/* ==========================================================================
   The First 39 — Brand + Site Styles
   Single source of truth for tokens. The style guide (styleguide.html)
   documents everything defined here.

   Breakpoints (desktop-first; CSS variables can't be used in media queries,
   so these four values are the only ones allowed):
     xl  >= 1280px  wide desktop        (max-width: 1279px) below
     lg  1024–1279  laptop / tablet landscape
     md  768–1023   tablet portrait     (max-width: 1023px)
     sm  480–767    large phone         (max-width: 767px)
     xs  < 480      phone               (max-width: 479px)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap");

:root {
  /* ---- Core palette ---- */
  --ink: #161514;          /* Primary dark. Text, logo, bold blocks */
  --scroll: #F7F3EC;       /* Primary light. Page background */
  --gold: #BA9554;         /* Signature accent (from the logo bar) */
  --cedar: #1E3B34;        /* Secondary dark. Feature sections */
  --tekhelet: #2A5B8C;     /* Accent. The blue thread "to remember" (Num 15:39) */
  --clay: #B24A26;         /* Warm earth. History section + danger/error only */

  /* ---- Accent: Tekhelet (decided Nov 14, 2026; see accent-lab.html) ----
     Components use --accent*, never a raw color. */
  --accent: #2A5B8C;          /* Tekhelet */
  --accent-on-dark: #8DB6E2;  /* tint for text/marks on Ink or Cedar */
  --accent-soft: #DCE7F2;     /* tinted surface on Scroll */
  --accent-fg: #FFFFFF;       /* text on a solid accent fill */
  --danger: #B24A26;          /* errors and 'don't' marks, always Clay */

  /* ---- Support neutrals ---- */
  --linen: #EBE4D6;        /* Cards, alt sections */
  --stone: #6A645B;        /* Secondary text on light */
  --gold-deep: #8A6A33;    /* Gold for small text on light (AA) */
  --line: rgba(22, 21, 20, 0.12);
  --line-on-dark: rgba(247, 243, 236, 0.16);
  --muted-on-dark: #B8B1A4;

  /* ---- Teaching palette: the five divisions of the 39 ---- */
  --law: #BA9554;          /* Law (5): Genesis–Deuteronomy */
  --history: #B24A26;      /* History (12): Joshua–Esther */
  --poetry: #6E8F79;       /* Poetry & Wisdom (5): Job–Song of Songs */
  --major: #2D5A4F;        /* Major Prophets (5): Isaiah–Daniel */
  --minor: #5E4670;        /* Minor Prophets (12): Hosea–Malachi (plum) */

  /* ---- Type ---- */
  --font-display: "Outfit", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-scripture: "Newsreader", Georgia, "Times New Roman", serif;

  --fs-display: clamp(3.25rem, 9.5vw, 8.5rem);
  --fs-h1: clamp(2.5rem, 5.5vw, 4.25rem);
  --fs-hero: clamp(2.375rem, 5.2vw, 4.5rem); /* interior page header title */
  --fs-h2: clamp(2rem, 3.6vw, 2.875rem);
  --fs-h3: 1.5rem;
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.125rem, 1.6vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.78rem;
  --fs-scripture: clamp(1.5rem, 2.8vw, 2.25rem);

  /* ---- Space (8pt base) ---- */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;           /* Mostly square. The brand is built on blocks. */
  --radius-pill: 999px;
  --shadow: 0 1px 0 var(--line), 0 12px 32px -18px rgba(22, 21, 20, 0.35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--scroll);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* Focus ring: Ink on light backgrounds, Gold on dark ones, White on the Tekhelet bar (all >= 3:1) */
:is(.section--ink, .section--cedar, .site-footer, .mvs, .grid39-wrap, .cast39-wrap, .res-feature, .product, .depth-card.is-live, .quote-card, .key-verse, .art-verse, .art-song, .move.is-weak, .tier--feature, .fighter, .lab-top, .sg-side, .cover, .ww-stage, .f39p, .pp-hero, .pp-sec--cedar, .st-one, .st-word, .pt-continue, .stratum.is-foundation, .jy-top, .cheer, .cx-card--ink, .pf-head, .eb-peek-bubble) :focus-visible,
:is(.depth-card.is-live, .fighter-open):focus-visible { outline-color: var(--gold); }
.announce :focus-visible { outline-color: #fff; outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-4); top: var(--s-4); background: var(--ink); color: var(--scroll); padding: var(--s-2) var(--s-4); z-index: 100; }

/* ---------- Type ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
}
.display { font-size: var(--fs-display); font-weight: 900; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.035em; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 800; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 700; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 var(--s-4); max-width: 68ch; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: inherit; }
.small { font-size: var(--fs-small); }
.muted { color: var(--stone); }

/* Eyebrow: echoes the wide-tracked "THE FIRST 39" in the logo */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0 0 var(--s-4);
}
.eyebrow::before { content: ""; width: 2rem; height: 3px; background: var(--gold); }

/* Scripture: the only serif on the page — the Word stands apart */
.scripture {
  font-family: var(--font-scripture);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-scripture);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-4);
  max-width: 30ch;
}
.ref {
  font-family: var(--font-display); font-size: var(--fs-small); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
}

/* Gold mark: highlight a key word with the logo's gold bar */
.mark-gold {
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 92% / 100% 0.14em;
  padding-bottom: 0.04em;
}

/* Gold rule: the bar from the logo, used under headings */
.rule { width: 64px; height: 4px; background: var(--gold); border: 0; margin: var(--s-5) 0; }
.rule.center { margin-inline: auto; }

/* The Arrow: the forward-pointing triangle inside the F39 mark */
.arrow { display: inline-block; width: 0.62em; height: 0.72em; background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%); vertical-align: -0.02em; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--scroll);
  display: inline-flex; align-items: center; gap: 0.75em;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 1rem 1.5rem; border: 2px solid var(--btn-bg); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn::after { content: ""; width: 0.55em; height: 0.65em; background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .2s var(--ease); }
.btn:hover::after { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--ink); }
.btn--light { --btn-bg: var(--scroll); --btn-fg: var(--ink); }
.btn--ghost { background: transparent; color: var(--btn-bg); }
.btn--ghost:hover { background: var(--btn-bg); color: var(--btn-fg); }
.btn--ghost-light { --btn-bg: var(--scroll); --btn-fg: var(--ink); background: transparent; color: var(--scroll); }
.btn--ghost-light:hover { background: var(--scroll); color: var(--ink); }
.btn--sm { padding: 0.6rem 1rem; font-size: 0.8rem; }

/* ---------- The 39 Bar: OT divided into its five sections, to scale ---------- */
.bar39 { display: grid; grid-template-columns: 5fr 12fr 5fr 5fr 12fr; height: 10px; width: 100%; }
.bar39 > span:nth-child(1) { background: var(--law); }
.bar39 > span:nth-child(2) { background: var(--history); }
.bar39 > span:nth-child(3) { background: var(--poetry); }
.bar39 > span:nth-child(4) { background: var(--major); }
.bar39 > span:nth-child(5) { background: var(--minor); }
.bar39--thick { height: 18px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--scroll) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Reading progress (js/reading.js, on study weeks and articles): a thin bar on the header's bottom edge. */
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: background-color .3s; }
@media print { .read-progress { display: none; } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); height: 76px; }
.brand { display: flex; flex: none; align-items: center; text-decoration: none; }   /* the logo never shrinks */
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav > a, .nav-item > a {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  position: relative; padding: var(--s-2) 0;
}
:is(.nav > a, .nav-item > a):not(.btn, .nav-acct)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
:is(.nav > a, .nav-item > a):not(.btn, .nav-acct):hover::after, :is(.nav > a, .nav-item > a)[aria-current]::after { transform: scaleX(1); }
.nav .btn { padding: 0.6rem 1rem; letter-spacing: 0.1em; }
/* The account link: quiet on purpose. A thin person icon after the button on desktop (name visually hidden,
   title for the tooltip), filled in Tekhelet once signed in (.is-in, from site.js). Phones: a text line under the button. */
.nav > .nav-acct { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin-left: calc(-1 * var(--s-3));
  border-radius: 50%; color: var(--stone); letter-spacing: 0; text-transform: none; }
.nav-acct i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid currentColor;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease); }
.nav-acct svg { width: 18px; height: 18px; }
.nav-acct:hover, .nav-acct[aria-current] { color: var(--accent); }
.nav-acct.is-in { color: var(--accent); }
.nav-acct.is-in i { background: var(--accent); border-color: var(--accent); color: var(--accent-fg, #fff); }
.nav-acct.is-in:hover i { background: var(--ink); border-color: var(--ink); }
/* Your profile photo in place of the icon (site.js, only when you've added one: the f39_av cookie). */
.nav-acct i.has-pic { overflow: hidden; background: var(--linen); }
.nav-acct i.has-pic img { width: 100%; height: 100%; object-fit: cover; }
/* The icon is an <svg>, and the hidden attribute does nothing on one: hide it here, or it shares the circle with the photo. */
.nav-acct i.has-pic svg { display: none; }
.nav-acct:focus-visible { outline-offset: 0; }
.nav-acct-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: var(--s-2); cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s; }

/* Dropdown (disclosure pattern): the label stays a link; the chevron button opens the menu.
   site.js also opens it on hover for mouse users. */
.nav-item { display: flex; align-items: center; }
.nav-sub { all: unset; box-sizing: border-box; width: 44px; height: 44px; margin: 0 -14px 0 -8px; display: grid; place-items: center; cursor: pointer; color: var(--ink); border-radius: var(--radius); }
.nav-sub svg { transition: transform .2s var(--ease); }
.nav-sub[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub:hover { color: var(--accent); }
.nav-sub:focus-visible { outline: 3px solid var(--ink); outline-offset: -4px; }
/* ---------- Mega menu (Resources): built by tools/build_nav.py from data/nav.json ----------
   Desktop: one wide panel anchored to the nav's right edge. Products in three groups (Study, Teach, Listen & watch),
   then a footer with Featured picks, the five sections and All resources. It never grows past the screen: it
   scrolls inside itself if it has to. Phones: the Resources item opens an accordion of names under group headings. */
.nav { position: relative; }
.nav-item { position: static; }
.nav-menu {
  position: absolute; top: calc(100% + 14px); right: 0; width: min(940px, calc(100vw - 2 * var(--gutter))); z-index: 60;
  max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--scroll); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--s-4) var(--s-4) 0; display: none;
}
.nav-menu::before { content: ""; position: absolute; inset: -15px 0 auto; height: 15px; } /* hover bridge across the gap */
.nav-menu::after { content: ""; position: absolute; inset: -1px -1px auto; height: 4px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--law) 0 20%, var(--history) 0 40%, var(--poetry) 0 60%, var(--major) 0 80%, var(--minor) 0); }
.nav-item.open .nav-menu { display: block; }
.nav-menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu-h { margin: 0 0 var(--s-2); padding-inline: var(--s-2); font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--stone); }

.nav-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.nav-prods { display: grid; gap: 2px; }
.nav-prod { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-3); align-items: center; min-height: 44px;
  padding: var(--s-2); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.nav-prod:hover, .nav-prod[aria-current] { background: var(--linen); }
.nav-prod img { width: 56px; height: 42px; object-fit: cover; border-radius: 2px; background: #B2B2B2; }
.nav-prod b { display: flex; align-items: center; gap: .4rem; font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: -.01em; line-height: 1.2; }
.nav-prod small { display: block; color: var(--stone); font-size: .82rem; line-height: 1.3; margin-top: 1px; }
.nav-prod:hover b { color: var(--accent); }
.nav-soon { font-style: normal; font-family: var(--font-display); font-weight: 700; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .12rem .4rem; border: 1px solid currentColor; border-radius: var(--radius-pill); color: var(--stone); }

.nav-menu-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4) var(--s-6); align-items: start;
  margin: var(--s-4) calc(-1 * var(--s-4)) 0; padding: var(--s-4) var(--s-4) var(--s-3); background: color-mix(in srgb, var(--linen) 55%, var(--scroll)); border-top: 1px solid var(--line); }
.nav-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--s-3); }
.nav-pick { display: block; min-height: 44px; padding: var(--s-1) var(--s-2); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.nav-pick:hover, .nav-pick[aria-current] { background: var(--linen); }
.nav-pick small { display: block; font-family: var(--font-display); font-weight: 700; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.nav-pick b { display: block; font-family: var(--font-display); font-weight: 700; font-size: .92rem; line-height: 1.25; }
.nav-pick:hover b { color: var(--accent); }
.nav-secs { display: grid; grid-template-columns: repeat(2, auto); gap: 0 var(--s-3); }
.nav-sec { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-2); border-radius: var(--radius);
  font-size: .85rem; text-decoration: none; color: var(--ink); }
.nav-sec:hover { background: var(--linen); text-decoration: underline; text-underline-offset: 3px; }
.nav-sec i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.nav-menu-all { display: flex; align-items: center; justify-content: flex-end; min-height: 44px; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4);
  background: color-mix(in srgb, var(--linen) 55%, var(--scroll));
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--accent); }
.nav-menu-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav-menu :focus-visible { outline-offset: -3px; }

