/* ============================================================
   LUTHER'S WORLD — SHARED DESIGN SYSTEM
   Structural rules modeled on Gerah's discipline: one card
   shape, two radius values, one hover pattern. Warm palette kept
   for the audience (families, seniors). Interactive controls
   (buttons, tabs, cards) carry a layered "soft lift" shadow with
   a matching hover/active state — see --shadow-btn-* below.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@600;700&display=swap');
html{font-size:112.5%}
:root{
  --body:'Atkinson Hyperlegible',system-ui,sans-serif;
  --body-btn:'Atkinson Hyperlegible',system-ui,sans-serif; /* same face as --body: one family on every device */
  --display:'Source Serif 4',Georgia,serif;
  --story:var(--body);

  /* ink scale — four steps, purple-black base */
  --ink:#241a22;--ink2:#4c3f49;--ink3:#5f515a;--ink4:#7a6d76;

  /* surface scale: lifted from parchment to layered neutrals */
  --rule:#e4e0da;--paper:#ffffff;--paper2:#f3f0eb;--page:#faf8f5;

  /* brand */
  --site-acc:#5b2a54;--site-acc-deep:#3f2247;--site-acc-soft:#f3ecf2;
  --gold:#c99a2e;--gold-deep:#6e5412;--gold-soft:#faf3e2;

  /* per-world overrides (set by game pages via inline style) */
  --acc:var(--w-acc,var(--site-acc));--acc-deep:var(--w-acc-deep,var(--site-acc-deep));--acc-soft:var(--w-acc-soft,var(--site-acc-soft));
  --found:var(--w-found,#f3ecf2);--found-ink:var(--w-found-ink,#4c3a12);

  /* elevation */
  --shadow-sm:0 0 0 1px rgba(36,26,34,.07), 0 1px 3px rgba(36,26,34,.06), 0 1px 2px rgba(36,26,34,.03);
  --shadow-md:0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg:0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);

  /* button elevation — "soft lift": ambient two-layer shadow,
     deepens on hover, compresses on press. Neutral (ink-tinted)
     for white/quiet buttons; the -acc variants tint to whatever
     --acc resolves to on that page (site purple or a world color). */
  --shadow-btn:0 0 0 1px rgba(36,26,34,.07), 0 1px 2px rgba(36,26,34,.06), 0 3px 8px rgba(36,26,34,.07);
  --shadow-btn-hover:0 2px 4px rgba(36,26,34,.07), 0 6px 14px rgba(36,26,34,.10);
  --shadow-btn-press:0 1px 1px rgba(36,26,34,.08);
  --shadow-btn-acc:0 1px 2px color-mix(in srgb, var(--acc) 45%, transparent), 0 4px 10px color-mix(in srgb, var(--acc) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.12);
  --shadow-btn-acc-hover:0 2px 4px color-mix(in srgb, var(--acc) 50%, transparent), 0 8px 16px color-mix(in srgb, var(--acc) 36%, transparent), inset 0 1px 0 rgba(255,255,255,.15);
  --shadow-btn-acc-press:0 1px 2px color-mix(in srgb, var(--acc) 45%, transparent);
  --grad-acc:linear-gradient(180deg, color-mix(in srgb, var(--acc) 82%, white 18%), var(--acc));
  --grad-acc-hover:linear-gradient(180deg, color-mix(in srgb, var(--acc) 88%, white 12%), var(--acc-deep));

  /* primary button "glass" material — one dimensional treatment,
     reused everywhere a primary action appears. Gradient stays dark
     enough at the base that white text holds full contrast; the
     highlight lives in the top half only, so it signals "press me"
     without ever competing with the label. */
  --grad-glass:linear-gradient(180deg, color-mix(in srgb, var(--acc) 74%, white 26%) 0%, var(--acc) 55%, var(--acc-deep) 100%);
  --shadow-glass:0 1px 0 rgba(255,255,255,.25) inset, 0 2px 3px color-mix(in srgb, var(--acc-deep) 45%, transparent), 0 4px 9px color-mix(in srgb, var(--acc-deep) 32%, transparent);
  --shadow-glass-press:0 1px 0 rgba(255,255,255,.12) inset, 0 1px 1px color-mix(in srgb, var(--acc-deep) 45%, transparent);

  /* ── structural tokens ── */
  --radius-sm:10px;  /* buttons, pills, nav links, small controls */
  --radius-md:16px;  /* cards, containers, sheets, modals */
}

