/* Wide, provider-independent layout refinements. */
/* One primary-title scale, including pages with embedded and mobile overrides. */
body[data-route] #main-content h1 {
  font-size: clamp(30px, 3.3vw, 46px) !important;
  line-height: 1.14;
  text-wrap: balance;
}

body[data-kind="article"] main section:not([class*="hero"]),
body[data-kind="legal"] main section:not([class*="hero"]) {
  padding-left: max(34px, calc((100vw - 1480px) / 2)) !important;
  padding-right: max(34px, calc((100vw - 1480px) / 2)) !important;
}

main .cal-svc-wrap,
main .cal-check-wrap,
main .cal-guide-wrap,
main .cal-hybrid-wrap {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

main .cal-svc-hero,
main .cal-check-hero,
main .cal-guide-hero,
main .cal-hybrid-hero {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  padding: 78px max(34px, calc((100vw - 1480px) / 2)) !important;
  box-shadow: none !important;
}

main .cal-svc-section,
main .cal-check-section,
main .cal-guide-section,
main .cal-hybrid-section,
main .cal-svc-cta,
main .cal-check-cta,
main .cal-guide-cta,
main .cal-hybrid-cta,
main .cal-cta {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  padding: 62px max(34px, calc((100vw - 1480px) / 2)) !important;
  box-shadow: none !important;
}

.legal-copy { line-height: 1.75; }
.legal-copy h2 { margin-top: 2.2rem; font-size: clamp(1.35rem, 2vw, 1.8rem) !important; }
.legal-copy p { max-width: none; }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--ds-radius-l); padding: 22px; box-shadow: var(--ds-shadow-4); }
.video-card h2 { font-size: 22px !important; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--ds-radius-l); background: var(--ds-navy); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.site-hero-video iframe {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--ds-radius-l);
  background: var(--ds-navy);
  box-shadow: var(--ds-shadow-4);
}


/* Reference and blog indexes: compact, numbered cards across wide pages. */
#calibrum-medical-references > .cal-wrap,
#calibrum-non-medical-references > .cal-nm-wrap {
  width: 100% !important;
  max-width: none !important;
}

.cal-reference-list,
.cal-nm-reference-list {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 18px !important;
}

.cal-reference,
.cal-nm-reference {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  height: 100% !important;
  padding: 20px !important;
  background: #fff !important;
}

.cal-rank,
.cal-nm-rank { display: flex !important; }

.cal-reference h3,
.cal-nm-reference h3 { font-size: 19px !important; }

.cal-reference > div:last-child,
.cal-nm-reference > div:last-child {
  min-width: 0;
}

.pricing-form-wrap { width: min(100%, 980px); margin: 0 auto; }

/* Principal visitor journey (home, method, services, live).
   Colour, surfaces and item styling come from design-system.css; these rules
   only set each page's section rhythm and column structure. */
.cal-page-kicker { display: block; margin-bottom: 10px; }

