/* Seven Wells · Wellspring · v5
   One identity (stone, water, brass), with rooms: the age bands (Root, Stem,
   Branch, Crown) and the paths (Opifex) each tune it without breaking it.
   Fonts are served from this house, never from outside: private and fast. */

/* ---------- Type ---------- */
@font-face { font-family: "Alegreya"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/alegreya-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/alegreya-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/alegreya-sans-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/alegreya-sans-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/andika-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/andika-latin-700-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --ground: #ECEFEC;
  --sheet: #FBFCFA;
  --ink: #14231F;
  --muted: #5B6B66;
  --line: #D3DBD7;
  --line-strong: #B9C5C0;
  --well: #1D6B5A;
  --well-deep: #134A3E;
  --well-mist: #E3EFEA;
  --well-ink: #FBFCFA;
  --brass: #9C6F32;
  --brass-mist: #F3EADC;
  --sun: #C98A1C;
  --sun-mist: #FBF0D8;
  --fault: #B23B2E;
  --fault-mist: #F8E7E4;

  --display: "Alegreya", "Iowan Old Style", Palatino, Georgia, serif;
  --body: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --math: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --reader: "Andika", "Alegreya Sans", system-ui, sans-serif;

  --size: 18px;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --press: 0 3px 0;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0E1714;
    --sheet: #15211D;
    --ink: #E5ECE9;
    --muted: #9AAAA4;
    --line: #2A3A35;
    --line-strong: #3A4D47;
    --well: #4FAE95;
    --well-deep: #2F7F6B;
    --well-mist: #17302A;
    --well-ink: #0B1411;
    --brass: #D1A25F;
    --brass-mist: #2A2317;
    --sun: #E9B24A;
    --sun-mist: #2C2412;
    --fault: #E0705F;
    --fault-mist: #2E1A17;
  }
}

/* ---------- Rooms: the age bands ---------- */
/* Root (to age 7): the reader's letterforms, larger, rounder, sun-gold warmth. */
body[data-band="root"] {
  --body: var(--reader);
  --size: 21px;
  --r-s: 14px; --r-m: 20px; --r-l: 28px;
  --brass: var(--sun);
  --brass-mist: var(--sun-mist);
}
/* Stem (8–10): a little larger and softer than the house default. */
body[data-band="stem"] { --size: 19px; --r-s: 10px; --r-m: 16px; --r-l: 22px; }
/* Branch (11–13) and Crown (14+) use the house default. */

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* 'hidden' always wins over any display rule */
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--size);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--well); text-underline-offset: 3px; }
a:hover { color: var(--well-deep); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.num, .grid .num { font-variant-numeric: tabular-nums; }

/* ---------- Masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line); background: var(--sheet);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand span { font-family: var(--display); font-weight: 700; letter-spacing: .16em; font-size: 15px; text-transform: uppercase; }
.bar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav form { margin: 0; }
.nav a, .link { font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: var(--r-s); background: none; border: 0; cursor: pointer; }
.nav a:hover, .link:hover { background: var(--ground); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--well); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ground); }
.langs a { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-decoration: none; color: var(--muted); padding: 4px 10px; border-radius: 999px; }
.langs a[aria-current="true"] { color: var(--well-ink); background: var(--well); }

.page { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 40px 20px 64px; display: flex; flex-direction: column; gap: 36px; }

.foot {
  text-align: center; font-family: var(--display); font-style: italic; color: var(--muted); font-size: 15px;
  padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: .95em; line-height: 1.2; text-decoration: none; letter-spacing: .01em;
  background: var(--well); color: var(--well-ink); border: 0; border-radius: var(--r-s);
  padding: 12px 20px; cursor: pointer; box-shadow: var(--press) var(--well-deep);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { color: var(--well-ink); background: color-mix(in srgb, var(--well) 90%, #000); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--well-deep); }
.btn.ghost { background: var(--sheet); color: var(--ink); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--well); color: var(--well); background: var(--sheet); }
.btn.small { padding: 8px 14px; font-size: 14.5px; }
.btn:disabled { cursor: default; }

/* ---------- The door (home) ---------- */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; }
.hero .emblem { width: 96px; height: 96px; }
.hero h1 { font-family: var(--display); font-size: clamp(40px, 9vw, 64px); letter-spacing: .1em; margin: 0; line-height: 1.02; text-transform: uppercase; }
.hero.small h1 { letter-spacing: .02em; text-transform: none; font-size: clamp(32px, 6vw, 44px); }
.promise { font-family: var(--display); font-style: italic; font-size: clamp(19px, 3.4vw, 23px); color: var(--muted); margin: 0; max-width: 34ch; text-wrap: balance; }
.laws { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: law; }
.law { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; counter-increment: law; position: relative; }
.law::before {
  content: counter(law); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px;
  border-radius: 50%; border: 2px solid var(--brass); color: var(--brass); font-family: var(--display); font-weight: 700; font-size: 17px;
}
.law h2 { font-family: var(--display); font-size: 21px; margin: 0 0 6px; line-height: 1.2; }
.law p { margin: 0; color: var(--muted); font-size: 16.5px; }
.door { text-align: center; }
.door .btn { padding: 14px 28px; }
.status { display: inline-block; margin: 0; padding: 10px 16px; border: 1px dashed var(--line); border-radius: var(--r-s); color: var(--muted); font-size: 15px; }

/* ---------- Sheets and forms ---------- */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.sheet.narrow { max-width: 540px; width: 100%; margin: 0 auto; }
.sheet h1, .head-row h1, h1.plain { font-family: var(--display); font-size: clamp(28px, 5vw, 38px); margin: 0; line-height: 1.12; }
.eyebrow { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { margin: 0; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 8px; }
.form fieldset { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.form legend { font-family: var(--display); font-size: 21px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.form label { font-size: 15.5px; font-weight: 700; margin-top: 6px; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form select {
  font: inherit; font-size: 17px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s);
  background: var(--ground); color: var(--ink); width: 100%;
}
.form input:focus, .form select:focus, .answer input:focus, .check-row input.a:focus, .pin-form input:focus, .well input:focus {
  outline: 3px solid color-mix(in srgb, var(--well) 30%, transparent); border-color: var(--well);
}
.form .btn { margin-top: 14px; align-self: flex-start; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15.5px !important; }
.check input { width: 20px !important; height: 20px; margin-top: 3px; flex: none; accent-color: var(--well); }
.consent .check span { color: var(--ink); line-height: 1.55; }
.hint { margin: 0; font-size: 15px; color: var(--muted); }
.field-error { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--fault); }
.alert { margin: 0; padding: 12px 16px; border-radius: var(--r-s); border-left: 4px solid var(--fault); background: var(--fault-mist); }
.notice { margin: 0; padding: 12px 16px; border-radius: var(--r-s); border-left: 4px solid var(--well); background: var(--well-mist); }

/* ---------- The House ---------- */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.members { display: flex; flex-direction: column; gap: 10px; }
.member { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.member-main { display: flex; align-items: center; gap: 14px; }
.member h2 { font-family: var(--display); font-size: 21px; margin: 0; line-height: 1.2; }
.member-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meta { margin: 0; font-size: 15px; color: var(--muted); }
.role { font-weight: 800; }
.role-steward { color: var(--brass); }
.role-elder { color: var(--well); }
.pin-form { display: flex; gap: 8px; align-items: center; }
.pin-form input { font: inherit; font-size: 15px; width: 17ch; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--ground); color: var(--ink); }
.empty { color: var(--muted); margin: 0; }
.pill { font-size: 13.5px; font-weight: 700; text-decoration: none; color: var(--muted); padding: 3px 10px; border: 1.5px solid var(--line); border-radius: 999px; }
.pill:hover { color: var(--well); border-color: var(--well); }
.pill[aria-current="true"] { color: var(--well-ink); background: var(--well); border-color: var(--well); }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--well-mist); color: var(--well); font-family: var(--display); font-weight: 700; font-size: 20px; border: 2px solid var(--well); }
.avatar.big { width: 76px; height: 76px; font-size: 32px; border-width: 3px; }

/* "Who is learning?" — each learner is a well. */
.wells { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.well { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.well[data-band="root"] { border-radius: 28px; }
.well[data-band="root"] .avatar { border-color: var(--sun); color: var(--sun); background: var(--sun-mist); font-family: var(--reader); }
.well-name { font-family: var(--display); font-size: 22px; font-weight: 700; text-align: center; line-height: 1.2; }
.well input { font: inherit; width: 100%; max-width: 140px; text-align: center; letter-spacing: .3em; padding: 9px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--ground); color: var(--ink); }
.well .btn { width: 100%; max-width: 140px; }

/* ---------- Mastery states ---------- */
.state { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; line-height: 1.4; }
.state-unseen { color: var(--muted); }
.state-introduced { color: var(--brass); }
.state-practicing { color: var(--brass); background: var(--brass-mist); }
.state-secured { color: var(--well); background: var(--well-mist); }
.state-retained { color: var(--well-ink); background: var(--well); border-color: var(--well); }

/* A well for each skill: empty ring → half-filled → full → full with a brass heart. */
.springs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.spring { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line-strong); background: var(--sheet); position: relative; overflow: hidden; flex: none; }
.spring.s-introduced, .spring.s-practicing { border-color: var(--well); background: linear-gradient(to top, var(--well-mist) 50%, var(--sheet) 50%); }
.spring.s-practicing { background: linear-gradient(to top, color-mix(in srgb, var(--well) 45%, var(--sheet)) 50%, var(--sheet) 50%); }
.spring.s-secured, .spring.s-retained { border-color: var(--well); background: var(--well); }
.spring.s-retained::after { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); }

/* ---------- Today ---------- */
.today-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.today-head .crest { width: 60px; height: 60px; flex: none; }
.today-head h1 { margin-top: 2px; }
.today-head .meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.charge h2, .gate { font-family: var(--display); font-size: 23px; margin: 0 0 12px; line-height: 1.2; }
.charge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.charge-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-m); text-decoration: none; color: var(--ink);
  background: var(--sheet); border: 1.5px solid var(--line); font-weight: 700; font-size: 1.05em; line-height: 1.3; transition: border-color .15s, transform .08s; }