/* ── dark mode — opt-in via data-theme="dark" on <html> ── */
:root[data-theme="dark"]{
  --page:#1b1519;--paper:#261e24;--paper2:#2e252c;
  --ink:#f3edf1;--ink2:#d6ccd3;--ink3:#b3a6af;--ink4:#857b82;--rule:#3a3037;
  --gold:#c99a2e;--gold-soft:#3a3020;--gold-deep:#e6c877;
  --site-acc-soft:#3a2536;--found:#3a2536;--found-ink:#d6ccd3;
  --shadow-sm:0 1px 3px rgba(0,0,0,.4),0 1px 2px rgba(0,0,0,.3);
  --shadow-md:0 2px 8px rgba(0,0,0,.45),0 1px 3px rgba(0,0,0,.35);
  --shadow-lg:0 4px 16px rgba(0,0,0,.5),0 2px 4px rgba(0,0,0,.4);
  --shadow-btn:0 1px 2px rgba(0,0,0,.4),0 3px 8px rgba(0,0,0,.3);
  --shadow-btn-hover:0 2px 4px rgba(0,0,0,.45),0 6px 14px rgba(0,0,0,.4);
  --shadow-btn-press:0 1px 1px rgba(0,0,0,.5);
}
/* Puzzle pages override body background via inline style; reclaim it in dark mode */
[data-theme="dark"] body { background: var(--page) !important; }


/* medium text is the default before any script runs, so pages never
   draw at 16px and then jump to 18px */
html{font-size:112.5%;background:var(--page)}
@view-transition{navigation:auto}
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth}
/* visually hidden but present for screen readers & crawlers */
.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}
body{font-family:var(--body);background:var(--page);color:var(--ink);min-height:100vh;-webkit-font-smoothing:antialiased;line-height:1.55;font-size:1.05rem}
a{text-decoration:none;color:var(--site-acc)}
a:hover{text-decoration:none;opacity:.8}
/* prose links only — contextual underline on hover, never by default */
p a,li a,.note-box a,.sources a,.faq-a a{color:var(--site-acc);border-bottom:1px solid color-mix(in srgb,var(--site-acc) 35%,transparent);transition:border-color .15s,color .15s}
p a:hover,li a:hover,.note-box a:hover,.sources a:hover,.faq-a a:hover{border-color:var(--site-acc);opacity:1}

/* keyboard focus */
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid var(--site-acc);outline-offset:2px;border-radius:var(--radius-sm)}

/* ── top bar — masthead + underline nav (shared by every page,
   including the Daily/home shell — see shell.js) ─────────────── */
.topbar{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--paper) 94%,transparent);backdrop-filter:blur(8px);box-shadow:0 1px 2px rgba(36,26,34,.04),0 4px 14px rgba(36,26,34,.05)}
.tb-top{max-width:960px;margin:0 auto;padding:14px 20px 10px;display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative}
.tb-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}
.tb-name{display:flex;flex-direction:column;line-height:1.25}
.tb-nm{font-family:var(--display);font-size:1.2rem;font-weight:600;color:var(--ink)}
.tb-tag{font-size:.85rem;color:var(--ink3);letter-spacing:0;text-transform:none;margin-top:1px}

/* ── mobile: the old link row hands off to the bottom tab bar,
   and "More" carries the two low-frequency destinations ── */
.tb-more-btn{display:none;align-items:center;justify-content:center;width:38px;height:38px;
  border-radius:50%;background:transparent;border:none;color:var(--ink2);cursor:pointer;flex:none}
.tb-more-btn:hover{background:var(--paper2)}
.tb-more-menu{display:none;position:absolute;top:100%;right:20px;margin-top:6px;background:var(--paper);
  border:1px solid var(--rule);border-radius:var(--radius-md);box-shadow:var(--shadow-md);
  padding:6px;min-width:160px;z-index:60}
