/* ==========================================================================
   Dr. Stephen Sharp — shared stylesheet (Concept A "Inscription")
   --------------------------------------------------------------------------
   One file for every page. Cascade layers keep specificity flat, so later
   layers win without !important or long selectors:
     reset → tokens → base → layout → components → utilities
   Units: html is 62.5%, so 1rem = 10px and 1.6rem = 16px. Every size token
   below is a multiple of 4px (0.4rem). Media queries use em, which are always
   based on the browser default (16px), not on the 62.5% root.
   Breakpoints: 48em (768px) tablet, 64em (1024px) desktop,
   84em (1344px) full header nav; 90em (1440px) four steps in a row.
   ========================================================================== */

@layer reset, tokens, base, layout, components, utilities;

/* --------------------------------------------------------------------------
   Fonts — self-hosted Latin subsets (no third-party requests, no FOIT)
   -------------------------------------------------------------------------- */
/* Variable fonts: one file per family covers every weight we use.
   The weight range is limited to the weights the design system allows. */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2-variations"),
       url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Martel (headings): self-hosted Latin subset. Headings only use Regular (400),
   so that is the only weight shipped. Add more files here if that changes. */
@font-face {
  font-family: "Martel";
  src: url("../fonts/martel-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}



/* --------------------------------------------------------------------------
   Reset — only what this site needs
   -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, svg, picture { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
}

/* --------------------------------------------------------------------------
   Tokens
   Tier 1: primitives (raw values). Tier 2: semantic roles used by components.
   Components only reference tier 2, so a rebrand touches tier 1 alone.
   -------------------------------------------------------------------------- */
@layer tokens {
  :root {
    color-scheme: light;

    /* Color primitives — warm palette only, no green or sage */
    --color-maroon-700: #7c1315;   /* primary */
    --color-maroon-900: #540405;   /* primary hover / darker */
    --color-ivory: #f6f1e8;
    --color-stone: #ece4d6;
    --color-sand: #d6ccbb;
    --color-charcoal: #2a2622;
    --color-umber-600: #4a433b;
    --color-umber-500: #5e564d;
    --color-rose-200: #e3b3ae;

    /* Color roles (default context: ivory page) */
    --surface-page: var(--color-ivory);
    --surface-alt: var(--color-stone);
    --surface-brand: var(--color-maroon-700);
    --surface-inverse: var(--color-charcoal);
    --border-default: var(--color-sand);
    --border-strong: var(--color-umber-500);   /* 3:1+ for UI boundaries */

    /* Context-aware roles: redefined by .theme-* classes below */
    --text: var(--color-charcoal);
    --text-muted: var(--color-umber-600);
    --text-accent: var(--color-maroon-700);
    --link: var(--color-maroon-700);
    --link-hover: var(--color-maroon-900);
    --action-bg: var(--color-maroon-700);
    --action-bg-hover: var(--color-maroon-900);
    --action-text: var(--color-ivory);
    --focus-ring: var(--color-maroon-700);
    --rule: var(--border-default);

    /* Font families */
    --font-display: "Martel", Garamond, "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

    /* Font weights — primitives (only these are shipped) */
    --weight-regular: 400;     /* Manrope: body */
    --weight-medium: 500;      /* Manrope: interface */
    --weight-semibold: 400;    /* Martel headings (Regular; the only weight shipped) */
    --weight-bold: 700;        /* Manrope only: labels, buttons, emphasis */

    /* Font-weight roles */
    --weight-heading: var(--weight-semibold);        /* h1, h2 */
    --weight-heading-small: var(--weight-semibold); /* h3 and below; holds up at small sizes */
    --weight-ui: var(--weight-medium);             /* nav and secondary interface text */
    --weight-label: var(--weight-bold);            /* eyebrows, buttons, action links */

    /* Font-size scale — 4px steps starting at 16px */
    --fs-16: 1.6rem;
    --fs-20: 2rem;
    --fs-24: 2.4rem;
    --fs-28: 2.8rem;
    --fs-32: 3.2rem;
    --fs-36: 3.6rem;
    --fs-40: 4rem;
    --fs-44: 4.4rem;
    --fs-48: 4.8rem;
    --fs-56: 5.6rem;
    --fs-64: 6.4rem;
    --fs-72: 7.2rem;

    /* Font-size roles (mobile values; desktop overrides below) */
    --text-label: var(--fs-16);     /* labels, captions, meta */
    --text-body: var(--fs-20);      /* running text — brief requires 18px+ */
    --text-lead: var(--fs-24);      /* intro paragraphs */
    --text-h4: var(--fs-24);        /* minor headings, e.g. footer column titles */
    --text-h3: var(--fs-28);
    --text-h2: var(--fs-36);
    --text-display: var(--fs-48);   /* page h1 */

    /* Line heights */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-body: 1.6;

    /* Spacing scale — 4px steps */
    --space-4: 0.4rem;
    --space-8: 0.8rem;
    --space-12: 1.2rem;
    --space-16: 1.6rem;
    --space-20: 2rem;
    --space-24: 2.4rem;
    --space-32: 3.2rem;
    --space-40: 4rem;
    --space-48: 4.8rem;
    --space-64: 6.4rem;
    --space-80: 8rem;
    --space-96: 9.6rem;
    --space-128: 12.8rem;

    /* Spacing roles */
    --gutter: var(--space-20);
    --section-pad: var(--space-64);

    /* Radius scale — 2px steps (restraint: buttons and cards only) */
    --radius-2: 0.2rem;
    --radius-4: 0.4rem;
    --radius-6: 0.6rem;
    --radius-8: 0.8rem;
    --radius-pill: 99.9rem;

    /* Sizing */
    --measure: 65ch;             /* max line length for running text */
    --container: 136rem;         /* 1360px: fits the one-row header at 1440px */
    --logo-height: 4.4rem;       /* mark alone on phones; full logo (332:75) from 48em */
    --tap-target: 4.4rem;        /* 44px — above WCAG 2.2 AA 24px minimum */
    --border-width: 0.1rem;
    --focus-width: 0.3rem;

    /* Elevation (dropdown only) */
    --shadow-raised: 0 1.2rem 3.2rem rgb(42 38 34 / 0.25);

    /* Motion */
    --duration-fast: 150ms;
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  @media (min-width: 48em) {
    :root { --logo-height: 5.6rem; }
  }

  @media (min-width: 64em) {
    :root {
      --gutter: var(--space-40);
      --section-pad: var(--space-96);
      --text-lead: var(--fs-28);
      --text-h3: var(--fs-32);
      --text-h2: var(--fs-56);
      --text-display: var(--fs-72);
    }
  }

  /* Color contexts — one class swaps every role for a dark or brand band */
  .theme-brand {
    --text: var(--color-ivory);
    --text-muted: var(--color-ivory);
    --text-accent: var(--color-rose-200);
    --link: var(--color-ivory);
    --link-hover: var(--color-rose-200);
    --action-bg: var(--color-ivory);
    --action-bg-hover: var(--color-stone);
    --action-text: var(--color-maroon-700);
    --focus-ring: var(--color-ivory);
    --rule: var(--color-rose-200);
    background-color: var(--surface-brand);
    color: var(--text);
  }
  .theme-inverse {
    --text: var(--color-ivory);
    --text-muted: var(--color-stone);
    --text-accent: var(--color-rose-200);
    --link: var(--color-rose-200);
    --link-hover: var(--color-ivory);
    --action-bg: var(--color-ivory);
    --action-bg-hover: var(--color-stone);
    --action-text: var(--color-maroon-700);
    --focus-ring: var(--color-rose-200);
    --rule: var(--color-umber-500);
    background-color: var(--surface-inverse);
    color: var(--text);
  }
  .theme-alt {
    --callout-bg: var(--surface-page);
    background-color: var(--surface-alt);
  }
}

/* --------------------------------------------------------------------------
   Base — element defaults
   -------------------------------------------------------------------------- */
@layer base {
  html {
    font-size: 62.5%;            /* 1rem = 10px; still scales with user settings */
    scroll-behavior: smooth;
  }

  /* Headings share one rule; size is the only difference */
  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: var(--weight-heading);
    line-height: var(--leading-snug);
    text-wrap: balance;
    color: var(--text);
  }
  h1 { font-size: var(--text-display); line-height: var(--leading-tight); }
  h2 { font-size: var(--text-h2); line-height: var(--leading-tight); }
  h3 { font-weight: var(--weight-heading-small); }
  h3 { font-size: var(--text-h3); }

  p, li { max-width: var(--measure); text-wrap: pretty; }
  strong { font-weight: var(--weight-bold); }
  address { font-style: normal; }

  a {
    color: var(--link);
    text-decoration-thickness: var(--border-width);
    text-underline-offset: 0.25em;
    transition: color var(--duration-fast) var(--ease-out);
  }
  a:hover { color: var(--link-hover); text-decoration-thickness: 0.2rem; }

  /* One focus style for every interactive element, in every color context */
  :focus-visible {
    outline: var(--focus-width) solid var(--focus-ring);
    outline-offset: var(--focus-width);
    border-radius: var(--radius-2);
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* --------------------------------------------------------------------------
   Layout primitives — composable, used on every page
   -------------------------------------------------------------------------- */
@layer layout {
  .container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  }

  .section { padding-block: var(--section-pad); }

  /* Vertical rhythm: set --stack-gap to change spacing inside a stack */
  .stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--stack-gap, var(--space-24));
  }
  .stack--tight { --stack-gap: var(--space-8); }

  /* Horizontal group that wraps (buttons, links, chips) */
  .cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--cluster-gap, var(--space-16));
  }

  /* Auto-fitting card grid: set --grid-min for the narrowest column */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 28rem)), 1fr));
    gap: var(--grid-gap, var(--space-24));
  }

  .grid--narrow { --grid-min: 26rem; }
  .grid--wide { --grid-min: 30rem; }
  /* At most three columns: 5 items fall into 3 + 2 */
  .grid--3 { --grid-min: max(26rem, (100% - 2 * var(--space-24)) / 3); }

  /* Lists, grids and forms inside a stack take the full width */
  .stack > :is(.grid, .ticks, .steps, .faq, .contact-list) { align-self: stretch; }

  /* Two columns on desktop, stacked on phones */
  /* Columns align to the top; add .split--center where a photo sits beside text */
  .split {
    display: grid;
    gap: var(--space-40);
    align-items: start;
  }
  .split--center,
  .hero .split { align-items: center; }
  .split > * { min-width: 0; }
  @media (min-width: 64em) {
    .split { grid-template-columns: 1fr 1fr; gap: var(--space-80); }
    .split--wide-text { grid-template-columns: 7fr 5fr; }
  }
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */
@layer components {

  /* Site-wide notice above the header (pre-opening) */
  .site-banner {
    padding-block: var(--space-8);
    background-color: var(--color-maroon-900);
    color: var(--color-ivory);
    font-size: var(--text-label);
    font-weight: var(--weight-ui);
    line-height: var(--leading-snug);
  }
  .site-banner p { max-width: none; text-align: center;}

  /* Skip link — first focusable element on every page */
  .skip-link {
    position: absolute;
    left: var(--space-16);
    top: var(--space-16);
    z-index: 100;
    padding: var(--space-12) var(--space-20);
    background: var(--color-ivory);
    color: var(--color-maroon-700);
    font-weight: var(--weight-label);
    border-radius: var(--radius-4);
    transform: translateY(-200%);
  }
  .skip-link:focus { transform: none; }

  /* Small bold sentence-case label above headings (never all caps) */
  /* Three short rays before each label, drawn from the logo's sun */
  .eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-size: var(--text-label);
    font-weight: var(--weight-label);
    color: var(--text-accent);
    line-height: var(--leading-snug);
  }
  .eyebrow::before {
    content: "";
    flex-shrink: 0;
    width: var(--space-32);
    height: var(--space-12);
    background:
      linear-gradient(currentColor, currentColor) right top / var(--space-20) 0.2rem no-repeat,
      linear-gradient(currentColor, currentColor) right center / 100% 0.2rem no-repeat,
      linear-gradient(currentColor, currentColor) right bottom / var(--space-20) 0.2rem no-repeat;
  }

  .lead {
    font-size: var(--text-lead);
    line-height: var(--leading-snug);
    color: var(--text-muted);
  }

  .meta {
    font-size: var(--text-label);
    color: var(--text-muted);
  }

  /* Buttons — one base, one variant for the outline style */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-target);
    padding: var(--space-12) var(--space-24);
    border: var(--border-width) solid var(--action-bg);
    border-radius: var(--radius-4);
    background-color: var(--action-bg);
    color: var(--action-text);
    font-size: var(--fs-16);
    font-weight: var(--weight-label);
    line-height: var(--leading-snug);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
  }
  .btn:hover {
    background-color: var(--action-bg-hover);
    border-color: var(--action-bg-hover);
    color: var(--action-text);
    text-decoration: none;
  }
  .btn--outline {
    background-color: transparent;
    border-color: currentColor;
    color: var(--link);
  }
  .btn--outline:hover { background-color: var(--action-bg); border-color: var(--action-bg); }
  @media (min-width: 48em) { .btn { font-size: var(--fs-20); padding-inline: var(--space-32); } }

  /* Text link with arrow — for "read more" style paths */
  /* Inline so the arrow stays with the last word when the text wraps;
     padding keeps the target at 44px or taller */
  .link-arrow {
    display: inline-block;
    padding-block: var(--space-8);
    font-weight: var(--weight-label);
  }
  .link-arrow::after {
    content: "→";
    display: inline-block;
    margin-left: var(--space-8);
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .link-arrow:hover::after { transform: translateX(var(--space-4)); }

  /* ---------- Header ----------
     One row at every width. Order in the markup: logo, menu button, nav,
     phone, consultation button. Visual order is set with `order`.
       Phones:        mark, phone, menu button
       768px and up:  full logo, phone, menu button
       1024px and up: + consultation button
       1344px and up: full nav replaces the menu button
     The open menu drops below the row on smaller screens. */
  .site-header { position: relative; z-index: 10; }
  .site-header__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-12) var(--space-16);
    padding-block: var(--space-12);
  }
  .site-header__logo { flex-shrink: 0; display: block; }
  .site-header__logo img,
  .site-footer__logo { width: auto; height: var(--logo-height); }

  .site-header__call {
    order: 1;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target);
    white-space: nowrap;
    font-size: var(--fs-16);
    font-weight: var(--weight-label);
  }
  .site-header__cta { order: 2; display: none; font-size: var(--fs-16); white-space: nowrap; }

  .menu-toggle {
    order: 3;
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    min-height: var(--tap-target);
    padding: var(--space-8) var(--space-16);
    border: var(--border-width) solid currentColor;
    border-radius: var(--radius-4);
    background: transparent;
    font-size: var(--fs-16);
    font-weight: var(--weight-label);
    cursor: pointer;
  }
  .menu-toggle__icon,
  .menu-toggle__icon::before,
  .menu-toggle__icon::after {
    display: block;
    width: 1.6rem;
    height: 0.2rem;
    background: currentColor;
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .menu-toggle__icon { position: relative; }
  .menu-toggle__icon::before,
  .menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__icon::before { top: -0.5rem; }
  .menu-toggle__icon::after { top: 0.5rem; }
  [aria-expanded="true"] > .menu-toggle__icon { background: transparent; }
  [aria-expanded="true"] > .menu-toggle__icon::before { transform: translateY(0.5rem) rotate(45deg); }
  [aria-expanded="true"] > .menu-toggle__icon::after { transform: translateY(-0.5rem) rotate(-45deg); }

  .site-nav { order: 4; flex-basis: 100%; }
  .site-nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-block: var(--space-8) var(--space-16);
    border-top: var(--border-width) solid var(--rule);
  }
  .site-nav__list a {
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-height: var(--tap-target);
    text-decoration: none;
  }
  .site-nav__list a:not(.btn) { font-weight: var(--weight-ui); }
  .site-nav__list a:not(.btn):hover,
  .site-nav__list a[aria-current="page"] { text-decoration: underline; }
  .site-nav__cta { margin-top: var(--space-8); }

  /* "Who we help" dropdown: a disclosure button that shows a list of links.
     Phones and tablets: expands in place inside the menu. Desktop: a panel. */
  .nav-group__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    width: 100%;
    min-height: var(--tap-target);
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: var(--weight-ui);
    text-align: left;
    cursor: pointer;
  }
  .nav-group__toggle::after {
    content: "";
    width: 0.8rem;
    height: 0.8rem;
    border-right: 0.2rem solid currentColor;
    border-bottom: 0.2rem solid currentColor;
    transform: translateY(-0.2rem) rotate(45deg);
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .nav-group__toggle[aria-expanded="true"]::after { transform: translateY(0.2rem) rotate(-135deg); }
  .nav-group__toggle:hover,
  .nav-group__toggle.is-current { text-decoration: underline; }
  .nav-group__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: 0 0 var(--space-8) var(--space-20);
  }
  .nav-group__list[hidden] { display: none; }

  /* Without JS the menu stays open; JS sets data-menu to collapse it */
  .site-header[data-menu="closed"] .site-nav { display: none; }

  @media (min-width: 48em) {
    .site-header__bar { column-gap: var(--space-24); }
    .site-header__call { font-size: var(--fs-20); }
  }
  /* The consultation button moves out of the menu into the bar */
  @media (min-width: 64em) {
    .site-header__cta { display: inline-flex; }
    .site-nav__cta { display: none; }
  }
  @media (min-width: 84em) {
    .site-header__bar { flex-wrap: nowrap; column-gap: var(--space-20); }
    .site-header__cta { padding-inline: var(--space-20); }
    .menu-toggle { display: none; }
    .site-header[data-menu] .site-nav { display: block; }
    .site-nav { order: 0; flex-basis: auto; margin-left: auto; }
    .site-header__call { margin-left: 0; }
    .site-nav__list {
      flex-direction: row;
      align-items: center;
      gap: var(--space-20);
      padding: 0;
      border: 0;
    }
    .site-nav__list a,
    .nav-group__toggle { font-size: var(--fs-16); }
    .nav-group { position: relative; }
    .nav-group__toggle { width: auto; gap: var(--space-8); }
    .site-header[data-menu] .nav-group__list {
      position: absolute;
      top: calc(100% + var(--space-16));
      left: calc(var(--space-20) * -1);
      z-index: 20;
      min-width: 30rem;
      padding: var(--space-12) var(--space-20);
      border-radius: var(--radius-4);
      background-color: var(--color-maroon-900);
      box-shadow: var(--shadow-raised);
    }
  }

  /* ---------- Hero ---------- */
  .hero { padding-block: var(--space-48) var(--section-pad); }
  @media (min-width: 64em) { .hero { padding-top: var(--space-80); } }

  /* Closing band: a faint, oversized sun from the logo behind the text */
  .sun-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  .sun-band::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -6rem;
    bottom: -8rem;
    width: 32rem;
    aspect-ratio: 93 / 75;
    background: url("../img/mark-reversed.svg") center / contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
  }
  @media (min-width: 64em) {
    .sun-band::after { width: 56rem; right: 4%; bottom: -12rem; }
  }

  /* ---------- Image placeholder (swap for <picture> before launch) ---------- */
  .media-placeholder {
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--ratio, 4 / 3);
    padding: var(--space-20);
    border: var(--border-width) dashed var(--border-strong);
    border-radius: var(--radius-4);
    background-color: var(--surface-alt);
    color: var(--color-umber-600);
    font-size: var(--text-label);
  }
  /* ---------- Photos ----------
     Every photo uses its original, uncropped file. The frame sets the shape,
     and the image fills it. Framing is set per spot under "Photo framing" below. */
  .photo {
    display: block;
    overflow: hidden;
    aspect-ratio: var(--frame-ratio, auto);
    border-radius: var(--radius-4);
  }
  .photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--frame-focus, 50% 50%);
    transform: scale(var(--frame-zoom, 1));
    transform-origin: var(--frame-focus, 50% 50%);
  }
  /* The headshot source is 430px wide: cap heroes so it never scales past that */
  .photo--hero { width: 100%; max-width: 43rem; }
  .photo--circle { flex-shrink: 0; width: 12.8rem; border-radius: var(--radius-pill); }

  /* ---------- Photo framing: adjust each spot here ----------
     --frame-ratio  shape of the frame: 1 / 1 square, 4 / 5 portrait, 4 / 3 landscape
     --frame-focus  the point to keep in view: "50% 50%" is the center,
                    "50% 30%" moves the view up toward the top of the head
     --frame-zoom   1 shows the whole photo; 1.2 zooms in 20% around the focus point
     Zoom crops the edges, so raise it in small steps and check the chin and hair. */
  .frame-about      { --frame-ratio: 1 / 1; --frame-focus: 50% 50%; --frame-zoom: 1; }
  .frame-healthcare { --frame-ratio: 1 / 1; --frame-focus: 50% 40%; --frame-zoom: 1; }
  .frame-card       { --frame-ratio: 1 / 1; --frame-focus: 50% 40%; --frame-zoom: 1; }
  .frame-note       { --frame-ratio: 1 / 1; --frame-focus: 50% 40%; --frame-zoom: 1; }

  /* Small square image at the top of a path card */
  .card__media {
    width: 16rem;
    max-width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-4);
  }
  .card__media > * { height: 100%; }
  .card__media .media-placeholder {
    aspect-ratio: auto;
    padding: var(--space-12);
    border-radius: 0;
  }

  /* Round headshot beside a signed note: stacked on phones, side by side from 48em */
  .byline-photo {
    display: grid;
    gap: var(--space-24);
  }
  @media (min-width: 48em) {
    .byline-photo { grid-template-columns: auto 1fr; gap: var(--space-40); align-items: start; }
  }

  /* NeuralChek illustration: beats at uneven intervals over a breathing curve */
  .hrv { width: 100%; height: auto; overflow: visible; }
  .hrv path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .hrv__grid path { stroke: var(--border-default); stroke-width: 1; stroke-dasharray: 4 6; }
  .hrv__breath { stroke: var(--border-strong); stroke-width: 2; opacity: 0.5; }
  .hrv__gaps path { stroke: var(--border-strong); stroke-width: 1.5; }
  .hrv__pulse { stroke: var(--text-accent); stroke-width: 3; }
  .hrv__dots circle { fill: var(--text-accent); }

  /* ---------- Section heading block ---------- */
  .section-head { --stack-gap: var(--space-16); margin-bottom: var(--space-48); }

  /* ---------- Path cards (audience routes) ---------- */
  .card {
    --stack-gap: var(--space-16);
    padding: var(--space-32);
    background-color: var(--surface-page);
    border: var(--border-width) solid var(--border-default);
    border-top: 0.3rem solid var(--surface-brand);
    border-radius: var(--radius-4);
  }
  .card .link-arrow,
  .card .btn { margin-top: auto; }
  .card :is(h2, h3) { font-size: var(--text-h4); }

  /* ---------- Numbered steps (a real sequence) ---------- */
  .steps {
    display: grid;
    gap: var(--space-40);
    counter-reset: step;
  }
  .steps__item {
    display: grid;
    grid-template-columns: var(--space-48) 1fr;
    gap: var(--space-16) var(--space-20);
    counter-increment: step;
    align-content: start;
  }
  .steps__item::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: var(--space-48);
    height: var(--space-48);
    border: var(--border-width) solid var(--text-accent);
    border-radius: var(--radius-pill);
    color: var(--text-accent);
    font-family: var(--font-display);
    font-weight: var(--weight-heading-small);
    font-size: var(--fs-28);
    font-variant-numeric: lining-nums;           /* full-height 1 2 3, not old-style */
    line-height: 1;                              /* no extra space above or below the number */
    text-box: trim-both cap alphabetic;          /* optional fine-tune; browsers without support ignore it */
  }
  .steps__item > * { grid-column: 2; }
  .steps__item > h3 { grid-row: 1; align-self: center; }

  /* Compact steps inside a card (pathways): one column, smaller numbers */
  .steps--compact { gap: var(--space-16); }
  .steps--compact .steps__item { grid-template-columns: var(--space-32) 1fr; gap: var(--space-12); }
  .steps--compact .steps__item::before {
    width: var(--space-32);
    height: var(--space-32);
    font-size: var(--fs-20);
  }
  .steps--compact .steps__item > p { grid-row: 1; align-self: center; }

  /* Icon in place of the number (the list stays an <ol>, so order is kept) */
  .steps--icons .steps__item::before { content: none; }
  .steps__icon {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: var(--space-48);
    height: var(--space-48);
    border: var(--border-width) solid var(--text-accent);
    border-radius: var(--radius-pill);
    color: var(--text-accent);
  }
  .steps__icon svg { width: var(--space-32); height: var(--space-32); }
  /* Three steps sit in a row from 64em. Four steps: 2 by 2, then a row at 90em */
  @media (min-width: 48em) {
    .steps--4 { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 64em) {
    .steps:not(.steps--4, .steps--compact) { grid-template-columns: repeat(3, 1fr); }
  }
  @media (min-width: 90em) {
    .steps--4 { grid-template-columns: repeat(4, 1fr); }
  }

  /* ---------- Checklist (uses for) ---------- */
  .ticks {
    display: grid;
    gap: var(--space-12) var(--space-32);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 36rem), 1fr));
  }
  .ticks li {
    display: flex;
    gap: var(--space-12);
    align-items: baseline;
  }
  .ticks--stack { grid-template-columns: 1fr; }
  .ticks--compact {
    gap: var(--space-8) var(--space-24);
    font-size: var(--text-label);
    color: var(--text-muted);
  }
  .ticks li::before {
    content: "";
    flex-shrink: 0;
    width: var(--space-8);
    height: var(--space-8);
    background-color: var(--text-accent);
    border-radius: var(--radius-pill);
    transform: translateY(-0.2rem);
  }

  /* ---------- Brainwave motif (decorative, from Concept B) ---------- */
  .wave {
    width: 100%;
    height: var(--space-64);
    color: var(--text-accent);
    opacity: 0.6;
  }

  /* ---------- Signed note from Dr. Sharp ---------- */
  .note {
    --stack-gap: var(--space-16);
    padding-left: var(--space-24);
    border-left: 0.3rem solid var(--text-accent);
  }
  .note__quote {
    font-family: var(--font-display);
    font-weight: var(--weight-heading-small);
    font-size: var(--text-h3);
    line-height: var(--leading-snug);
  }

  /* ---------- Callout: prices, safety notes, things to read first ---------- */
  .callout {
    --stack-gap: var(--space-12);
    padding: var(--space-24);
    border-left: 0.3rem solid var(--surface-brand);
    border-radius: 0 var(--radius-4) var(--radius-4) 0;
    background-color: var(--callout-bg, var(--surface-alt));
  }
  .callout h3 { font-size: var(--text-h4); }

  /* ---------- Missing facts still to supply (remove before launch) ---------- */
  .todo {
    padding-inline: var(--space-4);
    border-radius: var(--radius-2);
    background-color: var(--color-rose-200);
    color: var(--color-charcoal);
  }

  /* ---------- Wellness disclaimer at the foot of a page ---------- */
  .disclaimer {
    padding-block: var(--space-32);
    border-top: var(--border-width) solid var(--border-default);
  }

  /* ---------- FAQ: native details/summary, no script needed ---------- */
  .faq {
    max-width: 88rem;
    border-top: var(--border-width) solid var(--border-default);
  }
  .faq__item { border-bottom: var(--border-width) solid var(--border-default); }
  .faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-16);
    min-height: var(--tap-target);
    padding-block: var(--space-16);
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: var(--weight-heading-small);
    line-height: var(--leading-snug);
    list-style: none;
    cursor: pointer;
  }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after {
    content: "+";
    flex-shrink: 0;
    color: var(--text-accent);
    font-family: var(--font-body);
    font-size: var(--fs-28);
    line-height: 1;
  }
  .faq__item[open] summary::after { content: "\2212"; }
  .faq__answer { padding-bottom: var(--space-24); }

  /* ---------- Contact details (label / value pairs) ---------- */
  .contact-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-8) var(--space-24);
    margin: 0;
  }
  .contact-list dt { font-weight: var(--weight-label); }
  .contact-list dd { margin: 0; min-width: 0; }

  /* ---------- Footer ---------- */
  .site-footer { padding-block: var(--space-64) var(--space-40); }
  .site-footer__grid {
    display: grid;
    gap: var(--space-40);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  }
  .site-footer h2 { font-size: var(--text-h4); font-weight: var(--weight-heading-small); }
  .site-footer__list { display: grid; gap: var(--space-4); }
  .site-footer__list a,
  .site-footer__legal a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target);
  }
  /* Bottom of the footer: wellness note above the copyright, stacked at every width */
  .site-footer__legal {
    display: grid;
    gap: var(--space-12);
    margin-top: var(--space-48);
    padding-top: var(--space-24);
    border-top: var(--border-width) solid var(--rule);
  }
  .site-footer__note { max-width: none; }
}

/* --------------------------------------------------------------------------
   Utilities — single-purpose, used sparingly
   -------------------------------------------------------------------------- */
@layer utilities {
  .ratio-4x5 { --ratio: 4 / 5; }
  .ratio-3x2 { --ratio: 3 / 2; }

}

/* --------------------------------------------------------------------------
   Page base — deliberately outside the layers.
   Unlayered CSS always beats layered CSS, so a host or third-party stylesheet
   that styles `body` (a preview wrapper, a form or chat embed) would otherwise
   replace the ivory background and Manrope. Keep this block small.
   -------------------------------------------------------------------------- */
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--surface-page);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
