/* ==========================================================================
   2hives brand.css — tokens + base components
   Source: brand/src/brand.src.css  ->  python3 brand/tools/build_css.py
   Colour tokens are generated from brand/tools/palette.py (contrast-checked).
   Teal: --accent is decorative (icons, borders, rails, progress); any teal surface that carries text uses
   --accent-fill / -hover / -active (white label >= 7:1 in light, navy label >= 8:1 in dark).
   Fonts: Outfit (display), Figtree (text), Atkinson Hyperlegible Mono (data). All OFL, self-hosted.
   Theme: follows prefers-color-scheme; <html data-theme="light|dark"> forces one.
   ========================================================================== */

/* ---------- fonts ---------- */
@font-face { font-family: "Outfit"; src: url("fonts/outfit-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-variable.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-italic-variable.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("fonts/atkinson-hyperlegible-mono-variable.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
/* Hindi (Devanagari): Noto Sans Devanagari, subset to the Devanagari block; unicode-range means the files are only fetched on pages that use the script */
@font-face { font-family: "Noto Sans Devanagari"; src: url("fonts/noto-sans-devanagari-regular.woff2") format("woff2"); font-weight: 100 599; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("fonts/noto-sans-devanagari-bold.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

/* ---------- tokens ---------- */
:root {
  --bg: #f4f1ea; --surface: #fffdf8; --surface-2: #ebe7dd; --line: #ddd7cb;
  --line-strong: #8a8475; --text: #16202c; --muted: #56606d; --faint: #666e7a;
  --accent: #3f7f6a; --accent-ink: #2f6656; --accent-fill: #20624f; --accent-fill-hover: #185644;
  --accent-fill-active: #124a3a; --on-accent: #ffffff; --accent-soft: #dcebe4; --glow: #e7b994;
  --glow-ink: #8a5418; --glow-soft: #f8e9d7; --focus: #2f6fde; --success: #1f7a4d;
  --success-bg: #e2f2e8; --warn: #8a5a00; --warn-bg: #fbf0d6; --error: #b42318;
  --error-bg: #fbe9e6; --on-error: #ffffff; --info: #2b5fa8; --info-bg: #e3ecf8;
  --delta: #4b4fb0; --theta: #2c67a6; --alpha: #1e7064; --beta: #9a5d0c;
  --gamma: #ad3f5c; --delta-bg: #e6e7f7; --theta-bg: #e1ebf6; --alpha-bg: #ddefea;
  --beta-bg: #f6ebda; --gamma-bg: #f7e3e8; --on-phase: #ffffff;
  color-scheme: light;

  /* legacy aliases so the current style.css keeps working during adoption */
  --accent-text: var(--on-accent); --ok: var(--success); --brand: var(--accent);
  --accent-hover: var(--accent-fill-hover);

  /* type */
  --font-display: "Outfit", "Noto Sans Devanagari", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-text: "Figtree", "Noto Sans Devanagari", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.8125rem;   /* 13 — legal, axis labels */
  --text-sm: 0.875rem;    /* 14 — meta, help */
  --text-base: 1.0625rem; /* 17 — body */
  --text-md: 1.1875rem;   /* 19 — lead, h4 */
  --text-lg: 1.5rem;      /* 24 — h3 / section */
  --text-xl: 2rem;        /* 32 — h2 / page title */
  --text-2xl: clamp(2.25rem, 1.6rem + 2.6vw, 3rem);    /* 36→48 — h1 */
  --text-3xl: clamp(2.6rem, 1.7rem + 4vw, 4.25rem);    /* 42→68 — hero display */
  --leading-tight: 1.1; --leading-snug: 1.25; --leading-body: 1.6;
  --tracking-display: -0.02em; --tracking-label: 0.06em;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;
  --measure: 66ch;

  /* space — 8-pt (4 for fine adjustments) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --gutter: 16px; --container: 1120px; --container-narrow: 640px;

  /* radius */
  --radius-sm: 6px; --radius: 10px; --radius-card: 14px; --radius-lg: 20px; --radius-pill: 999px;

  /* elevation — navy-tinted, never grey */
  --shadow-1: 0 1px 2px rgb(15 20 32 / 0.06), 0 1px 1px rgb(15 20 32 / 0.04);
  --shadow-2: 0 2px 4px rgb(15 20 32 / 0.05), 0 12px 28px -10px rgb(15 20 32 / 0.18);
  --shadow-3: 0 4px 8px rgb(15 20 32 / 0.06), 0 28px 60px -18px rgb(15 20 32 / 0.30);
  --ring: 0 0 0 3px var(--focus);

  /* motion — "settle": quick start, long soft landing */
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-breathe: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 420ms; --dur-breath: 5.5s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420; --surface: #171e2e; --surface-2: #1f2739; --line: #2a3346;
    --line-strong: #6a7690; --text: #eceae4; --muted: #a3abba; --faint: #8d96a7;
    --accent: #7fb7a4; --accent-ink: #8cc2af; --accent-fill: #7fb7a4; --accent-fill-hover: #97c8b7;
    --accent-fill-active: #a7d7c6; --on-accent: #0f1420; --accent-soft: #1b3330; --glow: #e7b994;
    --glow-ink: #efc59d; --glow-soft: #33261c; --focus: #8fb4ff; --success: #6fd3a0;
    --success-bg: #12301f; --warn: #f3c46b; --warn-bg: #33280f; --error: #ff9b8f;
    --error-bg: #3a1a1a; --on-error: #0f1420; --info: #93b8f5; --info-bg: #172640;
    --delta: #9aa0f2; --theta: #7fb0e6; --alpha: #6cc6b2; --beta: #e9b061;
    --gamma: #ef93a8; --delta-bg: #22264a; --theta-bg: #162b45; --alpha-bg: #123430;
    --beta-bg: #3a2a14; --gamma-bg: #3d1d27; --on-phase: #0f1420;
    color-scheme: dark;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.35);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.3), 0 14px 32px -12px rgb(0 0 0 / 0.55);
    --shadow-3: 0 4px 8px rgb(0 0 0 / 0.35), 0 30px 64px -18px rgb(0 0 0 / 0.7);
  }
}
:root[data-theme="dark"] {
    --bg: #0f1420; --surface: #171e2e; --surface-2: #1f2739; --line: #2a3346;
    --line-strong: #6a7690; --text: #eceae4; --muted: #a3abba; --faint: #8d96a7;
    --accent: #7fb7a4; --accent-ink: #8cc2af; --accent-fill: #7fb7a4; --accent-fill-hover: #97c8b7;
    --accent-fill-active: #a7d7c6; --on-accent: #0f1420; --accent-soft: #1b3330; --glow: #e7b994;
    --glow-ink: #efc59d; --glow-soft: #33261c; --focus: #8fb4ff; --success: #6fd3a0;
    --success-bg: #12301f; --warn: #f3c46b; --warn-bg: #33280f; --error: #ff9b8f;
    --error-bg: #3a1a1a; --on-error: #0f1420; --info: #93b8f5; --info-bg: #172640;
    --delta: #9aa0f2; --theta: #7fb0e6; --alpha: #6cc6b2; --beta: #e9b061;
    --gamma: #ef93a8; --delta-bg: #22264a; --theta-bg: #162b45; --alpha-bg: #123430;
    --beta-bg: #3a2a14; --gamma-bg: #3d1d27; --on-phase: #0f1420;
  color-scheme: dark;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-2: 0 2px 4px rgb(0 0 0 / 0.3), 0 14px 32px -12px rgb(0 0 0 / 0.55);
  --shadow-3: 0 4px 8px rgb(0 0 0 / 0.35), 0 30px 64px -18px rgb(0 0 0 / 0.7);
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 1ms; --dur-breath: 0s; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-text); font-size: var(--text-base); line-height: var(--leading-body);
  font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display {
  font-family: var(--font-display); font-weight: var(--weight-medium); letter-spacing: var(--tracking-display);
  line-height: var(--leading-snug); margin: 0 0 0.4em; text-wrap: balance; color: var(--text);
}
.display { font-size: var(--text-3xl); line-height: var(--leading-tight); font-weight: 400; letter-spacing: -0.03em; }
h1, .h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); }
h2, .h2 { font-size: var(--text-xl); }
h3, .h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
h4, .h4 { font-size: var(--text-md); letter-spacing: -0.005em; font-weight: var(--weight-semibold); }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
.lead { font-size: var(--text-md); color: var(--muted); max-width: 56ch; }
.eyebrow { font-family: var(--font-text); font-size: var(--text-xs); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-ink); margin: 0 0 var(--space-2); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: var(--text-sm); } .xsmall { font-size: var(--text-xs); }
.mono, code, kbd, time.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }
.num { font-family: inherit; font-size: inherit; }
strong, b { font-weight: var(--weight-semibold); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.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; }
.skip { position: absolute; left: -999px; top: var(--space-2); z-index: 50; background: var(--surface); color: var(--text);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius); box-shadow: var(--shadow-2); }
.skip:focus { left: var(--space-2); }