/* Small desktop and tablet: the nav tightens so the logo keeps its room beside it */
@media (max-width: 1279px) { .nav { gap: var(--s-5); } }
/* Tablet: the panel spans the header; descriptions stay, thumbnails go so three columns still fit */
@media (max-width: 1023px) and (min-width: 768px) {
  .nav { gap: var(--s-3); }
  .nav > a, .nav-item > a { white-space: nowrap; font-size: .75rem; letter-spacing: .05em; }
  .nav .btn { padding: .55rem .7rem; }
  .nav > .nav-acct { margin-left: -6px; }
}
@media (max-width: 1023px) {
  .nav-prod { grid-template-columns: minmax(0, 1fr); }
  .nav-prod img { display: none; }
  .nav-menu-foot { grid-template-columns: minmax(0, 1fr); }
  .nav-secs { grid-template-columns: repeat(3, auto); justify-content: start; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--scroll); border-bottom: 1px solid var(--line); padding: var(--s-2) var(--gutter) var(--s-5);
    display: none; max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.open { display: flex; }
  .nav > a, .nav-item > a { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
  :is(.nav > a, .nav-item > a):not(.btn, .nav-acct)::after { display: none; }
  .nav .btn { margin-top: var(--s-4); justify-content: center; }
  .nav > .nav-acct { display: flex; justify-content: center; gap: var(--s-2); width: auto; height: auto; min-height: 44px; margin: var(--s-2) 0 0;
    padding: var(--s-2) 0; border: 0; border-radius: var(--radius); font-family: var(--font-body); font-weight: 400; font-size: .95rem; }
  .nav-acct i { width: 28px; height: 28px; }
  .nav-acct svg { width: 16px; height: 16px; }
  .nav-acct-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-acct[aria-current] .nav-acct-label { text-decoration: underline; text-underline-offset: 4px; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-item > a { flex: 1; border-bottom: 0; }
  .nav-sub { margin: 0 -10px 0 0; }
  /* The accordion: names only, under their group headings, two columns where they fit */
  .nav-menu { position: static; width: 100%; flex-basis: 100%; max-height: none; overflow: visible; box-shadow: none; border: 0;
    background: transparent; padding: 0 0 var(--s-3); }
  .nav-menu::before, .nav-menu::after { display: none; }
  .nav-groups { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .nav-menu-h { padding-inline: 0; margin-bottom: 0; }
  .nav-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-3); }
  .nav-prod { padding: 0; min-height: 44px; }
  .nav-prod:hover, .nav-prod[aria-current] { background: none; }
  .nav-prod[aria-current] b { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .nav-prod b { font-size: 1rem; font-weight: 700; }
  .nav-prod small, .nav-menu-foot { display: none; }
  .nav-menu-all { justify-content: flex-start; margin: var(--s-2) 0 0; padding: 0; background: none; }
}
@media (max-width: 359px) { .nav-prods { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--ink { background: var(--ink); color: var(--scroll); }
.section--cedar { background: var(--cedar); color: var(--scroll); }
.section--linen { background: var(--linen); }
.section--gold { background: var(--gold); color: var(--ink); }
.section--ink .muted, .section--cedar .muted { color: var(--muted-on-dark); }
.section--gold .eyebrow::before { background: var(--ink); }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 767px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--scroll); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-6); position: relative;
}
.card--top { border-top: 6px solid var(--gold); }

/* ---------- Page header (interior pages) ----------
   <section|header class="page-hero"><div class="wrap"> eyebrow, h1, .lead, then anything else (.page-hero-title stands in for the h1 in demos) </div>
   - Title: Outfit 900 caps at --fs-hero, one .hl word at most.
   - The 39 Rules: 39 hairline columns (one per book) across the content width, with the four
     division lines (after books 5, 17, 22, 27) in gold, fading in from the top right.
   - The bottom edge carries a short 39 Bar (4px per book), aligned to the content.
   - Desktop (>= 1024px): when the title is followed by a .lead, the title takes the left column
     and the lead and anything after it sit in the right column, top-aligned with the title.
     Heroes holding forms-in-cards, facts or a table of contents stay stacked.
   - Entrance: eyebrow, title, lead rise in turn and the gold mark draws in (off with reduced motion). */
.page-hero {
  --hero-rule: rgba(22, 21, 20, .08);
  --hero-mark: rgba(186, 149, 84, .75);
  --hero-x: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  position: relative; overflow: hidden; overflow: clip; isolation: isolate;
  padding-block: clamp(2.75rem, 6vw, 4.75rem) clamp(2.25rem, 4.5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(ellipse 55% 90% at 88% 0%, rgba(186, 149, 84, .16), transparent 70%);
}
.page-hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: var(--hero-x); right: var(--hero-x);
  pointer-events: none; border-right: 1px solid var(--hero-rule);
  background:
    linear-gradient(90deg, transparent 0 12.82%, var(--hero-mark) 0 calc(12.82% + 1px), transparent 0 43.59%, var(--hero-mark) 0 calc(43.59% + 1px), transparent 0 56.41%, var(--hero-mark) 0 calc(56.41% + 1px), transparent 0 69.23%, var(--hero-mark) 0 calc(69.23% + 1px), transparent 0),
    linear-gradient(90deg, var(--hero-rule) 1px, transparent 1px) 0 0 / calc(100% / 39) 100%;
  -webkit-mask-image: radial-gradient(ellipse 75% 130% at 100% 0%, #000 20%, transparent 72%);
          mask-image: radial-gradient(ellipse 75% 130% at 100% 0%, #000 20%, transparent 72%);
}
.page-hero::after {
  content: ""; position: absolute; left: var(--hero-x); bottom: -1px; width: 156px; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, var(--law) 0 12.82%, var(--history) 0 43.59%, var(--poetry) 0 56.41%, var(--major) 0 69.23%, var(--minor) 0);
}
.page-hero:is(:has(+ .bar39), :has(+ * > .bar39:first-child))::after { display: none; } /* a full 39 Bar already follows */
.page-hero .wrap { position: relative; }
.page-hero :is(h1, .page-hero-title) { font-size: var(--fs-hero); font-weight: 900; text-transform: uppercase; line-height: .92; letter-spacing: -.035em; margin-bottom: var(--s-5); max-width: 16ch; text-wrap: pretty; }
.page-hero .lead { max-width: 46ch; }
.page-hero .wrap > :last-child { margin-bottom: 0; }

/* Desktop split: title left, lead (and what follows) right */
.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > * { grid-column: 2; }
.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > :not(h1, .page-hero-title, :is(h1, .page-hero-title) ~ *) { grid-column: 1 / -1; justify-self: start; }
.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > :is(h1, .page-hero-title) { grid-column: 1; margin-bottom: 0; max-width: none; }
.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > :is(h1, .page-hero-title) ~ .lead { margin-bottom: 0; padding-top: .3em; }
:where(.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc))) > :is(h1, .page-hero-title) ~ * ~ * { margin-top: var(--s-5); }
:where(.page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc))) > :is(h1, .page-hero-title) ~ * ~ :is(p.small, p.muted) { margin-top: var(--s-4); }
@media (max-width: 1023px) {
  .page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) { display: block; }
  .page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > :is(h1, .page-hero-title) { margin-bottom: var(--s-5); max-width: 16ch; }
  .page-hero .wrap:has(> :is(h1, .page-hero-title) + .lead):not(:has(.acct, .st-hero-row, dl, .vz-toc)) > :is(h1, .page-hero-title) ~ .lead { margin-bottom: var(--s-4); padding-top: 0; }
}
@media (max-width: 767px) {
  .page-hero { --hero-rule: rgba(22, 21, 20, .05); }
  .page-hero::after { width: 117px; } /* 3px per book */
}

/* Dark page headers (Ink): same structure, light rules */
.page-hero.vz-hero { --hero-rule: rgba(247, 243, 236, .07); --hero-mark: rgba(186, 149, 84, .6); background-image: radial-gradient(ellipse 55% 90% at 88% 0%, rgba(186, 149, 84, .16), transparent 70%); }

