/* ==========================================================================
   Presque — marketing site stylesheet
   Palette & type ramp derived from the Presque brand mockups.
   ========================================================================== */

/* ---------- Fonts ----------
   Self-hosted, never loaded from Google: fetching them from Google Fonts
   would send every visitor's IP address to Google before the consent banner
   has been answered (see "Fonts" in the README).

   The files are the variable woff2 subsets Google Fonts serves (Newsreader
   v1.003: wght + opsz axes; Hanken Grotesk v3.013: wght axis), with Google's
   unicode-range split, so the browser fetches only the subsets a page uses.
   Each face is declared over the weight range the site uses — Newsreader
   300–500 (italic 300–400), Hanken Grotesk 400–700 — and optical size
   follows font-size automatically (font-optical-sizing: auto).
   Both families are under the SIL Open Font License 1.1; the licence text
   sits next to the files in assets/fonts/.

   Within a family the latin face is declared last on purpose: where subsets
   overlap (U+0304, U+0308, U+0329), the last matching face wins.
   Every page preloads hanken-grotesk-latin and newsreader-latin in its
   <head>; keep those <link> tags in step if a file is renamed. Files under
   /assets/* are cached for 30 days, so give a replacement file a new name
   rather than overwriting it. */

/* Newsreader — roman */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../assets/fonts/newsreader-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../assets/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../assets/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Newsreader — italic */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../assets/fonts/newsreader-italic-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../assets/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../assets/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Hanken Grotesk */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ----------
   THE LIGHT PALETTE. It is the application's light palette (app.css in
   kfikert/presque) under the site's own names, so a visitor who goes from
   presque.io to app.presque.io sees the same ground, ink and sage. The DARK
   palette follows this block. Every colour a component paints is a token
   here; a hex in a component rule is a bug in waiting for dark mode. */
:root {
  color-scheme: light;

  --bg: #F4F6F1;
  /* The card ground (was #fff in every card rule), and one step above it for
     something that floats over cards: the cookie banner. */
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --ink: #25322B;
  --body: #515E57;
  --body-soft: #5C6B63;
  /* Body text a notch firmer than --body: check-list items, the week card's
     question, the plan feature list. */
  --body-strong: #3D4A43;
  --body-mid: #4A564F;
  /* Muted text steps darkened slightly from the mockup values
     (#7C887F/#8A968C/#97A399) to meet WCAG AA 4.5:1 on their backgrounds. */
  --muted: #6A766F;
  --muted-2: #6A766F;
  --muted-3: #66726B;
  --muted-4: #6A766F;

  --border: #E4E9DF;
  --border-card: #EAEEE4;
  --border-btn: #DBE1D6;
  --border-row: #EEF1EA;
  /* An edge that has to be seen against cards, not just against the page. */
  --border-strong: #CBD4C6;
  /* An off switch's track: the boundary that says "this switches", so it
     clears 3:1 (WCAG 1.4.11) on the tinted plate it sits on (3.41:1). */
  --switch-off: #7A867F;

  --sage: #5E8E72;
  --sage-deep: #436E56;
  --sage-soft: #E4EEE7;
  --sage-mid: #D6E5DA;
  --sage-wash: #EEF4EF;
  --sage-light: #9FC3AC;
  /* A large panel filled with the accent (the closing CTA) and white text on it. */
  --sage-fill: #5E8E72;

  --blue: #5C7C9C;
  --blue-deep: #43617C;
  --blue-soft: #E1E9F0;
  --blue-mid: #C5D6E4;
  --blue-wash: #EBF1F6;
  --blue-light: #9FBBD6;
  --blue-fill: #5C7C9C;

  /* The label on any filled pill or button: white on the light palette, dark
     on the dark one, where every fill turns light (as in the app). */
  --on-accent: #FFFFFF;

  --band: #ECF0EA;
  --band-border: #E2E7DD;
  --chip: #F1F4EE;
  --skeleton: #E3E8E0;
  --sep: #C7D0C2;
  --header-bg: rgba(244, 246, 241, 0.82);
  --strip-bg: rgba(255, 255, 255, 0.5);
  --selection: #D6E5DA;
  --selection-blue: #D3E0EC;

  /* The always-dark bands (spotlight, footer, the dark mark tile). */
  --dark: #25322B;
  --dark-border: #36443B;
  --dark-body: #C4CFC3;
  --dark-muted: #9FAE9F;
  --dark-link: #B7C3B7;
  --dark-faint: #7E8E80;

  /* Form errors: a warm brick that sits with the palette, 6:1 on white. */
  --error: #A6402B;
  /* The contact form's fields: their ground (white on light, sunk below the
     card on dark), the edge a hovered field takes, the ring round a field in
     error, and the select's chevron, drawn in the ink of each palette. */
  --field-bg: #FFFFFF;
  --field-hover: #C5CEC0;
  --error-ring: #F6E3DE;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2325322B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --accent: var(--sage);
  --accent-deep: var(--sage-deep);
  --accent-soft: var(--sage-soft);
  --accent-mid: var(--sage-mid);
  --accent-wash: var(--sage-wash);
  --accent-light: var(--sage-light);
  --accent-fill: var(--sage-fill);
  --accent-fill-2: var(--sage-fill-2);
  --accent-glow: var(--glow-sage);
  --accent-glow-2: var(--glow-blue);

  /* One easing for everything that moves: quick to start, soft to land. */
  --ease-out: cubic-bezier(0.22, 0.72, 0.28, 1);

  --radius: 18px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* The colour every shadow is cast in, as an r, g, b triple so a rule can
     pick its own strength: rgba(var(--shadow-rgb), 0.2). */
  --shadow-rgb: 37, 50, 43;
  --shadow-btn: 0 2px 8px rgba(37, 50, 43, 0.13);
  --shadow-card: 0 18px 44px -22px rgba(37, 50, 43, 0.28);
  --shadow-panel: 0 24px 50px -26px rgba(37, 50, 43, 0.32);
  --shadow-deep: 0 30px 60px -30px rgba(0, 0, 0, 0.5);

  /* Illustrations drawn in light pastels are dimmed on the dark palette. */
  --art-filter: none;

  /* ILLUSTRATION COLOURS. A warm sand beside the sage and the blue: the sun
     in the hero scenes, a third appointment colour in the diary mock-up. It
     is for drawings only, never for text on the page ground or for a control
     (--sand-deep on --sand-soft is 5.2:1, for a label inside a drawing). */
  --sand: #E3CF9F;
  --sand-soft: #F6EEDB;
  --sand-mid: #EFE2C2;
  --sand-deep: #7A5E22;
  /* The light a hero is washed in (three soft pools of colour behind the
     copy), and the dot grid laid over it. */
  --glow-sage: rgba(94, 142, 114, 0.22);
  --glow-blue: rgba(92, 124, 156, 0.2);
  --glow-sand: rgba(227, 199, 132, 0.34);
  --dot: rgba(37, 50, 43, 0.11);
  /* The second stop of a filled panel's gradient (the closing CTA): the
     accent fill, a step deeper and cooler. White text sits on both stops. */
  --sage-fill-2: #46776A;
  --blue-fill-2: #46678C;
  /* The same pools of light inside the always-dark bands. Like the other
     --dark-* tokens these do not change with the palette. */
  --dark-glow-sage: rgba(159, 195, 172, 0.17);
  --dark-glow-blue: rgba(159, 187, 214, 0.13);
  --dark-glow-sand: rgba(227, 207, 159, 0.08);
  --dark-line: rgba(255, 255, 255, 0.08);
  /* A card that has been picked up: hover, and the cards afloat in a hero. */
  --shadow-lift: 0 28px 56px -28px rgba(37, 50, 43, 0.4);
  --shadow-float: 0 22px 48px -24px rgba(37, 50, 43, 0.34), 0 2px 6px rgba(37, 50, 43, 0.05);

  /* Which face the sun-and-moon button wears: a moon while the light palette
     is drawn (what a press gives), a sun while the dark one is. The palette
     blocks flip these, so the face is right in the first frame, with no
     script — the same device the app uses (--pq-face-moon / --pq-face-sun). */
  --face-moon: inline-flex;
  --face-sun: none;

  --container: 1180px;
  --gutter: 32px;
}

/* Blue-accented page (For clinicians) */
.theme-blue {
  --accent: var(--blue);
  --accent-deep: var(--blue-deep);
  --accent-soft: var(--blue-soft);
  --accent-mid: var(--blue-mid);
  --accent-wash: var(--blue-wash);
  --accent-light: var(--blue-light);
  --accent-fill: var(--blue-fill);
  --accent-fill-2: var(--blue-fill-2);
  --accent-glow: var(--glow-blue);
  --accent-glow-2: var(--glow-sage);
}

/* ---------- THE DARK PALETTE ----------
   The application's dark palette (app.css, "docs/07 dark theme"), mapped onto
   the site's tokens, and drawn by the same two rules the app uses:

   - a device set to dark, unless this browser pinned Light; and
   - a pin of Dark, on any device.

   The pin is data-theme on <html>, set from localStorage["pq-appearance"]
   ("light" | "dark"; absent = follow the device) by the inline script at the
   top of every page's <head>, before the first paint. Same key, same values,
   same attribute as the app; see "Appearance" in js/site.js.

   Both blocks are `screen` only, so a printed page is always light. The two
   blocks MUST stay identical — change one, change the other. Every fill
   lightens (a mint primary, a near-white ink) and its label goes dark
   (--on-accent); the tints go deep; the greys keep their sage. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121816;
    --surface: #1A211D;
    --surface-raised: #212A25;
    --ink: #EEF2EC;
    --body: #C9D1CA;
    --body-soft: #B9C2BB;
    --body-strong: #DCE3DD;
    --body-mid: #D0D8D1;
    --muted: #AAB4AC;
    --muted-2: #AAB4AC;
    --muted-3: #AAB4AC;
    --muted-4: #AAB4AC;
    --border: #2F3B34;
    --border-card: #29342E;
    --border-btn: #3C4A42;
    --border-row: #29342E;
    --border-strong: #4A5951;
    --switch-off: #7E8A81;
    --sage: #7DB391;
    --sage-deep: #9ED1B3;
    --sage-soft: #1F3328;
    --sage-mid: #2A4536;
    --sage-wash: #1D2B23;
    --sage-fill: #2D4B3A;
    --blue: #86A6C4;
    --blue-deep: #AAC5DE;
    --blue-soft: #1F2C39;
    --blue-mid: #34495E;
    --blue-wash: #1D2631;
    --blue-fill: #2C4258;
    --on-accent: #101613;
    --band: #161D1A;
    --band-border: #26302A;
    --chip: #25302A;
    --skeleton: #2D3A33;
    --sep: #3C4A42;
    --header-bg: rgba(18, 24, 22, 0.82);
    --strip-bg: rgba(255, 255, 255, 0.025);
    --selection: #2F5A42;
    --selection-blue: #2E4560;
    --dark: #0B100D;
    --dark-border: #222C26;
    --shadow-rgb: 0, 0, 0;
    --shadow-btn: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 18px 44px -22px rgba(0, 0, 0, 0.65);
    --shadow-panel: 0 24px 50px -26px rgba(0, 0, 0, 0.7);
    --shadow-deep: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    --art-filter: brightness(0.78) saturate(0.85);
    --sand: #C8AF74;
    --sand-soft: #2E2718;
    --sand-mid: #3D3320;
    --sand-deep: #E4CD97;
    --glow-sage: rgba(125, 179, 145, 0.15);
    --glow-blue: rgba(134, 166, 196, 0.14);
    --glow-sand: rgba(200, 175, 116, 0.09);
    --dot: rgba(238, 242, 236, 0.07);
    --sage-fill-2: #1F3A33;
    --blue-fill-2: #213549;
    --shadow-lift: 0 28px 56px -28px rgba(0, 0, 0, 0.85);
    --shadow-float: 0 22px 48px -24px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.3);
    --face-moon: none;
    --face-sun: inline-flex;
    --error: #F0A999;
    --field-bg: #121816;
    --field-hover: #5A685F;
    --error-ring: #3C2420;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23EEF2EC' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121816;
    --surface: #1A211D;
    --surface-raised: #212A25;
    --ink: #EEF2EC;
    --body: #C9D1CA;
    --body-soft: #B9C2BB;
    --body-strong: #DCE3DD;
    --body-mid: #D0D8D1;
    --muted: #AAB4AC;
    --muted-2: #AAB4AC;
    --muted-3: #AAB4AC;
    --muted-4: #AAB4AC;
    --border: #2F3B34;
    --border-card: #29342E;
    --border-btn: #3C4A42;
    --border-row: #29342E;
    --border-strong: #4A5951;
    --switch-off: #7E8A81;
    --sage: #7DB391;
    --sage-deep: #9ED1B3;
    --sage-soft: #1F3328;
    --sage-mid: #2A4536;
    --sage-wash: #1D2B23;
    --sage-fill: #2D4B3A;
    --blue: #86A6C4;
    --blue-deep: #AAC5DE;
    --blue-soft: #1F2C39;
    --blue-mid: #34495E;
    --blue-wash: #1D2631;
    --blue-fill: #2C4258;
    --on-accent: #101613;
    --band: #161D1A;
    --band-border: #26302A;
    --chip: #25302A;
    --skeleton: #2D3A33;
    --sep: #3C4A42;
    --header-bg: rgba(18, 24, 22, 0.82);
    --strip-bg: rgba(255, 255, 255, 0.025);
    --selection: #2F5A42;
    --selection-blue: #2E4560;
    --dark: #0B100D;
    --dark-border: #222C26;
    --shadow-rgb: 0, 0, 0;
    --shadow-btn: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 18px 44px -22px rgba(0, 0, 0, 0.65);
    --shadow-panel: 0 24px 50px -26px rgba(0, 0, 0, 0.7);
    --shadow-deep: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    --art-filter: brightness(0.78) saturate(0.85);
    --sand: #C8AF74;
    --sand-soft: #2E2718;
    --sand-mid: #3D3320;
    --sand-deep: #E4CD97;
    --glow-sage: rgba(125, 179, 145, 0.15);
    --glow-blue: rgba(134, 166, 196, 0.14);
    --glow-sand: rgba(200, 175, 116, 0.09);
    --dot: rgba(238, 242, 236, 0.07);
    --sage-fill-2: #1F3A33;
    --blue-fill-2: #213549;
    --shadow-lift: 0 28px 56px -28px rgba(0, 0, 0, 0.85);
    --shadow-float: 0 22px 48px -24px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.3);
    --face-moon: none;
    --face-sun: inline-flex;
    --error: #F0A999;
    --field-bg: #121816;
    --field-hover: #5A685F;
    --error-ring: #3C2420;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23EEF2EC' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

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

html {
  /* A phone turned on its side keeps the type size it was given, rather
     than having the browser inflate some of it. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep in-page anchor targets clear of the 72px sticky header. */
  scroll-padding-top: 84px;
  /* Decorative rings intentionally bleed past the viewport edge; clip them
     at the root so they can never cause horizontal panning (esp. iOS). */
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html { overflow-x: clip; }
  /* Clipping at the root alone is not enough on a phone: Chrome still widens
     the layout viewport to fit the bleed (430px on a 390px iPhone 13), and a
     position: fixed element is laid out against that viewport — the cookie
     banner's right edge, and its Privacy Policy link, sat off-screen. Clipping
     at <body> too keeps the bleed out of the viewport's width. `clip`, unlike
     `hidden`, makes no scroll container, so the sticky header still sticks. */
  body { overflow-x: clip; }
}