.tb-more-menu.open{display:block}
.tb-more-menu a{display:block;padding:10px 12px;border-radius:var(--radius-sm);font-size:.92rem;
  font-weight:600;color:var(--ink2);text-decoration:none}
.tb-more-menu a:hover{background:var(--paper2);color:var(--ink)}
@media(max-width:899px){
  .tb-nav{display:none}
  .tb-more-btn{display:flex}
}
.tb-side{display:flex;align-items:center;gap:8px;position:relative}
.tb-nav{max-width:960px;margin:0 auto;padding:0 20px;display:flex;gap:clamp(10px,1.4vw,18px);border-top:1px solid var(--rule);overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.tb-nav::-webkit-scrollbar{display:none}
.tb-link{font-family:var(--body-btn);font-size:.88rem;font-weight:600;color:var(--ink3);text-decoration:none;padding:11px 1px;min-height:44px;display:flex;align-items:center;white-space:nowrap;border-bottom:2.5px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s}

/* ── mobile bottom tab bar (injected by bottom-nav.js) ──
   Phone only. Fixed to the bottom, five equal tabs, icon over
   label. The top .tb-nav takes back over at 900px, where this
   bar hides and its body padding is released. ── */
.lw-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:flex;
  background:color-mix(in srgb,var(--paper) 97%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  border-top:1px solid var(--rule);padding-bottom:env(safe-area-inset-bottom)}
.lw-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  padding:8px 4px;min-height:56px;text-decoration:none;color:var(--ink3);font-family:var(--body-btn);
  font-size:.68rem;font-weight:600;text-align:center;line-height:1.2;transition:color .15s}
.lw-tab svg{width:22px;height:22px;flex:none}
.lw-tab.on{color:var(--site-acc)}
body.lw-has-tabbar{padding-bottom:76px}
@media(min-width:900px){
  .lw-tabbar{display:none}
  body.lw-has-tabbar{padding-bottom:0}
}
.tb-link:hover{color:var(--ink)}
.tb-link.active{color:var(--site-acc-deep);border-color:var(--site-acc)}

.col{max-width:960px;margin:0 auto;padding:0 20px}
.lw-main .wd-wrap{padding-left:0;padding-right:0;max-width:100%}


/* ── THE CARD — one component, used for every "tap to go" element ── */
/* Adapted from Gerah's .path-row: white bg, 1px border, consistent
   radius, content left + CTA right, border-color shift on hover.
   Thick 2px borders replaced with 1px to match Gerah's restraint. */
.card{
  display:flex;align-items:center;gap:14px;
  width:100%;padding:16px 18px;
  background:var(--paper);border:none;border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
  text-decoration:none;color:var(--ink);cursor:pointer;
  transition:box-shadow .18s ease,transform .18s ease;
}
.card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.card:active{box-shadow:var(--shadow-sm);transform:translateY(0)}
.card-icon{width:42px;height:42px;flex-shrink:0;font-size:1.8rem;display:flex;align-items:center;justify-content:center}
.card-body{flex:1;min-width:0}
.card-name{display:block;font-family:var(--display);font-size:1.12rem;font-weight:600;line-height:1.25}
.card-sub{display:block;font-size:.88rem;color:var(--ink2);line-height:1.35;margin-top:2px}
.card-cta{white-space:nowrap;font-size:.88rem;font-weight:700;color:var(--site-acc);display:flex;align-items:center;gap:4px;flex-shrink:0;transition:transform .15s}
.card:hover .card-cta{transform:translateX(3px)}

/* card grid */
.card-grid{display:grid;gap:10px}
@media(min-width:560px){.card-grid{grid-template-columns:1fr 1fr}}

/* card earned state (passport) */
.card.earned{box-shadow:0 0 0 2px var(--gold), var(--shadow-sm)}
.card.earned .card-cta{color:var(--gold-deep)}
.card.locked{opacity:.88}

/* ── button system — two roles, used everywhere ──────────────────
   .btn-secondary: the existing flat white pill (Hint, Sound, segment
   options, Rename). Quiet by design — it should never compete with
   the one primary action on screen.
   .btn-primary: the "glass" material (New puzzle, Next puzzle, Start,
   completion CTA). One gradient + one highlight + one press physics,
   reused everywhere so the whole app reads as one tactile system
   instead of a different button per page. ────────────────────────── */
