/*
 * Base Template CSS
 *
 * Shared defaults for all templates. Individual templates extend/override these.
 * Uses CSS custom properties that can be overridden by:
 * 1. Template-specific CSS
 * 2. Tenant color/font settings via inline styles
 */

:root {
  /* === Color System === */
  /* Primary colors - main brand color */
  --color-primary: #3b82f6;
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;

  /* Secondary colors */
  --color-secondary: #64748b;
  --color-secondary-500: #64748b;
  --color-secondary-600: #475569;

  /* Extended palette */
  --color-subdued: #6b7280;
  --color-link: #2563eb;
  --color-page-bg: #f9fafb;
  --color-container-bg: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;

  /* === Typography === */
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;
  --line-height-heading: 1.3;

  /* === Spacing === */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* === Layout === */
  --container-max-width: 90rem; /* 1440px — single source of truth for every template */
  --container-padding: 1rem;
  --header-height: 4.5rem;
  --section-spacing: 4rem;

  /* === Logo === */
  /* Single source of truth for header logo height. Overridden inline by the
     site renderer / preview based on the tenant's logo_size setting. */
  --logo-height: 56px;

  /* === Effects === */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* === Base Styles === */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-page-bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  color: var(--color-text);
  margin-top: 0;
}

h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: var(--spacing-lg); }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: var(--spacing-md); }
h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--spacing-sm); }
h5 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--spacing-sm); }
h6 { font-size: 1rem; font-weight: 600; margin-bottom: var(--spacing-sm); }

/* Default emphasis treatment in headlines: italic + brand-primary colour.
   Templates that want a different treatment (gradient clip, etc.) override
   this rule in their own stylesheet. */
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--color-primary);
}

p {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

/* === Utility Classes === */
.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

/* Default gap between the optional "from" prefix and the price.
   Templates can override .services-menu li .svc-price small to taste. */
.services-menu li .svc-price small {
  margin-right: 0.35em;
}

/* Banner — container-width image on a coloured panel (defaults to page bg). */
.section-banner {
  background: var(--color-page-bg);
}
.section-banner .banner-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}

/* Editorial — image + headline/body split, image-left or image-right.
   Body content comes from a rich-text editor (TipTap), so we style the
   nested elements (h2, p, ol/ul/li) generically and let templates layer
   their own typography on top. */
.section-editorial {
  background: var(--color-page-bg);
}
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.editorial-grid.image-right .editorial-image { order: 2; }
.editorial-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  object-fit: cover;
  aspect-ratio: 4/5; /* default: medium */
}
/* Size variants — adjust HEIGHT via aspect-ratio; width always fills the
   grid column. Smaller ratio number = taller image. */
.editorial-image.size-small img  { aspect-ratio: 5/4; }
.editorial-image.size-medium img { aspect-ratio: 4/5; }
.editorial-image.size-large img  { aspect-ratio: 3/4; }
.editorial-content .eyebrow {
  margin-bottom: 12px;
}
.editorial-content h2 {
  margin: 0 0 16px;
  line-height: var(--line-height-heading);
}
.editorial-content h2 em {
  font-style: italic;
  color: var(--color-secondary);
  font-weight: inherit;
}
.editorial-body p {
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.editorial-body ol,
.editorial-body ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  counter-reset: editorial-list;
}
.editorial-body li {
  counter-increment: editorial-list;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
}
/* TipTap wraps each <li>'s content in a <p>. Without this override, the
   <p>'s 20px bottom margin makes the flex child taller than its visible
   text, so align-items:center mis-centres the marker. Zero the margin
   and make the paragraph's box hug the text so the lower-alpha circle
   sits true to the centre — including when the text wraps. */
.editorial-body li > p {
  margin: 0;
  flex: 1;
}
.editorial-body li:last-child {
  border-bottom: 1px solid var(--color-border);
}
.editorial-body ol li::before,
.editorial-body ul li::before {
  content: counter(editorial-list, lower-alpha);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 14px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .editorial-grid.image-right .editorial-image { order: 0; }
}

.card {
  background-color: var(--color-container-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-600);
  opacity: 1;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--color-secondary-600);
  opacity: 1;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
  opacity: 1;
}