/* Home */
body[data-route="/"] .cal-home-hero { min-height: 0; }
body[data-route="/"] .cal-home-hero .site-hero-layout { width: 100%; }
body[data-route="/"] .site-hero-video { order: 0; }
body[data-route="/"] .cal-home-overview { padding: 40px var(--ds-gutter); border-bottom: 1px solid var(--ds-stroke-subtle); }
body[data-route="/"] .cal-home-overview p {
  max-width: 1120px;
  margin: 0;
  padding-left: 24px;
  border-left: 2px solid var(--ds-brand);
  color: var(--ds-fg1);
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.6;
}
body[data-route="/"] .cal-home-process .cal-home-grid-3 { position: relative; gap: 0 !important; margin-top: 0; }
body[data-route="/"] .cal-home-process .cal-home-card { position: relative; padding: 70px 34px 24px 0 !important; border-top: 0 !important; background: none !important; }
body[data-route="/"] .cal-home-process .cal-home-card::before {
  position: absolute; top: 0; left: 0; z-index: 1;
  display: grid; width: 44px; height: 44px; place-items: center;
  border: 1.5px solid var(--ds-brand); border-radius: 50%; background: var(--ds-bg-subtle); color: var(--ds-brand);
  font-family: var(--ds-font-display); font-size: 14px; font-weight: 700; box-shadow: 0 0 0 6px var(--ds-bg-subtle);
}
body[data-route="/"] .cal-home-process .cal-home-card:nth-child(1)::before { content: "01"; }
body[data-route="/"] .cal-home-process .cal-home-card:nth-child(2)::before { content: "02"; }
body[data-route="/"] .cal-home-process .cal-home-card:nth-child(3)::before { content: "03"; }
body[data-route="/"] .cal-home-process .cal-home-card::after {
  content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 1px; background: var(--ds-stroke-strong);
}
body[data-route="/"] .cal-home-evidence,
body[data-route="/"] .cal-home-beyond { background: var(--ds-navy) !important; color: #fff; }
body[data-route="/"] :is(.cal-home-evidence, .cal-home-beyond) :is(h2, h3) { color: #fff; }
body[data-route="/"] :is(.cal-home-evidence, .cal-home-beyond) .cal-home-intro { color: var(--ds-fg2-on-dark); }
body[data-route="/"] .cal-home-evidence .cal-home-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: stretch; }
body[data-route="/"] .cal-home-resources .cal-home-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* What is Delphi */
body[data-route^="/what-is-delphi"] .site-hero-layout { grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr); }
body[data-route^="/what-is-delphi"] .cal-delphi-intro .cal-intro:first-of-type { color: var(--ds-fg1); font-size: clamp(20px, 1.8vw, 25px); line-height: 1.45; }
body[data-route^="/what-is-delphi"] .cal-delphi-principles .cal-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; counter-reset: principle; }
body[data-route^="/what-is-delphi"] .cal-delphi-principles .cal-card { position: relative; padding-left: 64px !important; }
body[data-route^="/what-is-delphi"] .cal-delphi-principles .cal-card::before {
  counter-increment: principle; content: "0" counter(principle);
  position: absolute; top: 24px; left: 0;
  color: var(--ds-brand); font-family: var(--ds-font-display); font-size: 20px; font-weight: 700;
}
body[data-route^="/what-is-delphi"] .cal-delphi-modes { background: var(--ds-navy) !important; color: #fff; }
body[data-route^="/what-is-delphi"] .cal-delphi-modes h2 { color: #fff; }
body[data-route^="/what-is-delphi"] .cal-delphi-process .cal-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-route^="/what-is-delphi"] .cal-delphi-surveylet h2 { max-width: 600px; }

/* Delphi services */
body[data-route^="/delphi-services"] .cal-services-intro .cal-intro:first-of-type { font-size: 21px; color: var(--ds-fg1); }
body[data-route^="/delphi-services"] .cal-services-options .cal-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body[data-route^="/delphi-services"] .cal-services-options .cal-card:first-child { grid-column: 1 / -1; }
body[data-route^="/delphi-services"] .cal-services-options .cal-card .cal-actions { margin-top: 12px; }
body[data-route^="/delphi-services"] .cal-services-comparison { background: var(--ds-navy) !important; color: #fff; }
body[data-route^="/delphi-services"] .cal-services-comparison h2 { color: #fff; }
body[data-route^="/delphi-services"] .cal-services-comparison .cal-intro { color: var(--ds-fg2-on-dark); }
body[data-route^="/delphi-services"] .cal-services-comparison .cal-table-wrap { overflow: auto; background: #fff; }
body[data-route^="/delphi-services"] .cal-services-journey .cal-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body[data-route^="/delphi-services"] .cal-services-method { padding-bottom: 34px !important; }
body[data-route^="/delphi-services"] .cal-services-rand { padding-top: 34px !important; }

/* Live consensus */
body[data-route^="/live-consensus"] .cal-live-hero .site-hero-layout { grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr); }
body[data-route^="/live-consensus"] .cal-live-process,
body[data-route^="/live-consensus"] .cal-live-example { background: var(--ds-navy) !important; color: #fff; }
body[data-route^="/live-consensus"] :is(.cal-live-process, .cal-live-example) h2 { color: #fff; }
body[data-route^="/live-consensus"] :is(.cal-live-process, .cal-live-example) .cal-live-intro { color: var(--ds-fg2-on-dark); }
body[data-route^="/live-consensus"] .cal-live-process .cal-live-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body[data-route^="/live-consensus"] .cal-live-example { padding-top: 74px !important; padding-bottom: 74px !important; }
body[data-route^="/live-consensus"] .cal-live-example .cal-live-intro { max-width: 1100px; font-size: 21px; }

@media (max-width: 1050px) {
  body[data-route^="/what-is-delphi"] .site-hero-layout,
  body[data-route^="/live-consensus"] .cal-live-hero .site-hero-layout { grid-template-columns: 1fr .85fr; }
  body[data-route^="/what-is-delphi"] .cal-delphi-process .cal-steps,
  body[data-route^="/delphi-services"] .cal-services-journey .cal-steps,
  body[data-route^="/live-consensus"] .cal-live-process .cal-live-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body[data-route^="/what-is-delphi"] .site-hero-layout,
  body[data-route^="/live-consensus"] .cal-live-hero .site-hero-layout { grid-template-columns: 1fr; }
  body[data-route="/"] .cal-home-process .cal-home-card::after { display: none; }
  body[data-route="/"] .cal-home-process .cal-home-grid-3,
  body[data-route="/"] .cal-home-evidence .cal-home-grid-3 { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  body[data-route="/"] .cal-home-resources .cal-home-grid-4,
  body[data-route^="/what-is-delphi"] .cal-delphi-principles .cal-grid-3,
  body[data-route^="/what-is-delphi"] .cal-delphi-process .cal-steps,
  body[data-route^="/delphi-services"] .cal-services-options .cal-grid-3,
  body[data-route^="/delphi-services"] .cal-services-journey .cal-steps,
  body[data-route^="/live-consensus"] .cal-live-process .cal-live-steps { grid-template-columns: 1fr !important; }
  body[data-route^="/delphi-services"] .cal-services-options .cal-card:first-child { grid-column: auto; }
}

/* Page-wide viewer for the large informational images. */
.site-hero-art.has-enlargeable-image { position: relative; }
.site-hero-art.has-enlargeable-image::after {
  content: "Click to enlarge";
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(14, 47, 79, .9);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}
.cal-enlargeable-image { cursor: zoom-in; }
.cal-enlargeable-image:focus-visible { outline: 4px solid var(--ds-brand-on-dark); outline-offset: 5px; }
.cal-image-viewer[hidden] { display: none !important; }
.cal-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 18, 31, .94);
  overflow: auto;
}
.cal-image-viewer__panel {
  width: min(96vw, 1800px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cal-image-viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
}
.cal-image-viewer__caption { font-weight: 800; }
.cal-image-viewer__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.cal-image-viewer__link,
.cal-image-viewer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: #fff;
  color: var(--ds-navy) !important;
  font: inherit;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}
.cal-image-viewer__image {
  display: block;
  max-width: 100%;
  max-height: calc(96vh - 66px);
  margin: auto;
  object-fit: contain;
  border-radius: var(--ds-radius-l);
  background: #fff;
  box-shadow: var(--ds-shadow-4);
}
.cal-image-viewer-open { overflow: hidden; }

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: 1fr; }
  .cal-reference-list, .cal-nm-reference-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 700px) {
  .cal-reference-list, .cal-nm-reference-list { grid-template-columns: 1fr !important; }
}

@media (max-width: 620px) {
  main .cal-svc-hero, main .cal-check-hero, main .cal-guide-hero, main .cal-hybrid-hero { padding: 48px 20px !important; }
  main .cal-svc-section, main .cal-check-section, main .cal-guide-section, main .cal-hybrid-section,
  main .cal-svc-cta, main .cal-check-cta, main .cal-guide-cta, main .cal-hybrid-cta, main .cal-cta { padding: 44px 20px !important; }
  .cal-image-viewer { padding: 12px; }
  .cal-image-viewer__toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cal-image-viewer__image { max-height: calc(96vh - 116px); }
  .site-hero-video iframe { border-radius: var(--ds-radius-l); }
}

/* Accessible inquiry field validation. */
.contact-form .form-field [aria-invalid="true"] { border:2px solid #b42318; }
.contact-form .form-field [aria-invalid="true"]:focus { outline:3px solid #fecdca; outline-offset:2px; border-color:#b42318; }
.contact-form .field-error { color:#b42318; font-size:13px; line-height:1.5; font-weight:600; }
.contact-form .field-error[hidden] { display:none; }
.contact-form .form-status[data-state="error"] { background:#fef3f2; color:#b42318; }