.btn-secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-family:var(--body-btn);font-weight:600;font-size:.92rem;background:var(--paper);border:none;color:var(--ink2);padding:10px 18px;border-radius:var(--radius-sm);cursor:pointer;min-height:46px;
  box-shadow:var(--shadow-btn);transition:box-shadow .15s ease,transform .1s ease,background .15s,color .15s}
.btn-secondary:hover{background:var(--paper2);color:var(--ink);box-shadow:var(--shadow-btn-hover);transform:translateY(-1px)}
.btn-secondary:active{box-shadow:var(--shadow-btn-press);transform:translateY(0)}

.btn-primary{position:relative;overflow:hidden;font-family:var(--body-btn);font-weight:700;font-size:.95rem;letter-spacing:.01em;
  background:var(--grad-glass);color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);border:none;padding:11px 22px;border-radius:999px;cursor:pointer;min-height:46px;
  box-shadow:var(--shadow-glass);transition:box-shadow .1s ease,transform .1s ease}
.btn-primary::before{content:"";position:absolute;top:1px;left:8%;right:8%;height:38%;
  background:linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0));border-radius:999px 999px 40% 40%;pointer-events:none}
.btn-primary:hover{transform:translateY(-1px)}
.btn-primary:active{box-shadow:var(--shadow-glass-press);transform:translateY(2px) scale(.99)}

/* ── segmented controls + tool buttons ─────────────────────────── */
.seg{display:flex;gap:6px;flex-wrap:wrap}
.sb{background:var(--paper);border:none;color:var(--ink2);padding:9px 16px;border-radius:var(--radius-sm);font-weight:600;font-size:.92rem;cursor:pointer;min-height:46px;font-family:var(--body-btn);
  box-shadow:var(--shadow-btn);transition:box-shadow .15s ease,transform .1s ease,background .15s,color .15s}
.sb:hover{background:var(--paper2);color:var(--ink);box-shadow:var(--shadow-btn-hover);transform:translateY(-1px)}
.sb:active{box-shadow:var(--shadow-btn-press);transform:translateY(0)}
.sb.active{background:var(--grad-glass);color:#fff;box-shadow:var(--shadow-glass)}
.sb.active:hover{transform:translateY(-1px)}
.sb.active:active{box-shadow:var(--shadow-glass-press);transform:translateY(1px)}
.tool-btn{font-family:var(--body-btn);font-weight:600;font-size:.92rem;background:var(--paper);border:none;color:var(--ink2);padding:10px 18px;border-radius:var(--radius-sm);cursor:pointer;min-height:46px;
  box-shadow:var(--shadow-btn);transition:box-shadow .15s ease,transform .1s ease,background .15s,color .15s}
.tool-btn:hover{background:var(--paper2);color:var(--ink);box-shadow:var(--shadow-btn-hover);transform:translateY(-1px)}
.tool-btn:active{box-shadow:var(--shadow-btn-press);transform:translateY(0)}
.tool-btn.primary{position:relative;overflow:hidden;background:var(--grad-glass);color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);border-radius:999px;box-shadow:var(--shadow-glass)}
.tool-btn.primary::before{content:"";position:absolute;top:1px;left:8%;right:8%;height:38%;background:linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0));border-radius:999px 999px 40% 40%;pointer-events:none}
.tool-btn.primary:hover{transform:translateY(-1px)}
.tool-btn.primary:active{box-shadow:var(--shadow-glass-press);transform:translateY(2px) scale(.99)}

/* ── game label — quiet, like Gerah's .promo-eyebrow ───────────── */
.pa-badge{font-size:.85rem;font-weight:700;letter-spacing:0;text-transform:none;color:var(--site-acc)}