/* Reduced motion: nothing drifts, loops or slides. Every animation is cut to
   a single instant pass (so anything that draws itself in still ends drawn),
   and the looping ones are not started at all — see "Motion", which is
   written inside `prefers-reduced-motion: no-preference` throughout. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection); }
.theme-blue ::selection { background: var(--selection-blue); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.018em;
  margin: 0;
  /* Even lines rather than one long line and an orphan. */
  text-wrap: balance;
}
p, li { text-wrap: pretty; }

/* Fluid from a 320px phone to a wide desktop: the size grows with the
   viewport between the two ends, so no width gets a headline that is either
   cramped or lost. */
.display {
  font-size: clamp(38px, 3.1vw + 28px, 68px);
  line-height: 1.04;
  margin-bottom: 22px;
}

.display-sub {
  font-size: clamp(36px, 3vw + 26px, 64px);
  line-height: 1.05;
  margin-bottom: 22px;
}

.display em,
.display-sub em {
  position: relative;
  font-style: italic;
  color: var(--accent-deep);
  white-space: nowrap;
}
/* One brush stroke under the word the headline leans on. Drawn as a mask so
   it takes the accent of the page and of the palette. */
.display em::after,
.display-sub em::after {
  content: "";
  position: absolute;
  left: -0.02em;
  right: -0.05em;
  bottom: -0.07em;
  height: 0.19em;
  background: var(--accent-light);
  opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C32 3 58 12 88 7s54-4 109 1' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C32 3 58 12 88 7s54-4 109 1' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.h2 { font-size: clamp(30px, 2.2vw + 22px, 46px); line-height: 1.08; }
.h2-md { font-size: clamp(29px, 2vw + 22px, 44px); line-height: 1.08; }
.h2-sm { font-size: clamp(28px, 1.8vw + 21px, 42px); line-height: 1.1; }
.h2-xs { font-size: clamp(27px, 1.6vw + 21px, 40px); line-height: 1.1; }

.h3 { font-weight: 500; font-size: 21px; margin-bottom: 8px; }
.h3-lg { font-weight: 500; font-size: 22px; margin-bottom: 8px; }

.lede { font-size: clamp(17px, 0.5vw + 15.4px, 19px); line-height: 1.6; margin: 0 0 32px; max-width: 30em; }
.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.section-head { max-width: 640px; margin-bottom: 50px; }
.section-head .h2, .section-head .h2-md { margin-top: 16px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head--narrow { max-width: 620px; margin-bottom: 56px; }
.section-head--tight { margin-bottom: 48px; }
.section-head__lede { font-size: 16.5px; line-height: 1.6; color: var(--muted); margin: 14px 0 0; }
.section-head__lede a { color: var(--accent-deep); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.footnote {
  font-size: 14px;
  color: var(--muted-3);
  margin: 0;
}
.footnote--serif { font-style: italic; font-family: var(--serif); }
.footnote + .footnote { margin-top: 7px; }
.footnote strong { color: var(--body-soft); font-weight: 600; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn svg { flex: none; transition: transform 0.25s var(--ease-out); }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  /* A little light across the top edge, so the pill reads as raised. */
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 62%);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-btn);
}

.btn--dark {
  background: var(--ink);
  color: var(--on-accent);
  box-shadow: 0 2px 8px rgba(var(--shadow-rgb), 0.2);
}

.btn--small {
  font-size: 14.5px;
  padding: 11px 20px;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.12);
}

/* Hover belongs to a pointer that can hover: on a touch screen it would
   stick after the tap. */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover svg { transform: translateX(3px); }
  .btn--primary:hover { box-shadow: 0 10px 22px -8px rgba(var(--shadow-rgb), 0.4); }
  .btn--ghost:hover { border-color: var(--accent); }
  .btn--dark:hover { box-shadow: 0 10px 22px -8px rgba(var(--shadow-rgb), 0.5); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--body-soft);
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.05);
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
/* Once the page has moved under the bar (site.js), it lifts off the page. */
.site-header.is-scrolled { box-shadow: 0 12px 32px -24px rgba(var(--shadow-rgb), 0.55); }

.site-header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  /* 44px tall, so the way home is a comfortable target on a phone. */
  min-height: 44px;
  text-decoration: none;
}
.brand svg { flex: none; transition: transform 0.6s var(--ease-out); }
.brand__name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
@media (hover: hover) {
  /* The open ring turns once, and closes a little more. */
  .brand:hover svg { transform: rotate(90deg); }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 30px);
}
.site-nav a {
  position: relative;
  padding: 10px 0;
  text-decoration: none;
  color: var(--body);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s var(--ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 600;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.signin-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.site-header__actions .btn { white-space: nowrap; }

/* The sun-and-moon button: light or dark in one press, as the app's menu has
   it (AppearanceToggle). A toggle named for what it turns on — "Dark mode",
   pressed while the dark palette is drawn — so a screen reader announces a
   press as a change of state. The face is the stylesheet's (--face-moon /
   --face-sun flip with the palette); aria-pressed is site.js's. */
.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 1px solid var(--border-btn);
  border-radius: 999px;
  color: var(--body-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--ink); }
/* The base focus rule squares every button to 4px; keep this one round. */
.theme-toggle:focus-visible { border-radius: 999px; }
.theme-toggle__face {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}
.theme-toggle__face--moon { display: var(--face-moon); }
.theme-toggle__face--sun { display: var(--face-sun); }
.theme-toggle svg { transition: transform 0.5s var(--ease-out); }
@media (hover: hover) {
  .theme-toggle:hover svg { transform: rotate(24deg); }
}
@media (max-width: 1040px), (pointer: coarse) {
  .theme-toggle { width: 44px; height: 44px; }
}

/* The menu button: three bars that fold into a cross while the menu is open. */
.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  margin-right: -10px;
  color: var(--ink);
}
.nav-toggle path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__top { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__mid { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bot { transform: translateY(-5px) rotate(-45deg); }

/* The menu itself: a sheet that drops from under the bar, over the page
   rather than pushing it down. Hidden with `visibility`, so its links are out
   of the tab order while it is shut. It scrolls on its own if a short screen
   (a phone on its side) cannot show every link. */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 6px var(--gutter) 24px;
  box-shadow: 0 34px 50px -34px rgba(var(--shadow-rgb), 0.55);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.mobile-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--body);
  font-size: 16.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-row);
}
.mobile-nav a[aria-current="page"] { color: var(--accent-deep); font-weight: 600; }
/* Re-assert .btn longhands that .mobile-nav a would otherwise win on */
.mobile-nav .btn {
  display: flex;
  justify-content: center;
  padding: 15px 26px;
  font-weight: 600;
  margin-top: 18px;
  width: 100%;
  color: var(--on-accent);
  border-bottom: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Its own stacking context, so the light and the dot grid can sit behind
     the copy (negative z-index) without slipping behind the page. */
  isolation: isolate;
  overflow: hidden;
}
@supports (overflow: clip) {
  .hero { overflow: clip; }
}

/* The light behind the copy: three soft pools of colour — the page's accent
   behind the illustration, sand in the top corner like low sun, and the
   neighbouring accent under the copy. One layer, moved by transform alone (see
   "Motion"), so it never costs a repaint. */
.hero::before {
  content: "";
  position: absolute;
  inset: -14% -10% -4%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 79% 30%, var(--accent-glow), transparent 72%),
    radial-gradient(30% 42% at 5% 6%, var(--glow-sand), transparent 72%),
    radial-gradient(28% 36% at 50% 76%, var(--accent-glow-2), transparent 72%);
  /* Fades out before the hero's lower edge, so the light never ends in a line. */
  -webkit-mask-image: linear-gradient(#000 58%, transparent 96%);
  mask-image: linear-gradient(#000 58%, transparent 96%);
}
/* A dot grid over the illustration's side, fading out towards the copy. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(58% 68% at 80% 36%, #000 0%, transparent 74%);
  mask-image: radial-gradient(58% 68% at 80% 36%, #000 0%, transparent 74%);
}

.hero__grid {
  padding-top: clamp(44px, 7vw, 100px);
  padding-bottom: clamp(44px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(32px, 4.6vw, 64px);
  align-items: center;
}
.hero__copy { position: relative; z-index: 2; min-width: 0; }
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

/* ---------- Hero scenes ----------
   Each hero carries a small composed illustration: product cards afloat over
   the brand's open ring. A scene is drawn in em, and its font-size is tied to
   the width of the column it sits in (a container query unit), so the whole
   composition scales as one picture from a 320px phone to a wide desktop —
   nothing reflows, overlaps differently or pokes out of the screen.

   --scene-w is the width, in px, the scene was drawn at: at that column
   width 1em is 16px. A narrow column switches to a tighter drawing (fewer,
   larger cards) further down, so the cards stay legible on a phone.

   A scene is one image to assistive technology (role="img" with a label in
   the markup): the sample names and times inside are not page content. */
.hero__visual {
  position: relative;
  min-width: 0;
  container-type: inline-size;
}
.scene {
  --scene-w: 540;
  position: relative;
  font-size: 16px;
  height: 26em;
  line-height: 1.6;
}
@supports (width: 1cqw) {
  .scene { font-size: calc(100cqw / var(--scene-w) * 16); }
}

/* The open ring behind the cards, and a smaller one in the other accent. */
.scene__ring {
  position: absolute;
  z-index: 0;
  width: 21.5em;
  height: 21.5em;
  top: -1.4em;
  right: -2.8em;
  color: var(--accent);
  opacity: 0.55;
}
.scene__ring--small {
  width: 6.4em;
  height: 6.4em;
  top: auto;
  right: auto;
  bottom: 1.2em;
  left: 10.6em;
  color: var(--accent-light);
  opacity: 0.9;
}
/* The sun: a warm disc low on the left of the scene. */
.scene__sun {
  position: absolute;
  z-index: 0;
  left: -1.4em;
  bottom: 0.2em;
  width: 8em;
  height: 8em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sand-soft), var(--sand-mid) 70%);
  box-shadow: 0 0 0 1.1em var(--glow-sand);
  opacity: 0.9;
}

/* Cards afloat in a scene */
.float-card {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: 1.125em;
  box-shadow: var(--shadow-float);
}