/* Entrance */
@keyframes f39-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes f39-mark { from { background-size: 0% .16em; } }
.page-hero .wrap > * { animation: f39-rise .7s var(--ease) both; }
.page-hero .wrap > :is(h1, .page-hero-title) { animation-delay: .06s; }
.page-hero .wrap > :is(h1, .page-hero-title) ~ * { animation-delay: .14s; }
.page-hero :is(h1, .page-hero-title) .hl { animation: f39-mark .9s var(--ease) .45s both; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--scroll); border-top: 5px solid var(--ink); }
.site-footer .bar39 { height: 8px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: var(--s-7); padding-block: var(--s-9) var(--s-8); }
.footer-brand img { width: 168px; height: auto; margin-bottom: var(--s-5); }
.footer-brand p { color: var(--muted-on-dark); font-size: var(--fs-small); max-width: 32ch; }
.footer-col h2 {
  font-size: var(--fs-eyebrow); letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
  color: var(--gold); margin-bottom: var(--s-5);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.footer-col a { text-decoration: none; color: var(--scroll); opacity: .85; font-size: 0.95rem; }
.footer-col a:hover { opacity: 1; color: var(--gold); }
.signup { display: flex; margin-top: var(--s-4); border: 1px solid var(--line-on-dark); border-radius: var(--radius); overflow: hidden; }
.signup input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--scroll); padding: 0.85rem 1rem; font: inherit; font-size: 0.95rem; }
.signup input::placeholder { color: var(--muted-on-dark); }
.signup button { background: var(--gold); color: var(--ink); border: 0; padding: 0 1.1rem; cursor: pointer; font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.footer-bottom { border-top: 1px solid var(--line-on-dark); padding-block: var(--s-5); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: 0.8rem; color: var(--muted-on-dark); }
.footer-bottom a { color: var(--muted-on-dark); text-decoration: none; }
.footer-bottom a:hover { color: var(--scroll); }
.footer-bottom nav { display: flex; gap: var(--s-5); }
.footer-credit { white-space: nowrap; }
.footer-bottom .footer-credit a { text-decoration: underline; text-underline-offset: 2px; }
.socials { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-on-dark); border-radius: 50%; color: var(--scroll); }
.socials a:hover { border-color: var(--gold); color: var(--gold); }
.socials svg { width: 20px; height: 20px; }
@media (max-width: 1023px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .footer-main { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid rgba(22,21,20,.25); border-radius: var(--radius);
  padding: 0.85rem 1rem; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(186,149,84,.45); }

/* Switch: an on/off toggle. A real checkbox with role="switch", inside a <label> that names it:
   <label>… <span class="switch"><input type="checkbox" role="switch"><span class="switch-track" aria-hidden="true"></span></span></label>
   On = Tekhelet (a selection). The off track uses Stone so the control still clears 3:1. */
.switch { position: relative; display: inline-flex; flex: none; width: 52px; height: 30px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: relative; width: 100%; height: 100%; border: 2px solid var(--stone); border-radius: var(--radius-pill); background: var(--scroll); transition: background .2s var(--ease), border-color .2s var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--stone); transition: transform .2s var(--ease), background .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(22px); background: var(--accent-fg); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Compact: dense screens (Brand Guide → Components → Compact) ----------
   For dashboards that show a lot at once, like /account. Opt in with class="cx" on a container.
   Same palette, type families, focus rings and contrast as everywhere else. What changes: smaller type steps
   (15px body, 13px meta, 12px labels at the smallest), tighter spacing, white cards on Scroll, and the control
   height: 36px with a mouse, back to 44px on touch (pointer: coarse). WCAG 2.2 AA asks for 24px; we stay well above. */
.cx {
  --cx-fs: .9375rem; --cx-fs-sm: .8125rem; --cx-fs-h: 1.0625rem; --cx-fs-num: 1.75rem;
  --cx-pad: var(--s-5); --cx-gap: var(--s-5); --cx-tap: 36px;
  font-size: var(--cx-fs); line-height: 1.55;
}
@media (pointer: coarse) { .cx { --cx-tap: 44px; } }
@media (max-width: 767px) { .cx { --cx-pad: var(--s-4); --cx-gap: var(--s-4); --cx-fs-num: 1.5rem; } }
.cx-card { position: relative; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--cx-pad); }
.cx-card--ink { background: var(--ink); color: var(--scroll); border-color: transparent; }
.cx-card--linen { background: var(--linen); border-color: transparent; }
.cx-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-4); margin: 0 0 var(--s-4); }
.cx-title { font-family: var(--font-display); font-weight: 800; font-size: var(--cx-fs-h); line-height: 1.3; letter-spacing: 0; margin: 0; }
.cx-k { font-family: var(--font-display); font-weight: 700; font-size: .75rem; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin: 0; }
.cx-card--ink .cx-k { color: var(--muted-on-dark); }
.cx-sub { font-size: var(--cx-fs-sm); color: var(--stone); margin: 0; }
.cx-card--ink .cx-sub { color: var(--muted-on-dark); }
.cx p { max-width: 62ch; }
.cx-link { display: inline-flex; align-items: center; min-height: var(--cx-tap); font-size: var(--cx-fs-sm); font-weight: 600; color: var(--accent); text-underline-offset: 3px; }
.cx-card--ink .cx-link { color: var(--accent-on-dark); }
.cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: var(--cx-tap); padding: .35rem .9rem;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--scroll);
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem; line-height: 1.2; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.cx-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cx-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cx-btn--gold:hover { background: var(--ink); border-color: var(--ink); color: var(--scroll); }
.cx-btn--ghost { background: transparent; color: var(--ink); }
.cx-btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--scroll); }
.cx-btn--quiet { background: none; border-color: transparent; color: var(--stone); font-family: var(--font-body); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding-inline: .5rem; }
.cx-btn--quiet:hover { background: none; border-color: transparent; color: var(--ink); }
.cx-btn:disabled { opacity: .6; cursor: progress; }
.cx-card--ink .cx-btn--ghost { color: var(--scroll); border-color: var(--scroll); }
.cx-card--ink .cx-btn--ghost:hover { background: var(--scroll); color: var(--ink); }
.cx-chip { display: inline-flex; align-items: center; gap: .35em; padding: .2em .65em; border-radius: var(--radius-pill); background: var(--linen); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: .75rem; line-height: 1.3; letter-spacing: .04em; white-space: nowrap; }
.cx-chip--on { background: var(--accent); color: var(--accent-fg); }
.cx-chip--gold { background: var(--gold); color: var(--ink); }
.cx-chip--line { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--stone); }
/* A meter is never the only way to read a value: put the number beside it in words. */
.cx-meter { display: block; height: 6px; border-radius: 3px; background: var(--linen); overflow: hidden; }
.cx-meter > span { display: block; height: 100%; width: var(--v, 0%); min-width: 6px; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.cx-meter.is-zero > span { min-width: 0; }
.cx-card--ink .cx-meter { background: rgba(247, 243, 236, .16); }
.cx-card--ink .cx-meter > span { background: var(--gold); }
.cx-stats { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 0; margin: 0; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Hairlines between tiles; the last column's and row's tuck under the frame, so a short last row stays clean. */
.cx-stat { background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.cx-stat > a, .cx-stat > div { display: grid; align-content: start; gap: 2px; height: 100%; padding: var(--s-3) var(--s-4); color: inherit; text-decoration: none; }
.cx-stat > a:hover { background: var(--accent-soft); }
.cx-stat > a:focus-visible { outline-offset: -3px; }
.cx-stat-n { font-family: var(--font-display); font-weight: 800; font-size: var(--cx-fs-num); line-height: 1.1; letter-spacing: -.02em; }
.cx-stat-n small { font-size: .55em; font-weight: 600; color: var(--stone); letter-spacing: 0; }
.cx-stat-l { font-size: var(--cx-fs-sm); color: var(--stone); line-height: 1.35; }
.cx-list { list-style: none; margin: 0; padding: 0; }
.cx-row { display: flex; align-items: center; gap: var(--s-3); min-height: calc(var(--cx-tap) + var(--s-3)); padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.cx-list > .cx-row:first-child { border-top: 0; }
.cx-row-main { flex: 1; min-width: 0; }
.cx-row-main > * { margin: 0; }
.cx [hidden], .cx[hidden] { display: none !important; }   /* hidden wins over a component's own display */
.cx .form-msg:empty { display: none; }
.cx .form-msg { font-size: var(--cx-fs-sm); padding: var(--s-2) var(--s-3); margin: var(--s-3) 0 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ==========================================================================
   Site: home page + interior page pieces
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.hero { position: relative; overflow: hidden; overflow: clip; padding-block: clamp(3.5rem, 8vw, 6.5rem) 0; }
.hero .big39 {
  position: absolute; right: -3vw; top: -4vw; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(16rem, 42vw, 40rem); line-height: .8; letter-spacing: -.06em; color: transparent;
  -webkit-text-stroke: 2px rgba(186,149,84,.35); pointer-events: none; user-select: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: var(--fs-display); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: -.04em; margin-bottom: var(--s-6); max-width: 11ch; }
.hero h1 .gold { color: var(--gold); }
.hero .lead { max-width: 40ch; margin-bottom: var(--s-6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: clamp(3rem, 7vw, 5rem); }

/* 39 grid */
.grid39-wrap { background: var(--ink); color: var(--scroll); padding-block: var(--s-6) var(--s-5); }
.grid39-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.grid39-head p { margin: 0; }
.grid39 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(39, minmax(0, 1fr)); gap: 3px; }
.grid39 .b { position: relative; aspect-ratio: 1 / 2.4; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0 8px; align-items: center; color: #fff; font-family: var(--font-display); transition: transform .3s var(--ease), opacity .3s; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 18ms); }
.grid39 .b:hover { transform: translateY(-6px); }
.grid39 .num { font-size: .6rem; opacity: .7; font-weight: 600; }
.grid39 .ab { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.grid39[data-focus] .b { opacity: .18; }
.grid39[data-focus="law"] .b--law, .grid39[data-focus="history"] .b--history, .grid39[data-focus="poetry"] .b--poetry,
.grid39[data-focus="major"] .b--major, .grid39[data-focus="minor"] .b--minor { opacity: 1; transform: translateY(-6px); }
.b--law { background: var(--law); color: var(--ink); } .b--history { background: var(--history); } .b--poetry { background: var(--poetry); color: var(--ink); }
.b--major { background: var(--major); } .b--minor { background: var(--minor); }
.grid39-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-4); }
.grid39-legend button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: .8rem; font-weight: 500; letter-spacing: .06em; color: var(--muted-on-dark); }
.grid39-legend button:hover, .grid39-legend button:focus-visible { color: var(--scroll); }
.grid39-legend b { color: var(--gold); font-weight: 700; }
.grid39-legend .dot { width: 12px; height: 12px; display: inline-block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 1023px) {
  .grid39 { grid-template-columns: repeat(13, minmax(0, 1fr)); }
  .grid39 .b { aspect-ratio: 1 / 1.5; }
}
@media (max-width: 479px) {
  .grid39 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .grid39 .b { aspect-ratio: 1 / 1.25; padding: 4px 0; }
  .grid39 .ab { writing-mode: horizontal-tb; transform: none; font-size: .62rem; letter-spacing: 0; }
}

/* The 39, by its people (home): rows are people, columns are the 39 books */
.cast39-wrap { background: var(--ink); color: var(--scroll); padding-block: var(--s-6) var(--s-6); }
.cast39-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.cast39-head h2 { font-size: var(--fs-eyebrow); color: var(--scroll); margin: 0; }
.cast39-head p { margin: 0; color: var(--muted-on-dark); }
.cast39 { --name: 9.5rem; --row: 30px; --gap: 2px; }
.c39-tools { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-4); }
.c39-now { margin: 0; font-family: var(--font-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-dark); }
.c39-now b { color: var(--gold); font-weight: 700; }
.c39-pick { display: flex; align-items: center; gap: var(--s-3); }
.c39-pick label { font-family: var(--font-display); font-size: .8rem; letter-spacing: .06em; color: var(--muted-on-dark); }
.c39-pick select { min-height: 44px; padding: 0 2.2rem 0 var(--s-3); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23F7F3EC' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .8rem center / 12px 8px; color: var(--scroll); border: 1px solid var(--line-on-dark); border-radius: var(--radius); font: 500 .9rem var(--font-body); appearance: none; cursor: pointer; }

.c39-grid { display: grid; gap: var(--gap); }
.c39-head, .c39-row { display: grid; grid-template-columns: var(--name) 1fr; gap: 0 var(--s-3); align-items: stretch; }
.c39-books, .c39-cells { display: grid; grid-template-columns: repeat(39, minmax(0, 1fr)); gap: var(--gap); }
.c39-books .c39-s, .c39-cells .c39-s { margin-left: 4px; }
.c39-book { height: 4.4rem; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; opacity: .55; transition: opacity .25s, transform .25s var(--ease); animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 14ms); }
.c39-book.b--law, .c39-book.b--poetry { color: var(--ink); }
.c39-book span { writing-mode: vertical-rl; transform: rotate(180deg); }
.c39-book:hover, .c39-book.is-col, .c39-book.is-lit { opacity: 1; }
.c39-book.is-lit, .c39-book.is-col { transform: translateY(-5px); }
.c39-grid:not([data-f-person=""]) .c39-book:not(.is-lit), .c39-grid:not([data-f-book=""])[data-f-person=""] .c39-book:not(.is-col) { opacity: .2; }

.c39-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.c39-layer { display: flex; align-items: baseline; gap: var(--s-3); padding: var(--s-4) 0 var(--s-1); font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line-on-dark); margin-bottom: 2px; }
.c39-layer:first-child { padding-top: var(--s-2); }
/* Layers 2–5: a teaser for now, as on /approach (blurred, inert, hidden from screen readers) */
.c39-teaser { position: relative; }
.c39-teaser > .c39-rows { filter: blur(5px); opacity: .7; user-select: none; pointer-events: none; }
.c39-teaser .c39-row { min-height: 26px; }
.c39-lock { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-4); }
.c39-lock-card { max-width: 26rem; text-align: center; padding: clamp(1.25rem, 3.5vw, 2rem); background: var(--ink); border: 1px solid var(--line-on-dark); border-top: 6px solid var(--gold); border-radius: var(--radius); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); }
.c39-lock-card p { margin: 0 0 var(--s-4); color: var(--muted-on-dark); }
.c39-lock-card .c39-lock-h { margin-bottom: var(--s-2); font-family: var(--font-display); font-weight: 800; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2; color: var(--scroll); }
.c39-row { min-height: var(--row); }
.c39-rows > [hidden] { display: none; }
.c39-name { all: unset; cursor: pointer; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 0 var(--s-2); border-radius: var(--radius); font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--scroll); }
.c39-name:hover, .c39-row.is-on .c39-name { background: rgba(247, 243, 236, .08); }
.c39-row .c39-name[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.c39-count { font-weight: 500; font-size: .75rem; color: var(--muted-on-dark); font-variant-numeric: tabular-nums; }
.c39-name[aria-pressed="true"] .c39-count { color: var(--ink); }
.c39-name:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.c39-cells i { position: relative; display: block; cursor: pointer; background: rgba(247, 243, 236, .05); transition: opacity .25s, background .25s; }
.c39-cells i.is-story, .c39-key i.is-story, .c39-d-k i.is-story { background: var(--gold); }
.c39-cells i.is-named::after, .c39-key i.is-named::after, .c39-d-k i.is-named::after { content: ""; position: absolute; left: 50%; top: 50%; width: min(8px, 70%); aspect-ratio: 1; border-radius: 50%; background: var(--accent-on-dark); transform: translate(-50%, -50%); }
.c39-cells i.is-col { background-color: rgba(247, 243, 236, .16); }
.c39-cells i.is-story.is-col { background: #E0C38E; }
/* Focus: one person (dim the other rows) or one book (dim people not in it) */
.c39-grid:not([data-f-person=""]) .c39-row:not(.is-on) .c39-cells, .c39-grid:not([data-f-book=""])[data-f-person=""] .c39-row:not(.is-on) .c39-cells { opacity: .25; }
.c39-grid:not([data-f-person=""]) .c39-row:not(.is-on) .c39-name, .c39-grid:not([data-f-book=""])[data-f-person=""] .c39-row:not(.is-on) .c39-name { color: var(--muted-on-dark); }

.c39-key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0 calc(var(--name) + var(--s-3)); font-family: var(--font-display); font-size: .8rem; letter-spacing: .04em; color: var(--muted-on-dark); }
.c39-key span { display: inline-flex; align-items: center; gap: .5rem; }
.c39-key i, .c39-d-k i { position: relative; display: inline-block; width: 10px; height: 16px; background: rgba(247, 243, 236, .05); }
.c39-key b { color: var(--scroll); font-weight: 600; }
.c39-detail { position: sticky; bottom: 0; z-index: 2; margin-top: var(--s-5); padding: var(--s-4) var(--s-5); min-height: 6.5rem; border-left: 3px solid var(--gold); background: #23211F; box-shadow: 0 -18px 30px -12px rgba(0, 0, 0, .6); }
.c39-detail p { margin: 0 0 var(--s-2); max-width: 80ch; color: var(--scroll); font-size: .95rem; line-height: 1.6; }
.c39-detail p:last-child { margin-bottom: 0; }
.c39-detail small { color: var(--muted-on-dark); font-size: .8rem; }
.c39-d-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.c39-d-h b { font-family: var(--font-display); font-size: 1.25rem; }
.c39-d-h span { font-family: var(--font-display); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.c39-d-k { display: inline-flex; align-items: center; gap: .45rem; margin-right: var(--s-2); font-family: var(--font-display); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-on-dark); }
.c39-go { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-on-dark); font-family: var(--font-display); font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 1023px) {
  .cast39 { --name: 7.5rem; --gap: 1px; }
  .c39-books .c39-s, .c39-cells .c39-s { margin-left: 2px; }
  .c39-book { height: 3.6rem; font-size: .58rem; letter-spacing: .02em; }
}
@media (max-width: 767px) {
  .cast39 { --name: 6rem; --row: 44px; }
  .c39-tools { flex-direction: column; align-items: stretch; }
  .c39-pick select { flex: 1; }
  .c39-book { height: 12px; padding: 0; opacity: 1; }
  .c39-book span { display: none; }
  .c39-books .c39-s, .c39-cells .c39-s { margin-left: 1px; }
  .c39-name { font-size: .85rem; padding: 0 var(--s-1) 0 var(--s-2); }
  .c39-key { margin-left: 0; }
  .c39-detail { position: static; box-shadow: none; padding: var(--s-3) var(--s-4); }
}
@media (max-width: 479px) { .cast39 { --name: 5.25rem; } .c39-count, .c39-key .c39-key-n { display: none; } }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-on-dark); }
.stats > div { padding: var(--s-6) var(--s-5) var(--s-6) 0; border-right: 1px solid var(--line-on-dark); }
.stats > div + div { padding-left: var(--s-5); }
.stats > div:last-child { border-right: 0; }
.stats .v { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: -.03em; color: var(--gold); }
.stats .l { font-family: var(--font-display); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); margin-top: var(--s-2); }
@media (max-width: 767px) { .stats { grid-template-columns: 1fr 1fr; } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(3) { padding-left: 0; } .stats > div:nth-child(n+3) { border-top: 1px solid var(--line-on-dark); } }

/* Split intro */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 1023px) { .split { grid-template-columns: 1fr; } }
.quote-card { background: var(--ink); color: var(--scroll); padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius); position: relative; }
.quote-card .ref { color: var(--gold); margin: 0; }
.quote-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }

/* The five sections (home) */
.five { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.five-item { padding: var(--s-5) var(--s-4) var(--s-5) 0; border-right: 1px solid var(--line); position: relative; min-width: 0; }
.five-item + .five-item { padding-left: var(--s-4); }
.five-item:last-child { border-right: 0; }
.five-item::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 8px; background: var(--c); }
.five-item .n { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1; color: var(--c); letter-spacing: -.03em; margin-top: var(--s-3); }
.five-item h3 { font-size: 1.2rem; margin: var(--s-2) 0 var(--s-1); }
.five-item .range { font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-bottom: var(--s-3); }
.five-item p { font-size: .92rem; color: var(--stone); margin: 0; }
.five-item .step { font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; display: flex; align-items: center; gap: .4rem; }
.five-item .step .arrow { color: var(--c); }
@media (max-width: 1023px) {
  .five { grid-template-columns: 1fr; }
  .five-item, .five-item + .five-item { padding: var(--s-5) 0 var(--s-5) var(--s-5); border-right: 0; border-bottom: 1px solid var(--line); }
  .five-item::before { right: auto; top: 0; bottom: 0; width: 6px; height: auto; }
}

/* How we teach */
.how { counter-reset: h; }
.how .card { padding-top: var(--s-7); }
.how .card::before { counter-increment: h; content: "0" counter(h); position: absolute; top: var(--s-5); left: var(--s-6); font-family: var(--font-display); font-weight: 800; color: var(--gold-deep); font-size: .85rem; letter-spacing: .2em; }

/* Resource cards */
.res { display: flex; flex-direction: column; background: rgba(247,243,236,.04); border: 1px solid var(--line-on-dark); border-radius: var(--radius); padding: var(--s-6); position: relative; }
.res h3 { margin-top: var(--s-3); }
.res p { color: var(--muted-on-dark); font-size: .95rem; flex: 1; }
.pill { display: inline-block; font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: .3rem .65rem; border-radius: var(--radius-pill); border: 1px solid currentColor; }
.pill--soon { color: var(--accent-on-dark); }
.res-light { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); display: flex; flex-direction: column; border-top: 6px solid var(--c, var(--gold)); }
.res-light p { color: var(--stone); font-size: .95rem; flex: 1; }
.res-light .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }
.res-light .pill--soon { color: var(--accent); }

/* CTA band */
.cta-band { display: grid; grid-template-columns: 1.4fr auto; gap: var(--s-6); align-items: end; }
.cta-band h2 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; margin: 0; max-width: 16ch; }
@media (max-width: 767px) { .cta-band { grid-template-columns: 1fr; } }

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filters button { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; background: transparent; border: 1.5px solid var(--line); color: var(--ink); padding: .55rem 1rem; border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.filters button i { width: 10px; height: 10px; border-radius: 50%; }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.filters button[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--accent-fg); }
.filters button:hover { border-color: var(--accent); }

/* Partner tiers */
.tier { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); display: flex; flex-direction: column; }
.tier ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); display: grid; gap: var(--s-2); flex: 1; }
.tier li { display: grid; grid-template-columns: 1rem 1fr; gap: .6rem; font-size: .95rem; }
.tier li::before { content: ""; width: .55em; height: .65em; margin-top: .45em; background: var(--gold); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.tier--feature { background: var(--cedar); color: var(--scroll); border-color: transparent; }
.tier--feature .muted { color: var(--muted-on-dark); }
.partner-logo { aspect-ratio: 3/2; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: var(--s-4); transition: border-color .15s; }
.partner-logo:hover { border-color: var(--accent); }
.partner-logo img { width: 100%; max-width: 200px; height: auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 1023px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-5); }
.contact-list b { display: block; font-family: var(--font-display); font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .2rem; }
.contact-list a { text-decoration: none; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.contact-list a:hover { color: var(--accent); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 6px solid var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 479px) { .form-row { grid-template-columns: 1fr; } }
.form-msg { background: var(--linen); border-left: 4px solid var(--gold); padding: var(--s-3) var(--s-4); margin-top: var(--s-4); font-size: .95rem; }

/* Team placeholder */
.person { display: grid; gap: var(--s-3); }
.person .ph { aspect-ratio: 4/5; background: var(--linen); border-radius: var(--radius); display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 3rem; color: rgba(22,21,20,.18); }
.person h4 { margin: 0; }
.founder { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; margin-top: var(--s-6); }
.founder-photo { margin: 0; display: grid; gap: var(--s-3); }
.founder-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--linen); }
.founder-photo figcaption { display: grid; gap: var(--s-1); font-family: var(--font-display); }
.founder-note { max-width: 62ch; }
.founder-note > :last-child { margin-bottom: 0; }
.founder-sign { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
@media (max-width: 767px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 240px; } }

/* Gold highlight for display headlines on light backgrounds (gold text fails contrast there) */
.hl { background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 88% / 100% 0.16em; padding-bottom: .02em; }
.section--ink .hl, .section--cedar .hl { background: none; color: var(--gold); }
.res .pill, .res-light .pill { align-self: flex-start; }