/* ── completion banner ─────────────────────────────────────────── */
.done{display:none;margin:18px 0;text-align:center;padding:22px 18px;border-radius:var(--radius-md);background:var(--paper);border:none;box-shadow:var(--shadow-md)}
.done-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.done.show{display:block;animation:fade .5s ease}
@keyframes fade{from{opacity:0}to{opacity:1}}
.done .eyebrow{font-size:.82rem;font-weight:700;color:var(--acc-deep);margin-bottom:6px}
.done .dline{font-family:var(--display);font-size:1.35rem;color:var(--ink);max-width:32ch;line-height:1.45;margin:0 auto 14px}
.done .next-btn{position:relative;overflow:hidden;font-family:var(--body-btn);font-weight:700;font-size:1rem;letter-spacing:.01em;background:var(--grad-glass);color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);border:none;padding:12px 26px;border-radius:999px;cursor:pointer;min-height:48px;
  box-shadow:var(--shadow-glass);transition:box-shadow .1s ease,transform .1s ease}
.done .next-btn::before{content:"";position:absolute;top:1px;left:8%;right:8%;height:38%;background:linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0));border-radius:999px 999px 40% 40%;pointer-events:none}
.done .next-btn:hover{transform:translateY(-1px)}
.done .next-btn:active{box-shadow:var(--shadow-glass-press);transform:translateY(2px) scale(.99)}

/* ── footer ────────────────────────────────────────────────────── */
.foot{text-align:center;padding:30px 0 44px;font-size:.92rem;color:var(--ink2);line-height:1.7}
.foot .fline{font-size:1.05rem;color:var(--ink);font-weight:700;margin-bottom:6px}
.foot a{color:var(--ink2);font-weight:600;border-bottom:none;opacity:.8}
.foot a:hover{color:var(--ink);opacity:1}

/* ── section headers (Gerah-style: heading + one-line sub) ─────── */
.sec-head{margin-bottom:16px}
.sec-head h2{font-family:var(--display);font-size:1.4rem;font-weight:600;margin-bottom:3px}
.sec-head p,.sec-head .hint{font-size:.95rem;color:var(--ink2)}

@media(max-width:600px){.col{padding:0 14px}.tb-top{padding:10px 14px 8px;gap:10px}.tb-brand svg{width:30px;height:30px}.tb-tag{display:none}.tb-nm{font-size:1.08rem}.tb-side{gap:6px}.tb-nav{padding:0 14px;gap:16px}}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .done.show{animation:none}
  .card:hover{background:var(--paper)}
  .card:hover .card-cta{transform:none}
}

/* phone: the bottom tab bar replaces the top menu (this rule must come after .tb-nav) */
@media(max-width:899px){.tb-nav{display:none}}
@media(min-width:900px){.tb-link{font-size:.84rem}}

/* line icons replace emoji: size them wherever an emoji used to sit */
.lw-ctamotif svg{width:42px;height:42px}
.lw-stopmotif svg{width:20px;height:20px}
.pa-sil svg{width:100%;height:100%;opacity:.12}

/* ═══════════════════════════════════════════════════════════════
   ONE FRAMEWORK
   Every page is built from the same five parts, in the same order:
   shared header → page hero (eyebrow, title, one-line lead) →
   content → section headings → controls. Each Luther's Trail stop
   brings its color to the CONTENT (icon tile, found letters,
   progress, stamp), never to the header, headings, or buttons.
   Type: Atkinson Hyperlegible for every heading and label. Source
   Serif is reserved for the wordmark and for words meant to be read
   slowly (clues, Luther's explanations, completion lines).
   "html body" raises specificity so page-level <style> blocks
   can't drift away from these rules again.
   ═══════════════════════════════════════════════════════════════ */
:root{
  --t-eyebrow:.74rem; --t-h1:1.75rem; --t-h2:1.25rem; --t-h3:1.05rem; --t-lead:1.05rem;
  --measure:68ch; --hero-top:28px; --hero-gap:10px; --section-gap:34px;
  --grad-site:linear-gradient(180deg, color-mix(in srgb, var(--site-acc) 82%, white 18%), var(--site-acc));
  --grad-site-glass:linear-gradient(180deg, color-mix(in srgb, var(--site-acc) 74%, white 26%) 0%, var(--site-acc) 55%, var(--site-acc-deep) 100%);
  --shadow-site-glass:0 1px 0 rgba(255,255,255,.25) inset, 0 2px 3px color-mix(in srgb, var(--site-acc-deep) 45%, transparent), 0 4px 9px color-mix(in srgb, var(--site-acc-deep) 32%, transparent);
}