/* === Form Elements === */
.input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  background-color: var(--color-container-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.label {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

/* === Logo === */
/* All templates render the header logo through this rule. Per-template
   styles must NOT override max-height — set --logo-height instead. */
.logo-area img {
  height: var(--logo-height);
  max-height: var(--logo-height);
  width: auto;
  display: block;
}

/* === Header inner ===
   Templates own the .site-header band (bg, border, sticky, vertical
   padding). The inner wrapper centres header content to the same
   container max-width as the rest of the page so the logo / nav / CTA
   line up with the page columns instead of running edge-to-edge. */
.site-header-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ============================================================
 * Section layout helpers
 *
 * Used by the homepage sample / block palette / preview iframe / live
 * customer site. Templates own colour & typography; these rules only
 * declare the layout primitives (grid columns, image aspect ratios, map
 * placement) so a hero, stats row, visit grid etc. lays out the same
 * way wherever it renders.
 * ============================================================ */

.section-inner { max-width: var(--container-max-width); margin: 0 auto; padding: 0 40px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 32px;
}
/* When the hero is text-only (image toggled off or no URL), drop to a
   single full-width column and centre the copy by default. Templates
   can override either the layout or the alignment if they want a
   different no-image look. */
.hero-grid.no-image {
  grid-template-columns: 1fr;
  text-align: center;
}
.hero-grid.no-image .hero-copy h1,
.hero-grid.no-image .hero-copy p {
  margin-left: auto;
  margin-right: auto;
}
.hero-copy h1 { margin: 0 0 20px; }
.hero-media {
  aspect-ratio: 5/4; /* default: medium */
  width: 100%;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 14px;
  display: block;
}
/* Size variants — adjust HEIGHT via aspect-ratio; width always fills the
   grid column. Smaller ratio number = taller image. */
.hero-media.size-small  { aspect-ratio: 4/3; }
.hero-media.size-medium { aspect-ratio: 5/4; }
.hero-media.size-large  { aspect-ratio: 4/5; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 24px 0 40px;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 18%, transparent);
}
.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.1;
  color: inherit;
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: inherit;
  opacity: 0.6;
}

.booking-inline { padding: 0 0 64px; }
.booking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.booking-head h3 { margin: 0; }
.booking-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-subdued);
}
.booking-badge::before {
  content: "✓";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #15803D;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.booking-fields {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
/* Normalise label spacing so per-template vertical-stack rules
   (which typically add a big top margin) don't break our horizontal grid. */
.booking-fields .booking-field > label {
  display: block;
  margin: 0 0 8px;
}
.booking-fields .cta-button,
.booking-fields .btn {
  /* Sit on the same baseline as the select / input row instead of
     stretching the full label+control height — without this the button
     reads as a tall block reaching up to where the field labels start. */
  align-self: end;
  height: 44px;
  white-space: nowrap;
}
.booking-helper {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--color-subdued);
}

/* ============================================================
 * Date picker — react-day-picker calendar, popped from the booking
 * teaser's Date field. Field trigger mirrors the look of the
 * `.booking-widget select / input` per-template rules so the three
 * controls (Service / Location / Date) read as a single row.
 * ============================================================ */
.datepicker-field { position: relative; }
.datepicker-trigger {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--color-container-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.datepicker-trigger:hover:not(:disabled) {
  border-color: color-mix(in srgb, currentColor 28%, transparent);
}
.datepicker-trigger:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.datepicker-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.datepicker-trigger svg {
  flex: 0 0 auto;
  color: color-mix(in srgb, currentColor 60%, transparent);
}
.datepicker-placeholder { color: color-mix(in srgb, currentColor 50%, transparent); }
.datepicker-value { color: var(--color-text); font-variant-numeric: tabular-nums; }
.datepicker-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  background: var(--color-container-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 24px 48px -16px rgba(20, 30, 28, 0.28);
  padding: 4px 8px 8px;
}

/* Re-skin react-day-picker (v9) so it matches the surrounding template
   palette without the library's default purple. The library uses CSS
   custom properties prefixed `--rdp-*`. */
.datepicker-popover .rdp-root {
  --rdp-accent-color: var(--color-primary);
  --rdp-accent-background-color: color-mix(in srgb, var(--color-primary) 14%, transparent);
  --rdp-day-height: 36px;
  --rdp-day-width: 36px;
  --rdp-day_button-height: 32px;
  --rdp-day_button-width: 32px;
  --rdp-day_button-border-radius: 999px;
  --rdp-selected-border: 0;
  --rdp-disabled-opacity: 0.35;
  --rdp-outside-opacity: 0.4;
  font-family: var(--font-body);
  color: var(--color-text);
}
.datepicker-popover .rdp-caption_label,
.datepicker-popover .rdp-month_caption {
  font-family: var(--font-heading);
  font-weight: 500;
}
.datepicker-popover .rdp-button_previous,
.datepicker-popover .rdp-button_next {
  border-radius: 999px;
}
.datepicker-popover .rdp-button_previous:hover:not([disabled]),
.datepicker-popover .rdp-button_next:hover:not([disabled]) {
  background: color-mix(in srgb, currentColor 6%, transparent);
}
.datepicker-popover .rdp-day_button:hover:not([disabled]) {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}
.datepicker-popover .rdp-selected .rdp-day_button {
  background: var(--color-primary);
  color: #fff;
}
.datepicker-popover .rdp-today:not(.rdp-selected) .rdp-day_button {
  color: var(--color-primary);
  font-weight: 600;
}

.about-photo {
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 14px;
  margin-top: 48px;
  display: block;
}

.clinicians-head,
.visit-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 40px;
}
.clinicians-head h2,
.visit-head h2 { margin: 12px 0 8px; }
.clinicians-lede,
.visit-head-lede {
  max-width: 52ch;
  color: inherit;
  opacity: 0.7;
  margin: 0;
}
@media (max-width: 720px) {
  .clinicians-head,
  .visit-head { grid-template-columns: 1fr; align-items: stretch; }
}
.clinicians-link {
  color: inherit;
  font-size: 14px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.85;
  align-self: end;
}
.clinicians-link:hover { opacity: 1; }