.charge-item:hover { color: var(--ink); border-color: var(--well); }
.charge-item:active { transform: translateY(1px); }
.charge-item .words { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.charge-item .tag { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.charge-item .go { font-size: 1.3em; color: var(--muted); line-height: 1; }
.charge-item.next { background: var(--well); border-color: var(--well); color: var(--well-ink); box-shadow: var(--press) var(--well-deep); }
.charge-item.next .tag { color: color-mix(in srgb, var(--well-ink) 78%, var(--well)); }
.charge-item.next .go { color: var(--well-ink); }
.charge-item.next:hover { color: var(--well-ink); background: color-mix(in srgb, var(--well) 92%, #000); }
.charge-item .icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brass-mist); color: var(--brass); }
.charge-item.next .icon { background: color-mix(in srgb, var(--well-ink) 18%, transparent); color: var(--well-ink); }

.path { display: flex; flex-direction: column; gap: 12px; }
.station { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.station.sealed { border: 2px solid var(--brass); }
.station-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.station-head h3 { font-family: var(--display); font-size: 21px; margin: 0; line-height: 1.2; }
.seal { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.skill { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.skill-name { font-weight: 700; display: flex; flex-direction: column; line-height: 1.3; }
.code { display: none; font-family: var(--math); font-size: 11.5px; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.locked { font-size: 14px; color: var(--muted); text-align: right; }
.station-check { border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Practice ---------- */
.practice-head { display: flex; flex-direction: column; gap: 8px; }
.streak-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.streak { display: inline-flex; gap: 6px; }
.streak i { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); background: var(--sheet); transition: background .25s, border-color .25s; }
.streak i.on { background: var(--well); border-color: var(--well); animation: fill .45s ease-out; }
@keyframes fill { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.work { display: flex; flex-direction: column; gap: 18px; }
.problem .q { font-size: 1.02em; margin: 0; color: var(--muted); font-weight: 500; }
.problem .x { font-family: var(--math); font-size: clamp(28px, 7.5vw, 40px); font-weight: 700; letter-spacing: .01em; overflow-x: auto; white-space: nowrap; line-height: 1.2; }
.answer { display: flex; gap: 10px; flex-wrap: wrap; }
.answer input, .check-row input.a {
  font-family: var(--math); font-size: 22px; padding: 11px 14px; border: 2px solid var(--line); border-radius: var(--r-m);
  background: var(--ground); color: var(--ink); width: min(15ch, 100%);
}
.feedback { border-radius: var(--r-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.feedback.ok { background: var(--well-mist); border-left: 4px solid var(--well); }
.feedback.bad { background: var(--fault-mist); border-left: 4px solid var(--fault); }
.feedback.warn { background: var(--brass-mist); border-left: 4px solid var(--brass); }
.verdict { margin: 0; font-weight: 800; font-size: 1.02em; }
.steps { margin: 0; font-family: var(--math); font-size: 14.5px; white-space: pre-wrap; color: var(--ink); line-height: 1.6; }
.feedback-actions { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }

/* The moment a skill is secured: the well fills. */
.moment { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-m); background: var(--sheet); border: 2px solid var(--brass); }
.moment svg { flex: none; }
.moment .rise { transform-box: fill-box; transform-origin: 50% 100%; animation: rise 1.4s cubic-bezier(.3, .7, .2, 1) both; }
.moment .ring { animation: glow 1.4s ease-out both; }
.moment strong { display: block; font-family: var(--display); font-size: 22px; line-height: 1.15; }
.moment span { color: var(--muted); font-size: 15.5px; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes glow { 0% { stroke-opacity: .25; } 100% { stroke-opacity: 1; } }

/* Lessons */
.lesson summary { font-family: var(--display); font-size: 21px; font-weight: 700; cursor: pointer; }
.lesson h2 { font-family: var(--display); font-size: 23px; margin: 8px 0 0; }
.lesson h3 { font-family: var(--display); font-size: 18px; margin: 8px 0 0; }
.lesson p { margin: 0; }
.ex { margin: 0; font-family: var(--math); font-size: 15px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; overflow-x: auto; white-space: pre; }
.callout { padding: 2px 0 2px 14px; border-left: 3px solid var(--well); }
.callout.trap { border-left-color: var(--fault); }
.callout.eng { border-left-color: var(--brass); }
.vocab { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; font-size: 15.5px; }
.vocab div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.vocab dt { font-weight: 700; } .vocab dd { margin: 0; color: var(--muted); }

/* ---------- The Tutor ---------- */
.tutor { border-radius: var(--r-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--brass); background: var(--brass-mist); }
.tutor.rung2, .tutor.estimate { border-left-color: var(--well); background: var(--well-mist); }
.tutor.rung3, .tutor.rung4 { border-left-color: var(--ink); background: var(--ground); }
.tutor.warn { border-left-color: var(--brass); background: var(--brass-mist); }
.tutor p { margin: 0; }
.tutor-tag { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.tutor.rung2 .tutor-tag, .tutor.estimate .tutor-tag { color: var(--well); }
.tutor.rung3 .tutor-tag, .tutor.rung4 .tutor-tag { color: var(--ink); }
.tutor-lead { font-style: italic; color: var(--muted); }
.tutor-q { font-size: 1.02em; line-height: 1.55; }
.tutor-fb { font-weight: 700; }
.tutor-fb:empty { display: none; }
.tutor-pattern { font-size: 15.5px; padding: 8px 12px; border-radius: var(--r-s); background: var(--sheet); border: 1.5px dashed var(--brass); }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices .btn.chosen-ok { border-color: var(--well); color: var(--well); background: var(--well-mist); }
.choices .btn.chosen-no { border-color: var(--fault); color: var(--fault); }
.answer.small input { font-size: 18px; width: 10ch; }

/* Visual models: bars, a common ruler, the area square. */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { margin: 0; display: flex; align-items: center; gap: 12px; }
.bar svg { flex: 0 1 260px; min-width: 0; width: 260px; max-width: calc(100% - 4.8em); height: auto; overflow: visible; }
.area { flex-direction: column; align-items: flex-start; gap: 6px; }
.area svg { flex: none; width: 180px; max-width: 100%; }
.bar figcaption { font-family: var(--math); font-weight: 700; font-size: 15px; white-space: nowrap; }
.bar-on { fill: var(--well); stroke: var(--sheet); stroke-width: 2.5; }
.bar-on.bar-b { fill: var(--brass); }
.bar-off { fill: var(--sheet); stroke: var(--line-strong); stroke-width: 1.5; }
.ruler figcaption { color: var(--muted); font-weight: 500; }
.rule-line { stroke: var(--ink); stroke-width: 1.25; }
.rule-tick { stroke: var(--ink); stroke-width: 1.25; }
.area rect { stroke: var(--sheet); stroke-width: 2; }
.area-off { fill: var(--sheet); stroke: var(--line-strong) !important; stroke-width: 1 !important; }
.area-a { fill: color-mix(in srgb, var(--well) 38%, var(--sheet)); }
.area-b { fill: color-mix(in srgb, var(--brass) 42%, var(--sheet)); }
.area-both { fill: var(--well-deep); }
.review-note { margin: 0; font-weight: 700; color: var(--brass); }
.review-note:empty { display: none; }
.belief { margin: 0; font-size: 15.5px; padding-left: 12px; border-left: 3px solid var(--brass); }

/* ---------- Mastery check ---------- */
.check-list { display: flex; flex-direction: column; gap: 4px; }
.check-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; border-top: 1px solid var(--line); padding: 14px 0; }
.check-row .n { font-family: var(--math); color: var(--brass); padding-top: 2px; }
.check-row .body { display: flex; flex-direction: column; gap: 6px; }
.check-row .q, .check-row .x { margin: 0; }
.check-row .x { font-family: var(--math); font-size: 21px; font-weight: 700; }
.score { font-family: var(--display); font-size: 38px; font-weight: 700; margin: 0; }
.score.pass { color: var(--well); } .score.fail { color: var(--fault); }
.mark { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mark.c { color: var(--well); } .mark.w { color: var(--fault); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.grid th, .grid td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid th { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.grid .num { text-align: right; }

/* ---------- Room: the Opifex Path (the maker's precision) ---------- */
body[data-room="opifex"] .code { display: block; }
body[data-room="opifex"] .practice-head .code { font-size: 12.5px; }
body[data-room="opifex"] .rule-line, body[data-room="opifex"] .rule-tick { stroke: var(--well); }
body[data-room="opifex"] .ruler svg { background-image: linear-gradient(90deg, color-mix(in srgb, var(--well) 10%, transparent) 1px, transparent 1px); background-size: 10px 100%; }
body[data-room="opifex"] .tutor-tag { font-family: var(--math); font-weight: 700; letter-spacing: .06em; }

/* ---------- Room: Root (the youngest) ---------- */
body[data-band="root"] .code { display: none; }   /* the band outranks the path's codes */
body[data-band="root"] .btn { padding: 14px 24px; }
body[data-band="root"] .charge-item { padding: 20px; }
body[data-band="root"] .spring { width: 32px; height: 32px; }
body[data-band="root"] .streak i { width: 24px; height: 24px; }
body[data-band="root"] .streak i.on, body[data-band="root"] .spring.s-secured, body[data-band="root"] .spring.s-retained { background: var(--sun); border-color: var(--sun); }
body[data-band="root"] h1.plain { font-family: var(--reader); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .page { padding: 28px 16px 48px; gap: 28px; }
  .sheet { padding: 20px; }
  .station { padding: 16px; }
  .masthead { padding-left: 16px; padding-right: 16px; }
  .brand span { display: none; }
  .nav-signout { display: none; }   /* on phones, sign out lives on the Account page */
  .bar-right { gap: 8px; }
  .nav a, .link { padding: 6px 8px; font-size: 14.5px; }
  .pin-form { width: 100%; }
  .pin-form input { flex: 1; width: auto; }
  .skill { grid-template-columns: 1fr auto; }
  .skill .btn, .skill .locked { grid-column: 1 / -1; justify-self: start; }
  .answer input { flex: 1 1 10ch; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .masthead, .foot, .btn { display: none !important; } body { background: #fff; } }

.signout-sheet { padding: 18px 26px; align-items: flex-start; }
@media (min-width: 561px) { .signout-sheet { display: none; } }

/* ---------- v6: the Reading Engine ---------- */
.session-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.session-bar i { display: block; height: 100%; width: 0; background: var(--well); transition: width .3s ease; }
.reading { gap: 18px; }
.coach { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-m); background: var(--ground); font-family: "Alegreya Sans", system-ui, sans-serif; font-size: 16.5px; }
.coach-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.coach p { margin: 0; line-height: 1.5; }
.coach .guide { display: block; margin-top: 6px; color: var(--muted); }
.stage { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 24px 12px; border-radius: var(--r-l); background: var(--sheet); border: 2px solid var(--line); font-family: var(--reader); }
.glyph-big { font-family: var(--reader); font-weight: 700; font-size: clamp(110px, 32vw, 180px); line-height: 1; color: var(--ink); }
.word-big { font-family: var(--reader); font-weight: 700; font-size: clamp(56px, 16vw, 104px); line-height: 1.1; color: var(--ink); word-break: break-word; }
.sentence-big { font-family: var(--reader); font-weight: 700; font-size: clamp(30px, 8vw, 46px); line-height: 1.45; color: var(--ink); max-width: 22ch; }
.oral { font-family: "Alegreya Sans", sans-serif; font-weight: 700; font-size: clamp(26px, 6vw, 36px); color: var(--muted); }
.stage-sub { display: flex; align-items: center; gap: 12px; }
.stage-sub .key { font-family: var(--reader); font-size: 26px; color: var(--muted); }
.speak { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--well); color: var(--well-ink); box-shadow: var(--press) var(--well-deep); }
.speak:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--well-deep); }

/* Sound marks under a word: a dot for one letter, a bar for a team, an arc for the silent e. */
.rword { display: inline-flex; align-items: flex-start; }
.seg { position: relative; display: inline-block; padding-bottom: .32em; }
.seg i { position: absolute; left: 50%; bottom: 0; width: .16em; height: .16em; border-radius: 50%; background: var(--line-strong); transform: translateX(-50%); }
.seg.team i { width: 70%; height: .12em; border-radius: .06em; }
.seg.silent { color: var(--muted); }
.seg.silent i { display: none; }
.seg.split:not(.silent) i { background: var(--brass); }
.rword.apart { gap: .18em; }
.rword.apart .seg { cursor: pointer; padding-inline: .06em; border-radius: .12em; }
.rword.apart .seg i { background: var(--well); width: .2em; height: .2em; }
.rword.apart .seg.team i { width: 70%; height: .14em; }
.rword.apart .seg.lit { background: var(--well-mist); color: var(--well); }
.heart { color: var(--brass); text-decoration: underline wavy; text-decoration-thickness: .06em; text-underline-offset: .18em; }
.sw { font: inherit; color: inherit; background: none; border: 0; padding: 0 .04em; border-radius: .12em; }
button.sw { cursor: pointer; }
.sw.hw { text-decoration: underline wavy var(--brass); text-decoration-thickness: .05em; text-underline-offset: .2em; }
.sw.lit { background: var(--well-mist); color: var(--well); }

.marks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.marks .btn { padding: 16px 12px; font-size: 18px; }
.marks .btn:only-child { grid-column: 1 / -1; }
.marks .btn.ghost { border-width: 2px; }
.well-note { margin: 0; text-align: center; font-weight: 700; color: var(--brass); }
.done { align-items: center; text-align: center; }
.filled { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.filled li { display: flex; align-items: center; gap: 10px; font-family: var(--reader); font-size: 20px; }
.filled .spring { width: 22px; height: 22px; }

/* Today: the road */
.road-line { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.road-line .spring { width: 18px; height: 18px; border-width: 2px; }
.road-line .spring.here { outline: 3px solid var(--brass); outline-offset: 2px; }
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tile { min-width: 76px; padding: 10px 12px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--sheet); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile .glyph { font-family: var(--reader); font-weight: 700; font-size: 38px; line-height: 1.05; }
.tile .sound { font-family: var(--math); font-size: 12.5px; color: var(--muted); }
.tile.s-practicing, .tile.s-introduced { border-color: var(--brass); }
.tile.s-secured, .tile.s-retained { border-color: var(--well); background: var(--well-mist); }
.tile.s-secured .glyph, .tile.s-retained .glyph { color: var(--well); }
.actions.between { justify-content: space-between; }

/* The Reading Gate */
.rules { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.gate-sections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gate-sections li { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-direction: column; }
.gate-sections span { font-size: 15px; color: var(--muted); }
.gate-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.gate-steps div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gate-steps b { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.gate-steps b i { display: block; height: 100%; width: 0; background: var(--well); }
.gate-steps span { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gate-steps .on span { color: var(--ink); }
.gate-marks { display: flex; flex-direction: column; gap: 10px; }
.markrow { display: grid; grid-template-columns: minmax(70px, auto) 1fr 1fr; gap: 10px; align-items: center; }
.markrow .lab { font-weight: 800; }
.mb { font: inherit; font-weight: 800; padding: 14px 10px; border-radius: var(--r-s); border: 2px solid var(--line); background: var(--sheet); color: var(--ink); cursor: pointer; }
.mb.ok.sel { background: var(--well-mist); border-color: var(--well); color: var(--well); }
.mb.ny.sel { background: var(--brass-mist); border-color: var(--brass); color: var(--brass); }
.place { border-left: 4px solid var(--well); padding-left: 14px; display: flex; flex-direction: column; gap: 4px; }
.place strong { font-family: var(--display); font-size: 26px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.grow { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.grow .nm { font-weight: 800; }
.grow .meta { grid-column: 1 / -1; }
.grow .miss { grid-column: 1 / -1; font-family: var(--reader); color: var(--muted); font-size: 15.5px; }

/* The House voice */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.voice { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.voice.has { border-color: color-mix(in srgb, var(--well) 45%, var(--line)); }
.voice.recording { border: 2px solid var(--fault); }
.voice-top { display: flex; align-items: center; gap: 12px; }
.voice-top .glyph { font-family: var(--reader); font-weight: 700; font-size: 40px; line-height: 1; min-width: 1.4em; }
.voice-id { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.voice-id b { font-family: var(--math); font-size: 14px; }
.voice .hint { font-size: 14.5px; }
.voice-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.voice.recording [data-act=rec] { background: var(--fault); box-shadow: none; }

/* ---------- v7: voices ---------- */
.voice-list { display: flex; flex-direction: column; gap: 10px; }
.voice-list .member form { margin: 0; }
.narration summary { font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.clips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.clip { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--sheet); }
.clip button { font: inherit; font-size: 15px; border: 0; background: none; color: var(--ink); padding: 4px 10px; cursor: pointer; }
.clip .clip-play { font-family: var(--reader); }
.clip .clip-redo { color: var(--muted); border-left: 1.5px solid var(--line); padding: 4px 8px; }
.clip .clip-play:hover { color: var(--well); }
.clip.gone { opacity: .35; text-decoration: line-through; pointer-events: none; }

/* ---------- v8: Draws and Mirrors ---------- */
.situation { font-size: 1.12em; line-height: 1.6; margin: 0; }
.choices.col { flex-direction: column; align-items: stretch; }
.choices.col .btn { justify-content: flex-start; text-align: left; }
.choices .btn.picked { border-color: var(--brass); color: var(--brass); }
.choices .btn.dim { opacity: .45; }
.recognize { display: flex; flex-direction: column; gap: 8px; }
.mirror-work { font-family: var(--math); font-size: clamp(24px, 6vw, 32px); font-weight: 700; padding: 14px 16px; border-radius: var(--r-m); background: var(--ground); }
.mirror-work .wrong { color: var(--fault); text-decoration: underline wavy var(--fault); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.mirror-work .eq { color: var(--muted); }
.formation td .mark-flowing { color: var(--well); font-weight: 800; }
.formation td .mark-gap { color: var(--brass); font-weight: 800; }
.formation .finding { border-left: 4px solid var(--brass); padding: 10px 14px; background: var(--brass-mist); border-radius: var(--r-s); margin: 0; }
.story { text-align: left; font-family: var(--reader); font-weight: 700; font-size: clamp(24px, 6.5vw, 34px); line-height: 1.5; max-width: 24ch; }
.story h3 { font-family: var(--reader); font-size: 1.1em; margin: 0 0 .4em; color: var(--well); }
.story p { margin: 0; }
.story-marks .lab small { display: block; font-weight: 500; color: var(--muted); font-size: 13.5px; }
.marks > .story-marks, .marks > .actions { grid-column: 1 / -1; }
.story-marks .markrow { grid-template-columns: 1fr 1fr; } .story-marks .markrow .lab { grid-column: 1 / -1; }

/* ---------- v9: Station 2 visual models ---------- */
.pv svg { width: 240px; max-width: 100%; height: auto; }
.pv-head { font-family: var(--math); font-size: 11px; fill: var(--muted); }
.pv-digit { font-family: var(--math); font-size: 18px; font-weight: 700; fill: var(--ink); }
.pv-digit.sm { font-size: 12px; }
.pv-dot { font-family: var(--math); font-size: 20px; font-weight: 700; fill: var(--brass); }
.pv-line { stroke: var(--brass); stroke-width: 1; stroke-dasharray: 3 3; }
.dline svg { width: 280px; max-width: calc(100% - 4.8em); height: auto; }
.dline figcaption { font-size: 13px; }

/* ---------- v10: the Syllable Road ---------- */
.family { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-family: var(--reader); font-weight: 700; font-size: clamp(24px, 6vw, 34px); }
.family span { padding: 2px 12px; border-radius: var(--r-s); background: var(--ground); }
.family span.on { background: var(--well-mist); color: var(--well); }
.glyph-big.syl { font-size: clamp(88px, 26vw, 150px); }
.rword.syl { gap: 0; }
.syl-dot { color: var(--brass); padding: 0 .08em; }
.voice-id .hint { font-size: 13.5px; }

/* ---------- v11: House care ---------- */
.well-name small { display: block; font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.sheet.danger { border-color: color-mix(in srgb, var(--fault) 35%, var(--line)); }
.sheet.danger .btn.ghost { color: var(--fault); border-color: color-mix(in srgb, var(--fault) 45%, var(--line)); }

/* ---------- The Number Road: visual models, answering by tap, the number pad ---------- */
.q-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.q-row .q { flex: 1; }
.btn.listen { flex: 0 0 auto; }
.vis { margin: 6px 0 2px; overflow-x: auto; }
.nv { margin: 0; }
.nv svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.nv-cell { fill: var(--sheet); stroke: var(--line-strong); stroke-width: 1.5; }
.nv-a { fill: var(--well); }
.nv-b { fill: var(--brass); }
.nv-ghost { fill: none; stroke: var(--well); stroke-width: 2; stroke-dasharray: 3 3; }
.nv-x { stroke: var(--fault); stroke-width: 3; stroke-linecap: round; }
.nv-box { fill: var(--ground); stroke: var(--line-strong); stroke-width: 1.5; }
.nv-lab { font-family: var(--body); font-size: 13px; font-weight: 800; fill: var(--muted); letter-spacing: .06em; }
.nv-lab.sm { font-size: 11px; }
.nv-num { font-family: var(--math); font-size: 14px; font-weight: 700; fill: var(--ink); }
.nv-num.sm { font-size: 11px; }
.nv-rule, .nv-tick { stroke: var(--ink); stroke-width: 1.5; }
.nv-hide { fill: var(--sun-mist); stroke: var(--sun); stroke-width: 1.5; }
.nv-jump { fill: none; stroke: var(--brass); stroke-width: 2; }
.nv-flat, .nv-rod, .nv-unit { fill: var(--well-mist); stroke: var(--well); stroke-width: 1.4; }
.nv-grid { stroke: var(--well); stroke-width: .5; opacity: .55; }
.nv-fa { fill: var(--well); stroke: var(--sheet); stroke-width: 1.5; }
.nv-fb { fill: var(--brass); stroke: var(--sheet); stroke-width: 1.5; }
.nv-fo { fill: var(--sheet); stroke: var(--line-strong); stroke-width: 1.5; }
.nv-seg { fill: var(--well-mist); stroke: var(--well); stroke-width: 1.4; }
.nv-seg2 { fill: var(--brass-mist); stroke: var(--brass); stroke-width: 1.4; }
.nv-segq { fill: var(--sun-mist); stroke: var(--sun); stroke-width: 1.4; stroke-dasharray: 4 3; }
.problem .x[hidden] { display: none; }
.choices.big { gap: 10px; margin: 6px 0; }
.choices.big .btn { min-width: 76px; min-height: 56px; font-family: var(--math); font-size: 24px; font-weight: 700; justify-content: center; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(56px, 76px)); gap: 8px; margin-top: 10px; flex-basis: 100%; }
.keypad[hidden] { display: none; }
.keypad .key { font-family: var(--math); font-size: 24px; font-weight: 700; min-height: 54px; border-radius: var(--r-m); border: 1.5px solid var(--line-strong);
  background: var(--sheet); color: var(--ink); box-shadow: var(--press) var(--line); cursor: pointer; }
.keypad .key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.answer:has(.keypad:not([hidden])) { flex-wrap: wrap; }
.callout.home { border-left-color: var(--sun); }
.callout .tag { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); margin-right: 4px; }
.gate-invite { margin: 10px 0 14px; }
.numroad .road-line { flex-wrap: wrap; }
.check-row .vis { margin: 6px 0; }
.check-row .choices { margin-top: 6px; }
body[data-band="root"] .problem .q { font-family: var(--reader); font-size: 1.25em; color: var(--ink); }
body[data-band="root"] .keypad .key { min-height: 64px; font-size: 28px; }
pre.ex, pre.steps { white-space: pre-wrap; overflow-wrap: anywhere; }

/* View as: a clear band that no one can miss */
.preview-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--sun-mist); border-bottom: 2px solid var(--sun); color: var(--ink); font-weight: 700; font-size: 15px; text-align: center; }
.preview-bar form { margin: 0; }
form.inline { display: inline; margin: 0; }

.problem .x, .check-row .x { white-space: pre-line; }

/* ---------- The Scribe Road ---------- */
.scribe-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-pick { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.voice-pick .pill { cursor: pointer; border: 1px solid var(--line-strong); background: var(--sheet); font: inherit; color: var(--ink); }
.voice-pick .pill[aria-current="true"] { background: var(--well); color: var(--well-ink); border-color: var(--well); }
.scribe .live { font-family: var(--math); font-size: 14px; color: var(--muted); }
.passage { font-family: var(--math); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.9; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--sheet); max-height: 13.5em; overflow-y: auto; cursor: text; margin-top: 10px; white-space: pre-wrap; overflow-wrap: break-word; }   /* Build 54: lines break between words, never inside one */
.passage span { color: var(--muted); border-radius: 3px; }
.passage span.done { color: var(--ink); }
.passage span.err { background: var(--fault-mist); color: var(--fault); }
.passage span.cur { background: var(--sun-mist); box-shadow: inset 0 -3px 0 var(--sun); color: var(--ink); }
.passage span.cur.err { background: var(--fault-mist); box-shadow: inset 0 -3px 0 var(--fault); color: var(--fault); }   /* Build 54: a missed key shows where it was missed */
.kbd-catch { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.keyboard { margin-top: 14px; display: grid; gap: 5px; justify-content: center; user-select: none; }
.keyboard[hidden] { display: none; }
.krow { display: flex; gap: 5px; justify-content: center; }
.krow.r1 { margin-left: 18px; } .krow.r2 { margin-left: 30px; } .krow.r3 { margin-left: 46px; }
.key { min-width: 34px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font-family: var(--math); font-size: 14px;
  border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); }
.key.wide { min-width: 64px; } .key.space { min-width: 250px; }
.key.f-lp, .key.f-rp { box-shadow: inset 0 -4px 0 #b7a3d9; } .key.f-lr, .key.f-rr { box-shadow: inset 0 -4px 0 #8fbfe0; }
.key.f-lm, .key.f-rm { box-shadow: inset 0 -4px 0 #9fd3a8; } .key.f-li, .key.f-ri { box-shadow: inset 0 -4px 0 #f0c47a; } .key.f-th { box-shadow: inset 0 -4px 0 var(--line-strong); }
.key.next { background: var(--sun); color: #1b1300; border-color: var(--sun); transform: translateY(-1px); }
.key.first { background: transparent; color: var(--ink); border: 2px dashed var(--sun); }   /* Build 54: the accent key, struck before its letter */
.scribe-set { margin-top: 8px; justify-content: flex-start; gap: 16px; }
.scribe-set .pill { text-decoration: none; }
.kbd-pick { display: inline-flex; gap: 6px; align-items: center; }
.kbd-pick select { font: inherit; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--sheet); color: var(--ink); }
.scribe-score { font-family: var(--math); font-size: 20px; margin: 4px 0; }
.scribe kbd { font-family: var(--math); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 7px; background: var(--ground); }
.moment-line { font-weight: 800; color: var(--well); }
#heard { width: 100%; font-family: var(--math); font-size: 18px; padding: 10px; border-radius: var(--r-m); border: 1.5px solid var(--line-strong); background: var(--sheet); color: var(--ink); }
.listen-cmp { font-family: var(--math); background: var(--ground); padding: 8px 10px; border-radius: var(--r-s); }
@media (max-width: 560px) { .key { min-width: 24px; height: 30px; font-size: 12px; } .key.space { min-width: 150px; } .krow.r1, .krow.r2, .krow.r3 { margin-left: 0; } }

/* ---------- Build 18 · The Learner's Door, the Daily Measure, My Journey, the Ledger of Hours ---------- */
.door-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.door-hero .emblem { width: 72px; height: 72px; }
.door-code .code-input { font-family: var(--math); font-size: 30px; letter-spacing: .28em; text-align: center; text-transform: uppercase; padding: 14px; }
.door-wells .well.has-error { border-color: var(--fault); }
.alert.small, .notice.small { font-size: 14.5px; padding: 8px 12px; }
.door-foot { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.door-foot .link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

.measure { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "wells words" "bar bar"; gap: 10px 16px; align-items: center;
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 20px; }
.measure-wells { grid-area: wells; display: grid; place-items: center; }
.measure-words { grid-area: words; display: flex; flex-direction: column; gap: 2px; }
.measure-count { margin: 0; font-size: 17px; }
.measure-count strong { font-family: var(--display); font-size: 30px; line-height: 1; color: var(--well); }
.measure-bar { grid-area: bar; height: 8px; border-radius: 999px; background: var(--well-mist); overflow: hidden; }
.measure-bar i { display: block; height: 100%; background: var(--well); border-radius: inherit; transition: width .6s ease; }
.measure-bar.big { height: 12px; }
.measure.met { border-color: color-mix(in srgb, var(--brass) 55%, var(--line)); background: linear-gradient(135deg, var(--sheet), var(--brass-mist)); }
.measure.met .measure-bar i { background: var(--brass); }
.measure.met .measure-count strong { color: var(--brass); }

.keeper-note { border-left: 4px solid var(--brass); background: var(--brass-mist); border-radius: var(--r-s); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.keeper-note p { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.35; }

.day-close { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.seal-form { margin: 0; display: inline; }

.sealed-page { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.sealed-page .seal-mark { width: 110px; height: 110px; animation: seal-in .9s ease both; }
@keyframes seal-in { from { transform: scale(.6) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.seal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 540px; }
.seal-stats div, .journey-stats .stat { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.seal-stats strong, .journey-stats strong { font-family: var(--display); font-size: 32px; line-height: 1; color: var(--well); }
.seal-stats small { font-size: 18px; color: var(--muted); }
.seal-stats span, .journey-stats span { font-size: 13.5px; color: var(--muted); line-height: 1.25; }
.plain-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; text-align: left; }

.journey-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.days-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; }
.day { aspect-ratio: 1; border-radius: 6px; border: 1.5px solid var(--line-strong); background: transparent; display: inline-block; }
.day.some { background: var(--well-mist); border-color: var(--well); }
.day.kept { background: var(--well); border-color: var(--well); }
.day.now { outline: 2px solid var(--brass); outline-offset: 2px; }
.legend { margin: 0; font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend .day { width: 14px; height: 14px; aspect-ratio: auto; margin-left: 8px; }
.legend .day:first-child { margin-left: 0; }
.jroad { display: flex; flex-direction: column; gap: 6px; }
.jroad-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recent-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }

.keys-code { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.keys-code-main { display: flex; flex-direction: column; gap: 8px; }
.house-code { margin: 4px 0 0; font-family: var(--math); font-size: clamp(30px, 7vw, 44px); font-weight: 700; letter-spacing: .12em; color: var(--well-deep); }
.keys-code-tools { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clock-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.clock-form label { font-size: 14px; font-weight: 700; }
.clock-form select, .key-card input, .key-card select, .note-row input {
  font: inherit; font-size: 16px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--ground); color: var(--ink); }
.key-list, .ledger { display: flex; flex-direction: column; gap: 16px; }
.key-head, .ledger-head { display: flex; align-items: center; gap: 14px; }
.key-head h2, .ledger-head h2 { font-family: var(--display); font-size: 21px; margin: 0; line-height: 1.2; }
.key-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.key-grid .field { display: flex; flex-direction: column; gap: 6px; }
.key-grid label { font-size: 14.5px; font-weight: 700; }
.key-grid .check { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.door-state { font-weight: 700; }
.door-state.on { color: var(--well); }
.door-state.warn, .warn { color: var(--fault); }

.day-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-nav strong { font-family: var(--display); font-size: 21px; min-width: 90px; text-align: center; }
.day-nav span.btn { opacity: .35; pointer-events: none; }
.ledger-name { flex: 1; min-width: 0; }
.ledger-verdict { text-align: right; display: flex; flex-direction: column; }
.ledger-verdict strong { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--muted); }
.ledger-verdict.some strong { color: var(--well); }
.ledger-verdict.met strong { color: var(--brass); }
.ledger-verdict span { font-size: 13px; color: var(--muted); }
.ledger-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.ledger-facts div { display: flex; flex-direction: column; gap: 2px; }
.ledger-facts dt { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ledger-facts dd { margin: 0; font-size: 18px; font-weight: 700; }
.ledger-facts small { font-weight: 400; font-size: 13.5px; color: var(--muted); }
.week-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-bars a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); }
.bar-wrap { position: relative; width: 100%; max-width: 34px; height: 64px; border-radius: 6px; background: var(--ground); overflow: hidden; }
.bar-wrap .bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--well-mist); border-top: 3px solid var(--well); }
.week-bars .kept .bar { background: var(--well); }
.bar-wrap .goal-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--brass); z-index: 1; }
.bar-day { font-size: 12.5px; font-weight: 700; }
.week-bars .on .bar-day { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ledger-more summary { cursor: pointer; font-weight: 700; color: var(--well); }
.sittings { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 15px; }
.sittings th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.sittings td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); }
.note-form { display: flex; flex-direction: column; gap: 6px; }
.note-form label { font-size: 14.5px; font-weight: 700; }
.note-row { display: flex; gap: 8px; }
.note-row input { flex: 1; min-width: 0; }
.ledger-links { margin: 0; font-size: 15px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

@media (max-width: 560px) {
  .keys-code { grid-template-columns: 1fr; }
  .key-grid { grid-template-columns: 1fr; }
  .ledger-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-head { flex-wrap: wrap; }
  .sittings { font-size: 13.5px; }
  .history li { grid-template-columns: 1fr; gap: 2px; }
  .note-row { flex-direction: column; }
}

/* Numbers that are read as counts use lining figures: an old-style 0 reads as the letter o. */
.measure-count strong, .ledger-verdict strong, .seal-stats strong, .journey-stats strong, .house-code, .ledger-facts dd, .sittings td, .history .meta { font-variant-numeric: lining-nums tabular-nums; }
.week-bars .none .bar { display: none; }

/* ---------- Build 19 · The Number Gate, reborn ---------- */
.gate-rail-wrap { display: flex; flex-direction: column; gap: 8px; }
.gr-map { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10px, 1fr)); gap: 3px; }
.gr-map li { height: 14px; border-radius: 4px; background: var(--ground); border: 1.5px solid var(--line-strong); }
.gr-map li.proven, .gr-legend .k.proven { background: var(--well); border-color: var(--well); }
.gr-map li.inferred, .gr-legend .k.inferred { background: var(--well-mist); border-color: var(--well); border-style: dashed; }
.gr-map li.broke, .gr-legend .k.broke { background: var(--brass-mist); border-color: var(--brass); }
.gr-map li.here, .gr-legend .k.here { outline: 3px solid var(--brass); outline-offset: 2px; }
.gr-map li.now, .gr-legend .k.now { background: var(--sun); border-color: var(--sun); animation: gate-pulse 1.6s ease-in-out infinite; }
.gr-map li.ahead, .gr-legend .k.ahead { opacity: .45; }
@keyframes gate-pulse { 50% { opacity: .45; } }
.gr-legend .k { display: inline-block; width: 16px; height: 12px; border-radius: 3px; border: 1.5px solid var(--line-strong); background: var(--ground); vertical-align: middle; }
.gr-legend .meta { margin-left: auto; }
.gate-start .start-options { display: grid; gap: 10px; }
.start-opt { text-align: left; font: inherit; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--line-strong); border-radius: var(--r-m); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.start-opt:hover { border-color: var(--well); }
.start-opt.main { border-color: var(--well); background: var(--well-mist); }
.start-opt strong { font-family: var(--display); font-size: 20px; }
.start-sub { font-size: 15px; color: var(--muted); }
.unseen-toggle { margin-top: 8px; align-self: flex-start; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--muted); background: none; border: 1.5px dashed var(--line-strong); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.unseen-toggle[aria-pressed="true"] { color: var(--brass); border-style: solid; border-color: var(--brass); background: var(--brass-mist); }
.check-row.row-unseen .q, .check-row.row-unseen .x, .check-row.row-unseen .vis, .check-row.row-unseen input.a, .check-row.row-unseen .choices { opacity: .4; }
.check-row .body { display: flex; flex-direction: column; }
.gate-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gate-actions .link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.gate-verdict h2 { font-family: var(--display); font-size: clamp(24px, 4.4vw, 30px); margin: 0; }
.gate-verdict.held { border-color: var(--well); }
.gate-verdict.not { border-color: var(--brass); }

.gr-verdict { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, var(--sheet), var(--brass-mist)); border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line)); border-radius: var(--r-l); padding: 20px 22px; }
.gr-verdict svg { flex: none; }
.gr-verdict h2 { font-family: var(--display); font-size: clamp(24px, 4.6vw, 32px); margin: 2px 0 6px; line-height: 1.15; }
.gr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gr-stats div { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.gr-stats strong { font-family: var(--display); font-size: 30px; line-height: 1; color: var(--well); font-variant-numeric: lining-nums tabular-nums; }
.gr-stats span { font-size: 13.5px; color: var(--muted); }
.gr-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.gr-items li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gr-items li:last-child { border-bottom: 0; }
.gr-items div { display: flex; flex-direction: column; gap: 2px; }
.gi { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.gi.right { background: var(--well); color: var(--well-ink); }
.gi.wrong { background: var(--brass-mist); color: var(--brass); border: 1.5px solid var(--brass); }
.gi.unseen { background: var(--ground); color: var(--muted); border: 1.5px dashed var(--line-strong); }
.gr-skill { font-weight: 700; }
.gr-note { font-size: 15px; color: var(--muted); font-variant-numeric: lining-nums; }
.gr-belief { font-size: 15px; color: var(--brass); }
.gr-trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gr-trail > li { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 14px; }
.gr-trail > li.held { border-left: 4px solid var(--well); }
.gr-trail > li.not { border-left: 4px solid var(--brass); }
.gr-trail summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.gr-step { font-family: var(--math); font-size: 13px; color: var(--muted); }
.gr-title { font-weight: 700; flex: 1; min-width: 0; }
.gr-res { font-size: 14.5px; color: var(--muted); font-variant-numeric: lining-nums; }
.gr-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 560px) {
  .gr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gr-verdict { flex-direction: column; align-items: flex-start; }
}

/* ---------- Build 19 · The House Board and each learner's charts ---------- */
.board-strip { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.board-strip > div { flex: 1 1 120px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.board-strip strong { font-family: var(--display); font-size: 28px; line-height: 1.05; color: var(--well); font-variant-numeric: lining-nums tabular-nums; }
.board-strip small { font-size: 17px; color: var(--muted); }
.board-strip span { font-size: 13.5px; color: var(--muted); }
.board-strip .live strong { color: var(--sun); }
.board-strip .meta { flex-basis: 100%; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.board-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); background: var(--sheet); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 16px; transition: border-color .15s, transform .15s, box-shadow .15s; position: relative; }
.board-card:hover, .board-card:focus-visible { border-color: var(--well); transform: translateY(-2px); box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.board-card.s-kept { border-color: color-mix(in srgb, var(--brass) 50%, var(--line)); background: linear-gradient(160deg, var(--sheet) 55%, var(--brass-mist)); }
.bc-top { display: flex; gap: 12px; align-items: center; }
.bc-wells { flex: none; display: grid; }
.bc-name h2 { font-family: var(--display); font-size: 21px; margin: 0; line-height: 1.15; }
.bc-name h2 small { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--muted); display: block; }
.bc-status { margin: 3px 0 0; font-size: 13.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.bc-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.s-here .bc-status { color: var(--sun); } .s-here .bc-status .dot { background: var(--sun); box-shadow: 0 0 0 4px var(--sun-mist); animation: gate-pulse 1.6s ease-in-out infinite; }
.s-kept .bc-status { color: var(--brass); } .s-kept .bc-status .dot { background: var(--brass); }
.s-begun .bc-status { color: var(--well); } .s-begun .bc-status .dot { background: var(--well); }
.bc-min { margin: 0; font-size: 15px; color: var(--muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bc-min strong { font-family: var(--display); font-size: 30px; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.bc-idle { font-size: 13px; }
.bc-spark { display: flex; flex-direction: column; gap: 2px; }
.spark { width: 100%; height: 36px; }
.spark .b1, .chart .b1, .chart-key .k.b1 { fill: var(--well); background: var(--well); }
.spark .b3 { fill: color-mix(in srgb, var(--well) 38%, var(--sheet)); }
.spark .ref, .chart .ref { stroke: var(--brass); stroke-width: 1.5; stroke-dasharray: 4 3; }
.bc-spark .meta { font-size: 12px; }
.bc-facts { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; font-variant-numeric: lining-nums; }
.bc-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bc-alerts li { font-size: 13.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; align-self: flex-start; }
.bc-alerts .warn { color: var(--fault); background: var(--fault-mist); }
.bc-alerts .note { color: var(--brass); background: var(--brass-mist); }
.bc-open { font-size: 13.5px; font-weight: 800; color: var(--well); margin-top: auto; }
.board-history summary { cursor: pointer; list-style: none; }
.board-history summary h2 { display: inline; }

.chart-card { gap: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-head h2 { margin: 0; }
.chart-key { margin: 0; font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chart-key .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.chart-key .k:first-child { margin-left: 0; }
.chart-key .k.b2 { background: var(--line-strong); }
.chart-key .k.ref { height: 0; width: 16px; border-top: 2px dashed var(--brass); border-radius: 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .tick { font-size: 11px; fill: var(--muted); font-family: var(--body); font-variant-numeric: lining-nums tabular-nums; }
.chart .b2 { fill: var(--line-strong); }
.chart .hit { fill: transparent; }
.chart .ln { fill: none; stroke: var(--well); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--well); stroke: var(--sheet); stroke-width: 2; }
.chart .mark { outline: none; cursor: default; }
.chart .mark.on .b1, .chart .mark:focus .b1 { fill: var(--well-deep); }
.chart .mark.on .dot, .chart .mark:focus .dot { r: 6; }
.chart .mark.on .hit, .chart .mark:focus .hit { fill: color-mix(in srgb, var(--well) 8%, transparent); }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-table summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--well); }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.hours .hr { height: 34px; border-radius: 4px; background: var(--ground); outline: none; }
.hours .hr.l1 { background: color-mix(in srgb, var(--well) 25%, var(--sheet)); }
.hours .hr.l2 { background: color-mix(in srgb, var(--well) 50%, var(--sheet)); }
.hours .hr.l3 { background: color-mix(in srgb, var(--well) 75%, var(--sheet)); }
.hours .hr.l4 { background: var(--well); }
.hours .hr.on, .hours .hr:focus { box-shadow: 0 0 0 2px var(--ink); }
.hours-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 1fr 34px; grid-template-areas: "label n" "track track"; gap: 4px 8px; align-items: center; }
.hb-label { grid-area: label; font-size: 14.5px; line-height: 1.3; }
.hb-n { grid-area: n; text-align: right; font-weight: 800; font-variant-numeric: lining-nums; }
.hb-track { grid-area: track; height: 8px; border-radius: 999px; background: var(--ground); overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--brass); border-radius: inherit; }
.tip { position: absolute; z-index: 50; max-width: 260px; background: var(--ink); color: var(--sheet); font-size: 13.5px; line-height: 1.35; padding: 7px 10px; border-radius: 8px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); font-variant-numeric: lining-nums; }
@media (max-width: 720px) { .chart-pair { grid-template-columns: 1fr; } }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) { .chart-scroll .chart { min-width: 580px; } }

/* ---------- Build 20 · The Day's Order, the Rest, the Honest Hour ---------- */
.key-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field-label { font-size: 14.5px; font-weight: 700; }
.order-inputs { display: grid; gap: 6px; }
.order-inputs.two { grid-template-columns: 1fr 1fr; }
.order-inputs label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 400; }
.order-inputs input { width: 84px; }
.order-inputs.two label { flex-direction: column; align-items: flex-start; }
.measure .order, .measure > .hint { grid-column: 1 / -1; }
.order { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.order li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name min" "bar bar"; gap: 3px 10px; align-items: baseline; }
.order-name { grid-area: name; font-size: 15px; font-weight: 700; }
.order-min { grid-area: min; font-size: 14px; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.order-min strong { color: var(--ink); }
.order-bar { grid-area: bar; height: 6px; border-radius: 999px; background: var(--well-mist); overflow: hidden; }
.order-bar i { display: block; height: 100%; background: var(--well); border-radius: inherit; transition: width .6s ease; }
.order li.kept .order-bar i { background: var(--brass); }
.order li.kept .order-name::after { content: " ✓"; color: var(--brass); }
.order.mini { gap: 5px; }
.order.mini .order-name { font-size: 13px; }
.order.mini .order-min { font-size: 12.5px; }
.order.mini .order-bar { height: 4px; }
.chart .b3, .chart-key .k.b3 { fill: color-mix(in srgb, var(--well) 35%, var(--sheet)); background: color-mix(in srgb, var(--well) 35%, var(--sheet)); }
.rest-banner { border-left: 4px solid var(--sun); background: var(--sun-mist); border-radius: var(--r-s); padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rest-banner p { margin: 0; flex: 1; }
.rest-page { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.rest-page .breathing { width: 120px; height: 120px; animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.86); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
.rest-clock { margin: 4px 0; }
.rest-clock strong { font-family: var(--math); font-size: clamp(44px, 12vw, 64px); color: var(--well); letter-spacing: .04em; }
.rest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 460px; }
.rest-list li { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 14px; }
.tutor.breathe { border-color: var(--sun); background: var(--sun-mist); }
.tutor.breathe #breathe-n { font-family: var(--math); font-size: 28px; font-weight: 700; color: var(--sun); }
.key-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; align-items: start; }
.key-grid .f-order { grid-column: 2; grid-row: 1 / span 3; }
.order-name small { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) { .key-grid { grid-template-columns: 1fr; } .key-grid .f-order { grid-column: auto; grid-row: auto; } }

/* ---------- Build 21 · The Road Map ---------- */
.roads { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.road-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); background: var(--sheet); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 16px 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.road-card:hover, .road-card:focus-visible { color: var(--ink); border-color: var(--well); transform: translateY(-2px); box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 10%, transparent); }
.rc-head { display: flex; align-items: center; gap: 12px; }
.rc-name { flex: 1; min-width: 0; }
.rc-name h2 { font-family: var(--display); font-size: 21px; margin: 0; line-height: 1.15; }
.rc-name .meta { font-variant-numeric: lining-nums; }
.rc-open { font-size: 26px; color: var(--muted); line-height: 1; }
.road-badge { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brass-mist); color: var(--brass); }
.road-badge svg { width: 32px; height: 32px; }
.road-badge text { fill: currentColor; font-family: var(--display); }
.rb-road-num { background: var(--well-mist); color: var(--well-deep); }
.rb-road-scribe { background: var(--sun-mist); color: var(--sun); }
.rb-opifex { background: color-mix(in srgb, var(--ink) 8%, var(--sheet)); color: var(--ink); }
.roadmap { width: 100%; height: auto; display: block; overflow: visible; }
.rm-way { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.rm-walked { fill: none; stroke: var(--well); stroke-width: 5; stroke-linecap: round; }
.rm-stone circle { fill: var(--sheet); stroke: var(--line-strong); stroke-width: 2.5; }
.rm-stone.done circle { fill: var(--well); stroke: var(--well); }
.rm-stone.here circle { fill: var(--sheet); stroke: var(--brass); stroke-width: 3.5; }
.rm-stone.gate circle { stroke-width: 3; }
.rm-stone text { font-family: var(--body); font-size: 11px; font-weight: 800; fill: var(--muted); font-variant-numeric: lining-nums; }
.rm-stone.done text { fill: var(--well-ink); }
.rm-stone.here text { fill: var(--brass); }
.rm-flag { fill: var(--brass); stroke: var(--brass); stroke-width: 2; stroke-linejoin: round; }
.rm-pin path { fill: var(--brass); }
.rm-pin circle { fill: var(--sheet); }
.rm-pin { animation: pin-bob 2.4s ease-in-out infinite; }
@keyframes pin-bob { 50% { transform: translateY(-3px); } }
.roadmap.root .rm-stone circle { stroke-width: 3.5; }
.rc-here { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 16px; }
.rc-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.rc-pin { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brass); flex: none; align-self: center; }
.rc-next { margin: 0; font-size: 14.5px; color: var(--muted); font-variant-numeric: lining-nums; }
.rc-next.strong { color: var(--well); font-weight: 700; }
body[data-band="root"] .roads { grid-template-columns: 1fr; }
body[data-band="root"] .rc-here { font-size: 20px; }
.road-page-head { display: flex; flex-direction: column; gap: 10px; }
.road-page-head .road-badge { width: 56px; height: 56px; }
.road-full { gap: 12px; }
.gate-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.gate-legend li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 4px 0; }
.gl-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--line-strong); color: var(--muted); flex: none; font-variant-numeric: lining-nums; }
.gate-legend li.done .gl-n { background: var(--well); border-color: var(--well); color: var(--well-ink); }
.gate-legend li.here .gl-n { border-color: var(--brass); color: var(--brass); }
.gate-legend li.here .gl-t { font-weight: 700; }
.gl-t { flex: 1; }
.gl-c { color: var(--muted); font-size: 13px; font-variant-numeric: lining-nums; }
@media (max-width: 560px) { .roads { grid-template-columns: 1fr; } }
.rm-more { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 1 6; stroke-linecap: round; opacity: .6; }
.road-full ~ section .road-line { display: none; }   /* on a road's page the map above replaces the line of wells */
.roadmap.root { max-width: 460px; margin: 0 auto; }

/* ---------- Build 22 · The Voice of the House, the tones, the Words of Witness ---------- */
.vw { border-radius: 4px; transition: background-color .12s, box-shadow .12s; }
.vw.on { background: var(--sun-mist); box-shadow: 0 2px 0 var(--sun); color: var(--ink); }
.v-reading { outline: 2px dashed color-mix(in srgb, var(--sun) 55%, transparent); outline-offset: 4px; border-radius: 6px; }
.voice-bar { align-self: flex-end; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: -20px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 4px; max-width: 100%; }
.voice-bar button { font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); background: none; border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.voice-bar button:hover { background: var(--ground); }
.voice-bar .vb-read { background: var(--well); color: var(--well-ink); }
.voice-bar .vb-read:hover { background: var(--well-deep); }
.voice-bar svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.voice-bar .vb-read path.w1, .voice-bar .vb-read path.w2 { fill: none; stroke-width: 2; stroke-linecap: round; }
.voice-bar.speaking .vb-read path.w2 { animation: wave 1s ease-in-out infinite; }
@keyframes wave { 50% { opacity: .2; } }
.voice-bar .vb-stop { display: none; }
.voice-bar.speaking .vb-stop { display: inline-flex; }
.voice-bar .vb-opt[aria-pressed="true"] { background: var(--well-mist); color: var(--well-deep); }
.voice-bar.off .vb-read { background: var(--ground); color: var(--muted); }
@media (max-width: 560px) { .voice-bar .vb-read span { display: none; } .voice-bar button { padding: 8px 10px; } }
.witness { margin: 6px 0 0; font-family: var(--display); font-size: 19px; color: var(--brass); }
.witness::before { content: "◆ "; font-size: .7em; vertical-align: .15em; }
main .q, main .lead, main .tutor-q, main details[open] > p { cursor: default; }
.hv-samples { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hv-samples li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hv-samples audio { height: 36px; max-width: 100%; }

/* ---------- Build 25 · The Next Well ---------- */
.next-well { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px solid var(--well); border-radius: var(--r-m); background: var(--well-mist); }
.next-well .nw-words { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 1px; }
.nw-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.next-well strong { font-family: var(--display); font-size: 19px; line-height: 1.2; }
.next-well.road-turn { border-color: var(--sun); background: var(--sun-mist); }   /* Build 55: a road's time kept; the next waits for the learner */
.next-well .nw-sub { font-size: 14px; color: var(--muted); }
.nw-in { font-size: 13px; color: var(--muted); font-variant-numeric: lining-nums; }
.nw-ring { width: 34px; height: 34px; flex: none; transform: rotate(-90deg); }
.nw-ring circle { fill: none; stroke-width: 4; }
.nw-ring .bg { stroke: var(--line); }
.nw-ring .fg { stroke: var(--well); stroke-dasharray: 94.25; stroke-dashoffset: 0; animation: nw-count linear forwards; }
@keyframes nw-count { to { stroke-dashoffset: 94.25; } }
.next-well.held .nw-ring { display: none; }
.next-well .link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.next-well.all-done { border-color: var(--brass); background: var(--brass-mist); }
.road-name { margin: 2px 0 0; font-family: var(--display); font-size: 20px; color: var(--brass); }

/* ---------- The Wellhouse (Build 28) ---------- */
.rb-well { background: var(--well-mist); color: var(--well); }
.wh-head { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.wh-head-text { display: flex; flex-direction: column; gap: 10px; }
.wh-head h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 6vw, 48px); }
.wh-langs { display: flex; gap: 6px; flex-wrap: wrap; }
.wh-gauge { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 170px; text-align: center; }
.wh-gauge svg { width: 120px; height: 200px; }
.wh-gauge figcaption { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
.wh-gauge figcaption strong { font-family: var(--display); font-size: 19px; color: var(--ink); }
.wh-roof { fill: none; stroke: var(--brass); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.wh-post { stroke: var(--brass); stroke-width: 3.5; stroke-linecap: round; }
.wh-rope { stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 3 3; }
.wh-ring { fill: var(--sheet); stroke: var(--line-strong); stroke-width: 1.5; }
.wh-ring.reached { fill: color-mix(in srgb, var(--well) 22%, var(--sheet)); stroke: var(--well); }
.wh-ring.here { fill: var(--well); }
.wh-ring-n { font: 700 10px var(--body); fill: var(--muted); }
.wh-ring.here + .wh-ring-n { fill: var(--well-ink); }
.wh-bucket { fill: var(--brass); }
.wh-inhand { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-l); background: var(--sheet); border: 1px solid var(--line); border-left: 5px solid var(--well); text-decoration: none; color: var(--ink); }
.wh-inhand-t { flex: 1; display: flex; flex-direction: column; }
.wh-inhand-t strong { font-family: var(--display); font-size: 21px; }
.wh-shelf { display: flex; flex-direction: column; gap: 14px; }
.wh-shelf-head { display: flex; flex-direction: column; gap: 2px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.wh-shelf-head h2 { margin: 0; font-family: var(--display); font-size: 26px; }
.wh-books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wh-book > a, .wh-book > div { display: flex; gap: 14px; height: 100%; box-sizing: border-box; padding: 14px 16px 14px 0; border-radius: var(--r-m); background: var(--sheet); border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.wh-book > a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 10%, transparent); }
.wh-spine { flex: none; width: 34px; display: grid; place-items: center; font: 800 15px var(--display); color: var(--well-ink); background: var(--well); border-radius: 0 6px 6px 0; }
.wh-shelf-first .wh-spine { background: var(--sun); }
.wh-shelf-old .wh-spine { background: var(--brass); }
.wh-shelf-deep .wh-spine { background: var(--well-deep); }
.wh-shelf-authored .wh-spine { background: var(--ink); color: var(--sheet); }
.wh-book-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wh-book-title { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.wh-book-by { font-size: 13.5px; color: var(--muted); font-style: italic; }
.wh-book-blurb { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wh-book-meta { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.wh-later > div { opacity: .55; }
.wh-later .wh-spine { background: var(--line-strong); }
.wh-heard-chip { color: var(--well-deep); background: var(--well-mist); }
.wh-empty { padding: 14px 0; font-style: italic; }
.wh-bookhead { display: flex; flex-direction: column; gap: 10px; }
.wh-bookhead h1 { margin: 0; font-family: var(--display); font-size: clamp(30px, 5.5vw, 42px); }
.wh-rlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wh-rlist li + li { border-top: 1px solid var(--line); }
.wh-rlist a { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; text-decoration: none; color: var(--ink); }
.wh-rn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; border: 2px solid var(--line-strong); color: var(--muted); }
.wh-rlist .done .wh-rn { background: var(--well); border-color: var(--well); color: var(--well-ink); }
.wh-rlist .here .wh-rn { border-color: var(--well); color: var(--well); }
.wh-rt { font-weight: 700; }
.wh-rs { font-size: 13.5px; color: var(--muted); }
.wh-result { margin: 12px 0 0; }
.wh-about { display: flex; flex-direction: column; gap: 4px; }
.wh-readhead { display: flex; flex-direction: column; gap: 8px; }
.wh-readhead h1 { margin: 0; font-family: var(--display); font-size: clamp(28px, 5vw, 38px); }
.wh-text { padding: 26px 30px; display: flex; flex-direction: column; gap: 1em; }
.wh-text .wh-p { margin: 0; line-height: 1.75; }
.wh-t-first { font-family: var(--reader); font-size: clamp(24px, 5.4vw, 30px); }
.wh-t-first .wh-p { line-height: 1.9; }
.wh-t-young { font-family: var(--reader); font-size: clamp(20px, 4.2vw, 23px); }
.wh-t-deep { font-family: var(--display); font-size: clamp(19px, 3.6vw, 21px); }
.wh-t-deep .wh-p:first-child::first-letter { font-size: 2.6em; float: left; line-height: .9; padding: .06em .08em 0 0; color: var(--well); font-weight: 700; }
/* Build 54: verse keeps its lines; a long reading keeps its sections; a House note stands apart from the author's words */
.wh-text .wh-verse { white-space: pre-line; padding-left: 1.2em; font-style: italic; }
.wh-text .wh-sec { margin: .6em 0 0; font-family: var(--display); font-size: 1.05em; font-weight: 700; color: var(--well-deep); }
.wh-t-deep .wh-sec + .wh-p::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; font-weight: inherit; }
.wh-note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 14px 18px; border-left: 4px solid var(--brass); background: var(--well-mist); border-radius: 8px; font-size: 15.5px; line-height: 1.55; }
.wh-note p { margin: 0; }
.wh-note-mark { color: var(--brass); font-weight: 700; }
.wh-reach-line { margin: 0; color: var(--well-deep); }
.wh-reach-chip { color: var(--brass-deep, var(--ink)); background: var(--well-mist); }
.wh-next { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.wh-next strong { font-family: var(--display); }
.wh-next-n { font: 800 26px var(--math); color: var(--well); min-width: 2ch; text-align: center; }
.wh-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wh-bar .hint { flex-basis: 100%; }
.wh-fluent .wh-w { cursor: pointer; border-radius: 4px; padding: 0 1px; }
.wh-fluent .wh-w:hover { background: var(--well-mist); }
.wh-fluent .wh-w.miss { background: var(--fault-mist); color: var(--fault); text-decoration: line-through; text-decoration-thickness: 2px; }
.wh-fltime { font: 700 22px var(--math); margin-left: auto; }
.wh-flres { margin: 0; }
.wh-qs { display: flex; flex-direction: column; gap: 12px; }
.wh-qs-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wh-q { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.35; }
.wh-choices { display: flex; flex-direction: column; gap: 8px; }
.wh-choice { padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--sheet); cursor: pointer; font-weight: 500; line-height: 1.35; transition: border-color .12s, background .12s; }
.wh-choice:hover, .wh-choice:focus-visible { border-color: var(--well); outline: none; }
.wh-choices.answered .wh-choice { cursor: default; }
.wh-choice.picked { border-color: var(--ink); }
.wh-choice.right { border-color: var(--well); background: var(--well-mist); }
.wh-choice.wrong { border-color: var(--fault); background: var(--fault-mist); }
.wh-fb { margin: 0; font-weight: 700; min-height: 1.2em; }
.wh-fb.ok { color: var(--well); }
.wh-fb.not { color: var(--ink); }
.wh-end { display: flex; flex-direction: column; gap: 10px; border-top: 5px solid var(--well); }
.wh-end h2 { margin: 0; font-family: var(--display); font-size: 28px; }
.wh-review { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; }
.wh-review li { display: flex; flex-direction: column; }
.wh-rq { color: var(--muted); }
.wh-ra { font-weight: 700; }
.wh-review li.ok .wh-ra { color: var(--well); }
.wh-review li.not .wh-ra { color: var(--fault); }
.wh-review em { font-style: normal; color: var(--well); }
.wh-vocab dt { font-weight: 700; }
.wh-card-depths { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wh-card-depths li { display: grid; grid-template-columns: 74px auto 1fr; gap: 10px; align-items: center; font-size: 14.5px; }
.wh-card-l { color: var(--muted); font-weight: 700; }
.wh-mini { display: inline-flex; gap: 3px; }
.wh-mini i { width: 10px; height: 14px; border-radius: 3px; border: 1.5px solid var(--line-strong); }
.wh-mini i.on { background: var(--well); border-color: var(--well); }
@media (max-width: 640px) {
  .wh-head { grid-template-columns: 1fr; }
  .wh-gauge { flex-direction: row; width: auto; text-align: left; gap: 14px; }
  .wh-gauge svg { width: 72px; height: 120px; flex: none; }
  .wh-text { padding: 20px 18px; }
  .wh-books { grid-template-columns: 1fr; }
}
#wellhouse { display: flex; flex-direction: column; gap: 16px; }
#wellhouse .chart-head h2 { display: flex; align-items: center; gap: 10px; }
#wellhouse .chart-head .road-badge { width: 36px; height: 36px; }
#wellhouse .chart-head .road-badge svg { width: 26px; height: 26px; }
.wh-ledger-depths { display: flex; flex-direction: column; gap: 8px; }
.wh-depth-row { display: grid; grid-template-columns: 74px auto 1fr auto auto; gap: 10px; align-items: center; }
.wh-depth-row select { font: inherit; padding: 6px 8px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); }
.ledger-charts.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) {
  .ledger-charts.two { grid-template-columns: 1fr; }
  .wh-depth-row { grid-template-columns: 74px 1fr; }
  .wh-depth-row .wh-mini { display: none; }
}
.wh-young .wh-q, .wh-young .wh-choice { font-family: var(--reader); }
.wh-young .wh-q { font-size: 26px; }
.wh-young .wh-choice { font-size: 23px; padding: 16px 18px; }

/* ---------- The Flow and the Sip (Build 29) ---------- */
.btn.soon { position: relative; overflow: hidden; }
.btn.soon::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: currentColor; opacity: .55; transform-origin: left; animation: soonfill var(--soon, 3s) linear forwards; }
@keyframes soonfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sip-veil { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--well-deep) 55%, transparent); backdrop-filter: blur(3px); animation: sipin .35s ease-out; }
@keyframes sipin { from { opacity: 0; } to { opacity: 1; } }
.sip { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; background: var(--sheet); border-radius: var(--r-l); padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 12px; border-top: 6px solid var(--well); box-shadow: 0 18px 50px color-mix(in srgb, var(--ink) 25%, transparent); }
.sip .eyebrow { display: flex; align-items: center; gap: 6px; }
.sip .eyebrow svg { width: 16px; height: 16px; fill: var(--well); }
.sip h2 { margin: 0; font-family: var(--display); font-size: 30px; }
.sip-body { min-height: 150px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.sip-step { display: flex; align-items: center; gap: 16px; }
.sip-ring { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.sip-ring circle { fill: none; stroke-width: 3.5; }
.sip-ring .bg { stroke: var(--line); }
.sip-ring .fg { stroke: var(--well); stroke-dasharray: 94.25; stroke-dashoffset: 94.25; animation: sipfill linear forwards; }
@keyframes sipfill { to { stroke-dashoffset: 0; } }
.sip-say { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.35; }
.sip-k { margin: 0; font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: .1em; }
.sip-q { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; }
.sip-math { font-family: var(--math); font-size: 30px; }
.sip-dots { margin: 0; font-size: 30px; letter-spacing: .2em; color: var(--well); line-height: 1.3; }
.sip-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.sip-choices .btn { min-width: 76px; font-size: 22px; font-family: var(--math); }
.sip-right { background: var(--well-mist) !important; border-color: var(--well) !important; color: var(--well-deep) !important; }
.sip-wrong { background: var(--fault-mist) !important; border-color: var(--fault) !important; }
.sip-twins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sip-twins > div { display: flex; flex-direction: column; gap: 8px; }
.sip-w { font: inherit; padding: 10px 12px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--sheet); color: var(--ink); cursor: pointer; text-align: left; }
.sip-w.on { border-color: var(--well); background: var(--well-mist); }
.sip-w.joined { border-color: var(--well); background: var(--well); color: var(--well-ink); }
.sip-w.miss { border-color: var(--fault); animation: sipshake .3s; }
@keyframes sipshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sip-back { margin: 0; font-family: var(--display); font-style: italic; font-size: 20px; color: var(--well); }
@media (prefers-reduced-motion: reduce) { .sip-veil, .sip-w.miss { animation: none; } }
.charge-mark { color: var(--well); font-weight: 800; }
.role-guardian { color: var(--well-deep); }

/* ---------- The Treasury (Build 31) ---------- */
.ts-head { display: flex; flex-direction: column; gap: 10px; }
.ts-head h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 6vw, 46px); }
.ts-chest { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--r-l); background: linear-gradient(135deg, var(--brass-mist), var(--sheet)); border: 1px solid var(--line); }
.ts-coin { width: 72px; height: 72px; flex: none; }
.ts-coin circle { fill: var(--brass); }
.ts-coin .in { fill: none; stroke: var(--brass-mist); stroke-width: 2; }
.ts-coin .drop { fill: var(--brass-mist); }
.ts-num { margin: 0; font-family: var(--display); }
.ts-num strong { font-size: 46px; color: var(--brass); line-height: 1; }
.ts-num span { font-size: 20px; color: var(--muted); }
.ts-num.small strong { font-size: 24px; }
.ts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ts-list li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ts-list li:last-child { border-bottom: 0; }
.ts-amt { flex: none; min-width: 34px; font-weight: 800; color: var(--brass); font-variant-numeric: tabular-nums; }
.ts-fresh { border-left: 5px solid var(--brass); }
.ts-fresh h2 { margin: 0 0 8px; font-family: var(--display); }
.ts-rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ts-rewards > li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); }
.ts-rewards > li div { display: flex; flex-direction: column; }
.ts-rewards > li.can { border-color: var(--brass); }
.ts-rewards.admin > li { grid-template-columns: 1fr; }
.ts-rewards .retired { opacity: .55; }
.ts-price { font-weight: 800; color: var(--brass); font-variant-numeric: tabular-nums; }
.ts-price::after { content: " ◆"; font-size: .75em; }
.ts-state { font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.ts-granted { color: var(--well); } .ts-declined, .ts-withdrawn { color: var(--muted); } .ts-asked { color: var(--brass); }
.ts-ask { display: grid; grid-template-columns: 1fr minmax(160px, 260px) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ts-ask input, .ts-edit input, .ts-edit select { font: inherit; padding: 8px 10px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); min-width: 0; }
.ts-edit { display: grid; grid-template-columns: 2fr 90px 1fr 1fr 2fr auto; gap: 8px; align-items: center; }
.ts-addform { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.ts-learners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ts-learners li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); }
.ts-law { margin-top: 12px; font-style: italic; }
.ts-today { display: inline-flex; align-items: center; gap: 8px; }
.ts-today svg { width: 20px; height: 20px; fill: var(--brass); }
.ts-today svg path { fill: var(--sheet); }
.ts-new { color: var(--brass); font-weight: 800; }
@media (max-width: 720px) {
  .ts-edit, .ts-ask { grid-template-columns: 1fr; }
  .ts-rewards > li { grid-template-columns: 1fr auto; }
  .ts-rewards > li form, .ts-rewards > li > .meta, .ts-rewards > li > .state { grid-column: 1 / -1; }
}

/* ---------- The Evidence Record (Build 32) ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ev { display: flex; flex-direction: column; gap: 8px; }
.ev h2 { margin: 0; font-family: var(--display); font-size: 21px; display: flex; align-items: center; gap: 10px; }
.ev-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--body); background: var(--well-mist); color: var(--well-deep); flex: none; }
.ev p { margin: 0; }
.ev-big strong { font-family: var(--display); font-size: 34px; color: var(--well-deep); }
.ev-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.ev-honest { border-left: 5px solid var(--brass); }
.ev-honest h2 { margin: 0 0 6px; font-family: var(--display); }

/* Build 34 · Removed from the House (Steward only) */
.members.removed { margin-top: 32px; padding-top: 18px; border-top: 1px dashed var(--line); }
.members.removed .section-title { font-family: var(--display); font-size: 22px; margin: 0; }
.members.removed > .meta { margin: 0 0 6px; }
.members.removed .member { opacity: .82; }
.members.removed .member:hover, .members.removed .member:focus-within { opacity: 1; }

/* ---------- Build 35 · The Writer's Road ---------- */
.writer .wr-text { font-family: var(--display); font-size: 1.22em; line-height: 1.5; padding: 12px 16px; border-left: 3px solid var(--brass); background: var(--brass-mist); border-radius: var(--r-s); }
.writer .wr-pair { display: inline-block; margin-right: 6px; }
.writer .wr-word { display: block; margin-top: 8px; font-family: var(--body); font-size: .8em; color: var(--muted); }
.writer .wr-word b { color: var(--brass); font-size: 1.15em; }
.writer .wr-answer { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.writer .wr-answer textarea, .wr-compose textarea { width: 100%; box-sizing: border-box; font-family: var(--display); font-size: 1.15em; line-height: 1.55; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--sheet); color: var(--ink); resize: vertical; }
.writer .wr-answer .btn { align-self: flex-start; }
.wr-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-keys:empty { display: none; }
.wr-keys .btn { min-width: 40px; justify-content: center; font-family: var(--display); font-size: 17px; }
.wr-choices .btn { white-space: normal; line-height: 1.35; padding-top: 10px; padding-bottom: 10px; font-family: var(--display); font-size: 1.05em; }
.wr-order { margin: 4px 0; padding-left: 26px; display: flex; flex-direction: column; gap: 6px; font-family: var(--display); font-size: 1.05em; min-height: 8px; }
.wr-order li { padding: 8px 12px; background: var(--well-mist); border-radius: var(--r-s); }
.wr-pool .btn { white-space: normal; text-align: left; line-height: 1.35; font-family: var(--display); }
.wr-right { margin: 0; line-height: 1.5; }
.wr-right .tag, .wr-judgment .tag { display: inline-block; vertical-align: .12em; line-height: 1.2; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--well); margin-right: 4px; }
.wr-right ol { margin: 6px 0 0; padding-left: 22px; font-family: var(--display); }
.wr-end:empty { display: none; }
.wr-prompts { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.wr-prompts legend { margin-bottom: 8px; font-weight: 700; }
.wr-prompt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; background: var(--sheet); }
.wr-prompt:has(input:checked) { border-color: var(--well); background: var(--well-mist); }
.wr-prompt.done { opacity: .6; cursor: default; }
.wr-prompt input { margin-top: 4px; }
.wr-count { margin: 6px 0; color: var(--muted); }
.wr-count #wr-count { font-weight: 800; color: var(--ink); }
.wr-count.enough #wr-count { color: var(--well); }
.wr-expect { margin: 4px 0 8px; padding-left: 20px; }
.wr-piece { font-family: var(--display); font-size: 1.12em; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.wr-prompt-shown { font-style: italic; margin: 0; }
.wr-pieces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wr-pieces a { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; color: var(--ink); background: var(--sheet); }
.wr-pieces a:hover { border-color: var(--line-strong); }
.wr-state { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--brass-mist); color: var(--brass); }
.wr-state.ws-met { background: var(--well-mist); color: var(--well); }
.wr-state.ws-not_yet { background: var(--fault-mist); color: var(--fault); }
.wr-new-mark { font-size: 12px; font-weight: 700; color: var(--sun); }
.wr-scores th { text-align: left; font-weight: 700; padding-right: 14px; }
.wr-step { font-weight: 700; }
.wr-step.s1 { color: var(--fault); } .wr-step.s2 { color: var(--brass); } .wr-step.s3, .wr-step.s4 { color: var(--well); }
.wr-judge { display: flex; flex-direction: column; gap: 12px; }
.wr-judge textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); font: inherit; }
.wr-trait { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; margin: 0; }
.wr-trait legend { padding: 0 4px; }
.wr-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.wr-stepopt { display: flex; gap: 6px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; font-size: .95em; }
.wr-stepopt:has(input:checked) { border-color: var(--well); background: var(--well-mist); }
@media (max-width: 640px) { .wr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wr-new { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wr-new span { padding: 2px 8px; border-radius: var(--r-s); background: var(--sun-mist); font-family: var(--display); }
.wr-flags { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.wr-flags legend { margin-bottom: 6px; font-size: .95em; color: var(--muted); }
.wr-flag { display: inline-flex; gap: 4px; align-items: center; font-family: var(--display); }
.rb-road-writer { background: var(--brass-mist); color: var(--brass); }

/* ---------- Build 36 · Layers ---------- */
.layer-panel { border-left: 4px solid var(--brass); background: var(--brass-mist); display: flex; flex-direction: column; gap: 14px; }
.layer-tag { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.layer-source { margin: 6px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); font-family: var(--display); font-size: 1.1em; line-height: 1.55; }
.layer-source p { margin: 0; }
.layer-source footer { margin-top: 6px; font-family: var(--body); font-size: .8em; color: var(--muted); }
.layer-note { margin: 8px 0 0; }
.layer-by { font-weight: 700; color: var(--brass); }
.layer-laws ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.layer-form { display: flex; flex-direction: column; gap: 12px; }
.layer-form fieldset { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.layer-form fieldset { min-width: 0; }
.layer-form fieldset > label:not(.check) { display: flex; flex-direction: column; gap: 4px; }
.layer-form select { width: 100%; max-width: 100%; min-width: 0; }
.layer-on { font-size: 1.05em; }

/* ---------- Build 37 · The Heavens Road: diagrams drawn by Seven Wells ---------- */
.wr-svg { display: flex; justify-content: center; }
.wr-svg[hidden] { display: none; }
.dg { width: 100%; max-width: 420px; height: auto; background: var(--sky, #EEF3F8); border-radius: var(--r-m); }
.dg .d-sun { fill: #E9B23A; }
.dg .d-ray { stroke: #E9B23A; stroke-width: 2; stroke-linecap: round; }
.dg .d-earth { fill: #3A7BB8; }
.dg .d-night { fill: #0B1622; opacity: .62; }
.dg .d-moon-dark { fill: #3B4048; }
.dg .d-moon-lit { fill: #F3EEDA; }
.dg .d-limb { fill: none; stroke: #8A919B; stroke-width: 1; }
.dg .d-mark { fill: #fff; stroke: #0B1622; stroke-width: 1; }
.dg .d-text { fill: var(--ink); font-family: var(--body); font-weight: 700; }
.dg .d-on-earth { fill: #fff; }
.dg .d-ground { stroke: #6B5B45; stroke-width: 3; }
.dg .d-shadow { stroke: #1C2630; stroke-width: 6; opacity: .55; stroke-linecap: round; }
.dg .d-stick { stroke: #8A5A2B; stroke-width: 4; stroke-linecap: round; }
.dg .d-axis { stroke: #C0392B; stroke-width: 2; }
.dg .d-orbit { fill: none; stroke: #8A919B; stroke-dasharray: 4 4; }
.dg .d-umbra { fill: #000; opacity: .3; }
.dg .d-earth-arc { fill: none; stroke: #3A7BB8; stroke-width: 4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dg { background: #142230; } :root:not([data-theme="light"]) .dg .d-limb { stroke: #6B7480; } }
:root[data-theme="dark"] .dg { background: #142230; }
.wr-numrow { display: flex; align-items: center; gap: 10px; }
.wr-numrow input { font-size: 1.3em; padding: 10px 12px; width: 12ch; max-width: 60%; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--sheet); color: var(--ink); }
.wr-unit { font-weight: 700; color: var(--muted); }
.rb-road-heavens { background: #E3ECF6; color: #2D5F91; }


/* ---------- Build 38 · The Heavens Road, Gates 4–5: the Sun's family; light and gravity ---------- */
.dg .d-planet { fill: #B98A55; }
.dg .d-tick { stroke: #8A919B; stroke-width: .7; }
.dg .d-orbit-line { stroke: #8A919B; stroke-width: 1; }
.dg .d-mountain { fill: #6B5B45; }
.dg .d-path { fill: none; stroke: #C0392B; stroke-width: 1.6; stroke-dasharray: 3 3; }
.dg .d-path.d-orbit-path { stroke-dasharray: none; }

/* ---------- Build 39 · The Heavens Road, Gates 6–8: stars and elements; galaxies; Earth's systems and guardianship ---------- */
.dg .d-night-sky { fill: #0B1622; }
.dg .d-far-star { fill: #8A919B; }
.dg .d-near-star { fill: #E9B23A; }
.dg .d-sight { stroke: #C0392B; stroke-width: 1; stroke-dasharray: 3 3; }
.dg .d-disk { fill: #C9D3E0; }
.dg .d-bulge { fill: #E6D7A8; }
.dg .d-scale { stroke: var(--ink); stroke-width: 2; }
.dg .d-air { fill: none; stroke: #7FB3E0; }
.dg .d-air-band { fill: #7FB3E0; }
.dg .d-zoom { fill: none; stroke: #C0392B; stroke-width: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dg .d-disk { fill: #4A5868; } }
:root[data-theme="dark"] .dg .d-disk { fill: #4A5868; }

/* ---------- Build 40 · Evidence integrity: a paused skill, the guide's holds ---------- */
.wr-held { border-left: 4px solid var(--brass, #B08A3E); }
#holds form.inline { display: inline; margin-left: 8px; }

/* ---------- Build 43 · Today, one list: the reviews as one task; the minutes and the maps folded ---------- */
.measure .order-wrap { grid-column: 1 / -1; }
details[data-fold] > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; user-select: none; }
details[data-fold] > summary::-webkit-details-marker { display: none; }
details[data-fold] > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.4px solid var(--muted); border-bottom: 2.4px solid var(--muted);
  transform: rotate(45deg); margin: 0 4px -2px auto; transition: transform .18s ease; }
details[data-fold][open] > summary::after { transform: rotate(-135deg); margin-bottom: -6px; }
details[data-fold] > summary:focus-visible { outline: 2px solid var(--well); outline-offset: 4px; border-radius: 6px; }
.fold-n { font-size: 12px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center;
  background: var(--brass-mist); color: var(--brass); }
.order-wrap > summary { padding: 6px 0 2px; font-size: 14px; font-weight: 700; color: var(--muted); }
.order-wrap[open] > summary { margin-bottom: 6px; }
.roads-wrap { margin-top: 26px; }
.roads-wrap > summary { padding: 4px 0 14px; }
.roads-wrap > summary .fold-title { font-family: var(--display); font-size: 23px; line-height: 1.2; color: var(--ink); }
.charge-item .icon { position: relative; }
.charge-item .icon .count { position: absolute; top: -5px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: var(--brass); color: #fff; }
.charge-sub { display: block; margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }

/* Build 48 · The Witnessed Record */
.wt-chain { margin: 0 0 12px; }
.wt-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.wt-filter { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
.wt-filter .wt-check, .wt-filter .btn { grid-column: 1 / -1; }
.wt-filter .btn { justify-self: start; }
.wt-filter select, .wt-filter input[type=search], .wt-filter input:not([type]) { width: 100%; min-width: 0; }
.wt-caps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wt-cap p { margin: 4px 0; }
.wt-auth { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-auth .tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.wt-a-cert { background: var(--well-mist); color: var(--well); }
.wt-a-person { background: var(--brass-mist); color: var(--brass); }
.wt-a-none { color: var(--muted); }
.wt-ins { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-guide ol { margin: 6px 0 0; padding-left: 20px; }
.wt-form h2 { margin-top: 18px; }
.wt-form label, .wt-form select, .wt-form textarea { display: block; width: 100%; }
.wt-opt { display: flex !important; gap: 8px; align-items: flex-start; padding: 6px 4px; }
.wt-opt input { margin-top: 3px; }
.wt-request, .wt-void { display: grid; gap: 8px; justify-items: start; }
.wt-request input, .wt-void input { width: 100%; min-width: 0; box-sizing: border-box; }
.wt-request .hint, .wt-void .hint { margin: 0; }
.wt-est { font-weight: 700; }
.wt-dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 14px; margin: 12px 0 0; }
.wt-dl dt { color: var(--muted); font-size: .92em; }
.wt-dl dd { margin: 0; overflow-wrap: anywhere; }
.wr-state.ws-void { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.wr-state.ws-pending, .wr-state.ws-observed { background: var(--brass-mist); color: var(--brass); }
@media (max-width: 560px) { .wt-dl { grid-template-columns: 1fr; } .wt-dl dd { margin-bottom: 6px; } .wt-filter { grid-template-columns: 1fr; } }
.wt-filter select, .wt-filter input[name=q], .wt-request input, .wt-void input { padding: 8px 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-s); font: inherit; background: var(--sheet); color: var(--ink); }
.wt-cap { padding-top: 12px; padding-bottom: 12px; }
/* Build 50 · a practice kept over weeks */
.wt-entries { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.wt-entries li { overflow-wrap: anywhere; }
.wt-standing { font-weight: 700; margin: 12px 0 4px; }
.wt-counts { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 8px 0; }
.wt-counts label { display: flex !important; width: auto !important; flex-direction: column; gap: 4px; font-size: .95em; max-width: 260px; }
.wt-counts input { width: 7em; padding: 8px 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-s); font: inherit; background: var(--sheet); color: var(--ink); }
/* Build 51 · the listener named at the reader's side (listener PIN), and reading for practice */
.listener .w-pin { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sheet); }
.listener .w-pin h3 { margin: 0; font-size: 1.05em; }
.listener .w-who { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.listener .w-who legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.listener .pill-choice { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong, var(--line)); border-radius: 999px; cursor: pointer; }
.listener .pill-choice:has(input:checked) { border-color: var(--well); background: var(--well-mist); color: var(--well); font-weight: 700; }
.listener #pin-in { width: 9em; letter-spacing: .35em; font-size: 1.2em; padding: 8px 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-s); background: var(--sheet); color: var(--ink); }
.listener .w-pin .btn { justify-self: start; }
.listener .w-practice { margin-top: 16px; display: grid; gap: 6px; justify-items: start; }
.listener .w-or { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9em; margin: 0; }
.listener .w-or::before, .listener .w-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.coach .link-btn { display: block; text-align: left; background: none; border: 0; padding: 0; margin: 2px 0 6px; color: var(--muted); text-decoration: underline; font: inherit; font-size: 12px; cursor: pointer; }
/* Build 52 · a new voice, started under its own road */
.voice-here { margin: 12px 0 18px; }
.voice-here-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.voice-here-row input { flex: 1 1 220px; min-width: 0; }
/* Build 52 (D-127): a line with no recording is not spoken; a soft mark shows it was asked */
.v-silent { outline: 2px dashed var(--line-strong, var(--line)); outline-offset: 3px; border-radius: 4px; transition: outline-color .3s; }
/* Build 52 (D-128): a question not yet recorded, offered for a guide to read with the child; a Number question likewise */
.voice-gap { margin: 6px 0 10px; padding: 8px 12px; border-left: 3px solid var(--brass); background: var(--brass-mist); color: var(--ink); border-radius: var(--r-s); font-size: .92rem; }
/* Build 53: a line with no recording says so, for a moment, instead of seeming to play */
.v-none { display: inline-block; margin-left: .5em; padding: 1px 8px; border-radius: 999px; font: 600 .72rem var(--body); letter-spacing: .02em; color: var(--muted); background: var(--line); vertical-align: middle; }

/* Build 54 (D-137): the Reservoir — what each road still holds of new work */
.rsv { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.rsv-how { display: block; font-style: italic; opacity: .85; }
.rsv-low { color: var(--brass-deep, #8a6420); }
.rsv-dry { color: var(--fault); font-weight: 600; }
.rsv-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rsv-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 2px 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rsv-row .rsv { grid-column: 1 / -1; font-size: 13.5px; }
.order-inputs label .rsv { max-width: 22ch; }

/* Build 55 · worked examples on the Number Road: one at a time, "Another example" for the next */
.wex-sheet summary { font-family: var(--display); font-size: 19px; cursor: pointer; }
.wex { margin-top: 12px; }
.wex-q { font-size: 18px; line-height: 1.5; }
.wex-life { display: inline-block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--sun-mist); color: var(--ink); border: 1px solid var(--sun); vertical-align: 2px; }
.wex-steps { margin: 8px 0 8px 1.2em; padding: 0; line-height: 1.6; font-size: 17px; }
.wex-steps li { margin: 2px 0; }
.wex-steps pre.ex { margin: 4px 0; }
.wex-a strong { font-family: var(--math); font-size: 18px; }
.wex-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* ---------- The Scribe's Hall (Build 57): seals drawn by the House ---------- */
.hall .seals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.seal-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--sheet); }
.seal-card.won { border-color: var(--brass); background: linear-gradient(180deg, var(--brass-mist), var(--sheet) 70%); }
.seal-card .seal { width: 64px; height: 64px; }
.seal-card .seal-name { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.15; }
.seal-card .pill { margin-top: 4px; }
.subject-doors { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sit-begin { padding: 6px 0 2px; }
@media (max-width: 420px) { .hall .seals { grid-template-columns: repeat(2, 1fr); } .seal-card .seal-name { font-size: 15px; } }
.charge-item.spent { color: var(--muted); border-style: dashed; }

/* ---------- Build 58: seven seals, each its own; the Sticker Album ---------- */
.seal-card:not(.won) .seal { opacity: .9; }
.seal-card.won .seal { filter: drop-shadow(0 2px 3px rgba(20, 35, 31, .22)); }
.pill.pill-wait { color: var(--muted); border-style: dashed; }
.album .stickers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.sticker { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 8px 6px; }
.sticker .die { display: inline-flex; width: 112px; height: 112px; align-items: center; justify-content: center; }
.sticker .die .seal { width: 100%; height: 100%; }
.sticker.won .die { width: 124px; height: 124px; padding: 6px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 0 rgba(20, 35, 31, .08), 0 6px 14px rgba(20, 35, 31, .18); transform: rotate(var(--tilt, 0deg)); }
.sticker.won.goal .die { border-radius: 22%; }
.sticker.wait .die { opacity: .55; }
.sticker .seal-name { font-family: var(--display); font-weight: 700; font-size: 16.5px; line-height: 1.15; }
.print-only { display: none; }
@media (prefers-reduced-motion: no-preference) { .sticker.won .die { transition: transform .25s ease; } .sticker.won:hover .die { transform: rotate(0deg) scale(1.04); } }
@media (max-width: 420px) { .album .stickers { grid-template-columns: repeat(2, 1fr); } .sticker.won .die { width: 108px; height: 108px; } }
@media print {
  .no-print, .album-note { display: none !important; }
  .print-only { display: block; }
  .album { border: 0; box-shadow: none; background: #fff; padding: 0; }
  .album .stickers { grid-template-columns: repeat(3, 1fr); gap: 10mm; }
  .sticker.won .die { width: 50mm; height: 50mm; transform: none; box-shadow: none; outline: 0.3mm dashed #999; outline-offset: 2mm; }
  .sticker { break-inside: avoid; }
}