/* 1. page hero: same top spacing on every page */
html body .puzzle-area{padding-top:0}
html body .lw-head, html body .lg-hero, html body .wd-hero, html body .prose,
html body .puzzle-area>.pa-head{padding-top:var(--hero-top)}
html body .pp-hero{padding-top:var(--hero-top);text-align:left}
html body .pp-hero .av{margin:0 0 12px}
html body .pp-hero .sub{margin:0 0 4px;max-width:var(--measure)}

/* 2. eyebrow: one style, always site purple */
html body .lw-eyebrow, html body .lg-eyebrow, html body .pa-badge, html body .wd-arch{
  font-family:var(--body);font-size:var(--t-eyebrow);font-weight:700;letter-spacing:0;
  text-transform:none;color:var(--site-acc);margin:0 0 8px}

/* 3. page title (h1): one size, one face */
html body .lw-title, html body .lg-hero h1, html body .prose h1, html body .pp-hero h1,
html body .wd-name, html body .pa-name{
  font-family:var(--body);font-size:var(--t-h1);font-weight:700;line-height:1.22;
  letter-spacing:-.02em;color:var(--ink);margin:0 0 6px}

/* 4. lead line under the title: readable width, never tinted */
html body .lw-sub, html body .lg-lead, html body .prose .lead, html body .pp-hero .sub,
html body .wd-tag, html body .pa-flavor, html body .study-intro, html body .vf-intro{
  font-family:var(--body);font-size:var(--t-lead);line-height:1.6;color:var(--ink2);
  max-width:var(--measure);font-style:normal}

/* 5. section headings (h2) and card titles (h3) */
html body .prose h2, html body .lw-sec h2, html body .sec-head h2, html body .part-name,
html body .vf-done h2, html body .pp-sechead h2, html body .lg-sec h2, html body main > section > h2{
  font-family:var(--body);font-size:var(--t-h2);font-weight:700;line-height:1.3;letter-spacing:-.01em;color:var(--ink)}
html body .card-name, html body .pc-name, html body .order-item .oi-name{
  font-family:var(--body);font-size:var(--t-h3);font-weight:700;line-height:1.3}

/* 6. reading width for running text */
html body .prose p, html body .prose ul, html body .wd-story, html body .lg-lead,
html body .note p{max-width:var(--measure)}

/* 7. controls: every "selected" state is the same solid site purple,
      every primary action is the same glass button, on every page */
html body .sb.active, html body .ex-tab.on, html body .chip.on, html body .set-tab.on,
html body .tm-mode button.on, html body .lw-toggle.on, html body .lw-sz.on{
  background:var(--grad-site);color:#fff;text-shadow:none;
  box-shadow:0 1px 2px color-mix(in srgb, var(--site-acc) 45%, transparent),0 4px 10px color-mix(in srgb, var(--site-acc) 30%, transparent)}