/* ============================================================
 * Header — mobile menu
 *
 * Templates own the desktop `.main-nav` look (typography, gap, hover).
 * Below 720px the nav collapses behind a hamburger toggle. Templates
 * can override `.mobile-menu-toggle` styling but the visibility logic
 * stays here so every template gets the behaviour for free.
 * ============================================================ */
.mobile-menu-toggle {
  display: none;
  /* Stacks the three bars (::before, span, ::after) vertically. Without
     `flex-direction: column` the inline-flex below puts them side-by-side
     and the toggle reads as `─ ─ ─` instead of three stacked lines. */
  flex-direction: column;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-toggle::before,
.mobile-menu-toggle::after,
.mobile-menu-toggle span {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.mobile-menu-toggle::before { margin-bottom: 5px; }
.mobile-menu-toggle::after  { margin-top: 5px; }
.mobile-menu-toggle[aria-expanded="true"]::before {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] span { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"]::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* CTA placement modifiers — `--desktop` sits outside the nav (sibling
   of logo/nav/toggle), `--mobile` sits inside the nav and only appears
   when the mobile menu is open. Doubled-up `.cta-button.cta-button--*`
   selectors bump specificity (0,2,0) past per-template
   `.btn, .cta-button { display: inline-flex; }` rules (0,1,0) that
   would otherwise win on source order and bleed both buttons through. */
.cta-button.cta-button--mobile { display: none; }

/* ============================================================
 * Patient-login pill — outlined sibling of the primary Book-now CTA.
 * Same desktop/mobile placement modifiers as `.cta-button` so the pair
 * collapses into the mobile drawer together. Templates can override the
 * border colour / surface but the default reads as a quiet outline next
 * to the filled CTA.
 * ============================================================ */
.patient-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font: 500 14px var(--font-body);
  background: transparent;
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
  white-space: nowrap;
}
.patient-login:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  opacity: 1;
}
.patient-login svg { flex: 0 0 auto; }
.patient-login.patient-login--mobile { display: none; }
/* Same specificity hoist as `.main-nav a.cta-button` — when a Patient-
   login lives inside the nav, the template's `.main-nav a` colour rule
   would win on specificity and tint the pill text, breaking the muted
   look. Re-assert the resting / hover colours under the nav scope. */
.main-nav a.patient-login { color: var(--color-text); }
.main-nav a.patient-login:hover { color: var(--color-primary); }

/* Right-side action cluster — Patient-login pill + primary Book-now CTA
   sit in this container so they stay grouped on the right of the header
   and collapse together into the mobile drawer. */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* When the CTA renders inside `.main-nav`, the template's
   `.main-nav a { color: inherit }` rule outranks `.cta-button` on
   specificity (0,1,1 vs 0,1,0) and the button text inherits the nav's
   surface colour — usually a dark grey that disappears against the
   primary-coloured button. Re-assert white on the `<a>.cta-button`
   selector (specificity 0,2,1) so the CTA stays readable. Templates
   with dark CTA text can override per-template. */
.main-nav a.cta-button { color: #fff; }

/* Footer social row — sits above the copyright line in `.footer-bottom`.
   Templates already style `.footer-bottom` colours / typography; the
   row itself just needs sensible default spacing. */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
}
.footer-social a { color: inherit; opacity: 0.8; }
.footer-social a:hover { opacity: 1; }