/* links */
a { color: var(--accent-ink); text-decoration-line: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color var(--dur-1) ease, color var(--dur-1) ease; }
a:hover { text-decoration-color: currentColor; }
a.quiet { color: inherit; text-decoration: none; } a.quiet:hover { color: var(--accent-ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.3em; font-weight: var(--weight-semibold); text-decoration: none; }
.link-arrow .icon { transition: transform var(--dur-2) var(--ease-settle); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* icons */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 1em; height: 1em; vertical-align: -0.125em; } .icon-lg { width: 1.5em; height: 1.5em; }

/* layout helpers */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { gap: var(--space-2); } .stack-lg { gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.section { padding-block: var(--space-8); }
@media (min-width: 720px) { :root { --gutter: 24px; } }
@media (min-width: 1080px) { :root { --gutter: 32px; } }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--accent-fill); --btn-fg: var(--on-accent); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius); border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font: var(--weight-semibold) 0.95rem/1.2 var(--font-text);
  letter-spacing: 0.005em; text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease, color var(--dur-1) ease,
    box-shadow var(--dur-2) var(--ease-settle), transform var(--dur-1) ease;
}
.btn:hover { --btn-bg: var(--accent-fill-hover); }
.btn:active { --btn-bg: var(--accent-fill-active); transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus); }
.btn-primary { box-shadow: var(--shadow-1); }
.btn-secondary, .btn-outline { --btn-bg: transparent; --btn-fg: var(--accent-ink); --btn-bd: var(--accent); }
.btn-secondary:hover, .btn-outline:hover { --btn-bg: var(--accent-soft); }
.btn-tertiary, .btn-text { --btn-bg: transparent; --btn-fg: var(--accent-ink); --btn-bd: transparent; padding-inline: var(--space-2);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; }
.btn-tertiary:hover, .btn-text:hover { --btn-bg: transparent; text-decoration-color: currentColor; }
.btn-quiet, .btn.ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-strong); }
.btn-quiet:hover, .btn.ghost:hover { --btn-bg: var(--surface-2); }
.btn-big, .btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: var(--text-sm); }
.btn-block { width: 100%; }
.btn-icon { min-width: 44px; padding: 0; --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line); }
.btn-icon:hover { --btn-bg: var(--surface-2); }
.btn:disabled, .btn[aria-disabled="true"], .btn.is-disabled {
  --btn-bg: var(--surface-2); --btn-fg: var(--faint); --btn-bd: transparent; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-secondary:disabled, .btn-tertiary:disabled { --btn-bg: transparent; --btn-bd: var(--line); }
.btn .icon { width: 1.15em; height: 1.15em; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: var(--space-4); }
label, .label { font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--text); }
.help { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.input, input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-2) var(--ease-settle);
}
textarea { min-height: 7.5em; resize: vertical; line-height: var(--leading-body); }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369717d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
::placeholder { color: var(--faint); opacity: 1; }
.input:hover, input:hover, textarea:hover, select:hover { border-color: var(--muted); }
.input:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-size: var(--text-sm); font-weight: var(--weight-semibold); display: flex; gap: 6px; align-items: flex-start; margin: 0; }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }

/* chips: example prompts */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 var(--text-sm)/1.2 var(--font-text);
  cursor: pointer; transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease; }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- disclosure ---------- */
details.disclosure { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
details.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-3);
  min-height: 52px; padding: var(--space-3) var(--space-4); font-weight: var(--weight-semibold); border-radius: var(--radius-card); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: ""; margin-left: auto; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  color: var(--muted); transition: transform var(--dur-2) var(--ease-settle); }
details.disclosure[open] > summary::after { transform: rotate(180deg); }
details.disclosure > summary:hover { background: var(--surface-2); }
details.disclosure > summary .summary-meta { font-weight: 400; color: var(--muted); font-size: var(--text-sm); margin-left: auto; text-align: right; }
details.disclosure > summary:has(.summary-meta)::after { margin-left: 0; }
details.disclosure > .disclosure-body { padding: 0 var(--space-4) var(--space-4); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-5); }
.card-flat { background: var(--surface-2); border-color: transparent; }
.card > :last-child { margin-bottom: 0; }

.jgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.jcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden; transition: box-shadow var(--dur-3) var(--ease-settle), transform var(--dur-3) var(--ease-settle), border-color var(--dur-2) ease; }
.jcard-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.jcard-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.jcard-link:focus-visible { outline: none; } .jcard:has(.jcard-link:focus-visible) { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus); }
.jcard:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: transparent; }
.jcard-art { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0f1420; }
.jcard-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease-settle); }
.jcard:hover .jcard-art img { transform: scale(1.03); }
.jcard-media { position: relative; overflow: hidden; }
.jcard-media .badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.jcard-body { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-5) var(--space-5); flex: 1; }
.jcard-name { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
.jcard-promise { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }
.jcard-meta { margin-top: auto; padding-top: var(--space-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--text-sm); color: var(--muted); }
.jcard.is-soon .jcard-art img { filter: saturate(0.7) brightness(0.92); }
@media (min-width: 760px) {
  .jcard-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr; }
  .jcard-wide .jcard-link { display: contents; }
  .jcard-wide .jcard-art { aspect-ratio: 16 / 9; height: 100%; }
  .jcard-wide .jcard-body { justify-content: center; padding: var(--space-6); }
  .jcard-wide .jcard-name { font-size: var(--text-xl); }
  .jcard-wide .jcard-meta { margin-top: var(--space-3); }
}