html body .btn-primary, html body .tool-btn.primary, html body .done .next-btn{
  background:var(--grad-site-glass);box-shadow:var(--shadow-site-glass);color:#fff}

/* 8. game cards: one standard for every puzzle.
      - Answer cards (anything you tap to answer) share one face, one
        weight, one corner and three text sizes: a short label, a
        sentence-length card, and the small line under a label.
      - On a board of tiles every tile uses the SAME size (Today's Four
        sizes the whole board to its longest word; see today.js).
      - Letter tiles (Hidden Words, Unlock, crossword, word search) are
        the sans face, bold.
      - Filter pills (decks, modes, exercises, parts) are one pill shape.
      - Picker cards use the same title style as the trail cards. */
:root{--t-card:1.05rem;--t-card-text:.95rem;--t-card-sub:.8rem;--card-radius:12px}
html body .tf-tile, html body .ss-sq, html body .sh-btn, html body .ws-opt, html body .vf-opt,
html body .io-card, html body .un-card, html body .mcard, html body .ts-gap button{
  font-family:var(--body);border-radius:var(--card-radius);letter-spacing:0}
html body .sh-btn, html body .vf-opt, html body .ws-opt b{font-size:var(--t-card);font-weight:700}
html body .io-card, html body .un-card, html body .mcard{font-size:var(--t-card-text)}
html body .io-card, html body .un-card, html body .mcard.term, html body .ts-gap button, html body .tf-tile, html body .ss-sq{font-weight:700}
html body .sh-btn small, html body .ws-opt small{font-size:var(--t-card-sub);font-weight:400;color:var(--ink3)}
html body .ws-opt{font-size:1rem}
html body .tf-tile{font-size:var(--tf-fs,var(--t-card));padding:8px 6px}
html body .hw-t, html body .un-tile{font-family:var(--body);font-weight:700}
html body .io-set b{font-family:var(--body);font-weight:700;font-size:var(--t-h3,1.1rem)}

/* dark mode: purple TEXT gets a lighter tint of the same plum so it stays
   readable; purple BUTTONS keep the deep plum so white labels hold contrast */
:root[data-theme="dark"]{--site-acc-text:#e3bddb}
html[data-theme="dark"] body .lw-eyebrow, html[data-theme="dark"] body .lg-eyebrow,
html[data-theme="dark"] body .pa-badge, html[data-theme="dark"] body .wd-arch,
html[data-theme="dark"] body .lw-sec a, html[data-theme="dark"] body .back-link,
html[data-theme="dark"] body .tools a.back, html[data-theme="dark"] body p a,
html[data-theme="dark"] body li a{color:var(--site-acc-text)}
html[data-theme="dark"] body .tb-link.active{color:var(--ink);border-color:var(--site-acc-text)}
/* the certificate is a paper document: it keeps its print colors in either theme */
html body .cert, html body .cert .brand{color:#241a22}

html body .prose a.start-btn, html body a.btn-primary, html body a.lg-btn.primary{color:#fff;border-bottom:none}

/* type steps down on phones so titles don't crowd a small screen;
   tablets and up keep the full scale */
@media (max-width:560px){
  :root{--t-h1:1.5rem;--t-h2:1.15rem;--t-lead:1rem;--hero-top:22px}
  html body .prose p, html body .prose li, html body .wd-story p{line-height:1.65}
}

/* dark mode: trail stop colors get dark-mode versions. Deep accents become a
   light tint (readable text on dark), soft accents become a dark tint
   (readable panels). Set on body so they win over the stop's own values. */
html[data-theme="dark"] body{
  --acc-deep:color-mix(in srgb, var(--w-acc, var(--site-acc)) 45%, white);
  --acc-soft:color-mix(in srgb, var(--w-acc, var(--site-acc)) 24%, var(--paper));
  --found:color-mix(in srgb, var(--w-acc, var(--site-acc)) 30%, var(--paper));
  --found-ink:var(--ink);
}
html[data-theme="dark"] body .wd-wrap{--acc-deep:color-mix(in srgb, var(--acc) 45%, white);--acc-soft:color-mix(in srgb, var(--acc) 24%, var(--paper))}

html[data-theme="dark"] body .wd-wrap{--paper:#261e24;--paper2:#2e252c}
html[data-theme="dark"] body .sheet{background:var(--paper)}
html[data-theme="dark"] body .mi-kicker, html[data-theme="dark"] body .shape-min,
html[data-theme="dark"] body .unit-link, html[data-theme="dark"] body .unit-n,
html[data-theme="dark"] body .wd-navlink{color:var(--site-acc-text)}
:root[data-theme="dark"]{--ink4:#9a8f97}

/* pages that build their content with a script keep that area hidden until
   the first render is done, so it appears complete instead of jumping.
   The header and tab bar are outside it and draw immediately. */
.lw-building{visibility:hidden}

/* ═══════════════════════════════════════════════════════════════
   ACCORDION — one component for every question list and long note.
   Built on <details>/<summary>: works without scripts, opens with
   Enter or Space, and screen readers announce "collapsed/expanded".
   The question stays visible; the answer opens underneath.
   ═══════════════════════════════════════════════════════════════ */
.lw-acc{margin:14px 0 26px;background:var(--paper);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);overflow:hidden;interpolate-size:allow-keywords}
.lw-acc > details + details{border-top:1px solid var(--rule)}
.lw-acc summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-height:58px;padding:14px 20px;cursor:pointer;color:var(--ink);font-family:var(--body);font-weight:700;
  font-size:1.02rem;line-height:1.35;transition:background .15s}
.lw-acc summary::-webkit-details-marker{display:none}
.lw-acc summary > h2, .lw-acc summary > h3, .lw-acc summary .lw-acc-q{font:inherit;color:inherit;margin:0;letter-spacing:0}
.lw-acc summary .lw-acc-sub{display:block;font-weight:400;font-size:.9rem;color:var(--ink3);margin-top:3px}
.lw-acc summary::after{content:"";flex:none;width:9px;height:9px;margin:-4px 4px 0 0;border-right:2.5px solid var(--ink3);
  border-bottom:2.5px solid var(--ink3);transform:rotate(45deg);transition:transform .2s ease,margin .2s ease}
.lw-acc details[open] > summary::after{transform:rotate(-135deg);margin-top:4px}
.lw-acc summary:hover{background:var(--paper2)}
.lw-acc summary:hover::after{border-color:var(--ink)}
.lw-acc summary:focus-visible{outline:3px solid var(--site-acc);outline-offset:-3px;border-radius:var(--radius-sm)}
.lw-acc-body{padding:0 20px 18px;color:var(--ink2);font-size:1rem;line-height:1.65}
.lw-acc-body > * {max-width:68ch}
.lw-acc-body p{margin:0}
.lw-acc-body p + p, .lw-acc-body p + ul, .lw-acc-body ul + p{margin-top:10px}
.lw-acc-body ul{margin:0;padding-left:22px}
.lw-acc-body li + li{margin-top:6px}
/* smooth open/close where the browser supports it */
@supports (interpolate-size:allow-keywords){
  .lw-acc details::details-content{block-size:0;overflow:hidden;transition:block-size .25s ease,content-visibility .25s allow-discrete}
  .lw-acc details[open]::details-content{block-size:auto}
}
@media (prefers-reduced-motion:reduce){
  .lw-acc details::details-content{transition:none}
  .lw-acc summary::after{transition:none}
}
@media (max-width:560px){
  .lw-acc summary{padding:14px 16px}
  .lw-acc-body{padding:0 16px 16px}
}
/* a single collapsed note at the bottom of a page */
.lw-acc.lw-acc-note{box-shadow:none;border:1px solid var(--rule);background:transparent}
@media print{
  .lw-acc details > *:not(summary){display:block !important}
  .lw-acc summary::after{display:none}
  .lw-acc{box-shadow:none;border:1px solid #ccc}
}

/* the kitchen-table guide keeps its own cards inside the accordion */
.lw-acc-body.lw-kt > *{max-width:none}
.lw-acc-body.lw-kt ol{padding:0}

/* printable handout preview is a paper document: it keeps paper colors in either theme */
html[data-theme="dark"] body .sheet{--page:#faf8f5;--paper:#ffffff;--paper2:#f3f0eb;--ink:#241a22;--ink2:#4c3f49;--ink3:#5f515a;--ink4:#7a6d76;--rule:#e4e0da;
  --acc-deep:var(--w-acc-deep,#3f2247);--acc-soft:var(--w-acc-soft,#f3ecf2);--gold-deep:#6e5412;--gold-soft:#faf3e2;background:#fff;color:#241a22}

/* shared level switch (engine.js fpLevelSeg) */
.fp-level{display:flex;align-items:center;gap:8px;margin:12px 0 2px;flex-wrap:wrap}
.fp-level .dl{font-size:.85rem;font-weight:700;color:var(--ink3)}
.fp-level-note{font-size:.84rem;color:var(--ink3);margin:0 0 12px;min-height:1.2em}

/* team game winner headline (engine.js fpWinner) */
.fp-winner{text-align:center;margin:4px 0 12px}
.fp-winner-h{font-family:var(--display);font-weight:600;font-size:2rem;line-height:1.15;margin:0 0 6px}
.fp-winner-s{font-weight:700;font-size:.95rem;color:var(--ink2);margin:0}