.match-card {
  top: 1.2em;
  right: 0;
  width: 20.6em;
  padding: 1.375em;
}
.match-card__label {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.15em;
}
.match-card__person {
  display: flex;
  align-items: center;
  gap: 0.875em;
}
.match-card__name {
  font-family: var(--serif);
  font-size: 1.19em;
  color: var(--ink);
  line-height: 1.15;
}
.match-card__meta { font-size: 0.84em; color: var(--muted-2); margin-top: 0.15em; }
.match-card__tags {
  display: flex;
  gap: 0.44em;
  margin-top: 1em;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.78em;
  font-weight: 500;
  line-height: 1.5;
  color: var(--body-soft);
  background: var(--chip);
  padding: 0.38em 0.88em;
  border-radius: 999px;
  white-space: nowrap;
}
.tag--accent {
  font-weight: 600;
  color: var(--sage-deep);
  background: var(--sage-soft);
}

.week-card {
  z-index: 3;
  top: 11.7em;
  left: 0;
  width: 18.1em;
  padding: 1.1em 1.25em 1.2em;
}
.week-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75em;
}
.week-card__label {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.week-card__day { font-size: 0.75em; color: var(--muted-4); }
.week-card__q { font-size: 0.94em; color: var(--body-strong); line-height: 1.45; margin-bottom: 0.85em; }
.week-card__bars { display: flex; gap: 0.56em; }
.week-card__bars span {
  flex: 1;
  height: 0.5em;
  border-radius: 999px;
  background: var(--blue-soft);
  transform-origin: 0 50%;
}
.week-card__bars .is-mid { background: var(--blue-mid); }
.week-card__bars .is-active { background: var(--blue); }

/* A trend, in a card of its own: a label, a sparkline, a one-word reading. */
.trend-card {
  z-index: 3;
  top: 14.9em;
  right: 0.6em;
  width: 12.6em;
  padding: 1em 1.1em 0.95em;
}
.trend-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6em;
}
.trend-card__label {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}
.trend-card__label--blue { color: var(--blue); }
.trend-card__hint { font-size: 0.75em; color: var(--muted-4); white-space: nowrap; }
.trend-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  font-size: 0.8em;
  color: var(--muted-2);
  white-space: nowrap;
}
.trend-card__foot b { font-family: var(--serif); font-weight: 400; font-size: 1.3em; color: var(--ink); }

.spark { display: block; width: 100%; height: auto; margin: 0.5em 0 0.45em; overflow: visible; }
.spark__area { fill: var(--sage-soft); stroke: none; }
.spark__line { fill: none; stroke: var(--sage); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.spark__dot { fill: var(--surface); stroke: var(--sage-deep); stroke-width: 2.2; }
.spark--blue .spark__area { fill: var(--blue-soft); }
.spark--blue .spark__line { stroke: var(--blue); }
.spark--blue .spark__dot { stroke: var(--blue-deep); }

/* A small notice: an icon in a tinted disc, a line, and a quieter line. */
.chip-card {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.62em 1.05em 0.62em 0.68em;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-card__icon {
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-soft);
  color: var(--sage-deep);
}
.chip-card__icon svg { width: 1.15em; height: 1.15em; }
.chip-card__icon--blue { background: var(--blue-soft); color: var(--blue-deep); }
.chip-card__icon--sand { background: var(--sand-soft); color: var(--sand-deep); }
.chip-card__text { font-size: 0.84em; font-weight: 600; line-height: 1.3; color: var(--ink); }
.chip-card__text small { display: block; font-size: 0.9em; font-weight: 400; color: var(--muted-2); }
.chip-card__action {
  margin-left: 0.3em;
  font-size: 0.78em;
  font-weight: 600;
  padding: 0.42em 0.95em;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-accent);
}
/* A dot that says "live": the session about to start. */
.live-dot {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 var(--glow-sage);
}

/* Avatars (photo placeholders) */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-soft), var(--sage-mid));
  color: var(--sage-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.avatar--blue {
  background: linear-gradient(135deg, var(--blue-soft), var(--blue-mid));
  color: var(--blue-deep);
}
.avatar--sand {
  background: linear-gradient(135deg, var(--sand-soft), var(--sand-mid));
  color: var(--sand-deep);
}
.avatar--56 { width: 3.3em; height: 3.3em; font-size: 1.06em; }
.avatar--38 { width: 3.04em; height: 3.04em; font-size: 0.78em; }

/* Home scene: where each card sits at the drawing's full width. */
.scene--home .toast-card { top: 6.3em; left: 0.2em; z-index: 4; }

/* Clinicians scene: the day's list on the right, and three smaller cards
   down its left edge, each overlapping a corner of it and no words. */
.scene--clinic { height: 29em; }
.scene--clinic .scene__ring { top: -0.6em; right: -3em; }
.scene--clinic .scene__ring--small { top: 0.4em; bottom: auto; left: 12.5em; }
.scene--clinic .dash-card { top: 2.7em; }
.scene--clinic .note-card { top: 0; left: 0; z-index: 4; }
.scene--clinic .trend-card { top: 9.6em; left: 0; right: auto; width: 11.6em; z-index: 4; }
.scene--clinic .join-card { top: 25.6em; left: 1.2em; z-index: 4; }

/* Patients scene */
.scene--patient { height: 30.5em; }
.scene--patient .scene__ring { top: -2.4em; right: -3.2em; }
.scene--patient .checkin-card { top: 2.6em; left: 0; z-index: 4; width: 15.2em; padding: 1em 1.15em 1.1em; }
.scene--patient .share-card { top: 13.4em; left: 1.4em; z-index: 4; }

.checkin-card__q { font-size: 0.9em; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 0.75em; }
.checkin-card .mood-row { gap: 0.5em; }
.checkin-card .mood-row span { width: 1.9em; height: 1.9em; }

/* A narrow column (a phone) gets a tighter drawing of each scene: drawn at
   400px rather than 540px, so 1em is larger for the same width and the cards
   stay legible, with the smaller pieces tucked in closer. */
@container (max-width: 440px) {
  .scene { --scene-w: 400; }
  .scene__ring { width: 18em; height: 18em; right: -3.4em; }
  .scene__sun { width: 6.4em; height: 6.4em; left: -1.6em; }

  .scene--home { height: 27.6em; }
  .scene--home .match-card { width: 20em; }
  .scene--home .week-card { top: 11.9em; width: 17em; }
  .scene--home .trend-card { top: 18.6em; right: 0; width: 12.4em; }
  .scene--home .toast-card { top: 21.6em; left: 0; }
  .scene--home .scene__ring--small { display: none; }

  .scene--clinic { height: 36.6em; }
  .scene--clinic .dash-card { top: 3.9em; width: 23.2em; }
  .scene--clinic .note-card { top: 0; left: 0; }
  .scene--clinic .trend-card { top: 28em; left: 0; width: 11.2em; }
  /* Without its button the notice fits beside the trend rather than over it. */
  .scene--clinic .join-card { top: 30.6em; left: auto; right: 0; }
  .scene--clinic .join-card .chip-card__action { display: none; }
  .scene--clinic .scene__ring--small { display: none; }

  .scene--patient { height: 28.6em; }
  .scene--patient .portrait { width: 21em; }
  .scene--patient .checkin-card { top: 1.6em; width: 13.6em; }
  .scene--patient .share-card { top: 11.6em; left: 0; }
  .scene--patient .session-card { bottom: 0.4em; }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--strip-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.trust-strip__inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 36px;
}
.trust-strip__lead { font-size: 13px; color: var(--muted-3); font-weight: 500; }
.trust-strip__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sep);
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--body-soft);
}
.trust-item svg { flex-shrink: 0; }

/* ---------- Audience cards (home) ---------- */
.audience {
  padding-top: clamp(72px, 9vw, 116px);
  padding-bottom: clamp(40px, 5vw, 60px);
}
.audience__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.audience-card {
  --card-tint: var(--sage-wash);
  --card-edge: var(--sage-mid);
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: calc(var(--radius) + 6px);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.25s ease;
}
.audience-card--blue {
  --card-tint: var(--blue-wash);
  --card-edge: var(--blue-mid);
}
/* The corner: a tinted disc with the open ring around it. Both grow a little
   when the card is picked up. */
.audience-card::before,
.audience-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transition: transform 0.7s var(--ease-out);
}
.audience-card::before {
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  background: var(--card-tint);
}
.audience-card::after {
  top: -78px;
  right: -78px;
  width: 216px;
  height: 216px;
  border: 1.5px solid var(--card-edge);
  /* The gap in the ring, lower left. */
  -webkit-mask: conic-gradient(from 200deg, transparent 0 34deg, #000 34deg);
  mask: conic-gradient(from 200deg, transparent 0 34deg, #000 34deg);
  opacity: 0.8;
}
@media (hover: hover) {
  .audience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: var(--card-edge);
  }
  .audience-card:hover::before { transform: scale(1.18); }
  .audience-card:hover::after { transform: scale(1.1) rotate(40deg); }
}
.audience-card > * { position: relative; }
.audience-card .kicker { color: var(--sage); }
.audience-card--blue .kicker { color: var(--blue); }
.audience-card .h2-card {
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 16px 0 14px;
}
.audience-card p { font-size: 16.5px; margin: 0 0 26px; max-width: 30em; }

/* The offer, in one line each: what it costs, and for whom. */
.audience-card__offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 26px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--chip);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body-soft);
}
.audience-card__offer strong { color: var(--ink); font-weight: 600; font-size: 15px; }

.check-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--body-strong);
  line-height: 1.5;
}
.check-list svg { margin-top: 3px; flex-shrink: 0; }
/* The ticks are drawn with the light palette's hexes as SVG attributes. Any
   CSS property beats a presentation attribute, so these follow the palette. */
.check-list svg circle { fill: var(--sage-soft); }
.check-list svg path { stroke: var(--sage-deep); }
.audience-card--blue .check-list svg circle { fill: var(--blue-soft); }
.audience-card--blue .check-list svg path { stroke: var(--blue-deep); }

.text-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Padded out to a 44px target without moving the text. */
  padding: 10px 0;
  margin: -10px 0;
  color: var(--sage-deep);
  font-weight: 600;
  font-size: 15.5px;
}
.text-link svg { flex: none; transition: transform 0.25s var(--ease-out); }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover svg { transform: translateX(4px); }
.text-link--blue { color: var(--blue-deep); }

/* ---------- Feature grid ---------- */
.features {
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-grid--two { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: var(--accent-mid);
  }
  .feature-card:hover .feature-card__icon { transform: rotate(-6deg) scale(1.06); }
}
.feature-card--roomy { padding: 32px; }
.feature-card p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.feature-card--roomy p { font-size: 15.5px; }

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-deep);
  transition: transform 0.4s var(--ease-out);
}

/* A feature card that opens with a mock-up (see "Mock-ups"): the drawing
   sits on a tinted stage at the top of the card, cut off by the card's
   lower edge like a screenshot peeking out, and the icon overlaps it. */
.feature-card--viz { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.feature-card__stage {
  position: relative;
  height: 196px;
  padding: 20px 20px 0;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 85% 0%, var(--accent-glow), transparent 70%),
    var(--accent-wash);
  border-bottom: 1px solid var(--border-row);
  container-type: inline-size;
}
.feature-card--roomy .feature-card__stage { height: 216px; padding: 24px 24px 0; }
.feature-card__body { padding: 0 28px 28px; }
.feature-card--roomy .feature-card__body { padding: 0 32px 32px; }
.feature-card--viz .feature-card__icon {
  position: relative;
  margin-top: -22px;
  border: 3px solid var(--surface);
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

/* ---------- Dark spotlight ---------- */
.spotlight {
  position: relative;
  isolation: isolate;
  background: var(--dark);
  color: #E8EDE6;
}
/* Light inside the dark band: the same pools of colour as the hero. */
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 62% at 84% 26%, var(--dark-glow-sage), transparent 72%),
    radial-gradient(34% 52% at 4% 96%, var(--dark-glow-blue), transparent 72%),
    radial-gradient(22% 30% at 46% 0%, var(--dark-glow-sand), transparent 72%);
}
/* Its upper edge is a line of hills rather than a ruled line: the band rises
   out of the page like the landscape in the patients' hero. Two ridges in
   one mask, the far one fainter. */
.spotlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px);
  height: clamp(26px, 5vw, 72px);
  pointer-events: none;
  background: var(--dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill-opacity='.42' d='M0 80V34c160-30 330-34 520-10s300 30 470 8 300-30 450-14v62z'/%3E%3Cpath d='M0 80V58c200-26 380-30 560-14s330 30 520 10 250-24 360-18v44z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill-opacity='.42' d='M0 80V34c160-30 330-34 520-10s300 30 470 8 300-30 450-14v62z'/%3E%3Cpath d='M0 80V58c200-26 380-30 560-14s330 30 520 10 250-24 360-18v44z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.spotlight--offset { margin-top: clamp(40px, 5vw, 64px); }
.spotlight__copy, .spotlight__visual { min-width: 0; }
/* Two faint rings behind the mock-up, like the hero's. */
.spotlight__visual { position: relative; }
.spotlight__visual::before,
.spotlight__visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 112%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--dark-line);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.spotlight__visual::after { width: 82%; border-style: dashed; }
.spotlight__grid {
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.spotlight .kicker { color: var(--accent-light); }
.spotlight h2 {
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.06;
  color: #fff;
  margin: 18px 0 20px;
}
.spotlight p {
  font-size: 18px;
  line-height: 1.62;
  color: var(--dark-body);
  margin: 0 0 28px;
  max-width: 32em;
}

.stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stats > div { position: relative; padding-top: 16px; }
/* A short rule over each figure, in the band's accent. */
.stats > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-light);
}
.stats__num {
  font-family: var(--serif);
  font-size: clamp(38px, 3.4vw, 46px);
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats__label { font-size: 14px; color: var(--dark-muted); margin-top: 6px; }

.spotlight__checks {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.spotlight__checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  color: #DCE5DB;
}
.spotlight__checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none'%3E%3Cpath d='M6.5 11.4l3 3 6-6.4' stroke='%2325322B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat,
    var(--accent-light);
}