/* ---------- badges ---------- */
.badge, .pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  font: var(--weight-semibold) 0.75rem/1 var(--font-text); letter-spacing: 0.02em; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid transparent; }
.badge .icon { width: 13px; height: 13px; stroke-width: 2; }
.badge-free { background: var(--glow-soft); color: var(--glow-ink); }
.badge-soon, .pill { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge-owned { background: var(--accent-soft); color: var(--accent-ink); }
.badge-locked { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.badge-next, .pill-next { background: var(--glow-soft); color: var(--glow-ink); }
.badge-on-art { background: rgb(15 20 32 / 0.62); color: #f4f1ea; border-color: rgb(255 255 255 / 0.16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* phase badges (editor line table) */
.badge.state-delta { background: var(--delta-bg); color: var(--delta); } .badge.state-theta { background: var(--theta-bg); color: var(--theta); }
.badge.state-alpha { background: var(--alpha-bg); color: var(--alpha); } .badge.state-beta { background: var(--beta-bg); color: var(--beta); }
.badge.state-gamma { background: var(--gamma-bg); color: var(--gamma); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- progress ---------- */
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.progress-label strong { color: var(--text); }
.progress-track, progress.progress-bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 6px; border: 0;
  border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: var(--value, 0%); border-radius: inherit; background: var(--accent);
  transition: width var(--dur-3) var(--ease-settle); }
progress.progress-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--radius-pill); }
progress.progress-bar::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-pill); }
progress.progress-bar::-moz-progress-bar { background: var(--accent); border-radius: var(--radius-pill); }
.progress-stages { display: flex; gap: 4px; }
.progress-stages > span { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); position: relative; overflow: hidden; }
.progress-stages > span::before { content: ""; position: absolute; inset: 0; width: var(--value, 0%); background: var(--accent); border-radius: inherit; }
.progress-indeterminate .progress-fill { width: 30%; animation: twh-slide 1.6s var(--ease-breathe) infinite; }
@keyframes twh-slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* ---------- session rows ---------- */
.srows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.srow { border-bottom: 1px solid var(--line); }
.srow-link { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--space-3);
  min-height: 60px; padding: var(--space-3) var(--space-2); color: inherit; text-decoration: none; border-radius: var(--radius);
  transition: background-color var(--dur-1) ease; }