/* When there's only one (or zero) top-level page, the menu is hidden
   entirely — the logo carries the navigation. The toggle button is also
   suppressed in TemplateHeader for the same case. */
.main-nav.is-hidden { display: none; }

/* Submenus — one level deep. Desktop: hover-revealed dropdown anchored
   under the parent, centred so it reads as belonging to that item. A
   transparent ::before bridges the visual gap so the dropdown doesn't
   snap shut while the cursor traverses it. Mobile: stays inline in the
   column, indented under the parent.
   Styling tracks the Linden Medical mockup — generous padding, soft
   shadow, and an item-level hover surface with a 4px corner radius so
   each link gets a quiet "chip" treatment. Templates can re-tint the
   item hover background via `.nav-submenu a:hover { background: … }`. */
.nav-item--has-children {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-item--has-children .nav-item-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* SVG caret — rotates 180° when the dropdown is open / focused. */
.nav-caret {
  opacity: 0.7;
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-item--has-children:hover > .nav-item-link .nav-caret,
.nav-item--has-children:focus-within > .nav-item-link .nav-caret {
  opacity: 1;
  transform: rotate(180deg);
}
.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 10px 12px;
  background: var(--color-container-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -18px rgba(20, 30, 28, 0.18);
  z-index: 50;
}
/* Hover bridge — fills the 14px visual gap between parent and dropdown. */
.nav-submenu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.nav-submenu a {
  display: block;
  padding: 10px 20px;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: var(--color-text);
  transition: background-color 120ms ease, color 120ms ease;
}
.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-primary);
}
.nav-item--has-children:hover > .nav-submenu,
.nav-item--has-children:focus-within > .nav-submenu {
  display: block;
}