/* ---------- Accent candidates (kept for the Accent Lab record) ---------- */
[data-accent="clay"]     { --accent: #B24A26; --accent-on-dark: #E58A63; --accent-soft: #F8EAE1; --accent-fg: #FFFFFF; }
[data-accent="tekhelet"] { --accent: #2A5B8C; --accent-on-dark: #8DB6E2; --accent-soft: #DCE7F2; --accent-fg: #FFFFFF; }
[data-accent="indigo"]   { --accent: #3E4F7A; --accent-on-dark: #A3B1D6; --accent-soft: #E0E3EE; --accent-fg: #FFFFFF; }

/* ==========================================================================
   Accent (Tekhelet) on the site: announce, link & select, emphasize
   ========================================================================== */
/* Announcement bar: sits above the sticky header and scrolls away */
.announce { background: var(--accent); color: var(--accent-fg); font-size: .9rem; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 44px; padding-block: .5rem; position: relative; padding-right: calc(var(--gutter) + 36px); padding-left: calc(var(--gutter) + 36px); }
.announce p { margin: 0; max-width: none; text-align: center; line-height: 1.4; }
.announce b { font-family: var(--font-display); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; background: var(--accent-fg); color: var(--accent); padding: .18rem .45rem; border-radius: 3px; margin-right: .6rem; vertical-align: .08em; }
.announce .wrap p a { color: inherit; font-weight: 600; text-underline-offset: 3px; white-space: nowrap; }
.announce .wrap p a:hover { text-decoration-thickness: 2px; }
.announce-x { position: absolute; right: calc(var(--gutter) - 8px); top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.4rem; line-height: 1; border-radius: 50%; opacity: .85; }
.announce-x:hover { opacity: 1; background: rgba(255,255,255,.12); }
.announce[hidden] { display: none; }
@media (max-width: 767px) { .announce .long { display: none; } .announce { font-size: .85rem; } .announce .wrap { justify-content: flex-start; padding-left: var(--gutter); } .announce p { text-align: left; } }

/* Inline links in running text */
main p a:not(.btn), main li a.inline { color: var(--accent); font-weight: 500; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
main p a:not(.btn):hover { text-decoration-thickness: 2.5px; }
.section--ink p a:not(.btn), .section--cedar p a:not(.btn), .cast39-wrap p a:not(.btn) { color: var(--accent-on-dark); }

/* Badges */
.pill--new { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.section--ink .pill--new, .section--cedar .pill--new { background: var(--accent-on-dark); border-color: var(--accent-on-dark); color: var(--ink); }
@media (max-width: 479px) { .eyebrow { letter-spacing: .2em; gap: var(--s-2); } .eyebrow::before { width: 1.25rem; } }

/* ---------- Live resources ---------- */
.res--live { border-color: var(--gold); background: rgba(186,149,84,.08); }
.res--live h3 a { color: inherit; text-decoration: none; }
.res--live h3 a:hover { color: var(--gold); }
.res--live .btn { align-self: flex-start; margin-top: var(--s-2); }
.res-feature { display: grid; grid-template-columns: 1fr; background: var(--ink); color: var(--scroll); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s-7); }
.res-feature-img { display: block; background: #B2B2B2; }
.res-feature-img img { width: 100%; height: auto; display: block; }
.res-feature-body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.res-feature .meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.res-feature .pill--new { background: var(--accent-on-dark); border-color: var(--accent-on-dark); color: var(--ink); }
.res-feature .meta .pill:not(.pill--new) { color: var(--muted-on-dark) !important; }
.res-feature h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; }
.res-feature h2 a { color: inherit; text-decoration: none; }
.res-feature h2 a:hover { color: var(--gold); }
.res-feature p { color: var(--muted-on-dark); max-width: 60ch; }
.res-feature .btn--ghost { --btn-bg: var(--scroll); color: var(--scroll); }
.res-feature .btn--ghost:hover { color: var(--ink); }

/* ---------- Layers = depth (home) ---------- */
.depth { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s-4); margin-top: var(--s-7); }
@media (max-width: 767px) { .depth { grid-template-columns: 1fr; } }
.depth-card { --pad: clamp(1.5rem, 4vw, 2.25rem); display: grid; grid-template-columns: auto 1fr; gap: var(--s-5); padding: var(--pad); border-radius: var(--radius); text-decoration: none; color: inherit; }
.depth-card h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: .95; margin: .4rem 0 .6rem; }
.depth-card p { font-size: .98rem; margin-bottom: var(--s-4); }
.depth-kicker { font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.depth-go { font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; }
.depth-card.is-live { background: var(--ink); color: var(--scroll); transition: transform .25s var(--ease); }
.depth-card.is-live:hover { transform: translateY(-3px); }
.depth-card.is-live .depth-kicker, .depth-card.is-live .depth-go { color: var(--gold); }
.depth-card.is-live p { color: var(--muted-on-dark); }
.depth-card.is-next { border: 1.5px dashed rgba(22,21,20,.25); }
.depth-card.is-next .depth-kicker { color: var(--stone); }
.depth-card.is-next p { color: var(--stone); }
.depth-card.is-next .depth-go { color: var(--accent); }
/* ---------- Our Approach (/approach): the five layers as strata, stepping down to the foundation ---------- */
.ap-compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.ap-way { padding: clamp(1.5rem, 4vw, 2.25rem); border: 1.5px dashed rgba(22,21,20,.25); border-radius: var(--radius); }
.ap-way h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 var(--s-3); }
.ap-way p:last-child { margin: 0; }
.ap-way.is-ours { border: 0; border-top: 6px solid var(--accent); background: var(--linen); }
.strata { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.stratum { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: var(--s-3) var(--s-6);
  padding: clamp(1.25rem, 3vw, 2rem); background: var(--scroll); border-radius: var(--radius); border-left: 6px solid var(--gold); }
.stratum-n { font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.stratum h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: .95; margin: .35rem 0 .6rem; }
.stratum-sub { display: block; font-size: .5em; letter-spacing: .02em; font-weight: 700; margin-top: .3rem; }
.stratum-tag { display: inline-block; font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .6rem; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--stone); }
.stratum.is-live .stratum-tag { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.stratum-body > p { margin: 0 0 var(--s-3); }
.stratum-body > p.stratum-what { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin-bottom: var(--s-2); }
.stratum-people { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.stratum-people li { font-size: .88rem; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-pill); background: rgba(255,255,255,.5); }
.stratum-people li.more { border: 0; background: none; padding-inline: .2rem; color: var(--stone); font-style: italic; }
.stratum-people a { color: var(--accent); font-weight: 600; }
.stratum .depth-go { color: var(--accent); }
.stratum-people:last-child, .stratum-body > :last-child { margin-bottom: 0; }
.stratum.is-foundation { background: var(--ink); color: var(--scroll); }
.stratum.is-foundation .stratum-n, .stratum.is-foundation .depth-go { color: var(--gold); }
.stratum.is-foundation .stratum-body > p:not(.stratum-what) { color: var(--muted-on-dark); }
/* Layers 2–5 are a teaser for now: blurred, hidden from screen readers, with a note on top */
.strata-teaser { position: relative; margin-top: var(--s-3); }
.strata-teaser > .strata { margin: 0; filter: blur(7px); user-select: none; pointer-events: none; }
.strata--foundation { margin-top: var(--s-3); }
.strata-lock { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-4); }
.strata-lock-card { max-width: 26rem; text-align: center; padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--scroll); border-top: 6px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.strata-lock p { margin: 0 0 var(--s-4); }
.strata-lock .strata-lock-h { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.2; }
.ap-cta { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--linen); border-top: 6px solid var(--gold); border-radius: var(--radius); align-self: start; }
.ap-cta h2 { margin-top: 0; }
.ap-cta-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
@media (max-width: 1023px) { .stratum { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .ap-compare { grid-template-columns: 1fr; } }

/* depth gauge: one bar per layer, stacked like strata */
/* Layer 1 card: the First Eight lineup loop across the top, with its own pause button (WCAG 2.2.2) */
.depth-live { position: relative; display: grid; }
.depth-reel { grid-column: 1 / -1; display: block; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; aspect-ratio: 1200 / 232; background: #B2B2B2; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.depth-reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.depth-motion { position: absolute; top: .5rem; right: .5rem; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(22,21,20,.72); color: var(--scroll); cursor: pointer; }
.depth-motion:hover { background: var(--ink); }
.depth-motion:focus-visible { outline-color: var(--gold); }
@media (max-width: 479px) { .depth-motion { top: .25rem; right: .25rem; } }

/* Pause/play glyph for [data-motion] toggles */
.mt-icon { width: 12px; height: 12px; position: relative; }
.mt-icon::before, .mt-icon::after { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; background: currentColor; }
.mt-icon::before { left: 1px; } .mt-icon::after { right: 1px; }
[data-motion][aria-pressed="true"] .mt-icon::after { display: none; }
[data-motion][aria-pressed="true"] .mt-icon::before { left: 2px; width: 10px; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.depth-gauge { display: grid; align-content: start; gap: 4px; width: 14px; padding-top: .3rem; }
.depth-gauge i { display: block; height: 14px; background: var(--gold); border-radius: 2px; }
.depth-card.is-next .depth-gauge i { background: rgba(22,21,20,.18); }
.depth-card.is-next .depth-gauge i:first-child { background: var(--gold); }

/* ---------- Forms: status, honeypot ---------- */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--gold); margin-top: var(--s-2); }
/* Inline sign-up: the email list, right where something is coming soon (the "list" field
   says what they asked to hear about). .notify--dark on Ink/Cedar; .notify--center in a card. */
.notify { margin-top: var(--s-4); max-width: 30rem; }
.notify-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.notify input[type="email"] { flex: 1 1 13rem; min-width: 0; min-height: 44px; padding: .65rem .9rem; font: inherit; font-size: .95rem;
  color: var(--ink); background: #fff; border: 1.5px solid rgba(22,21,20,.25); border-radius: var(--radius); }
.notify input[type="email"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(186,149,84,.45); }
.notify .btn { flex: 0 0 auto; min-height: 44px; justify-content: center; }
.notify-msg { margin: var(--s-2) 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.notify-msg:empty { margin: 0; }
.notify-msg.is-error { color: var(--clay); }
.notify.is-done .notify-row { display: none; }
.notify--dark input[type="email"] { color: var(--scroll); background: rgba(247,243,236,.06); border-color: rgba(247,243,236,.35); }
.notify--dark input[type="email"]::placeholder { color: var(--muted-on-dark); }
.notify--dark input[type="email"]:focus { border-color: var(--gold); }
.notify--dark .notify-msg { color: var(--gold); }
.notify--dark .notify-msg.is-error { color: #F2A48A; }
.notify--center { margin-inline: auto; }
.notify--center .notify-row, .notify--center .notify-msg { justify-content: center; text-align: center; }
.notify-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-6);
  margin-top: var(--s-7); padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-top: 6px solid var(--gold); border-radius: var(--radius); background: var(--scroll); }
.notify-band > div:first-child { flex: 1 1 18rem; }
.notify-band h3 { margin: 0 0 var(--s-1); font-size: var(--fs-h4); }
.notify-band p { margin: 0; }
.notify-band .notify { flex: 1 1 20rem; margin-top: 0; }
.notify-band--dark { background: rgba(247,243,236,.04); border-color: var(--line-on-dark); border-top-color: var(--gold); }
.form-note.is-error { color: #F2A48A; }
.form-msg.is-error { border-left-color: var(--danger); }
.form-msg--error { display: none; border-left-color: var(--danger); margin: 0 0 var(--s-5); }
.form-msg--error:target { display: block; }
/* reCAPTCHA: the floating badge is hidden (it overlaps content on phones), so the contact
   form carries Google’s required notice instead (.form-legal). */
.grecaptcha-badge { visibility: hidden; }
.form-legal { margin-top: var(--s-4); margin-bottom: 0; }
.signup button:disabled, .form-card .btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Long-form text (privacy etc.) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin: var(--s-7) 0 var(--s-3); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; margin: 0 0 var(--s-4); }
.prose li { margin-bottom: var(--s-3); }
.prose li strong { font-family: var(--font-display); }

/* ---------- Accessibility helpers ---------- */
.quote-card--cedar { background: var(--cedar); }
.quote-card--cedar .ref, .section--cedar .ref { color: var(--muted-on-dark); }
.grid39-legend button[aria-pressed="true"] { color: var(--scroll); text-decoration: underline; text-underline-offset: 4px; }
.footer-col h2 { font-family: var(--font-display); line-height: 1.3; }

.prose h3 { margin: var(--s-5) 0 var(--s-2); }
.toc { background: var(--linen); border-radius: var(--radius); padding: var(--s-5) var(--s-6); margin-bottom: var(--s-7); }
.toc h2 { margin: 0 0 var(--s-3) !important; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: var(--s-6); }
.toc li { margin-bottom: .35rem; break-inside: avoid; }
.toc a { color: var(--accent); font-weight: 500; text-underline-offset: 3px; }
@media (max-width: 767px) { .toc ol { columns: 1; } }
.legal-summary { border-left: 4px solid var(--accent); padding: var(--s-2) 0 var(--s-1) var(--s-5); margin-bottom: var(--s-7); }
.legal-summary h2 { margin: 0 0 var(--s-3) !important; }
.legal-summary ul { margin-bottom: 0; }
.prose a { color: var(--accent); font-weight: 500; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.grid39 .b--law, .grid39 .b--poetry { color: var(--ink); }
.person .ph { color: var(--stone); }
/* Buttons styled with `all: unset` lose the global ring; restore it explicitly. */
.grid39-legend button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sw button.copy:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Resources: a side-by-side feature (picture left, text right) */
.res-feature--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
.res-feature--split .res-feature-img { height: 100%; }
.res-feature--split .res-feature-img img { height: 100%; object-fit: cover; filter: grayscale(1); }
@media (max-width: 767px) { .res-feature--split { grid-template-columns: 1fr; } }

/* ---------- Products (Resources page): the tools that are ready today ---------- */
.sec-head { margin-bottom: var(--s-6); max-width: 60ch; }
.sec-head h2 { margin-bottom: var(--s-2); }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.product { display: flex; flex-direction: column; background: var(--ink); color: var(--scroll); border-radius: var(--radius); overflow: hidden; }
.product-img { display: block; aspect-ratio: 16 / 7; background: #B2B2B2; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .4s var(--ease), transform .6s var(--ease); }
.product-img--lineup img { object-fit: contain; filter: none; padding-inline: 4%; }
.product:hover .product-img img { filter: none; transform: scale(1.02); }
.product-body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.5rem, 4vw, 2.5rem); }
.product .meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.product .pill--new { background: var(--accent-on-dark); border-color: var(--accent-on-dark); color: var(--ink); }
.product .pill:not(.pill--new) { color: var(--muted-on-dark); }
.product h3 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; margin-bottom: var(--s-3); }
.product h3 a { color: inherit; text-decoration: none; }
.product h3 a:hover { color: var(--gold); }
.product-tag { color: var(--muted-on-dark); }
/* A screenshot under the name (Games page), so it doesn't read as the product's title */
.product-shot { margin: 0 0 var(--s-5); }
.product-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-on-dark); border-radius: var(--radius); }
.product-shot figcaption { margin-top: var(--s-2); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-eyebrow); letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); }
.product-list { list-style: none; padding: 0; margin: 0 0 var(--s-6); display: grid; gap: var(--s-2); flex: 1; align-content: start; border-top: 1px solid var(--line-on-dark); padding-top: var(--s-4); }
.product-list li { display: grid; grid-template-columns: 1rem 1fr; gap: .6rem; font-size: .95rem; }
.product-list li::before { content: ""; width: .55em; height: .65em; margin-top: .45em; background: var(--gold); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.product .row { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.product .btn--ghost { --btn-bg: var(--scroll); color: var(--scroll); }
.product .btn--ghost:hover { color: var(--ink); }
@media (max-width: 1023px) { .products { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .product:hover .product-img img { transform: none; } }

/* ---------- Drawer (slide-in <dialog>, shared by the First Eight profiles and the Scripture drawer) ---------- */
body:has(dialog.drawer[open]) { overflow: hidden; }
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(620px, 100vw); max-width: 100vw; padding: 0; border: 0; background: var(--scroll); color: var(--ink); box-shadow: -24px 0 60px rgba(0,0,0,.35); }
dialog.drawer[open] { animation: drawer-in .42s cubic-bezier(.2,.8,.2,1); }
dialog.drawer.is-closing { animation: drawer-out .28s cubic-bezier(.5,0,.75,0) forwards; }
dialog.drawer::backdrop { background: rgba(22,21,20,.7); backdrop-filter: blur(4px); animation: fe-fade .3s ease; }
dialog.drawer.is-closing::backdrop { animation: fe-fade .28s ease reverse forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes fe-fade { from { opacity: 0; } }
.drawer-in { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.drawer-close { position: fixed; top: var(--s-4); right: var(--s-4); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(22,21,20,.25); background: rgba(247,243,236,.9); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.drawer-close:hover { border-color: var(--ink); }
@media (max-width: 767px) { dialog.drawer { width: 100vw; } }
@media (prefers-reduced-motion: reduce) { dialog.drawer[open], dialog.drawer::backdrop { animation: none; } }

/* ---------- Scripture references and the Scripture drawer (js/bible.js) ----------
   bible.js turns references in page text ("Genesis 3:6", "Genesis 2:16–17; 3:6") into buttons
   that open the drawer. Text comes from API.Bible through /api/bible. */
.bref { all: unset; cursor: pointer; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: currentColor; border-radius: 2px; }
.bref:hover { text-decoration-thickness: 2px; }
.bref-nw { white-space: nowrap; }   /* a reference and the punctuation touching it stay on one line */
.bref:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
:is(.section--ink, .section--cedar, .site-footer, .key-verse, .move.is-weak, .fighter, .cover, .pp-hero, .pp-sec--cedar, .st-one, .st-word, .st-chain li:last-child) .bref:focus-visible { outline-color: var(--gold); }
/* Small references (citations) get a little more room to tap */
cite .bref, .ref .bref { padding-block: .35em; margin-block: -.35em; }

dialog.sd { width: min(640px, 100vw); }
.sd-head { padding: var(--s-6) var(--s-6) var(--s-5); padding-right: calc(var(--s-6) + 44px); background: var(--linen); border-bottom: 1px solid var(--line); }
.sd-head .eyebrow { margin-bottom: var(--s-2); }
.sd-head h2 { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 var(--s-4); }
.sd-versions { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.sd-versions legend { font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); margin-bottom: var(--s-2); padding: 0; }
.sd-versions label { position: relative; display: inline-grid; place-items: center; min-height: 44px; min-width: 64px; padding: 0 var(--s-4); border: 1.5px solid rgba(22,21,20,.3); border-radius: var(--radius-pill); font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; cursor: pointer; background: var(--scroll); }
.sd-versions label:hover { border-color: var(--ink); }
.sd-versions input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sd-versions label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.sd-versions label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.sd-body { padding: var(--s-5) var(--s-6) var(--s-7); display: grid; gap: var(--s-6); }
.sd-body[aria-busy="true"] .sd-text { opacity: .45; }
.sd-part h3 { font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s-3); }
.sd-text { font-family: var(--font-scripture); font-size: 1.2rem; line-height: 1.75; transition: opacity .2s; }
.sd-text p { margin: 0 0 var(--s-4); max-width: 62ch; }
.sd-text .v { font-family: var(--font-display); font-size: .66em; font-weight: 700; color: var(--gold-deep); vertical-align: super; line-height: 0; margin-right: .25em; }
.sd.no-verses .sd-text .v { display: none; }
/* Chapter number: a big numeral where a new chapter starts inside a passage (the title already names the first) */
.sd-text .c { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--gold-deep); margin: var(--s-6) 0 var(--s-3); }
.sd-text > .c:first-child { display: none; }
/* Section headings: the translators' headings, not Scripture, so they look like labels, not text */
.sd-text :is(.s, .s1, .s2, .s3, .ms, .ms1, .ms2, .mr) { font-family: var(--font-display); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); line-height: 1.4; margin: var(--s-6) 0 var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.sd-text > :is(.s, .s1, .s2, .ms, .ms1, .ms2):first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sd-text .r { font-family: var(--font-body); font-size: .8rem; color: var(--stone); margin-top: calc(-1 * var(--s-2)); }
.sd-text .d { font-style: italic; font-size: 1.05rem; color: var(--stone); }   /* a psalm's own title is Scripture: kept, but quiet */
/* Poetry: lines hang together, second lines step in */
.sd-text :is(.q, .q1, .qm, .qm1, .pi, .pi1) { padding-left: 1.5em; text-indent: -1em; margin-bottom: 0; }
.sd-text :is(.q2, .qm2, .pi2) { padding-left: 3em; text-indent: -1em; margin-bottom: 0; }
.sd-text :is(.q3, .qm3) { padding-left: 4.5em; text-indent: -1em; margin-bottom: 0; }
.sd-text :is(.q, .q1, .q2, .q3, .qm1, .qm2, .qm3) + :not(.q, .q1, .q2, .q3, .qm1, .qm2, .qm3, .b) { margin-top: var(--s-4); }
.sd-text .b { margin: 0; height: var(--s-3); }
.sd-text :is(.li, .li1) { padding-left: 1em; }
.sd-text :is(.nd, .sc) { font-variant: small-caps; }
.sd-text :is(.it, .em) { font-style: italic; }   /* NASB marks words the translators supplied */
.sd-text .wj { color: inherit; }
/* Speech: anything in quotation marks (js/bible.js marks it). Who is speaking is left to the reader. */
.sd-text .sp { color: var(--major); }
.sd.no-speech .sd-text .sp { color: inherit; }
.sd-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.sd-toggle { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: 0 var(--s-3); font-family: var(--font-display); font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer; border-radius: var(--radius); }
.sd-toggle::before { content: ""; width: 1.1em; height: 1.1em; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--scroll); }
.sd-toggle[aria-pressed="true"]::before { background: var(--ink); box-shadow: inset 0 0 0 3px var(--scroll); }
.sd-toggle:hover { background: rgba(22,21,20,.06); }
.sd-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sd-more { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; border-top: 1px solid var(--line); padding-top: var(--s-5); }
.sd-more p { margin: 0 var(--s-2) 0 0; font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); width: 100%; }
.sd-more:empty { display: none; }
.sd-status { font-size: var(--fs-small); color: var(--stone); margin: 0; }
.sd-status.is-error { color: var(--danger); }
.sd-status:empty { display: none; }
.sd-foot { margin: 0; padding: var(--s-4) var(--s-6) var(--s-7); border-top: 1px solid var(--line); font-size: .8rem; color: var(--stone); display: grid; gap: var(--s-2); }
.sd-foot p { margin: 0; }
.sd-foot a { color: var(--ink); }
.sd-foot a:hover { color: var(--accent); }
@media (max-width: 767px) {
  .sd-head { padding: var(--s-5) var(--s-5) var(--s-4); padding-right: calc(var(--s-5) + 44px); }
  .sd-body { padding: var(--s-5) var(--s-5) var(--s-6); }
  .sd-foot { padding: var(--s-4) var(--s-5) var(--s-7); }
}

/* ---------- Music player (js/player.js): a round button at the bottom right that opens a small panel ---------- */
.f39p { position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-3); font-family: var(--font-body); color: var(--scroll); }
.has-f39p .site-footer { padding-bottom: 84px; }
.f39p .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; }