/* Framed app mock inside spotlight */
.device-frame {
  background: var(--bg);
  border-radius: calc(var(--radius) + 4px);
  padding: 16px;
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--dark-line);
  transition: transform 0.7s var(--ease-out);
}
.device-frame__screen {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

/* ---------- Faux product UI (screenshot placeholders) ---------- */
.app-mock {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.5vw, 26px);
  gap: clamp(10px, 1.6vw, 16px);
  font-size: clamp(12px, 1.3vw, 14.5px);
  color: var(--body);
}
.app-mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(8px, 1.2vw, 12px);
  border-bottom: 1px solid var(--border-row);
}
.app-mock__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.15em;
  color: var(--ink);
}
.app-mock__hint { font-size: 0.9em; color: var(--muted-4); }
.app-mock__q {
  font-family: var(--serif);
  font-size: 1.35em;
  color: var(--ink);
  line-height: 1.3;
}
.mood-row { display: flex; gap: 10px; }
.mood-row span {
  width: clamp(26px, 3.4vw, 36px);
  height: clamp(26px, 3.4vw, 36px);
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid var(--border-row);
}
.mood-row .is-active {
  background: var(--sage);
  border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--glow-sage);
}
.app-mock__panel {
  background: var(--chip);
  border: 1px solid var(--border-row);
  border-radius: 12px;
  padding: clamp(10px, 1.6vw, 14px) clamp(12px, 1.8vw, 16px);
}
.app-mock__panel-title {
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.skeleton {
  height: 8px;
  border-radius: 999px;
  background: var(--skeleton);
  margin-top: 7px;
}
.skeleton.w-80 { width: 80%; }
.skeleton.w-60 { width: 60%; }
.skeleton.w-90 { width: 90%; }
.app-mock__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pill-btn {
  font-weight: 600;
  font-size: 0.95em;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--on-accent);
}
.pill-btn--ghost { background: var(--chip); color: var(--ink); border: 1px solid var(--border-row); }
.pill-btn--blue { background: var(--blue); }
.app-mock__note { font-size: 0.9em; color: var(--muted-2); display: inline-flex; align-items: center; gap: 6px; }

.signal-bars { display: flex; align-items: flex-end; gap: 6px; height: 42px; }
.signal-bars span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--blue-soft);
  transform-origin: 50% 100%;
}
.signal-bars .h-30 { height: 30%; }
.signal-bars .h-45 { height: 45%; }
.signal-bars .h-60 { height: 60%; }
.signal-bars .h-75 { height: 75%; }
.signal-bars .h-90 { height: 90%; background: var(--blue); }
.signal-bars .h-70 { height: 70%; background: var(--blue-mid); }

/* ---------- Dashboard card (clinicians scene) ---------- */
.dash-card {
  z-index: 2;
  top: 1.7em;
  right: 0;
  width: 23.75em;
  border-radius: 1.25em;
  padding: 1.375em;
  box-shadow: var(--shadow-panel);
}
.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1em;
}
.dash-card__title { font-family: var(--serif); font-size: 1.125em; color: var(--ink); }
.dash-card__sub { font-size: 0.81em; color: var(--muted-4); }
.dash-card__list { display: flex; flex-direction: column; gap: 0.625em; }
.dash-row {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.75em;
  border: 1px solid var(--border-row);
  border-radius: 0.75em;
}
.dash-row__body { flex: 1; min-width: 0; }
.dash-row__name { font-size: 0.9em; font-weight: 600; color: var(--ink); line-height: 1.4; }
.dash-row__meta { font-size: 0.78em; color: var(--muted-3); line-height: 1.4; }
.dash-row .tag { font-size: 0.72em; font-weight: 600; padding: 0.35em 0.8em; }
.dash-row .tag--ready { color: var(--blue-deep); background: var(--blue-soft); }
.dash-card__foot {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid var(--border-row);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75em;
}
.dash-card__foot-label { font-size: 0.84em; color: var(--muted); }
.dash-card__amount { font-family: var(--serif); font-size: 1.25em; color: var(--ink); white-space: nowrap; }
.dash-card__amount small {
  font-size: 0.65em;
  color: var(--muted-4);
  font-family: var(--sans);
}
/* Six small bars between the label and the figure: the month so far. */
.mini-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.22em;
  height: 1.7em;
}
.mini-bars i {
  width: 0.42em;
  height: var(--h, 50%);
  border-radius: 0.2em 0.2em 0 0;
  background: var(--blue-mid);
  transform-origin: 50% 100%;
}
.mini-bars i:last-child { background: var(--blue); }

/* Next-session card (patients scene) */
.session-card {
  z-index: 3;
  bottom: 1.5em;
  left: 0;
  width: 15em;
  border-radius: 1em;
  padding: 1em 1.125em;
}
.session-card__label {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5em;
}
.session-card__when { font-family: var(--serif); font-size: 1.125em; color: var(--ink); line-height: 1.3; }
.session-card__who { font-size: 0.84em; color: var(--muted-2); margin-top: 0.2em; }

/* Landscape illustration (patients scene): hills under a morning sun. */
.portrait {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 23.75em;
  aspect-ratio: 4 / 5;
  border-radius: 1.4em;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.portrait svg { width: 100%; height: 100%; filter: var(--art-filter); }

/* ---------- Steps ---------- */
.steps {
  padding-top: clamp(72px, 9vw, 110px);
  padding-bottom: clamp(72px, 9vw, 110px);
}
.steps__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
/* The thread from one step to the next: a dashed line through the three
   numbers (which sit on the page ground, so they cover it). */
.steps__grid::before {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  border-top: 1.5px dashed var(--accent-mid);
}
.step { position: relative; text-align: center; padding: 0 12px; }
.step__num {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 8px var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent-deep);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out);
}
@media (hover: hover) {
  .step:hover .step__num {
    background: var(--accent);
    color: var(--on-accent);
    transform: scale(1.06);
  }
}
.step h3 { font-weight: 500; font-size: 22px; margin-bottom: 10px; }
.step p { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* Two tracks (home): the clinician's three steps and the patient's three
   steps side by side, rather than one set of steps that speaks to both. */
.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.track {
  --track: var(--sage);
  --track-deep: var(--sage-deep);
  --track-soft: var(--sage-soft);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 38px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}
.track--clinician {
  --track: var(--blue);
  --track-deep: var(--blue-deep);
  --track-soft: var(--blue-soft);
}
/* A bar of the track's colour along the top edge. */
.track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--track), var(--track-soft));
}
@media (hover: hover) {
  .track:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
.track--clinician .kicker { color: var(--blue); }
.track--patient .kicker { color: var(--sage); }
.track__title {
  font-weight: 500;
  font-size: 25px;
  line-height: 1.2;
  margin: 12px 0 24px;
}
.track__steps {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  counter-reset: track;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.track__steps li {
  counter-increment: track;
  position: relative;
  padding-left: 50px;
  min-height: 34px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}
.track__steps li::before {
  content: counter(track);
  position: absolute;
  z-index: 1;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--track-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--track-deep);
}
/* The thread between one number and the next. */
.track__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: -18px;
  border-left: 1.5px dashed var(--track-soft);
}
.track__steps strong { color: var(--ink); font-weight: 600; }

/* ---------- Band sections (mark, quote) ---------- */
.band {
  background: var(--band);
  border-top: 1px solid var(--band-border);
  border-bottom: 1px solid var(--band-border);
}

.mark__grid {
  padding-top: clamp(64px, 8vw, 96px);
  padding-bottom: clamp(64px, 8vw, 96px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.mark__copy h2 { margin: 16px 0; }
.mark__copy p { font-size: 16.5px; line-height: 1.62; margin: 0; max-width: 32em; }
.mark__copy { min-width: 0; }
.mark__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.mark-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 132px;
  min-width: 0;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}
.mark-tile svg { flex-shrink: 0; transition: transform 0.9s var(--ease-out); }
@media (hover: hover) {
  .mark-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
  .mark-tile:hover svg { transform: rotate(120deg); }
  /* The monogram keeps its letter upright. */
  .mark-tile:hover svg:has(text) { transform: none; }
}
/* The monogram's "P" (fill="#25322B" in the markup) is ink on either palette. */
.mark-tile svg text { fill: var(--ink); }
.mark-tile--dark { background: var(--dark); border-color: var(--dark); }
.mark-tile__word {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.mark-tile--dark .mark-tile__word { color: #fff; font-size: 24px; }

.quote__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 96px) var(--gutter);
  text-align: center;
}
.quote__ring { margin: 0 auto 26px; color: var(--accent); }
.quote__text {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 28px;
}
.quote__attr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.quote__who { text-align: left; }
.quote__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.quote__role { font-size: 13.5px; color: var(--muted-2); }

/* ---------- Pricing ---------- */
.pricing {
  padding-top: clamp(64px, 8vw, 100px);
  padding-bottom: clamp(64px, 8vw, 100px);
}
.pricing__head { text-align: center; max-width: 640px; margin: 0 auto 18px; }
.pricing__head h2 { margin: 16px 0 12px; }
.pricing__head p { font-size: 17px; color: var(--muted); margin: 0; }

.billing-toggle-wrap { display: flex; justify-content: center; margin: 28px 0 44px; }
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--band);
  border: 1px solid var(--band-border);
  border-radius: 999px;
  padding: 4px;
}
.billing-toggle button {
  border: none;
  background: transparent;
  cursor: pointer;
  min-height: 44px;
  padding: 9px 20px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--body-soft);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.billing-toggle button small { font-size: 12px; color: var(--blue-deep); font-weight: 600; }
.billing-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(var(--shadow-rgb), 0.12);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  /* Every card takes the row's height, so the three bottoms line up and the
     "Add on" / "Nothing to add on" footers sit on one baseline. */
  align-items: stretch;
}
.plan {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.25s ease;
}
.plan--featured {
  border: 1.5px solid var(--blue);
  background:
    radial-gradient(90% 46% at 50% 0%, var(--blue-wash), transparent 72%),
    var(--surface);
  box-shadow: 0 24px 50px -28px rgba(var(--shadow-rgb), 0.3);
}
@media (hover: hover) {
  .plan:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--blue-mid); }
  .plan--featured:hover { border-color: var(--blue); }
}
.plan__flag {
  position: absolute;
  top: -13px;
  left: 34px;
  background: var(--blue);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 13px;
  border-radius: 999px;
}
.plan h3 { font-weight: 500; font-size: 23px; margin-bottom: 6px; }
.plan__for { font-size: 14.5px; color: var(--muted-2); margin: 0 0 22px; line-height: 1.5; }
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.plan__amount {
  font-family: var(--serif);
  font-size: 46px;
  color: var(--ink);
  line-height: 1;
}
.plan__per { font-size: 16px; color: var(--muted-2); }
.plan__note { font-size: 13px; color: var(--muted-4); margin: 0 0 26px; }
.plan__cta {
  text-decoration: none;
  display: block;
  text-align: center;
  background: var(--chip);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 13px;
  border-radius: 999px;
  margin-bottom: 26px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background-color 0.15s ease;
}
@media (hover: hover) {
  .plan__cta:hover { transform: translateY(-2px); background: var(--blue-soft); }
  .plan__cta--primary:hover { background: var(--blue); box-shadow: 0 10px 22px -8px rgba(var(--shadow-rgb), 0.4); }
}
.plan__cta--primary {
  background: var(--blue);
  color: var(--on-accent);
  box-shadow: 0 2px 8px rgba(var(--shadow-rgb), 0.16);
}
.plan__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.plan__features li {
  /* A hanging indent rather than a flex row: with `display: flex` a <strong>
     and the loose text after it become two separate flex items and sit side
     by side in columns ("Unlimited AI notes & dictation    — no add-on"). */
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: var(--body-mid);
  line-height: 1.45;
}
.plan__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-soft);
}
/* The tick inside the disc, drawn from two borders so it takes the palette. */
.plan__features li::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 5.5px;
  width: 5px;
  height: 8px;
  border: solid var(--blue-deep);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg) translate(-1.5px, -1.5px);
}
.plan__features strong { color: var(--ink); font-weight: 600; }

/* What a plan does NOT include, said on the card itself: video minutes and
   AI notes are bought as add-ons on Solo and Practice (and included on Clinic),
   so nobody discovers that at the first invoice. */