@media (max-width: 800px) {
  .mobile-menu-toggle { display: inline-flex; }
  .site-header-inner .main-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    background: var(--color-container-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    gap: 12px;
  }
  .site-header-inner .main-nav.is-open { display: flex; }
  .site-header { position: relative; }
  .cta-button.cta-button--desktop,
  .patient-login.patient-login--desktop,
  .header-actions { display: none; }
  .main-nav.is-open .cta-button.cta-button--mobile,
  .main-nav.is-open .patient-login.patient-login--mobile {
    display: inline-flex;
    align-self: stretch;
    justify-content: center;
  }
  /* On mobile submenus inline rather than float, indented under the
     parent so the hierarchy reads. */
  .nav-item--has-children {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-submenu {
    display: block;
    position: static;
    min-width: 0;
    padding: 4px 0 8px 16px;
    margin-top: 4px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav-submenu a { padding: 6px 0; }
}

/* ============================================================
 * Team — carousel modifier + headshot placeholder
 *
 * `.team-grid` is owned per-template (display, gap, columns, hover,
 * photo aspect, typography). For clinics with more than ~4 clinicians
 * the live site swaps the multi-row grid for a horizontal scroll-snap
 * row by adding the `--carousel` modifier *to the same element*. That
 * way every per-template `.team-grid .card *` rule (heading font, role
 * colour, bio spacing, card-foot) still matches — only the parent's
 * grid track shape changes. The compound selector beats the bare
 * `.team-grid` rule on specificity so this wins regardless of which
 * order base.css and the template stylesheet are linked in.
 * ============================================================ */
/* Paged carousel — a flex track wide enough for N pages, where each
   page is a CSS grid showing `--carousel-visible` cards. Translating
   the track by N * 100% slides the next page into view in a single
   transition. Driven entirely by JS state (no scrollbar); chrome
   (counter + prev/next + Full team link) sits in the section head
   row, pagination dots below the carousel. Implements the design at
   sites/public/templates/preview docs. */
.team-grid.team-grid--carousel {
  --carousel-gap: 24px;
  --carousel-visible: 4;
  display: block;
  grid-template-columns: none;
  overflow: hidden;
  padding: 4px 0 0;
}
@media (max-width: 1100px) { .team-grid.team-grid--carousel { --carousel-visible: 2; } }
@media (max-width: 540px)  { .team-grid.team-grid--carousel { --carousel-visible: 1; } }

.team-track {
  display: flex;
  width: 100%;
  transition: transform 480ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.team-page {
  flex: 0 0 100%;
  display: grid;
  gap: var(--carousel-gap);
  grid-template-columns: repeat(var(--carousel-visible), minmax(0, 1fr));
}

/* Pager chrome — counter + prev/next + Full team link sit on the
   right of the .clinicians-head row when in carousel mode. */
.team-pager {
  display: flex;
  align-items: center;
  gap: 20px;
  font-variant-numeric: tabular-nums;
}
.team-pager-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 15px;
  color: color-mix(in srgb, currentColor 60%, transparent);
}
.team-pager-counter-current { color: currentColor; font-weight: 500; }
.team-pager-nav { display: flex; gap: 8px; }
.team-pager-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: var(--color-container-bg);
  color: currentColor;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 120ms ease, color 120ms ease;
}
.team-pager-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.team-pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.team-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.team-dot {
  appearance: none;
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  cursor: pointer;
  padding: 0;
  transition: background 160ms ease, width 160ms ease;
}
.team-dot:hover { background: color-mix(in srgb, currentColor 35%, transparent); }
.team-dot.is-active {
  background: var(--color-primary);
  width: 44px;
}

@media (max-width: 720px) {
  /* On narrow viewports the pager chrome stacks under the heading
     instead of sitting beside it — breaks at the same breakpoint as
     the .clinicians-head grid. */
  .team-pager { width: 100%; justify-content: space-between; }
}

/* Headshot placeholder — when an HCP has no `photo_url`. Sized to the
   same 3:4 frame templates declare for `.team-grid .card img`. We
   override `display` (templates set `display: block` on `img,.avatar`,
   not on this class) so the monogram centres, and tint the background
   with the inherited primary colour so it reads as part of the brand
   rather than a stock greyscale fallback. */
.team-grid .card .headshot-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-primary, currentColor) 14%, transparent),
      color-mix(in srgb, var(--color-primary, currentColor) 6%, transparent)
    );
  color: var(--color-primary, currentColor);
  margin: 0;
}
.team-grid .card .headshot-placeholder .headshot-initials {
  font-family: var(--font-heading, inherit);
  font-size: clamp(40px, 18%, 88px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0.75;
}

@media (max-width: 720px) {
  .team-grid.team-grid--carousel { grid-auto-columns: 78vw; }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Visit section — directions card + Google Map */
.visit-lede {
  max-width: 52ch;
  color: inherit;
  opacity: 0.72;
  margin: 0 0 40px;
}
/* Single combined panel — card on the left, map on the right, sharing
   one rounded border. Matches the design mockup where the visit-card
   and map sit inside one container rather than as two siblings with a
   gap. */
.visit-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 1.3fr;
  gap: 0;
  align-items: stretch;
  min-height: 540px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-container-bg);
}
.visit-card,
.visit-grid .visit-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* The combined panel owns border + radius; the inner card surface
     drops its own so the two halves read as one container. Scoped
     under .visit-grid bumps specificity past template-level .card
     rules that would otherwise re-introduce rounded corners. */
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.visit-photo {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  background: color-mix(in srgb, currentColor 6%, transparent);
}
.location-loading {
  width: 100%;
  min-height: 240px;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, currentColor 4%, transparent) 30%,
    color-mix(in srgb, currentColor 10%, transparent) 50%,
    color-mix(in srgb, currentColor 4%, transparent) 70%
  );
  background-size: 200% 100%;
  animation: location-loading-shimmer 1.4s ease-in-out infinite;
  border-radius: 14px;
}
@keyframes location-loading-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Location switcher — replaces the plain <select> when a tenant has
   multiple clinics. Renders as a card-style button with a "Viewing
   location" eyebrow + the current name; clicking opens a custom menu
   with per-location address sub-text and a check-mark on the active
   row. Mirrors the design from sections.jsx in the design handoff. */
.loc-switcher { position: relative; min-width: 320px; }
.loc-switcher-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--color-container-bg);
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: currentColor;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.loc-switcher-btn:hover { border-color: color-mix(in srgb, currentColor 30%, transparent); }
.loc-switcher-btn.is-open {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}
.loc-switcher-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loc-switcher-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 55%, transparent);
}
.loc-switcher-title { font-size: 16px; font-weight: 500; color: currentColor; }
.loc-switcher-caret {
  flex: 0 0 auto;
  color: color-mix(in srgb, currentColor 60%, transparent);
  transition: transform 160ms ease;
}
.loc-switcher-btn.is-open .loc-switcher-caret { transform: rotate(180deg); }
.loc-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--color-container-bg);
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: var(--border-radius-md);
  box-shadow: 0 18px 40px -16px rgba(20, 30, 28, 0.22);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loc-switcher-item {
  position: relative;
  padding: 10px 36px 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: transparent;
  border: 0;
  color: currentColor;
  text-align: left;
  font: inherit;
}
.loc-switcher-item:hover { background: color-mix(in srgb, currentColor 4%, transparent); }
.loc-switcher-item.is-active { background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.loc-switcher-item-title { font-size: 15px; font-weight: 500; color: currentColor; }
.loc-switcher-item-sub { font-size: 13px; color: color-mix(in srgb, currentColor 55%, transparent); }
.loc-switcher-tick {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--color-primary);
}