a.srow-link:hover { background: var(--surface-2); }
.srow-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--faint); position: relative; }
.srow-icon .icon { width: 22px; height: 22px; }
.srow-n { font: 500 var(--text-xs)/1 var(--font-text); font-variant-numeric: tabular-nums; color: var(--faint); min-width: 2.2em; }
.srow-main { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.srow-title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.srow-meta { font-size: var(--text-sm); color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: var(--space-2); }
.srow-why { font-size: var(--text-sm); color: var(--muted); }
.srow.is-done .srow-icon { color: var(--accent); }
.srow.is-done .srow-title { color: var(--muted); font-weight: 500; }
.srow.is-next .srow-link { background: color-mix(in srgb, var(--glow-soft) 70%, transparent); box-shadow: inset 3px 0 0 var(--glow); }
.srow.is-next .srow-icon { color: var(--on-accent); background: var(--accent-fill); }
.srow.is-next .srow-icon .icon { width: 16px; height: 16px; margin-left: 2px; }
.srow.is-locked .srow-title { color: var(--muted); font-weight: 500; }
.srow.is-locked .srow-link { cursor: default; }

/* stage accordion uses details.disclosure; stage summary pieces */
.stage-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stage-name { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.01em; }
.stage-summary { font-weight: 400; font-size: var(--text-sm); color: var(--muted); }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-logo { height: 28px; width: auto; display: block; }
.brand-logo .i { stroke: var(--accent); } .brand-logo .w { fill: var(--text); }
.site-nav { display: flex; align-items: center; gap: var(--space-1); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.site-nav .btn { margin-left: var(--space-2); color: var(--on-accent); }
.site-nav .btn:hover { background: var(--accent-fill-hover); color: var(--on-accent); }
.nav-menu { display: none; position: relative; }
.nav-menu > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover { background: var(--surface-2); }
.nav-menu[open] > summary .i-menu, .nav-menu:not([open]) > summary .i-close { display: none; }
.nav-menu > nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; display: flex; flex-direction: column;
  padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-3); }
.nav-menu > nav a { padding: var(--space-3); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500; }
.nav-menu > nav a:hover { background: var(--surface-2); }
@media (max-width: 680px) { .site-nav.nav-wide { display: none; } .nav-menu { display: block; } }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 0; margin: 0;
  font-size: var(--text-sm); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs li + li::before { content: ""; width: 14px; height: 14px; background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 500; }
.back-link a { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); text-decoration: none; font-weight: 500; }

/* footer */
.site-footer { margin-top: var(--space-9); border-top: 1px solid var(--line); padding-block: var(--space-7) var(--space-6); color: var(--muted); font-size: var(--text-sm); }
.site-footer .footer-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; }
.site-footer a { color: var(--muted); } .site-footer a:hover { color: var(--accent-ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); list-style: none; padding: 0; margin: 0; }
.footer-safety { display: flex; gap: var(--space-3); align-items: flex-start; max-width: 60ch; }
.footer-safety .icon { color: var(--accent); margin-top: 2px; }
.footer-legal { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--faint); }