.f39p-toggle { all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--scroll); border: 2px solid var(--gold); box-shadow: 0 10px 28px -10px rgba(22, 21, 20, .55); transition: transform .2s var(--ease), background .2s; }
.f39p-toggle:hover { transform: translateY(-2px); }
.f39p.is-open .f39p-toggle { background: var(--gold); color: var(--ink); }
.f39p-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 8px var(--ink); } /* gold reads on dark pages, the ink ring on light ones */
.f39p-icon, .f39p-eq { grid-area: 1 / 1; }
.f39p-eq { display: none; height: 18px; align-items: flex-end; gap: 3px; }
.f39p-eq i { width: 4px; height: 100%; background: currentColor; transform-origin: bottom; animation: f39p-eq 1s ease-in-out infinite; }
.f39p-eq i:nth-child(2) { animation-delay: -.35s; } .f39p-eq i:nth-child(3) { animation-delay: -.7s; }
.f39p.is-playing .f39p-eq { display: flex; }
.f39p.is-playing .f39p-icon { display: none; }
.f39p.is-waiting:not(.is-open) .f39p-toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-on-dark); border: 2px solid var(--ink); }
@keyframes f39p-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.f39p-panel { width: 320px; max-width: calc(100vw - 2 * var(--s-4)); background: var(--ink); border-radius: var(--radius); box-shadow: 0 24px 48px -20px rgba(22, 21, 20, .7); overflow: hidden; position: relative; padding: var(--s-4) var(--s-4) var(--s-4); }
.f39p-panel[hidden] { display: none; }
.f39p-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(to right, var(--law) 0 12.8%, var(--history) 12.8% 43.6%, var(--poetry) 43.6% 56.4%, var(--major) 56.4% 69.2%, var(--minor) 69.2%); }
.f39p-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3); margin: var(--s-2) 0 var(--s-3); }
.f39p-cover { width: 56px; height: 56px; border-radius: 2px; display: block; }
.f39p-cover[hidden] { display: none; }
.f39p-meta { min-width: 0; }
.f39p-eyebrow { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.f39p-title { margin: .1rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.2; letter-spacing: -.01em; color: var(--scroll); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.f39p-btn { all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--muted-on-dark); transition: color .2s, background .2s; }
.f39p-btn:hover { color: var(--scroll); background: rgba(247, 243, 236, .08); }
.f39p-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; }
.f39p-btn[aria-pressed="true"] { color: var(--gold); }
.f39p-btn[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.f39p-repeat b { display: none; position: absolute; top: 9px; right: 7px; font-family: var(--font-display); font-size: .6rem; font-weight: 800; }
.f39p-repeat[data-mode="one"] b { display: block; }
.f39p-play { width: 52px; height: 52px; background: var(--gold); color: var(--ink); }
.f39p-play:hover { background: var(--scroll); color: var(--ink); }

.f39p-ctl { display: flex; justify-content: space-between; align-items: center; }
.f39p-seek { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--muted-on-dark); }
.f39p-seek input { width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.f39p-seek input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--gold) var(--p, 0%), rgba(247, 243, 236, .25) var(--p, 0%)); }
.f39p-seek input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(247, 243, 236, .25); }
.f39p-seek input::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold); }
.f39p-seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--scroll); border: 0; }
.f39p-seek input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--scroll); border: 0; }
.f39p-seek input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.f39p-status { margin: var(--s-2) 0 0; font-size: .8rem; color: var(--accent-on-dark); }
.f39p-status:empty { display: none; }
.f39p-list { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-3); margin-top: var(--s-3); border-top: 1px solid var(--line-on-dark); padding-top: var(--s-3); }
.f39p-list[hidden] { display: none; }
.f39p-list label { font-family: var(--font-display); font-weight: 600; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-on-dark); }
.f39p-list select { min-height: 44px; width: 100%; padding: 0 var(--s-3); border-radius: 2px; border: 1px solid var(--line-on-dark); background: var(--ink); color: var(--scroll); font: 600 .9rem var(--font-display); cursor: pointer; }
.f39p-list select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.f39p-all { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-1); font-family: var(--font-display); font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--scroll); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.f39p-all:hover { color: var(--gold); }

@media (max-width: 479px) {
  .f39p { right: var(--s-3); bottom: var(--s-3); }
  .f39p-panel { max-width: calc(100vw - 2 * var(--s-3)); }
}
@media (prefers-reduced-motion: reduce) {
  .f39p-eq i { animation: none; transform: scaleY(.7); }
  .f39p-eq i:nth-child(2) { transform: scaleY(1); }
  .f39p-toggle { transition: none; }
}
@media print { .f39p { display: none; } }
.mx-stream { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-4); }
.mx-stream[hidden] { display: none; }
.mx-stream .btn { min-height: 44px; }

/* ---------- Accounts: /sign-in and /account (js/account.js) ---------- */
.acct { display: grid; gap: var(--s-5); max-width: 34rem; margin-top: var(--s-6); }
.acct .form-card { margin: 0; }
.acct .form-card h2 { font-size: var(--fs-h4); margin: 0 0 var(--s-3); }
.acct .form-card > p { margin: 0 0 var(--s-4); }
.acct .field { margin-bottom: var(--s-4); }
.acct .btn { min-height: 44px; justify-content: center; }
.acct-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.acct-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; color: var(--stone);
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn--google { --btn-bg: #fff; --btn-fg: var(--ink); width: 100%; border-color: rgba(22,21,20,.25); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.btn--google::after { display: none; }
.btn--google:hover { border-color: var(--ink); }
.btn--google svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; }
.acct-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); }
.acct-facts dt { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; padding-top: .2em; }
.acct-facts dd { margin: 0; overflow-wrap: anywhere; }
.acct details summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.acct details[open] summary { margin-bottom: var(--s-3); }
.acct .form-msg:empty { display: none; }
.acct-danger { border-top-color: var(--danger); }
@media (max-width: 479px) { .acct-facts { grid-template-columns: 1fr; gap: 0 0; } .acct-facts dd { margin-bottom: var(--s-3); } }
.acct h2[tabindex="-1"]:focus { outline: none; }
/* Accounts: /welcome (age, consent) and /parent */
.acct fieldset { border: 0; margin: 0 0 var(--s-4); padding: 0; min-width: 0; }
.acct legend { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); margin-bottom: var(--s-2); padding: 0; }
.acct-date { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s-3); }
.acct-date .field { margin-bottom: 0; }
.acct-check { display: flex; gap: var(--s-3); align-items: flex-start; min-height: 44px; padding: var(--s-2) 0; cursor: pointer; line-height: 1.5; }
.acct-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--accent); cursor: pointer; }
.acct-check input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.acct-checks { margin: 0 0 var(--s-4); }
.acct-list { margin: 0 0 var(--s-4); padding-left: 1.2em; }
.acct-list li { margin-bottom: var(--s-2); }
/* /account pieces shared with eben.js and earn.js (the profile itself is css/account.css and js/profile.js). Badges are js/badge.js. */
.pt-hero { padding-bottom: var(--s-5); }
.pt-lead { margin-bottom: 0; }
.acct.pt { display: block; max-width: none; margin: 0; padding-bottom: var(--s-8); }
.pt .form-msg[data-ac-note] { margin: 0 0 var(--s-5); }
.pt-nav { position: sticky; top: 72px; z-index: 5; background: var(--scroll); border-bottom: 1px solid var(--line); margin-bottom: var(--s-6); }
.pt-nav ul { list-style: none; display: flex; gap: var(--s-5); margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.pt-nav a { display: flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pt-nav a:hover { border-bottom-color: var(--accent); }
.pt-sec { scroll-margin-top: 140px; margin-bottom: var(--s-8); }
.pt-sec-head { max-width: 62ch; margin-bottom: var(--s-5); }
.pt-sec-head h2 { margin: 0 0 var(--s-2); }
.pt-sec-head p { margin: 0; color: var(--stone); }
.pt-k { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 var(--s-2); }
.pt-loading { margin: 0; }

.pt-continue { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-7); align-items: center;
  background: var(--cedar); color: var(--scroll); border-radius: var(--radius); padding: var(--s-7); }
.pt-continue .pt-loading { grid-column: 1 / -1; color: var(--scroll); }
.pt-continue .pt-k { color: var(--accent-on-dark); }
.pt-continue h3 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.05; margin: 0 0 var(--s-3); color: var(--scroll); }
.pt-sub { font-size: 1.1rem; margin: 0 0 var(--s-4); max-width: 46ch; }
.pt-count { font-size: var(--fs-small); color: var(--muted-on-dark); margin: 0 0 var(--s-2); }
.pt-weeks { list-style: none; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin: 0 0 var(--s-5); padding: 0; max-width: 30rem; }
.pt-weeks a, .pt-weeks li > span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--scroll); text-decoration: none;
  border: 1.5px solid rgba(247, 243, 236, .35); }
.pt-weeks .is-soon > span { border-style: dashed; color: var(--muted-on-dark); }
.pt-weeks .is-done a, .pt-weeks .is-done > span { border-style: solid; background: var(--accent); border-color: var(--accent-on-dark); color: #fff; }
.pt-weeks .is-next a, .pt-weeks .is-next > span { border-color: var(--gold); border-width: 2px; }
.pt-weeks a:hover { border-color: var(--gold); }
.pt-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.pt-ctas .btn { min-height: 44px; }
.pt-soon { color: var(--muted-on-dark); margin-right: var(--s-3); }

.pt-shelf { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-6) var(--s-4); margin: 0; padding: 0; }
.pt-badge { position: relative; display: grid; justify-items: center; text-align: center; gap: var(--s-1); }
.pt-badge .f39-badge { width: 100%; max-width: 180px; height: auto; transition: transform .2s ease; }
.pt-badge:hover .f39-badge { transform: translateY(-3px); }
.pt-badge.is-soon .f39-badge { opacity: .75; }
.pt-badge-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; margin-top: var(--s-2); }
a.pt-badge-name::after { content: ""; position: absolute; inset: 0; }   /* the whole badge is the link */
a.pt-badge-name:focus-visible { outline: none; }
.pt-badge:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 6px; border-radius: var(--radius); }
.pt-badge-status { font-size: var(--fs-small); color: var(--stone); }
.pt-badge.is-earned .pt-badge-status { color: var(--gold-deep); font-weight: 700; }

.pt-next { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0; }
.pt-next li { position: relative; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: var(--s-5); }
.pt-next li:hover { border-color: var(--accent); }
.pt-next h3 { font-size: 1.15rem; margin: 0 0 var(--s-2); }
.pt-next h3 a { color: var(--ink); text-decoration: none; }
.pt-next h3 a::after { content: ""; position: absolute; inset: 0; }
.pt-next li:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.pt-next h3 a:focus-visible { outline: none; }
.pt-next p:last-child { margin: 0; font-size: var(--fs-small); color: var(--stone); }

.pt-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }
.pt-settings .form-card h3 { font-size: var(--fs-h4); margin: 0 0 var(--s-3); }

@media (max-width: 1023px) {
  .pt-continue { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-6); }
  .pt-next { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .pt-nav { top: 64px; }
  .pt-continue { grid-template-columns: 1fr; justify-items: start; padding: var(--s-5); }
  .pt-continue-badge { width: 180px; justify-self: center; }
  .pt-settings { grid-template-columns: 1fr; }
  .pt-shelf { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s-5) var(--s-4); }
}
@media (max-width: 479px) {
  .pt-next { grid-template-columns: 1fr; }
  .pt-weeks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pt-nav ul { gap: var(--s-4); }
  .pt-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-3); }
  .pt-badge-name { font-size: .95rem; }
}

/* Badges: /badges/ and the "Earn this badge" cards on any page (js/earn.js, js/badge.js, tools/build_badges.py). */
.f39-badge { display: block; width: 100%; height: auto; }
.btn--small { min-height: 44px; padding: .55rem 1rem; font-size: .78rem; }
.earn-strip { margin: var(--s-8) 0 var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.earn-strip-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-5); }
.earn-strip-head h2 { margin: 0; }
.earn-strip-head a { font-size: var(--fs-small); }
.earn-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--s-4); margin: 0; padding: 0; }
.earn-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-5); align-items: start; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); scroll-margin-top: 120px; }
.earn-card.is-earned { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
/* A Bible Study's call to action (tools/build_studies.py study_cta; js/progress.js says Start, Continue or Review).
   Shared: the study's Characters page and /studies/. */
.st-cta { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s-6); align-items: center; background: var(--linen);
  border-radius: var(--radius); padding: var(--s-6); margin-bottom: var(--s-5); }