@media (max-width: 720px) {
  .loc-switcher { min-width: 0; width: 100%; }
}
.visit-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.visit-body h3 { margin: 8px 0 4px; }
.visit-address {
  font-style: normal;
  color: inherit;
  opacity: 0.8;
  line-height: 1.6;
  margin: 0 0 8px;
}
.visit-subhead { margin: 12px 0 -4px; }
.visit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.visit-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 14px;
}
.visit-list li span:first-child { color: inherit; opacity: 0.75; }
.visit-list li span:last-child { color: inherit; font-weight: 500; white-space: nowrap; }
.visit-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #15803D !important;
}
.visit-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
}
.visit-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.visit-map-wrap,
.visit-grid .visit-map-wrap {
  position: relative;
  /* Border-radius lives on the parent .visit-grid now (merged panel
     design) — keep the inner map flat against the left edge. Scoped
     selector beats template-level rules that round corners. */
  border-radius: 0;
  overflow: hidden;
  background: var(--color-container-bg);
  min-height: 540px;
}
.visit-map {
  position: absolute;
  inset: 0;
}
.visit-map-fallback {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: inherit;
  opacity: 0.6;
  font-size: 13px;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.02)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 24px),
    var(--color-container-bg);
}
.visit-map-fallback code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
}
.visit-map-fallback { display: none; }
.visit-map-wrap[data-map-state="no-key"] .visit-map-fallback[data-state="no-key"],
.visit-map-wrap[data-map-state="loading"] .visit-map-fallback[data-state="loading"],
.visit-map-wrap[data-map-state="auth-failure"] .visit-map-fallback[data-state="auth-failure"],
.visit-map-wrap[data-map-state="script-error"] .visit-map-fallback[data-state="script-error"] {
  display: flex;
}
.visit-map-wrap[data-map-state="ready"] .visit-map-fallback { display: none; }