/* ---------- alerts / toast ---------- */
.alert { --a-fg: var(--info); --a-bg: var(--info-bg);
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  background: var(--a-bg); color: var(--text); font-size: 0.97rem; line-height: 1.5; }
.alert > .icon { color: var(--a-fg); margin-top: 2px; }
.alert-title { font-weight: var(--weight-semibold); color: var(--a-fg); display: block; }
.alert p { margin: 0; }
.alert-success { --a-fg: var(--success); --a-bg: var(--success-bg); }
.alert-warn, .notice { --a-fg: var(--warn); --a-bg: var(--warn-bg); }
.alert-error { --a-fg: var(--error); --a-bg: var(--error-bg); }
.toast-region { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--space-2); width: min(440px, calc(100vw - 2 * var(--gutter))); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-radius: var(--radius-card); background: var(--text); color: var(--bg); box-shadow: var(--shadow-3); font-weight: 500;
  animation: twh-rise var(--dur-3) var(--ease-settle) both; }
.toast .icon { color: var(--accent-soft); }
.toast .btn-icon { --btn-fg: var(--bg); --btn-bd: transparent; margin-left: auto; min-height: 36px; min-width: 36px; }
.toast .btn-icon:hover { --btn-bg: color-mix(in srgb, var(--bg) 14%, transparent); }
@keyframes twh-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- stepper (editor: Make it yours → Listen → Keep it) ---------- */
.steps { list-style: none; display: flex; gap: var(--space-2); padding: 0; margin: 0 0 var(--space-5); counter-reset: step; }
.steps li { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm); color: var(--muted); font-weight: 500; min-width: 0; }
.steps li::before { content: ""; height: 4px; border-radius: var(--radius-pill); background: var(--surface-2); }
.steps li[aria-current="step"] { color: var(--text); font-weight: var(--weight-semibold); }
.steps li[aria-current="step"]::before { background: var(--accent); }
.steps li.is-done::before { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.steps .step-n { font-family: var(--font-text); font-variant-numeric: tabular-nums; font-size: var(--text-xs); color: var(--faint); margin-right: 6px; }
.step-panel { display: flex; flex-direction: column; gap: var(--space-4); }
.step-title { display: flex; align-items: baseline; gap: var(--space-3); }
.step-title .step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); font: 600 var(--text-sm)/1 var(--font-text); color: var(--accent-ink); flex: none; align-self: center; }
.step-title { align-items: center; }

/* ---------- audio player shell ---------- */
.player { --art: none; display: grid; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.player-main { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-4); }
.player-art { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; display: block; background: #0f1420; }
.player-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-kicker { font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.player-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: anywhere; }
.player-chapter { font-size: var(--text-sm); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.player-chapter .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--phase, var(--accent)); }
.player-scrub { display: grid; gap: 6px; }
.player-bar { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; }
.player-bar .lane { position: absolute; inset: 11px 0; height: 6px; }
.player-bar .lane { border-radius: var(--radius-pill); } .player-bar .lane .lane-seg { opacity: 0.4; padding: 0; font-size: 0; }
.player-bar .played { position: absolute; left: 0; top: 11px; height: 6px; width: var(--value, 0%); border-radius: var(--radius-pill);
  background: var(--accent); }
.player-bar .thumb { position: absolute; left: var(--value, 0%); top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-1); }
.player-times { display: flex; justify-content: space-between; font: 500 var(--text-xs)/1 var(--font-text); color: var(--muted); font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-4); }
.player-controls .side { flex: 1; display: flex; gap: var(--space-2); }
.player-controls .side:last-child { justify-content: flex-end; }
.player-pp { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--shadow-2); transition: transform var(--dur-2) var(--ease-settle), background-color var(--dur-1) ease; }
.player-pp:hover { background: var(--accent-fill-hover); transform: scale(1.04); }
.player-pp:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--focus); }
.player-pp .icon { width: 28px; height: 28px; }
.player-pp .icon-play { margin-left: 3px; fill: currentColor; }
.player-skip { position: relative; }
.player-skip .skip-n { position: absolute; font: 700 8px/1 var(--font-mono); top: 50%; left: 50%; transform: translate(-50%, -38%); }
.player.is-playing .player-pp { animation: twh-breathe var(--dur-breath) var(--ease-breathe) infinite; }
@keyframes twh-breathe { 0%, 100% { box-shadow: var(--shadow-2), 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: var(--shadow-2), 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); } }
.player-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); margin: 0; }
.player-note .icon { color: var(--accent); }
@media (min-width: 640px) { .player { padding: var(--space-5); } .player-art { width: 88px; height: 88px; } }