.plan__addons {
  /* auto top margin: in a stretched card the spare height goes above the
     footer, so it always sits at the bottom edge. */
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-row);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted-3);
}
.plan__addons strong { color: var(--body-soft); font-weight: 600; }
.plan__addons a { color: var(--blue-deep); }

/* ---------- FAQ ---------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 60px) var(--gutter) clamp(72px, 9vw, 110px);
}
.faq--flush-top { padding-top: clamp(64px, 8vw, 96px); padding-bottom: clamp(40px, 5vw, 56px); }
.faq__head { text-align: center; margin-bottom: 46px; }
.faq__head h2 { margin-top: 16px; }
.faq__list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
}
.faq-item:hover { border-color: var(--accent-mid); }
/* The open question stands a little proud of the others. */
.faq-item:has(.faq-item__q[aria-expanded="true"]) {
  border-color: var(--accent-mid);
  box-shadow: var(--shadow-card);
}
.faq-item__h { margin: 0; }
.faq-item__q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--sans);
}
.faq-item__q span:first-child {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
/* The sign: a plus drawn from two bars. Opening the answer turns the upright
   bar flat, leaving a minus, and fills the disc. */
.faq-item__sign {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--ease-out);
}
.faq-item__sign::before,
.faq-item__sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1.8px;
  margin: -0.9px 0 0 -5.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}
.faq-item__sign::after { transform: rotate(90deg); }
.faq-item__q[aria-expanded="true"] .faq-item__sign {
  background: var(--accent);
  color: var(--on-accent);
  transform: rotate(180deg);
}
.faq-item__q[aria-expanded="true"] .faq-item__sign::after { transform: rotate(0deg); }
.faq-item__a {
  padding: 0 24px 24px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--body-soft);
  max-width: 60ch;
}
.faq-item__a[hidden] { display: none; }

/* ---------- CTA / waitlist ---------- */
.cta { padding-bottom: clamp(72px, 9vw, 110px); }
.cta--pad-top { padding-top: clamp(40px, 5vw, 56px); }
.cta__box {
  background:
    radial-gradient(50% 80% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(44% 70% at 0% 100%, rgba(255, 255, 255, 0.1), transparent 70%),
    linear-gradient(135deg, var(--accent-fill), var(--accent-fill-2));
  border-radius: var(--radius-xl);
  padding: clamp(48px, 6vw, 76px) 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 70px -44px rgba(var(--shadow-rgb), 0.6);
}
.cta__ring {
  position: absolute;
  opacity: 0.18;
  color: #fff;
}
.cta__ring--tl { top: -80px; left: -60px; }
.cta__ring--br { bottom: -70px; right: -40px; }
.cta__content { position: relative; }
.cta__box h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  color: #fff;
  margin: 0 0 16px;
}
.cta__box > .cta__content > p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 32px;
  max-width: 30em;
}

.waitlist { max-width: 480px; margin: 0 auto; }
.role-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}
.role-toggle button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s;
}
.role-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

.waitlist__form { display: flex; gap: 8px; flex-wrap: wrap; }
.waitlist__form input[type="email"] {
  flex: 1;
  min-width: 220px;
  border: none;
  border-radius: 999px;
  padding: 16px 22px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(var(--shadow-rgb), 0.12);
}
.waitlist__form input[type="email"]::placeholder { color: var(--muted-4); }
.waitlist__err {
  color: #fff;
  font-size: 14px;
  margin-top: 12px;
  font-weight: 500;
}
.waitlist__err[hidden] { display: none; }
.waitlist__fine {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 14px;
}

.waitlist__done {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  padding: 30px;
}
.waitlist__done[hidden] { display: none; }
.waitlist__done-ring { display: flex; justify-content: center; margin-bottom: 14px; color: #fff; }
.waitlist__done-title {
  font-family: var(--serif);
  font-size: 26px;
  color: #fff;
  margin-bottom: 8px;
}
.waitlist__done-msg { font-size: 16px; color: rgba(255, 255, 255, 0.92); line-height: 1.55; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  background: var(--dark);
  color: var(--dark-link);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(36% 70% at 92% 0%, var(--dark-glow-sage), transparent 72%);
}
.site-footer a { text-decoration: none; color: var(--dark-link); font-size: 15px; transition: color 0.15s ease; }
.site-footer a:hover { color: #fff; }

.site-footer__grid {
  padding-top: clamp(56px, 7vw, 80px);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--dark-border);
}
.site-footer__brand-name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: #fff;
}
.site-footer__blurb {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-muted);
  margin: 16px 0 18px;
  max-width: 28em;
}
.site-footer__domain { font-size: 14px; color: var(--dark-faint); }
.site-footer__col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-faint);
  margin-bottom: 16px;
}
.site-footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
/* A link slides a few pixels towards where it goes. */
.site-footer__links a,
.site-footer__simple nav a { transition: color 0.15s ease, transform 0.25s var(--ease-out); }
@media (hover: hover) {
  .site-footer__links a:hover { transform: translateX(3px); }
}
/* On a touch screen each footer link is a 44px target. The padding is taken
   back out of the gap, so the list is no longer than before. */
@media (pointer: coarse) {
  .site-footer__links { gap: 0; }
  .site-footer__links a,
  .site-footer__simple nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer__simple nav { gap: 0 24px; }
}
.site-footer__trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.site-footer__simple {
  padding-top: clamp(48px, 6vw, 68px);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--dark-border);
}
.site-footer__simple nav { display: flex; flex-wrap: wrap; gap: 24px; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 13.5px;
  color: var(--dark-faint);
}
.site-footer__crisis {
  font-style: italic;
  font-family: var(--serif);
}

/* ---------- 404 ---------- */
/* The page is header + one short message + footer, so on anything taller than
   a phone it would end mid-screen with bare background under the footer. The
   body is a column that fills the viewport: the message area takes whatever
   height is spare and keeps its content centred, and the footer sits on the
   bottom edge. On a short viewport (a phone held sideways) it simply scrolls. */
.error-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.error-layout .site-header,
.error-layout .site-footer { flex: none; }
.error-layout .site-footer { margin-top: auto; }
.error-layout .site-footer__legal {
  justify-content: center;
  text-align: center;
}

.error-page {
  position: relative;
  isolation: isolate;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Scales with the viewport height rather than a fixed 80px, so a landscape
     phone is not mostly padding. */
  padding: clamp(32px, 8vh, 80px) var(--gutter);
}
/* The same light as the heroes, behind the one message. */
.error-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 52% at 50% 34%, var(--accent-glow), transparent 72%),
    radial-gradient(30% 40% at 14% 88%, var(--glow-sand), transparent 72%),
    radial-gradient(30% 40% at 88% 80%, var(--accent-glow-2), transparent 72%);
}
.error-page h1 { font-size: clamp(34px, 5vw, 56px); margin: 24px 0 14px; }
.error-page p { max-width: 34em; margin: 0 0 30px; }
.error-page .btn { max-width: 100%; }

/* ==========================================================================
   Responsive
   The breakpoints, widest first. Everything between them is fluid (clamp()
   type and spacing, minmax(0, 1fr) grids, scenes that scale as one picture),
   so these are the only widths at which the layout itself changes:

     1600px+  a wider container on large desktops
     1040px   the header's links fold into the menu
      960px   two-column sections stack (hero, spotlight, tracks, plans)
      720px   phone: tighter gutter, shorter header, single-column grids
      420px   small phone
     and a short landscape screen (a phone on its side) gets a lower header.
   ========================================================================== */
@media (min-width: 1600px) {
  :root { --container: 1280px; }
}

@media (min-width: 1041px) {
  /* The menu sheet belongs to the folded header only. */
  .mobile-nav { display: none; }
}

@media (max-width: 1040px) {
  .site-nav, .site-header__actions .signin-link { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header__inner { gap: 12px; }
  .site-header__actions { gap: 10px; }
}

/* Under this the bar holds the brand, the appearance button and the menu
   button; the call to action is the last row of the menu instead. */
@media (max-width: 560px) {
  .site-header__actions .btn { display: none; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* Stacked, the scene sits centred under the copy at its drawn size rather
     than stretching across a tablet. */
  .hero__visual { width: 100%; max-width: 540px; margin: 0 auto; }

  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience__grid { grid-template-columns: minmax(0, 1fr); }
  .spotlight__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .spotlight__visual { order: 2 !important; width: 100%; max-width: 560px; margin: 0 auto; }
  .spotlight__copy { order: 1 !important; }
  .mark__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tracks { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .steps__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .steps__grid::before { display: none; }
  .step { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  html { scroll-padding-top: 76px; }
  .site-header__inner { height: 64px; }
  .mobile-nav { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); }

  /* A phone's hero is tall and narrow: the pools of light are drawn wider
     and flatter, or they would read as vertical bands. */
  .hero::before {
    background:
      radial-gradient(90% 30% at 92% 16%, var(--accent-glow), transparent 72%),
      radial-gradient(80% 26% at 0% 2%, var(--glow-sand), transparent 72%),
      radial-gradient(90% 30% at 40% 72%, var(--accent-glow-2), transparent 72%);
  }
  .hero::after {
    -webkit-mask-image: radial-gradient(90% 46% at 80% 70%, #000 0%, transparent 74%);
    mask-image: radial-gradient(90% 46% at 80% 70%, #000 0%, transparent 74%);
  }

  .section-head, .section-head--narrow, .section-head--tight { margin-bottom: 36px; }
  /* The two hero buttons share the row, or take a row each if they must. */
  .hero__ctas .btn { flex: 1 1 auto; }
  .feature-grid, .feature-grid--two { grid-template-columns: minmax(0, 1fr); }
  .mark__tiles { gap: 12px; }
  .mark-tile { padding: 20px 14px; min-height: 104px; }
  .mark-tile__word { font-size: 22px; }
  .audience-card { padding: 28px 24px; }
  .track { padding: 30px 24px 28px; }
  .plan { padding: 28px 24px; }
  .cta__box { padding-left: 22px; padding-right: 22px; }
  /* The brand takes the full width; the link columns pair up beneath it. */
  .site-footer__grid { gap: 32px 24px; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
  .stats { gap: 26px 28px; }
  .spotlight p { font-size: 17px; }
}

@media (max-width: 420px) {
  :root { --gutter: 16px; }
  /* Ring above the wordmark: side by side they no longer fit a half-width tile. */
  .mark-tile { flex-direction: column; gap: 8px; }
  .mark-tile__word, .mark-tile--dark .mark-tile__word { font-size: 20px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .faq-item__q { padding: 20px 18px; }
  .faq-item__a { padding: 0 18px 22px; }
  .billing-toggle button { padding: 9px 14px; }
}

@media (max-height: 480px) and (orientation: landscape) {
  html { scroll-padding-top: 68px; }
  .site-header__inner { height: 56px; }
  .mobile-nav { max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
}

/* ==========================================================================
   Live platform stats — the "Presque, so far" band
   Populated at runtime from the app's /public/stats (see js/site.js). The
   section ships `hidden` and only reveals itself once at least one figure
   comes back, so a pre-launch or offline site shows nothing rather than
   placeholder numbers.
   ========================================================================== */
.scale {
  position: relative;
  padding: 76px 0;
  background:
    radial-gradient(40% 80% at 50% 0%, var(--accent-glow), transparent 72%),
    var(--band);
  border-top: 1px solid var(--band-border);
  border-bottom: 1px solid var(--band-border);
}
.scale[hidden] { display: none; }

/* Flex rather than grid: the number of figures is decided at runtime (a stat
   below its publish floor never arrives), and a centred flex row makes every
   count from one to six land looking deliberate — an auto-fit grid strands the
   remainder in a left-aligned final row. */
.scale__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px 12px;
  margin: 42px auto 0;
  padding: 0;
  /* Sized so the full set of six figures breaks 3 + 3 rather than stranding two
     on a second row; fewer figures simply centre on one line. */
  max-width: 820px;
}

.scale__item {
  flex: 0 1 240px;
  text-align: center;
  padding: 0 8px;
}

.scale__num {
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.scale__label {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.scale__note {
  margin: 40px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted-3);
}

/* ==========================================================================
   Capability groups — the full "everything Presque does" inventory
   A titled block of plain rows, so a long feature list stays scannable
   instead of becoming forty identical cards.
   ========================================================================== */
.cap-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.cap-group {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .cap-group:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--accent-mid);
  }
  .cap-group:hover .cap-group__icon { transform: rotate(-6deg) scale(1.06); }
}

.cap-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cap-group__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid));
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.4s var(--ease-out);
}

.cap-group__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.cap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cap-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body-soft);
}

/* The bullet is the brand's open ring, in miniature. */
.cap-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.6px solid var(--accent);
  border-left-color: transparent;
  transform: rotate(-20deg);
}

.cap-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Trust panel — the security story, linking to the app's live documents
   ========================================================================== */
.trust-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 56px);
  align-items: start;
}
.trust-panel__lede {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  margin: 14px 0 0;
}

.trust-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.trust-fact {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 20px 22px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .trust-fact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--accent-mid);
  }
}
.trust-fact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid));
  color: var(--accent-deep);
}