.st-cta-badge { width: 160px; }
.st-cta-body > :last-child { margin-bottom: 0; }
.st-cta-k { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);   /* Gold Deep fails on Linen */ margin: 0 0 var(--s-1); }
.st-cta h2, .st-cta h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 var(--s-2); }
.st-cta h2 a, .st-cta h3 a { color: inherit; text-decoration: none; }
.st-cta h2 a:hover, .st-cta h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.st-cta-theme { font-weight: 600; margin: 0 0 var(--s-2); }
.st-cta-text { margin: 0 0 var(--s-4); }
@media (max-width: 479px) {
  .st-cta { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: var(--s-5); }
  .st-cta-badge { width: 140px; }
}
.earn-art { width: 112px; min-height: 119px; }
.earn-body > :first-child { margin-top: 0; }
.earn-k { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 var(--s-1); }
.earn-card h2, .earn-card h3 { font-size: 1.25rem; margin: 0 0 var(--s-2); }
.earn-how { margin: 0 0 var(--s-2); font-weight: 600; }
.earn-tip { margin: 0 0 var(--s-3); font-size: var(--fs-small); color: var(--stone); }
.earn-go { margin: 0 0 var(--s-4); font-size: var(--fs-small); }
.earn-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.earn-when { font-size: var(--fs-small); color: var(--stone); }
.earn-act .form-msg { flex-basis: 100%; margin: 0; padding: var(--s-2) var(--s-3); }
.earn-act .form-msg:empty { display: none; }
.bd-wrap { padding-block: var(--s-7) var(--s-9); }
.bd-status { margin: var(--s-4) 0 0; min-height: 1.5em; }
.bd-note { border-left: 4px solid var(--gold); background: var(--linen); padding: var(--s-4) var(--s-5); margin: 0 0 var(--s-7); border-radius: 0 var(--radius) var(--radius) 0; }
.bd-note p { margin: 0; max-width: none; }
.bd-sec { margin-bottom: var(--s-8); scroll-margin-top: 100px; }
.bd-head { display: flex; align-items: center; gap: var(--s-3); }
.bd-head h2 { margin: 0; }
.bd-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.bd-about { color: var(--stone); max-width: 62ch; margin: var(--s-2) 0 var(--s-5); }
.bd-studies { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-6) var(--s-4); margin: 0; padding: 0; }
.bd-count { color: var(--stone); font-size: var(--fs-small); }
.pt-acts { margin-top: var(--s-7); }
.pt-acts h3 { font-size: var(--fs-h4); margin: 0 0 var(--s-4); }
@media (max-width: 767px) { .bd-wrap { padding-top: var(--s-6); } }
@media (max-width: 479px) {
  .earn-card { grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4); }
  .earn-art { width: 76px; min-height: 81px; }
  .bd-studies { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-3); }
}
.earn-wrap { padding-bottom: var(--s-7); }
.earn-wrap .earn-strip { margin-top: 0; }
.pt-shelf-h { font-size: var(--fs-h4); margin: 0 0 var(--s-4); }

/* /badges/ as grids of badges (js/badges-page.js): each tile opens the drawer with how to earn it. */
.bd-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--s-6) var(--s-4); margin: 0; padding: 0; }
.bd-open { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; text-align: center; gap: var(--s-1); width: 100%; padding: var(--s-2) var(--s-1); border-radius: var(--radius); }
.bd-open:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.bd-art { display: block; width: 100%; max-width: 150px; aspect-ratio: 240 / 256; }
.bd-art .f39-badge { transition: transform .2s ease, filter .2s ease; }
.bd-open:hover .f39-badge { transform: translateY(-4px) rotate(-2deg); }
.bd-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; line-height: 1.2; color: var(--ink); margin-top: var(--s-2); }
.bd-status { font-size: var(--fs-small); color: var(--stone); min-height: 1.4em; }
.bd-tile.is-earned .bd-status { color: var(--gold-deep); font-weight: 700; }
.bd-tile.is-soon .f39-badge { opacity: .7; }
.bd-tile.is-soon .bd-name { color: var(--stone); }
.bd-sec { margin-bottom: var(--s-8); }
.bd-sec .bd-about { margin-bottom: var(--s-5); }
dialog.bd-drawer { width: min(520px, 100vw); }
.bd-d-head { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-5); align-items: center; padding: var(--s-7) var(--s-6) var(--s-5); padding-right: calc(var(--s-6) + 44px); background: var(--linen); border-bottom: 1px solid var(--line); }
.bd-d-head .eyebrow { margin-bottom: var(--s-2); }
.bd-d-head h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.05; margin: 0; }
.bd-d-status { margin: var(--s-2) 0 0; color: var(--stone); font-size: var(--fs-small); }
.bd-d-body { padding: var(--s-6); }
.bd-d-body > p { margin: 0 0 var(--s-4); }
.bd-how { font-size: 1.15rem; font-weight: 600; }
.bd-tip { color: var(--stone); }
.bd-act { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.bd-d-body .form-msg { margin-top: var(--s-4); }
.bd-d-body .form-msg:empty { display: none; }
.bd-weeks { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.bd-weeks li { display: flex; align-items: center; gap: var(--s-3); min-height: 32px; }
.bd-wk-no { flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; border: 1.5px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: .8rem; }
.bd-weeks .is-done .bd-wk-no { background: var(--accent); border-color: var(--accent); color: #fff; }
.bd-weeks small { color: var(--stone); }
@media (max-width: 479px) {
  .bd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-2); }
  .bd-name { font-size: .88rem; }
  .bd-status { font-size: .78rem; }
  .bd-d-head { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-6) var(--s-5) var(--s-4); padding-right: calc(var(--s-5) + 44px); }
  .bd-d-body { padding: var(--s-5); }
}
.pt-sec-cta { margin: var(--s-4) 0 0; }
.pt-sec-cta .btn { min-height: 44px; }

/* The Concierge's card (js/activity.js): what you earned, what it means, what's next. Bottom left, clear of the music
   player's button; at the top on phones (the player bar is at the bottom); in the page on /account ([data-cheer-slot]). */
.cheer { position: fixed; left: var(--s-4); bottom: var(--s-4); z-index: 80; width: min(440px, calc(100vw - 2 * var(--s-4)));
  max-height: calc(100vh - 2 * var(--s-4)); overflow-y: auto;
  background: var(--ink); color: var(--scroll); border: 2px solid var(--gold); border-radius: var(--radius);
  padding: var(--s-5) var(--s-5) var(--s-4); box-shadow: 0 16px 40px rgba(0,0,0,.35); animation: ch-in .5s cubic-bezier(.2,1.4,.4,1) both; }
.cheer--inline { position: relative; left: auto; bottom: auto; z-index: auto; width: auto; max-height: none; margin: 0 0 var(--s-5); }
.ch-live { display: flex; align-items: flex-start; gap: var(--s-4); padding-right: 36px; }
.ch-art { flex: none; }
.ch-art img, .ch-art span { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); background: var(--cedar); box-shadow: 0 0 0 0 rgba(186,149,84,.6);
  animation: ch-pop .7s .25s cubic-bezier(.2,1.6,.4,1) both, ch-glow 1.6s .6s ease-out 2; }
.ch-art .ch-lv { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--gold); }
.ch-text { min-width: 0; }
.ch-text p { margin: 0; }
.ch-eyebrow { font-size: var(--fs-small); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ch-eyebrow span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--scroll); }
.ch-name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; margin: 2px 0 var(--s-2) !important; }
.ch-mean, .ch-ahead { font-size: var(--fs-small); line-height: 1.5; margin-bottom: var(--s-2) !important; }
.ch-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.cheer .ch-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-on-dark); font-size: var(--fs-small); font-weight: 600; }
.ch-btns { display: flex; justify-content: flex-end; }
.ch-next { min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--gold); border-radius: var(--radius); background: none; color: var(--scroll); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.ch-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--scroll); font-size: 1.5rem; cursor: pointer; }
.cheer a:focus-visible, .cheer button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@keyframes ch-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes ch-pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
@keyframes ch-glow { to { box-shadow: 0 0 0 18px rgba(186,149,84,0); } }
@media (prefers-reduced-motion: reduce) { .cheer, .ch-art img, .ch-art span { animation: none; } }
@media (max-width: 767px) {
  .cheer:not(.cheer--inline) { top: var(--s-4); bottom: auto; }
}
@media (max-width: 479px) {
  .ch-art img, .ch-art span { width: 72px; height: 72px; }
  .ch-art .ch-lv { font-size: 2rem; }
  .cheer { padding: var(--s-4); }
}

/* Badge drawer: how it's earned, progress, quizzes (js/badges-page.js) */
.bd-mode { background: var(--linen); border-left: 4px solid var(--gold); padding: var(--s-3) var(--s-4); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--fs-small); }
.bd-prog { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); }
.bd-prog-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--linen); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bd-prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bd-prog-text { font-size: var(--fs-small); color: var(--stone); white-space: nowrap; }
.bd-quiz { margin-top: var(--s-6); display: grid; gap: var(--s-5); }
.bd-q { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4); margin: 0; background: #fff; }
.bd-q.is-wrong { border-color: var(--danger); border-width: 2px; }   /* a border, not an inset shadow: a shadow runs through the legend */
.bd-q legend { font-weight: 700; padding: 0 var(--s-2); margin-left: calc(-1 * var(--s-2)); }
.bd-q-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--scroll); font-size: .8rem; margin-right: var(--s-1); }
.bd-q .acct-check { margin: 0; }
.bd-q-hint { margin: var(--s-2) 0 0; font-size: var(--fs-small); color: var(--stone); }
.bd-q-hint cite { font-style: normal; }
.bd-q-msg { margin: var(--s-2) 0 0; font-size: var(--fs-small); color: var(--danger); font-weight: 600; }
.bd-q-msg:empty { display: none; }
.bd-quiz .btn { justify-self: start; }

/* ---------- Your path (levels): js/journey.js on /badges/ and /account ---------- */
.jy { margin: 0 0 var(--s-7); }
.jy-top { background: var(--ink); color: var(--scroll); border-radius: var(--radius); padding: var(--s-6) var(--s-7) var(--s-7); display: grid; gap: var(--s-6); }
.jy-card { display: flex; gap: var(--s-6); align-items: center; }
.jy-ring { flex: 0 0 auto; color: var(--scroll); }
.jy-ring-on { stroke: var(--gold); transition: stroke-dashoffset .8s ease; }
.jy-ring-k { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .2em; fill: var(--muted-on-dark); }
.jy-ring-n { font-family: var(--font-display); font-weight: 800; font-size: 40px; fill: var(--scroll); }
.jy-k { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 var(--s-2); }
.jy-name { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.05; margin: 0 0 var(--s-2); color: var(--scroll); }
.jy-about { color: var(--muted-on-dark); margin: 0 0 var(--s-3); max-width: 56ch; }
.jy-next { margin: 0; }
.jy-intro p:last-child { margin-bottom: 0; }
.jy-road { position: relative; }
.jy-track { position: absolute; top: 18px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 4px; border-radius: 4px; background: rgba(247, 243, 236, .18); }
.jy-track span { display: block; height: 100%; width: calc(var(--fill) * 100%); border-radius: 4px; background: var(--gold); }
.jy-stops { position: relative; list-style: none; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--s-2); margin: 0; padding: 0; }
.jy-stop { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; }
.jy-dot { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink);
  border: 2px solid rgba(247, 243, 236, .35); font-family: var(--font-display); font-weight: 800; color: var(--muted-on-dark); }
.jy-stop.is-past .jy-dot { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.jy-stop.is-here .jy-dot { background: var(--gold); border-color: var(--scroll); color: var(--ink); box-shadow: 0 0 0 6px rgba(186, 149, 84, .35); }
.jy-stop-name { font-family: var(--font-display); font-weight: 700; font-size: .9rem; line-height: 1.2; color: var(--scroll); margin-top: var(--s-1); }
.jy-stop:not(.is-past):not(.is-here) .jy-stop-name { color: var(--muted-on-dark); }
.jy-stop-at { font-size: .75rem; color: var(--muted-on-dark); }
.jy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-5) 0; }
.jy-stats div { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: var(--s-4) var(--s-5); }
.jy-stats dt { font-size: var(--fs-small); color: var(--stone); }
.jy-stats dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1.1; color: var(--ink); }
.jy-stats small, .pt-stat-n small { font-size: 1rem; font-weight: 600; color: var(--stone); }
.jy-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.jy-pair h3 { font-size: var(--fs-h4); margin: 0 0 var(--s-3); }
.jy-pair ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.jy-pair p { margin: 0; color: var(--stone); }
.jy-mini, .jy-near-btn { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) var(--s-3); text-align: left;
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.jy-mini:hover, .jy-near-btn:hover { border-color: var(--accent); }
.jy-mini:focus-visible, .jy-near-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.jy-mini .f39-badge { flex: 0 0 auto; width: 52px; height: 52px; }
.jy-mini span { display: grid; }
.jy-mini small { color: var(--stone); font-size: var(--fs-small); }
.jy-near-btn { display: grid; grid-template-columns: 1fr auto; row-gap: 6px; padding: var(--s-3); }
.jy-near-btn .bd-prog-bar { grid-column: 1 / -1; flex: none; }
.jy-note { font-size: var(--fs-small); color: var(--stone); margin: var(--s-5) 0 0; max-width: 70ch; }