/* ---------- phase lane ---------- */
.lane { display: flex; width: 100%; height: 36px; gap: 2px; border-radius: var(--radius-sm); overflow: hidden; }
.lane-seg { flex: var(--w, 1) 1 0; min-width: 3px; display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap;
  color: var(--on-phase); font: 600 0.72rem/1 var(--font-text); letter-spacing: 0.02em; background: var(--alpha); }
.lane-seg.state-delta { background: var(--delta); } .lane-seg.state-theta { background: var(--theta); }
.lane-seg.state-alpha { background: var(--alpha); } .lane-seg.state-beta { background: var(--beta); }
.lane-seg.state-gamma { background: var(--gamma); }
.lane-sm { height: 10px; border-radius: var(--radius-pill); } .lane-sm .lane-seg { padding: 0; font-size: 0; }
.lane-axis { display: flex; justify-content: space-between; margin-top: 6px; font: 500 var(--text-xs)/1 var(--font-text); font-variant-numeric: tabular-nums; color: var(--muted); }
.lane-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding: 0; margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--muted); }
.lane-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lane-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.lane-legend b { color: var(--text); font-weight: 600; }
.player-chapters .badge { cursor: pointer; }
/* existing SVG lane (static/_lane.html) */
.seg.state-delta rect { fill: var(--delta); } .seg.state-theta rect { fill: var(--theta); } .seg.state-alpha rect { fill: var(--alpha); }
.seg.state-beta rect { fill: var(--beta); } .seg.state-gamma rect { fill: var(--gamma); }
.seg rect { stroke: var(--surface); stroke-width: 2; } .seg text { fill: var(--on-phase); font-family: var(--font-text); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #eceae4; background: #0f1420; }
.hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(15 20 32 / 0.25) 0%, rgb(15 20 32 / 0.45) 50%, rgb(15 20 32 / 0.9) 100%); }
@media (min-width: 760px) { .hero::before { background:
  linear-gradient(90deg, rgb(15 20 32 / 0.78) 0%, rgb(15 20 32 / 0.5) 45%, rgb(15 20 32 / 0) 75%),
  linear-gradient(180deg, rgb(15 20 32 / 0) 55%, rgb(15 20 32 / 0.85) 100%); } }
.hero .lead, .hero .how, .hero small { text-shadow: 0 1px 12px rgb(15 20 32 / 0.6); }
.hero-inner { padding-block: var(--space-9) var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.hero h1, .hero .display { color: #f6f3ec; }
.hero .lead { color: #c9cfd9; }
.hero .eyebrow { color: #a9d3c4; }
.hero .btn-primary { --btn-bg: #7fb7a4; --btn-fg: #0f1420; } .hero .btn-primary:hover { --btn-bg: #97c8b7; }
.hero .btn-tertiary { --btn-fg: #eceae4; }

/* ---------- misc ---------- */
.price-line { font-size: var(--text-sm); color: var(--muted); }
.price-line .num { color: var(--text); font-weight: 600; }
.how { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); counter-reset: how; }
.how li { counter-increment: how; display: inline-flex; align-items: center; gap: var(--space-2); }
.how li::before { content: counter(how); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid currentColor; font: 600 0.75rem/1 var(--font-text); opacity: 0.8; }
.need { display: flex; gap: var(--space-3); align-items: center; color: var(--muted); font-size: var(--text-sm); }
.need .icon { color: var(--accent); width: 22px; height: 22px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--muted);
  font-weight: 600; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line-strong); }
.table td { padding: var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