@media (max-width: 960px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map-wrap { min-height: 360px; }
}
@media (max-width: 1040px) {
  .booking-fields {
    grid-template-columns: 1fr 1fr;
  }
  .booking-fields .cta-button,
  .booking-fields .btn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 820px) {
  .section-inner { padding: 0 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 32px 0; }
  .stats-row { grid-template-columns: 1fr; gap: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .booking-fields { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .clinicians-head { grid-template-columns: 1fr; }
}

/* ============================================================
 * New section blocks — geometry only.
 *
 * Templates own colour, typography and chrome. The rules below establish
 * grid columns, spacing, borders, and the relative layout of bits within
 * each block, using `--color-*` tokens so each template's palette flows
 * through automatically.
 * ============================================================ */

/* ── Stats bar ──────────────────────────────────────────────────
   Tight 4-up proof figures, vertical hairline dividers between cells.
   Sits as a band — top and bottom hairline mark the row clearly so it
   reads as a stats bar, not a stats section. */
.section-stats {
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-container-bg);
}
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.stat-bar-cell {
  padding: 8px 32px;
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-bar-cell:first-child { border-left: 0; padding-left: 0; }
.stat-bar-value {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-bar-label {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
  margin-top: 8px;
}
.stat-bar-sub {
  font-size: 13.5px;
  color: var(--color-text-muted);
}
@media (max-width: 900px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat-bar-cell:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 540px) {
  .stats-bar { grid-template-columns: 1fr; row-gap: 24px; }
  .stat-bar-cell { border-left: 0; padding-left: 0; }
}

/* ── How it works ──────────────────────────────────────────────
   Three numbered steps in a row. Each step has a number, a hairline
   divider with a brand-coloured dot at the right edge (the "tick" that
   visually connects to the next step), title and body. */
.section-how {
  background: var(--color-page-bg);
}
.section-how .how-head {
  margin-bottom: 56px;
}
.section-how .how-head h2 {
  margin: 12px 0 8px;
  font-family: var(--font-heading);
}
.section-how .how-lede {
  max-width: 52ch;
  color: var(--color-text);
  opacity: 0.72;
  margin: 0;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.how-step {
  position: relative;
  padding: 0 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.how-step:last-child { padding-right: 0; }
.how-step-num {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 3.5vw, 3rem);
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.how-step-line {
  height: 1px;
  background: var(--color-border);
  width: 100%;
  position: relative;
  margin: 8px 0;
}
.how-step-line-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 7px;
  height: 7px;
  background: var(--color-primary);
  border-radius: 50%;
}
.how-step-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}
.how-step-body {
  color: var(--color-text);
  opacity: 0.72;
  font-size: 15.5px;
  margin: 0;
  max-width: 36ch;
}
@media (max-width: 900px) {
  .how-steps { grid-template-columns: 1fr; gap: 32px; }
  .how-step { padding-right: 0; }
}

/* ── Testimonials (single-card carousel) ────────────────────────
   One quote at a time on a card, optional star rating, dot pager. */
.section-testimonials {
  background: var(--color-page-bg);
}
.section-testimonials .testi-head { margin-bottom: 32px; }
.section-testimonials .testi-head h2 {
  margin: 12px 0 0;
  font-family: var(--font-heading);
}
.testi-card {
  margin: 0 auto;
  max-width: 920px;
  padding: 56px clamp(32px, 6vw, 72px);
  background: var(--color-container-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.testi-stars {
  display: flex;
  gap: 4px;
  color: var(--color-primary);
  font-size: 18px;
  letter-spacing: 2px;
}
.testi-star { opacity: 0.18; }
.testi-star.is-filled { opacity: 1; }
.testi-quote {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.01em;
  font-weight: 400;
}
.testi-mark {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 1.4em;
  line-height: 0;
  margin-right: 4px;
  vertical-align: -0.15em;
}
.testi-byline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
.testi-author { font-size: 15px; color: var(--color-text); font-weight: 500; }
.testi-meta { font-size: 13.5px; color: var(--color-text-muted); }
.testi-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.testi-dot {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: color-mix(in srgb, currentColor 18%, transparent);
  transition: background 160ms ease, transform 160ms ease;
}
.testi-dot:hover { background: color-mix(in srgb, currentColor 35%, transparent); }
.testi-dot.is-active {
  background: var(--color-primary);
  transform: scale(1.3);
}

/* ── Partners & accreditations ─────────────────────────────────
   Centred head + flex-wrap row of partner logos, then a 4-up grid of
   accreditation cells below a hairline divider. Logos are rendered as
   <img>; if no image is uploaded the partner name is shown as text via
   `.partner-logo-text` so the section still reads. */
.section-partners {
  background: var(--color-page-bg);
}
.section-partners .partners-head {
  text-align: center;
  margin-bottom: 24px;
}
.section-partners .partners-head .eyebrow { display: inline-block; margin-bottom: 8px; }
.section-partners .partners-head h2 { margin: 0 auto 12px; max-width: 36ch; }
.partners-lede {
  font-size: 16px;
  color: var(--color-text);
  opacity: 0.72;
  max-width: 48ch;
  margin: 12px auto 0;
}
.partners-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px 56px;
  padding: 24px 0 48px;
  border-bottom: 1px solid var(--color-border);
}
.partner-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  max-width: 180px;
}
.partner-logo img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* Logos look quietest when they're tonally consistent. Templates can
     opt out by overriding `.partner-logo img { filter: none }`. */
  filter: grayscale(1);
  opacity: 0.7;
  transition: opacity 160ms ease, filter 160ms ease;
}
.partner-logo img:hover {
  filter: grayscale(0);
  opacity: 1;
}
.partner-logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--color-text);
  letter-spacing: -0.01em;
  opacity: 0.78;
  white-space: nowrap;
}

.accred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.accred-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}
.accred-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-container-bg);
  overflow: hidden;
}
.accred-mark img {
  max-width: 64%;
  max-height: 64%;
  object-fit: contain;
  display: block;
}
.accred-abbr {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-align: center;
  line-height: 1.05;
  padding: 4px;
}
.accred-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.accred-label { font-size: 14.5px; color: var(--color-text); font-weight: 500; }
.accred-note { font-size: 13px; color: var(--color-text-muted); }
@media (max-width: 900px) {
  .accred-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .accred-grid { grid-template-columns: 1fr; }
}

/* ── Journal preview ────────────────────────────────────────────
   3-column editorial grid; first card spans wider as the featured
   lead. Cards lift on hover. */