.trust-fact__title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.trust-fact p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--border-btn);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.doc-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.doc-link svg { flex: none; color: var(--accent-deep); }

/* ==========================================================================
   Dual sign-in / start doors (replaces the waitlist capture)
   ========================================================================== */
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
  text-align: left;
}

.door {
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 26px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: transform 0.4s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .door:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.32);
  }
}

.door__title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.25;
}

.door p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.door__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Underlined with a gradient rather than a border, so the link can be padded
   out to a 44px target and keep its line tight under the words. */
.door__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 4px;
}
.door__link:hover { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.8); }

/* A single full-width door (patient page) */
.doors--single { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .trust-panel { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 860px) {
  .cap-groups { grid-template-columns: minmax(0, 1fr); }
  .doors { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .scale { padding: 60px 0; }
  .scale__grid { gap: 28px 8px; }
  .scale__item { flex: 0 1 140px; }
  .scale__num { font-size: 34px; }
  .cap-group { padding: 26px 22px; }
}
/* Two to a row down to a small phone, where they take a row each. */
@media (max-width: 480px) {
  .trust-facts { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Legal documents — rendered in the site's own layout from the app's API
   (see js/site.js). The prose styles below dress markdown-derived HTML, so
   they target bare elements inside .legal-doc rather than classes.
   ========================================================================== */
.legal-page {
  padding: 64px 0 96px;
}

.legal-head {
  max-width: 760px;
  margin-bottom: 44px;
}
.legal-head h1 { margin: 8px 0 12px; }
.legal-head p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
}

.legal-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---- Document list ---- */
.legal-nav {
  position: sticky;
  top: 96px;
}
.legal-nav__title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-3);
  margin-bottom: 14px;
}
.legal-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-nav__list a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--body-soft);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.legal-nav__list a:hover {
  background: var(--chip);
  color: var(--ink);
}
.legal-nav__list a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
}

/* ---- The document itself ---- */
.legal-body { min-width: 0; }

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 44px 48px;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.72;
}
.legal-doc[hidden] { display: none; }

.legal-doc > :first-child { margin-top: 0; }
.legal-doc > :last-child { margin-bottom: 0; }

.legal-doc h1,
.legal-doc h2,
.legal-doc h3,
.legal-doc h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.legal-doc h1 { font-size: 32px; margin: 0 0 18px; }
.legal-doc h2 {
  font-size: 23px;
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border-row);
}
.legal-doc h3 { font-size: 18.5px; margin: 30px 0 10px; }
.legal-doc h4 { font-size: 16px; margin: 24px 0 8px; }

.legal-doc p { margin: 0 0 16px; }

.legal-doc a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc ul,
.legal-doc ol { margin: 0 0 16px; padding-left: 22px; }
.legal-doc li { margin-bottom: 7px; }

.legal-doc strong { color: var(--ink); font-weight: 600; }

/* The "Version 1.0 · Effective ..." preamble each document opens with. */
.legal-doc blockquote {
  margin: 0 0 26px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--chip);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: var(--body-soft);
}
.legal-doc blockquote p:last-child { margin-bottom: 0; }

.legal-doc hr {
  border: 0;
  border-top: 1px solid var(--border-row);
  margin: 32px 0;
}

/* Tables carry the compliance mappings; they must scroll rather than widen the page. */
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
}
.legal-doc thead th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--border);
  padding: 9px 12px 9px 0;
}
.legal-doc tbody td {
  border-bottom: 1px solid var(--border-row);
  padding: 9px 12px 9px 0;
  vertical-align: top;
}

.legal-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--chip);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ---- Index (no document chosen) ---- */
.legal-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
/* Scoped under .legal-doc: the index renders inside that container, so the
   generic `.legal-doc a` prose rule would otherwise underline these — they read
   as headings, not as links within a paragraph. */
.legal-doc .legal-index__link,
.legal-index__link {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
.legal-doc .legal-index__link:hover,
.legal-index__link:hover { color: var(--accent-deep); }
.legal-index__summary {
  margin: 4px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---- Loading / failure ---- */
.legal-state {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 40px 48px;
}
.legal-state[hidden] { display: none; }
.legal-state .skeleton { margin-bottom: 12px; }
.legal-state__title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 8px;
}
.legal-state__msg {
  margin: 14px 0 18px;
  font-size: 14.5px;
  color: var(--muted);
}

.legal-source {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted-3);
  text-align: right;
}
.legal-source[hidden] { display: none; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-nav { position: static; }
  .legal-nav__list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  /* Laid out in a row the documents are chips: each one outlined, so it
     reads as something to press rather than a run of words. */
  .legal-nav__list a {
    padding: 11px 15px;
    border: 1px solid var(--border-btn);
    border-radius: 999px;
    background: var(--surface);
  }
  .legal-nav__list a[aria-current="page"] { border-color: var(--accent-mid); }
}

@media (max-width: 720px) {
  .legal-page { padding: 44px 0 72px; }
  .legal-doc { padding: 28px 24px; font-size: 15px; }
  .legal-doc h1 { font-size: 26px; }
  .legal-doc h2 { font-size: 20px; }
  .legal-state { padding: 28px 24px; }
  /* The compliance tables are wide by nature — pan them, never the page. */
  .legal-doc table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ==========================================================================
   Add-ons — the two things billed by consumption rather than per practitioner
   ========================================================================== */
.addons {
  margin-top: 48px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.addons__head {
  max-width: 620px;
  margin-bottom: 26px;
}
.addons__title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.25;
}
.addons__head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.addons__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.addon {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 24px 26px;
}
.addon p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.addon__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-bottom: 10px;
}

.addon__name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.addon__price {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--accent-deep);
  white-space: nowrap;
}

.addon__unit {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted-3);
}

@media (max-width: 720px) {
  .addons__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Clinic rate card — the graduated per-seat ladder, published rather than
   hidden behind "contact us" (mirrors ClinicLadder in the application).
   ========================================================================== */
.ladder {
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.ladder__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-row);
  font-size: 14.5px;
  color: var(--body-soft);
}
.ladder__row:first-child { border-top: 0; }

.ladder__row--head {
  background: var(--chip);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-3);
}

.ladder__row span:nth-child(2) {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.ladder__row--head span:nth-child(2) {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted-3);
}

.ladder a {
  /* Padded out to a 44px target; the row is no taller for it. */
  display: inline-block;
  padding: 13px 0;
  margin: -13px 0;
  color: var(--accent-deep);
  font-weight: 600;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .ladder__row { padding: 12px 16px; gap: 8px; font-size: 13.5px; }
  .ladder__row span:nth-child(2) { font-size: 15px; }
}

/* ==========================================================================
   Clinician contact form ("Talk to us", clinicians page). Behaviour in
   site.js; the server half is api/src/contact.js.
   ========================================================================== */
.contact { padding: clamp(32px, 4vw, 48px) 0 clamp(8px, 2vw, 16px); }

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.contact__intro .h2-sm { margin: 16px 0; }
.contact__lede {
  margin: 0 0 28px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 30em;
}

.contact__notice {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 20px 22px;
}
.contact__notice .contact__notice-title {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
}
.contact__notice p {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
}
.contact__notice p:last-child { margin-bottom: 0; }
.contact__notice .contact__crisis { font-weight: 600; color: var(--ink); }

.contact__card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 38px);
  box-shadow: var(--shadow-card);
}

.contact-form { position: relative; }
.contact-form[hidden] { display: none; }

.contact-form__required {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field--wide { grid-column: 1 / -1; }
.field--check { margin-top: 22px; }

.field__label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.field__optional { font-weight: 400; color: var(--muted); }

.field__input {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 16px; /* 16px keeps iOS from zooming into the field */
  line-height: 1.4;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--border-btn);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__input:hover { border-color: var(--field-hover); }
.field__input:focus,
.field__input:focus-visible {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 1px var(--accent-deep), 0 0 0 4px var(--accent-soft);
}
textarea.field__input { min-height: 150px; resize: vertical; }

select.field__input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 16px center;
}
/* The "Choose one" placeholder reads as a hint, the options as answers. */
select.field__input:invalid { color: var(--muted); }
select.field__input option { color: var(--ink); }

.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 1px var(--error), 0 0 0 4px var(--error-ring);
}

.field__error {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--error);
}
.field__error[hidden] { display: none; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body);
  cursor: pointer;
}
.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: inherit;
}
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; border-radius: 4px; }

/* The honeypot. Off-screen rather than display:none, which some bots skip. */
.contact-form__trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Cloudflare Turnstile renders here, and is only visible when Cloudflare
   asks for an interaction. */
.contact-form__turnstile:not(:empty) { margin-top: 18px; }

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
}
.contact-form__actions .btn[disabled] { opacity: 0.72; cursor: progress; transform: none; }

.contact-form__status {
  flex: 1 1 220px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body);
}
.contact-form__status.is-error { color: var(--error); font-weight: 500; }
.contact-form__status a { color: inherit; text-underline-offset: 3px; }

.contact-form__fine {
  margin: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.contact-form__fine a { color: var(--accent-deep); text-underline-offset: 3px; }

.contact-done {
  padding: clamp(28px, 5vw, 56px) 8px;
  text-align: center;
}
.contact-done[hidden] { display: none; }
.contact-done:focus { outline: none; }
.contact-done__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.contact-done__title {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 28px);
  line-height: 1.2;
}
.contact-done p {
  margin: 0 auto;
  max-width: 32em;
  color: var(--body-soft);
}
.contact-done strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; }
  .contact__lede { max-width: none; }
}

@media (max-width: 560px) {
  .contact-form__grid { grid-template-columns: 1fr; }
  .contact-form__actions .btn { width: 100%; }
}

/* ---------- Cookie consent ----------
   A card pinned to the foot of the viewport, not a modal: the page stays
   usable behind it. Sits above the sticky header (50) and below the skip
   link (100). Follows --accent, so it turns blue on the clinicians page.

   It floats over cards that share its ground, so a card's own faint edge
   and soft shadow are not enough to tell it apart (it read as one more
   card, half-hidden among the others). It takes the raised surface, a firm
   edge, an accent bar along the top and a deeper, two-layer shadow, and it
   slides in, so the eye is drawn to it once without anything being blocked. */
.consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 680px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 26px 28px 24px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 4px 0 var(--accent),
    0 2px 6px rgba(var(--shadow-rgb), 0.1),
    0 28px 64px -14px rgba(var(--shadow-rgb), 0.45);
  animation: consent-in 0.32s cubic-bezier(0.22, 0.72, 0.28, 1) both;
}
.consent[hidden] { display: none; }

@keyframes consent-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.consent__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.consent__icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.consent__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.consent__title:focus { outline: none; }

.consent__text {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
}

/* Each choice is a row of its own on a tinted plate, the switch at its end,
   so the two read as two decisions rather than two lines of small print. */
.consent__options {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.consent__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 16px;
  background: var(--chip);
  border: 1px solid var(--border-row);
  border-radius: 14px;
  cursor: pointer;
}
.consent__option--locked { cursor: default; }
.consent__option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.consent__option-name { font-size: 15px; font-weight: 600; color: var(--ink); }
/* --body-soft, not --muted: on the tinted plate --muted falls to 4.27:1. */
.consent__option-hint { font-size: 13.5px; line-height: 1.45; color: var(--body-soft); }

/* The switch: a real checkbox (role="switch"), drawn as a track and a knob.
   Off is a solid grey that clears 3:1 against the plate; on is the accent.
   The locked "Necessary" switch stays drawn on — "always on" is information,
   and the browser's own disabled checkbox greyed it out to near-invisible. */
.consent__switch {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--switch-off);
  cursor: inherit;
  transition: background-color 0.15s ease;
}
.consent__switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  /* White on both palettes, as a phone's own switches draw it. */
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.consent__switch:checked { background: var(--accent); }
.consent__switch:checked::before { transform: translateX(18px); }
.consent__switch:disabled { opacity: 0.72; }
/* The base focus rule squares every input to 4px; keep the track round. */
.consent__switch:focus-visible { border-radius: 999px; outline-offset: 3px; }

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 12px;
}
.consent__actions .btn { font-size: 15px; padding: 12px 22px; }
/* Accept all and Reject all: one style, one size — neither is the "real" answer. */
.consent__choice { min-width: 124px; }
.consent__policy {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 22px 18px 18px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .consent__icon { width: 34px; height: 34px; }
  .consent__title { font-size: 21px; }
  .consent__text { font-size: 14.5px; }
  /* Accept and Reject share the first row, half each; Save takes the next. */
  .consent__actions .consent__choice { flex: 1 1 0; min-width: 0; }
  .consent__actions .consent__save { flex: 1 1 100%; }
  .consent__policy { flex-basis: 100%; margin-left: 0; text-align: center; }
}

/* ==========================================================================
   Product tour (home) — the platform inventory, one area at a time
   The same six capability groups as before, each beside a mock-up of the
   part of the product it describes. Without script every panel is on the
   page, one under the other, and the tab row is absent; site.js adds
   `is-ready`, shows the tabs and leaves one panel open (see "Product tour"
   in js/site.js). All six lists stay in the markup either way.
   ========================================================================== */