/* /account: overview, numbers, almost there, accomplishments */
.pt-you-top { background: var(--ink); color: var(--scroll); border-radius: var(--radius); padding: var(--s-6) var(--s-7) var(--s-7); display: grid; gap: var(--s-6); }
.pt-stats-h { margin-top: var(--s-6); }
.pt-stats { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; }
.pt-stats a { display: grid; gap: 2px; height: 100%; padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.pt-stats a:hover { border-color: var(--accent); }
.pt-stat-n { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.pt-stat-l { font-size: var(--fs-small); color: var(--stone); }
.pt-near { margin-top: var(--s-6); }
.pt-near ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0; }
.pt-near li { display: flex; gap: var(--s-3); align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-3) var(--s-4); }
.pt-near li .f39-badge { flex: 0 0 auto; width: 64px; height: 64px; }
.pt-near li > div { display: grid; gap: 6px; flex: 1; min-width: 0; }
.pt-near a { color: var(--ink); }
.pt-near-amt { font-size: var(--fs-small); color: var(--stone); }
.pt-empty { color: var(--stone); max-width: 62ch; }
.pt-tl-m { font-family: var(--font-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin: var(--s-6) 0 var(--s-3); }
.pt-tl-m:first-child { margin-top: 0; }
.pt-tl { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; display: grid; gap: var(--s-3); max-width: 46rem; }
.pt-tl::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.pt-tl-item { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.pt-tl-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; }
.pt-tl-mark .f39-badge { width: 56px; height: 56px; }
.pt-tl-wk { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--scroll), 0 0 0 5px var(--line); }
.pt-tl-item div { display: grid; }
.pt-tl-k { margin: 0; font-size: .75rem; font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }
.pt-tl-item.is-quiz .pt-tl-k { color: var(--accent); }
.pt-tl-item a { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.pt-tl-item time { font-size: var(--fs-small); color: var(--stone); }
.pt-emails .acct-check b { font-weight: 700; }

@media (max-width: 1023px) {
  .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-near ul { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .jy-top, .pt-you-top { padding: var(--s-5); }
  .jy-card { gap: var(--s-4); }
  .jy-ring { width: 96px; height: 96px; }
  .jy-pair, .jy-stats { grid-template-columns: 1fr; }
  .jy-stats { gap: var(--s-2); }
  .jy-stats div { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s-3) var(--s-4); }
  .jy-stats dd { font-size: 1.6rem; }
  /* the road turns to run down the page */
  .jy-track { top: 20px; bottom: 20px; left: 18px; right: auto; width: 4px; height: auto; }
  .jy-track span { width: 100%; height: calc(var(--fill) * 100%); }
  .jy-stops { grid-template-columns: 1fr; gap: var(--s-3); }
  .jy-stop { grid-template-columns: 40px 1fr auto; justify-items: start; align-items: center; text-align: left; column-gap: var(--s-3); }
  .jy-stop-name { margin: 0; }
}
@media (max-width: 479px) {
  .jy-card { flex-direction: column; align-items: flex-start; }
  .pt-stat-n { font-size: 1.8rem; }
  .pt-stats a { padding: var(--s-3) var(--s-4); }
}

/* ---------- Eben, the companion: /account#eben (js/eben.js, COMPANION.md) ---------- */
.eb-intro { display: flex; gap: var(--s-6); align-items: flex-start; background: var(--linen); border-radius: var(--radius); padding: var(--s-7); margin-bottom: var(--s-5); }
.eb-intro .pt-k { color: var(--ink); }
.eb-intro h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 var(--s-3); }
.eb-intro p { max-width: 62ch; }
.eb-promise { margin: 0 0 var(--s-5); padding-left: 1.2em; max-width: 62ch; }
.eb-promise li { margin-bottom: var(--s-2); }
.eb-intro .btn { min-height: 44px; }
.eb-intro .form-msg:empty, .eb .form-msg:empty { display: none; }
.eb-step { grid-template-columns: 120px minmax(0, 1fr); align-items: start; margin-bottom: var(--s-5); }
.eb-voice-line { font-size: 1.05rem; margin: 0 0 var(--s-2); color: var(--scroll); }
.eb-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; margin: 0 0 var(--s-5); font-size: var(--fs-small); color: var(--muted-on-dark); }
.eb-meta a, .eb-step .eb-meta a, .eb-step .bref { color: var(--scroll); }
.eb-meta cite { font-style: normal; }
.eb-ask { font-family: var(--font-display); font-weight: 700; margin: 0 0 var(--s-3); }
.eb-answers { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.eb-answers .btn { min-height: 44px; }
.eb-swap { margin: var(--s-4) 0 0; }
.eb-link { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--scroll); font-size: var(--fs-small); min-height: 44px; display: inline-flex; align-items: center; }
.eb-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.eb-reply { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--scroll); margin: 0 0 var(--s-3); }
.eb-reply:focus { outline: none; }
.eb h3, .eb-reply, .eb [data-eb-on], .eb [data-eb-edit], .eb [data-eb-check] { scroll-margin-top: 140px; }
.eb-smaller { margin: 0 0 var(--s-3); max-width: 52ch; }
.eb-sr:empty { display: none; }
.eb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-items: start; margin-bottom: var(--s-6); }
.eb .form-card h3 { font-size: var(--fs-h4); margin: 0 0 var(--s-3); }
.eb .form-card h3:focus, .eb h3[tabindex="-1"]:focus { outline: none; }
.eb .form-card .btn { min-height: 44px; }
.eb-why { color: var(--stone); font-size: var(--fs-small); margin: 0 0 var(--s-3); }
.eb-note { background: var(--linen); border-radius: 6px; padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); }
.eb-form { max-width: 44rem; margin-bottom: var(--s-6); }
.eb fieldset { border: 0; margin: 0 0 var(--s-5); padding: 0; min-width: 0; }
.eb legend { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: var(--s-2); padding: 0; }
.eb-legend-note { font-family: var(--font-body, inherit); font-weight: 400; font-size: var(--fs-small); color: var(--stone); }
.eb .acct-check { display: flex; gap: var(--s-3); align-items: flex-start; min-height: 44px; padding: var(--s-2) 0; cursor: pointer; line-height: 1.5; }
.eb .acct-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--accent); cursor: pointer; }
.eb .acct-check input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.eb .acct-check input:disabled + span { opacity: .55; }
.eb .acct-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); }
.eb .acct-facts dt { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; padding-top: .2em; }
.eb .acct-facts dd { margin: 0; }
.eb .acct-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.eb-str-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; counter-reset: str; }
.eb-str-list > li { counter-increment: str; border-top: 1px solid var(--line); padding: var(--s-4) 0; }
.eb-str-list h4 { margin: 0 0 var(--s-1); font-size: 1.15rem; }
.eb-str-list h4::before { content: counter(str) ". "; color: var(--gold-deep); }
.eb-str-list p { margin: 0 0 var(--s-2); }
.eb-who { font-size: var(--fs-small); color: var(--stone); }
.eb-who cite { font-style: normal; }
.eb-watch { font-size: var(--fs-small); }
.eb-check { grid-column: 1 / -1; }
.eb-grid:has(.eb-check) .eb-check { grid-row: 1; }
.eb-scale-key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-small); color: var(--stone); margin: 0 0 var(--s-4); }
.eb-items { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.eb-items > li { border-top: 1px solid var(--line); padding: var(--s-3) 0; }
.eb-items fieldset { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; justify-content: space-between; }
.eb-items legend { float: left; font-family: inherit; font-weight: 400; font-size: 1rem; margin: 0; max-width: 34rem; }
.eb-n { color: var(--stone); font-size: var(--fs-small); margin-right: .25em; }
.eb-scale { display: flex; gap: 6px; }
.eb-scale label { position: relative; cursor: pointer; }
.eb-scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.eb-scale label > span:not(.sr-only) { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 50%; font-weight: 700; background: #fff; }
.eb-scale input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.eb-scale input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.eb-scale label:hover > span:not(.sr-only) { border-color: var(--accent); }
.eb-pray, .eb-hist { margin-bottom: var(--s-6); }
.eb-pray h3, .eb-hist h3 { margin: 0 0 var(--s-2); }
.eb-pray-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0 0 var(--s-4); padding: 0; }
.eb-pray-list > li { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: var(--s-5); }
.eb-pray-list h4 { margin: 0 0 var(--s-1); font-size: 1.15rem; }
.eb-pray-list p { margin: 0 0 var(--s-3); }
.eb-try-h { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 var(--s-2) !important; }
.eb-try { margin: 0; padding-left: 1.2em; }
.eb-try li { margin-bottom: var(--s-1); }
.eb-more summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.eb-more[open] summary { margin-bottom: var(--s-3); }
.eb-hist ol { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.eb-hist li { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: baseline; padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.eb-hist time { color: var(--stone); font-size: var(--fs-small); margin-left: auto; }
.eb-hist-a { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--linen); border-radius: 999px; padding: .15em .7em; }
.eb-hist-a.is-did { background: var(--accent); color: #fff; }
.eb-lurk { border: 2px dashed var(--line); border-radius: var(--radius); padding: var(--s-5); margin-bottom: var(--s-6); color: var(--stone); max-width: 44rem; }
.eb-lurk h3 { margin: 0 0 var(--s-2); color: var(--stone); }
.eb-lurk p { margin: 0 0 var(--s-2); }
.eb-lurk .pt-k { color: var(--stone); }
.eb-lurk cite { font-style: normal; }
.eb-lurk-soon { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: .2em .8em; margin: 0 !important; }
.eb-off { max-width: 44rem; border-top-color: var(--stone); }
@media (max-width: 1023px) {
  .eb-pray-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .eb-grid, .eb-pray-list { grid-template-columns: 1fr; }
  .eb-step { grid-template-columns: 1fr; }
  .eb-step .eb-bot { max-width: 80px; }
  .eb-intro { flex-direction: column; padding: var(--s-5); }
}
@media (max-width: 479px) {
  .eb-scale { gap: 4px; }
  .eb-scale label > span:not(.sr-only) { width: 44px; height: 44px; }
  .eb .acct-facts { grid-template-columns: 1fr; gap: 0; }
  .eb .acct-facts dd { margin-bottom: var(--s-3); }
}
/* Eben, drawn (js/eben-bot.js): a slow bob, a flickering lamp, a wave. All off with reduced motion (global rule). */
/* Eben's art (js/eben-bot.js): all of him in a rounded tile, or just his face in a circle. */
.ebb { display: block; width: 100%; height: auto; background: #F6EEE4; }
.ebb--full { border-radius: 18px; }
.ebb--face { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
/* Eben onboarding (js/eben.js wizard): one question at a time */
.eb-bot { width: 100%; max-width: 140px; }
.eb-bot--intro { max-width: 150px; flex: 0 0 150px; }
.eb-step .eb-bot { max-width: 130px; }
.eb-wiz { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s-6); align-items: start; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: var(--s-6); max-width: 60rem; }
.eb-wiz-bot { position: sticky; top: 140px; }
.eb-wiz-bot .eb-bot { max-width: 180px; }
.eb-wiz-main { min-width: 0; }
.eb-wiz fieldset { margin: 0 0 var(--s-4); }
.eb .eb-wiz-q { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; margin: 0 0 var(--s-2); padding: 0; scroll-margin-top: 150px; }
.eb .eb-wiz-q:focus { outline: none; }
.eb-wiz-nav [data-wz-go]::after { display: none; }
.eb-wiz-nav [data-wz-go]::before { content: ""; width: 0.55em; height: 0.65em; background: currentColor; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.eb-wiz-why { color: var(--stone); margin: 0 0 var(--s-5); }
.eb-wiz-say { font-size: 1.1rem; margin: 0 0 var(--s-5); max-width: 52ch; }
.eb-wiz-say:empty { display: none; }
.eb-wiz-prog { margin-bottom: var(--s-5); }
.eb-wiz-count { display: flex; justify-content: space-between; gap: var(--s-4); font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 var(--s-2); }
.eb-wiz-count span:last-child { color: var(--stone); }
.eb-wiz-bar { height: 8px; background: var(--linen); border-radius: 999px; overflow: hidden; }
.eb-wiz-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.eb-opts { display: grid; gap: var(--s-3); }
.eb-opts.is-many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eb-opt { position: relative; display: block; cursor: pointer; }
.eb-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.eb-opt-box { display: flex; flex-direction: column; gap: 2px; min-height: 56px; justify-content: center; padding: var(--s-3) var(--s-4) var(--s-3) calc(var(--s-4) + 30px); border: 1.5px solid var(--line); border-radius: 10px; background: var(--scroll); position: relative; line-height: 1.4; }
.eb-opt-box::before { content: ""; position: absolute; left: var(--s-4); top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid var(--stone); border-radius: 50%; background: #fff; }
.eb-opt input[type="checkbox"] + .eb-opt-box::before { border-radius: 4px; }
.eb-opt-box span { font-size: var(--fs-small); color: var(--stone); }
.eb-opt:hover .eb-opt-box { border-color: var(--accent); }
.eb-opt input:checked + .eb-opt-box { border-color: var(--accent); background: var(--accent-soft); }
.eb-opt input:checked + .eb-opt-box::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.eb-opt input:focus-visible + .eb-opt-box { outline: 3px solid var(--ink); outline-offset: 2px; }
.eb-opt input:disabled + .eb-opt-box { opacity: .5; cursor: not-allowed; }
.eb-wiz-nav { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.eb-wiz-nav .btn { min-height: 44px; }
.eb-review { margin: var(--s-4) 0 var(--s-5); }
.eb-review > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--s-4); border-top: 1px solid var(--line); padding: var(--s-3) 0; }
.eb-review dt { font-size: var(--fs-small); color: var(--stone); grid-column: 1; }
.eb-review dd { margin: 0; grid-column: 1; font-weight: 600; }
.eb-review dd.eb-review-ch { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.eb .eb-review .eb-link { color: var(--accent); }
.eb .eb-review .eb-link:focus-visible { outline-color: var(--ink); }
@media (max-width: 767px) {
  .eb-wiz { grid-template-columns: 1fr; gap: var(--s-3); }
  .eb-wiz-bot { position: static; }
  .eb-wiz-bot .eb-bot { max-width: 72px; }
  .eb-opts.is-many { grid-template-columns: 1fr; }
  .eb-bot--intro { flex-basis: auto; max-width: 110px; }
  .eb-step .eb-bot { max-width: 80px; }
}