.section-journal {
  background: var(--color-container-bg);
}
.journal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 40px;
}
.journal-head-text { max-width: 640px; }
.journal-head-text h2 { margin: 12px 0 8px; font-family: var(--font-heading); }
.journal-lede {
  margin: 0;
  font-size: 16px;
  color: var(--color-text);
  opacity: 0.72;
  max-width: 52ch;
}
.journal-all-link {
  font-size: 14px;
  color: var(--color-primary);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
  align-self: end;
}
.journal-all-link:hover { opacity: 1; }

.journal-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.journal-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease;
}
.journal-card:hover { transform: translateY(-3px); }
.journal-card:hover .journal-title { color: var(--color-primary); }
.journal-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--color-page-bg);
}
.journal-card.is-feature .journal-image { aspect-ratio: 5 / 4; }
.journal-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.journal-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.journal-tag {
  color: var(--color-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}
.journal-dot { color: color-mix(in srgb, currentColor 30%, transparent); }
.journal-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0;
  transition: color 160ms ease;
}
.journal-card.is-feature .journal-title { font-size: 1.875rem; }
.journal-excerpt {
  font-size: 15px;
  color: var(--color-text);
  opacity: 0.72;
  margin: 0;
  line-height: 1.5;
}
.journal-read { font-size: 13px; color: var(--color-text-muted); margin: 0; }

@media (max-width: 1080px) {
  .journal-grid { grid-template-columns: 1fr 1fr; }
  .journal-card.is-feature { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .journal-head { grid-template-columns: 1fr; }
  .journal-grid { grid-template-columns: 1fr; }
}

/* ── FAQ accordion ──────────────────────────────────────────────
   Two-column: heading on the left, expandable list on the right. The
   icon is two crossed bars; the vertical bar fades to zero when the
   item is open, leaving a minus. */
.section-faq {
  background: var(--color-page-bg);
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.faq-aside { position: sticky; top: 96px; }
.faq-aside .eyebrow { margin-bottom: 12px; display: inline-block; }
.faq-aside h2 {
  font-family: var(--font-heading);
  margin: 0 0 18px;
  letter-spacing: -0.015em;
}
.faq-lede {
  color: var(--color-text);
  opacity: 0.72;
  font-size: 16px;
  margin: 0;
  max-width: 36ch;
}
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.faq-q-text { flex: 1; }
.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}
.faq-icon-bar {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 1.6px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform 200ms ease, opacity 200ms ease;
}
.faq-icon-bar-v { transform: translateY(-50%) rotate(90deg); }
.faq-item.is-open .faq-icon-bar-v {
  transform: translateY(-50%) rotate(0);
  opacity: 0;
}
.faq-a {
  padding: 0 0 24px;
  color: var(--color-text);
  opacity: 0.85;
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
}
@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-aside { position: static; }
}

/* ── CTA banner ─────────────────────────────────────────────────
   Dark band that anchors the bottom of the page. Two CTAs at the right;
   primary fills, secondary is a ghost outline. Background defaults to
   the template's secondary (ink) shade so it sits in tone. */
.section-cta {
  background: var(--color-secondary, var(--color-text));
  color: #fff;
  padding: 96px 0;
}
.section-cta .container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.section-cta .cta-inner {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 48px;
  align-items: end;
}
.section-cta .cta-eyebrow {
  color: color-mix(in srgb, #fff 65%, transparent) !important;
  margin-bottom: 8px;
  display: inline-block;
}
.section-cta .cta-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 8px 0 16px;
  color: #fff;
  max-width: 18ch;
}
.section-cta .cta-headline em {
  font-style: italic;
  color: color-mix(in srgb, var(--color-primary) 70%, white 30%);
}
.section-cta .cta-sub {
  color: color-mix(in srgb, #fff 75%, transparent);
  font-size: 17px;
  max-width: 44ch;
  margin: 0;
}
.section-cta .cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.section-cta .cta-actions .btn,
.section-cta .cta-actions .cta-primary {
  background: #fff;
  color: var(--color-secondary, var(--color-text));
  border-color: #fff;
}
.section-cta .cta-actions .btn:hover,
.section-cta .cta-actions .cta-primary:hover {
  background: color-mix(in srgb, #fff 92%, transparent);
}
.section-cta .cta-ghost,
.section-cta .cta-actions .btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid color-mix(in srgb, #fff 30%, transparent);
}
.section-cta .cta-ghost:hover {
  background: color-mix(in srgb, #fff 8%, transparent);
  border-color: color-mix(in srgb, #fff 50%, transparent);
}
@media (max-width: 900px) {
  .section-cta { padding: 72px 0; }
  .section-cta .cta-inner { grid-template-columns: 1fr; align-items: start; }
}