.tour { margin-top: 44px; }

.tour__tabs {
  display: none;
  gap: 6px;
  padding: 6px;
  margin: 0 0 20px;
  background: var(--band);
  border: 1px solid var(--band-border);
  border-radius: 999px;
}
.tour.is-ready .tour__tabs { display: flex; }

.tour__tab {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--body-soft);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tour__tab svg { flex: none; }
.tour__tab:hover { color: var(--ink); }
.tour__tab:focus-visible { border-radius: 999px; }
.tour__tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--accent-deep);
  box-shadow: 0 1px 4px rgba(var(--shadow-rgb), 0.16);
}

.tour__panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.2vw, 44px);
}
.tour__panel[hidden] { display: none; }
/* The base focus rule squares the corners; a focused panel keeps its own. */
.tour__panel:focus-visible { border-radius: var(--radius-lg); outline-offset: 3px; }
.tour__panel + .tour__panel { margin-top: 22px; }
.tour.is-ready .tour__panel + .tour__panel { margin-top: 0; }
.tour__copy { min-width: 0; }
.tour__copy .cap-group__title { font-size: 23px; }
.tour__stage { min-width: 0; }

/* Below the desktop the tabs stand as tiles: icon over label, all six in view
   at once (two rows of three on a phone) rather than a strip to scroll. */
@media (max-width: 1040px) {
  .tour__tabs { border-radius: 20px; }
  .tour__tab {
    flex-direction: column;
    gap: 6px;
    min-height: 66px;
    padding: 10px 6px;
    border-radius: 14px;
    font-size: 13px;
    text-align: center;
  }
  .tour__tab:focus-visible { border-radius: 14px; }
}
@media (max-width: 860px) {
  .tour__panel { grid-template-columns: minmax(0, 1fr); }
  /* The picture first, then what it shows. */
  .tour__stage { order: -1; }
}
@media (max-width: 720px) {
  .tour { margin-top: 32px; }
  .tour.is-ready .tour__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tour__copy .cap-group__title { font-size: 21px; }
}

/* ==========================================================================
   Mock-ups — small drawings of the product, made of markup rather than
   screenshots, so they follow the palette (light and dark) and stay sharp
   at any size. Each is one image to assistive technology (role="img" and a
   label in the markup).

   Like the hero scenes they are drawn in em, with the font-size tied to the
   width of the stage they sit on, so a mock-up is the same picture at 300px
   in a card and at 520px in the tour.
   ========================================================================== */
.viz-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(16px, 2.8vw, 32px);
  background:
    radial-gradient(70% 80% at 92% 0%, var(--accent-glow), transparent 70%),
    radial-gradient(60% 70% at 0% 100%, var(--glow-sand), transparent 70%),
    var(--accent-wash);
  container-type: inline-size;
}
.viz-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(135deg, transparent 20%, #000);
  mask-image: linear-gradient(135deg, transparent 20%, #000);
}

.viz {
  position: relative;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 0.85em;
  min-height: 21.5em;
  padding: 1.15em 1.25em 1.2em;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: 1.15em;
  box-shadow: var(--shadow-card);
  color: var(--body);
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
}
@supports (width: 1cqw) {
  .viz { font-size: clamp(8.5px, 2.9cqw, 15px); }
}
/* In a feature card the drawing runs off the stage's lower edge. */
.feature-card__stage .viz {
  min-height: 100%;
  border-bottom: 0;
  border-radius: 1.15em 1.15em 0 0;
  box-shadow: 0 -6px 30px -14px rgba(var(--shadow-rgb), 0.3);
}
@supports (width: 1cqw) {
  .feature-card__stage .viz { font-size: clamp(9px, 3.5cqw, 13.5px); }
}

/* Shared parts */
.viz__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
}
.viz__title { font-family: var(--serif); font-size: 1.2em; color: var(--ink); white-space: nowrap; }
.viz__hint { font-size: 0.84em; color: var(--muted-2); white-space: nowrap; }
.viz__seg {
  display: inline-flex;
  padding: 0.2em;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.78em;
  font-weight: 600;
  color: var(--body-soft);
}
.viz__seg i { font-style: normal; padding: 0.25em 0.75em; border-radius: 999px; }
.viz__seg .is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.16);
}
.viz__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
}
.viz__chips { display: flex; flex-wrap: wrap; gap: 0.5em; }
.viz__amount { font-family: var(--serif); font-size: 1.3em; color: var(--ink); white-space: nowrap; }
.viz-pill {
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.32em 0.85em;
  border-radius: 999px;
  background: var(--chip);
  color: var(--body-soft);
  white-space: nowrap;
}
.viz-pill--on { background: var(--accent-soft); color: var(--accent-deep); }
.viz-pill--solid { background: var(--accent); color: var(--on-accent); }
.viz .skeleton { display: block; height: 0.55em; margin-top: 0.5em; }
.viz .avatar { width: 2.6em; height: 2.6em; font-size: 0.8em; }

/* A list of bordered rows: tasks, the audit log, therapists, sharing. */
.viz-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.viz-rows li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.62em 0.8em;
  border: 1px solid var(--border-row);
  border-radius: 0.8em;
  background: var(--surface);
}
.viz-rows__main {
  flex: 1;
  min-width: 0;
  font-size: 0.94em;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.viz-rows__main small {
  display: block;
  font-size: 0.86em;
  font-weight: 400;
  color: var(--muted-2);
}

/* -- The diary: a week of sessions -- */
.diary {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1.5em repeat(5, minmax(0, 1fr));
  grid-template-rows: auto repeat(6, minmax(1.75em, 1fr));
  gap: 0.3em;
}
/* The hour lines behind the sessions. */
.diary::before {
  content: "";
  grid-column: 2 / -1;
  grid-row: 2 / -1;
  background: linear-gradient(var(--border-row) 1px, transparent 1px) 0 0 / 100% calc((100% + 0.3em) / 6);
}
.diary__day {
  grid-row: 1;
  grid-column: var(--c);
  padding-bottom: 0.15em;
  font-size: 0.74em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted-2);
}
.diary__day.is-today { color: var(--accent-deep); }
.diary__hr {
  grid-column: 1;
  grid-row: var(--r);
  font-size: 0.7em;
  line-height: 1;
  text-align: right;
  color: var(--muted-4);
}
.ev {
  grid-column: var(--c);
  grid-row: var(--r) / span var(--s, 1);
  z-index: 1;
  overflow: hidden;
  padding: 0.3em 0.45em;
  border-left: 0.22em solid var(--sage);
  border-radius: 0.5em;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
.ev small { display: block; font-size: 0.9em; font-weight: 400; opacity: 0.9; }
.ev--blue { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue); }
.ev--sand { background: var(--sand-soft); color: var(--sand-deep); border-color: var(--sand); }
/* Time blocked by an outside calendar: hatched, not a session. */
.ev--busy {
  background: repeating-linear-gradient(135deg, var(--chip) 0 0.45em, var(--surface) 0.45em 0.9em);
  color: var(--muted-2);
  border-color: var(--sep);
}
.diary__now {
  grid-column: 2 / -1;
  grid-row: var(--r);
  z-index: 2;
  align-self: center;
  height: 0;
  border-top: 1.5px solid var(--accent-deep);
}
.diary__now::before {
  content: "";
  position: absolute;
  width: 0.55em;
  height: 0.55em;
  margin: -0.31em 0 0 -0.2em;
  border-radius: 50%;
  background: var(--accent-deep);
}

/* -- A note, with a suggestion to accept or reject -- */
.note { display: flex; flex-direction: column; gap: 0.6em; }
.note__row { display: flex; align-items: flex-start; gap: 0.7em; }
.note__row b {
  flex: none;
  width: 1.9em;
  height: 1.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5em;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.78em;
}
.note__row p { flex: 1; min-width: 0; margin: 0; font-size: 0.9em; line-height: 1.4; color: var(--body-strong); }
.note__suggest {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.55em 0.65em;
  border: 1px dashed var(--sand);
  border-radius: 0.8em;
  background: var(--sand-soft);
}
.note__suggest svg { flex: none; width: 1.1em; height: 1.1em; color: var(--sand-deep); }
.note__suggest p { flex: 1; min-width: 0; margin: 0; font-size: 0.84em; line-height: 1.35; color: var(--sand-deep); }

/* -- A measure over time -- */
.chart { display: block; flex: 1; width: 100%; min-height: 0; overflow: visible; }
.chart__grid { fill: none; stroke: var(--border-row); stroke-width: 1; }
.chart__area { fill: var(--accent-soft); opacity: 0.75; }
.chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}
.chart__dot { fill: var(--surface); stroke: var(--accent-deep); stroke-width: 2.2; }
.chart__dot--last { fill: var(--accent-deep); }
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  padding: 0.4em 0.8em;
  border-radius: 0.7em;
  background: var(--chip);
  font-size: 0.82em;
  color: var(--body-soft);
  white-space: nowrap;
}
.score b { font-family: var(--serif); font-weight: 400; font-size: 1.5em; line-height: 1; color: var(--ink); }

/* -- Between sessions: the week's tasks -- */
.viz-check {
  flex: none;
  position: relative;
  width: 1.5em;
  height: 1.5em;
  border: 1.5px solid var(--sep);
  border-radius: 50%;
}
.is-done .viz-check { background: var(--sage); border-color: var(--sage); }
.is-done .viz-check::after {
  content: "";
  position: absolute;
  left: 0.46em;
  top: 0.2em;
  width: 0.36em;
  height: 0.7em;
  border: solid var(--on-accent);
  border-width: 0 0.15em 0.15em 0;
  transform: rotate(42deg);
}
.dots { display: flex; gap: 0.25em; }
.dots b { width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--skeleton); }
.dots .on { background: var(--sage); }

/* -- A video session, and the thread beside it -- */
.viz--meet { gap: 0.7em; padding: 0.8em; }
.call {
  position: relative;
  flex: 1;
  min-height: 11em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.8em;
  background: radial-gradient(90% 100% at 28% 18%, var(--sage-mid), var(--sage-soft) 58%, var(--blue-soft));
}
.viz .call__who { width: 4.4em; height: 4.4em; font-size: 1.25em; box-shadow: 0 0 0 0.5em var(--glow-sage); }
.call__tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78em;
  font-weight: 600;
  white-space: nowrap;
}
.call__tag--time { top: 0.9em; left: 0.9em; color: var(--body-soft); }
.call__tag--name { bottom: 0.9em; left: 0.9em; }
.call__self {
  position: absolute;
  top: 0.7em;
  right: 0.7em;
  width: 5.4em;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  border-radius: 0.6em;
  background: linear-gradient(135deg, var(--blue-soft), var(--blue-mid));
}
.call__controls { position: absolute; right: 0.7em; bottom: 0.7em; display: flex; gap: 0.4em; }
.call__controls i {
  width: 2.1em;
  height: 2.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}
.call__controls svg { width: 1.05em; height: 1.05em; }
.call__controls .is-end { background: var(--error); color: var(--on-accent); }
.bubbles { display: flex; align-items: center; gap: 0.5em; }
.bubble {
  padding: 0.48em 0.85em;
  border-radius: 1em 1em 1em 0.3em;
  background: var(--chip);
  color: var(--body-strong);
  font-size: 0.84em;
  white-space: nowrap;
}
.bubble--me {
  margin-left: auto;
  border-radius: 1em 1em 0.3em 1em;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* -- A receipt, sealed -- */
.receipt { display: flex; flex-direction: column; gap: 0.55em; }
.receipt__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  padding-bottom: 0.55em;
  border-bottom: 1px dashed var(--border-strong);
  font-size: 0.92em;
  white-space: nowrap;
}
.receipt__line b { font-family: var(--serif); font-weight: 400; font-size: 1.3em; color: var(--ink); }
.receipt__seal {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.84em;
  font-weight: 600;
  color: var(--accent-deep);
}
.receipt__seal svg { flex: none; width: 2em; height: 2em; }
.viz .mini-bars i { background: var(--accent-mid); }
.viz .mini-bars i:last-child { background: var(--accent); }

/* -- The audit log: each entry chained to the one before -- */
.audit li + li::before {
  content: "";
  position: absolute;
  left: 1.08em;
  top: -0.56em;
  height: 0.56em;
  border-left: 1.5px solid var(--sep);
}
.audit__dot {
  flex: none;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.22em var(--accent-soft);
}
.audit code {
  flex: none;
  padding: 0.2em 0.5em;
  border-radius: 0.4em;
  background: var(--chip);
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74em;
}

/* -- Sharing: who can see what -- */
.sw {
  flex: none;
  position: relative;
  width: 2.3em;
  height: 1.3em;
  border-radius: 999px;
  background: var(--switch-off);
}
.sw::after {
  content: "";
  position: absolute;
  top: 0.17em;
  left: 0.17em;
  width: 0.96em;
  height: 0.96em;
  border-radius: 50%;
  /* White on both palettes, as the consent banner's switch draws it. */
  background: #fff;
}
.sw--on { background: var(--sage); }
.sw--on::after { left: 1.17em; }

/* ==========================================================================
   Motion
   What moves, and the three rules it moves by:

   1. NOTHING DEPENDS ON IT. Every entrance is written with a `backwards`
      fill from a `from` keyframe, so the resting style is the finished
      drawing: a browser that runs no animation, or a visitor without script,
      sees everything, simply still.
   2. REDUCED MOTION MEANS NONE. The whole block sits inside
      `prefers-reduced-motion: no-preference`, and the base rule near the top
      of this file cuts anything else to a single instant pass.
   3. ONLY transform AND opacity move (and an SVG stroke offset), so motion is
      the compositor's work and never a layout.

   Two classes come from js/site.js. `reveal` / `is-revealed` fade a block up
   as it scrolls into view; it is only ever put on blocks that start below
   the fold, so nothing on screen blinks. `is-armed` holds a drawing's
   animations at their first frame until it is seen, and `is-inview` lets
   them run (a drawing already on screen at load is never armed).
   ========================================================================== */
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.7); } }
@keyframes scene-in { from { opacity: 0; transform: translateY(1.5em) scale(0.97); } }
@keyframes drift { to { transform: translateY(var(--drift-y, -0.6em)); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring-draw { from { stroke-dashoffset: 87; } }
@keyframes line-draw { from { stroke-dashoffset: 1; } }
@keyframes bar-fill { from { transform: scaleX(0); } }
@keyframes bar-grow { from { transform: scaleY(0); } }
@keyframes sun-rise { from { opacity: 0.2; transform: translateY(70px); } }
@keyframes cloud-pass { from { transform: translateX(-14px); } to { transform: translateX(30px); } }
@keyframes glow-drift { to { transform: translate3d(-3%, 2.5%, 0) scale(1.07); } }
@keyframes underline-draw { from { clip-path: inset(0 100% 0 0); } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--pulse); }
  70%, 100% { box-shadow: 0 0 0 0.75em transparent; }
}
@keyframes nav-item { from { opacity: 0; transform: translateY(-8px); } }
@keyframes price-flip { from { opacity: 0; transform: translateY(0.28em); } }
@keyframes read-progress { to { transform: scaleX(1); } }

/* Scroll reveal (classes from site.js). */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.75s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.75s var(--ease-out) var(--reveal-delay, 0s);
}

/* The spotlight's mock-up stands at a slight angle on a wide screen, and
   turns to face the reader under the pointer. */
@media (min-width: 961px) {
  .device-frame { transform: perspective(1400px) rotateY(-5deg) rotateX(2deg); }
  .spotlight__visual:hover .device-frame { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  /* -- Hero: the copy rises in, line by line -- */
  .hero__copy > * { animation: rise-in 0.7s var(--ease-out) backwards; }
  .hero__copy > :nth-child(1) { animation-delay: 0.04s; }
  .hero__copy > :nth-child(2) { animation-delay: 0.1s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.18s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.26s; }
  .hero__copy > :nth-child(5) { animation-delay: 0.34s; }
  .hero__copy > :nth-child(6) { animation-delay: 0.4s; }
  .display em::after,
  .display-sub em::after { animation: underline-draw 0.8s var(--ease-out) 0.8s backwards; }
  .hero::before { animation: glow-drift 20s ease-in-out infinite alternate; }
  .badge::before,
  .live-dot { --pulse: var(--accent-glow); animation: pulse-ring 2.6s ease-out infinite; }
  .live-dot { --pulse: var(--glow-sage); }

  /* -- Scenes: each card settles in, then floats at its own pace -- */
  .scene .float-card,
  .scene .portrait,
  .scene__sun {
    animation:
      scene-in 0.9s var(--ease-out) var(--in, 0.15s) backwards,
      drift var(--drift, 7s) ease-in-out calc(var(--in, 0.15s) + 0.9s) infinite alternate;
  }
  .match-card, .dash-card { --in: 0.12s; --drift: 7.6s; }
  .portrait { --in: 0.08s; --drift: 9s; --drift-y: -0.4em; }
  .week-card, .session-card { --in: 0.28s; --drift: 6.2s; --drift-y: 0.55em; }
  .trend-card { --in: 0.44s; --drift: 8.4s; }
  .chip-card, .checkin-card { --in: 0.6s; --drift: 5.6s; --drift-y: 0.5em; }
  .join-card, .share-card { --in: 0.76s; --drift: 6.8s; --drift-y: -0.5em; }
  .scene__sun { --in: 0s; --drift: 11s; --drift-y: -0.9em; }

  /* The landscape: the sun comes up, its ring closes round it, clouds pass. */
  .portrait__sun { animation: sun-rise 2.6s var(--ease-out) 0.2s backwards; }
  .portrait__ring { animation: ring-draw 2.4s var(--ease-out) 1s backwards; }
  .portrait__cloud { animation: cloud-pass 26s ease-in-out infinite alternate; }
  .portrait__cloud--far { animation-duration: 38s; animation-direction: alternate-reverse; }

  .scene__ring { animation: spin 110s linear infinite; }
  .scene__ring--small { animation-duration: 70s; animation-direction: reverse; }
  .scene__ring circle { animation: ring-draw 2.2s var(--ease-out) 0.25s backwards; }

  .week-card__bars span { animation: bar-fill 0.6s var(--ease-out) backwards; }
  .week-card__bars span:nth-child(1) { animation-delay: 1s; }
  .week-card__bars span:nth-child(2) { animation-delay: 1.1s; }
  .week-card__bars span:nth-child(3) { animation-delay: 1.2s; }
  .week-card__bars span:nth-child(4) { animation-delay: 1.3s; }
  .week-card__bars span:nth-child(5) { animation-delay: 1.4s; }

  .spark__line { stroke-dasharray: 1; animation: line-draw 1.5s var(--ease-out) 1.1s backwards; }
  .spark__area { animation: fade-in 0.9s ease 1.7s backwards; }
  .spark__dot { transform-box: fill-box; transform-origin: center; animation: pop-in 0.5s var(--ease-out) 2.3s backwards; }

  .mini-bars i { animation: bar-grow 0.6s var(--ease-out) backwards; }
  .mini-bars i:nth-child(1) { animation-delay: 0.9s; }
  .mini-bars i:nth-child(2) { animation-delay: 0.98s; }
  .mini-bars i:nth-child(3) { animation-delay: 1.06s; }
  .mini-bars i:nth-child(4) { animation-delay: 1.14s; }
  .mini-bars i:nth-child(5) { animation-delay: 1.22s; }
  .mini-bars i:nth-child(6) { animation-delay: 1.3s; }

  .mood-row .is-active { --pulse: var(--glow-sage); animation: pulse-ring 2.8s ease-out 1.2s infinite; }

  /* -- Mock-ups: each draws itself when it comes into view -- */
  .ev {
    transform-origin: 0 0;
    animation: pop-in 0.5s var(--ease-out) backwards;
    animation-delay: calc(0.1s + var(--c, 2) * 0.07s + var(--r, 2) * 0.04s);
  }
  .diary__now { transform-origin: 0 50%; animation: bar-fill 0.9s var(--ease-out) 0.9s backwards; }
  .viz-rows li,
  .note__row,
  .receipt__line { animation: rise-in 0.55s var(--ease-out) backwards; }
  .viz-rows li:nth-child(1), .note__row:nth-child(1), .receipt__line:nth-child(1) { animation-delay: 0.1s; }
  .viz-rows li:nth-child(2), .note__row:nth-child(2), .receipt__line:nth-child(2) { animation-delay: 0.22s; }
  .viz-rows li:nth-child(3), .note__row:nth-child(4) { animation-delay: 0.34s; }
  .viz-rows li:nth-child(4) { animation-delay: 0.46s; }
  .note__suggest { animation: rise-in 0.6s var(--ease-out) 0.6s backwards; }
  .note__suggest .viz-pill--on { --pulse: var(--accent-glow); animation: pulse-ring 2.4s ease-out 1.5s infinite; }
  .is-done .viz-check { animation: pop-in 0.45s var(--ease-out) 0.55s backwards; }
  .viz-rows li:nth-child(2).is-done .viz-check { animation-delay: 0.7s; }
  .dots b { animation: pop-in 0.35s var(--ease-out) backwards; animation-delay: calc(0.8s + var(--i, 0) * 0.06s); }

  .chart__line { animation: line-draw 1.7s var(--ease-out) 0.25s backwards; }
  .chart__area { animation: fade-in 1s ease 1.1s backwards; }
  .chart__dot { transform-box: fill-box; transform-origin: center; animation: pop-in 0.4s var(--ease-out) backwards; animation-delay: calc(0.35s + var(--i, 0) * 0.22s); }
  .score, .viz__chips .viz-pill { animation: rise-in 0.5s var(--ease-out) backwards; animation-delay: calc(0.5s + var(--i, 0) * 0.12s); }

  .call__self { animation: pop-in 0.5s var(--ease-out) 0.3s backwards; }
  .viz .call__who { animation: pop-in 0.6s var(--ease-out) 0.1s backwards; }
  .call__tag .live-dot { --pulse: var(--glow-sage); }
  .bubble { transform-origin: 0 100%; animation: pop-in 0.45s var(--ease-out) 0.7s backwards; }
  .bubble--me { transform-origin: 100% 100%; animation-delay: 1.15s; }
  .receipt__seal { animation: rise-in 0.55s var(--ease-out) 0.4s backwards; }
  .receipt__seal circle { animation: ring-draw 1.4s var(--ease-out) 0.5s backwards; }
  .receipt__seal path { stroke-dasharray: 1; animation: line-draw 0.5s ease 1.3s backwards; }
  .signal-bars span { animation: bar-grow 0.7s var(--ease-out) backwards; }
  .signal-bars span:nth-child(1) { animation-delay: 0.2s; }
  .signal-bars span:nth-child(2) { animation-delay: 0.28s; }
  .signal-bars span:nth-child(3) { animation-delay: 0.36s; }
  .signal-bars span:nth-child(4) { animation-delay: 0.44s; }
  .signal-bars span:nth-child(5) { animation-delay: 0.52s; }
  .signal-bars span:nth-child(6) { animation-delay: 0.6s; }

  /* Held at the first frame until seen (site.js), and stopped again when a
     scene has scrolled away, so nothing animates where nobody is looking. */
  .is-armed:not(.is-inview) *,
  .is-armed:not(.is-inview) *::before,
  .is-armed:not(.is-inview) *::after,
  .is-offscreen,
  .is-offscreen::before,
  .is-offscreen::after,
  .is-offscreen *,
  .is-offscreen *::before,
  .is-offscreen *::after { animation-play-state: paused !important; }

  /* -- The tour: a newly opened panel settles in -- */
  .tour.is-ready .tour__copy { animation: rise-in 0.5s var(--ease-out) backwards; }
  .tour.is-ready .tour__stage { animation: scene-in 0.6s var(--ease-out) 0.05s backwards; }

  /* -- The closing panel's rings turn, slowly, in opposite directions -- */
  .cta__ring { animation: spin 90s linear infinite; }
  .cta__ring--br { animation-duration: 120s; animation-direction: reverse; }

  /* -- The menu's links follow the sheet down -- */
  .mobile-nav.is-open a { animation: nav-item 0.35s var(--ease-out) backwards; }
  .mobile-nav.is-open a:nth-child(2) { animation-delay: 0.03s; }
  .mobile-nav.is-open a:nth-child(3) { animation-delay: 0.06s; }
  .mobile-nav.is-open a:nth-child(4) { animation-delay: 0.09s; }
  .mobile-nav.is-open a:nth-child(5) { animation-delay: 0.12s; }
  .mobile-nav.is-open a:nth-child(6) { animation-delay: 0.15s; }
  .mobile-nav.is-open a:nth-child(7) { animation-delay: 0.18s; }
  .mobile-nav.is-open a:nth-child(8) { animation-delay: 0.21s; }

  /* -- A price that has just changed (the billing toggle) -- */
  .plan__amount.is-changed,
  .plan__note.is-changed { animation: price-flip 0.4s var(--ease-out) backwards; }

  /* -- The 404's ring draws itself, and turns -- */
  .error-page > svg { animation: spin 40s linear infinite; }
  .error-page > svg circle { animation: ring-draw 1.6s var(--ease-out) 0.2s backwards; }
}

/* How far down the page the reader is, drawn along the header's lower edge.
   Tied to the scroll position itself (a scroll timeline), so it costs no
   script; a browser without scroll timelines simply has no line. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .site-header::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      pointer-events: none;
      background: linear-gradient(90deg, var(--accent), var(--accent-light));
      transform: scaleX(0);
      transform-origin: 0 50%;
      animation: read-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}

/* ---------- Print ----------
   Paper gets the words: no sticky bar, no banner, nothing held back waiting
   to be scrolled to, and every panel of the tour. */
@media print {
  .site-header, .mobile-nav, .consent, .hero__visual, .tour__tabs { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .tour__panel[hidden] { display: grid !important; }
  .tour__panel + .tour__panel { margin-top: 22px !important; }
  .faq-item__a[hidden] { display: block !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
