:root {
  /* Ten-step blue ladder — Deep Navy ground, Mist type, Cloud accents.
     A single hue with ten values reads as one material rather than a set of
     unrelated colours; the hierarchy comes from lightness, not from hues. */
  --bg: #0A1B2E;
  --bg-2: #0C1F38;
  --panel: #112A46;
  --panel-2: #1B3B5A;
  --line: #34506D;
  --line-soft: #22395A;
  --ink: #E1E8F0;
  --ink-2: #C4D2E1;
  --muted: #A1B2C4;
  --dim: #8CA0B8;
  --accent: #C4D2E1;
  --accent-fill: #A1B2C4;
  --accent-soft: rgba(196, 210, 225, 0.22);
  --accent-wash: #1B3B5A;
  --teal: #557392;
  --teal-soft: rgba(85, 115, 146, 0.26);
  --good: #8FC3A8;
  --good-soft: rgba(143, 195, 168, 0.12);
  --bad: #E3A0AB;
  --bad-soft: rgba(227, 160, 171, 0.12);
  --blue: #7A8CA6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px -14px rgba(0, 0, 0, 0.62);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- sidebar ---------- */

.side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 18px 22px;
  background: var(--bg-2);
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, #E1E8F0, #A1B2C4);
  color: #0A1B2E;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.brand strong { display: block; font-size: 13.5px; letter-spacing: 0.2px; color: var(--ink); }
.brand span { display: block; font-size: 11.5px; color: var(--dim); letter-spacing: 0.4px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: background 120ms, color 120ms;
}

.nav a i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.nav a:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--accent-wash); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent-fill); font-weight: 600; }
.nav a.on i { color: var(--accent); }

.side-foot {
  margin-top: auto;
  padding: 14px 12px 0;
  border-top: 1px solid var(--line-soft);
}

.mini-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.9px; color: var(--dim); }

.mini-bar {
  height: 5px;
  background: #1B3B5A;
  border-radius: 99px;
  margin: 9px 0 7px;
  overflow: hidden;
}

.mini-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--accent-fill));
  transition: width 400ms ease;
}

.mini-count { font-size: 11.5px; color: var(--muted); }

/* ---------- main ---------- */

.app {
  min-width: 0;
  padding: 46px 50px 100px;
  max-width: 1000px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
  color: var(--ink);
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.2px;
  margin: 52px 0 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
}

h3 { font-size: 16.5px; margin: 30px 0 10px; letter-spacing: 0.1px; color: var(--ink); }

p { margin: 0 0 15px; color: var(--ink-2); max-width: 76ch; }
.lede { font-size: 17.5px; color: var(--muted); max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* ---------- cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 14px; }
.grid .card + .card { margin-top: 0; }
.grid .card { display: block; color: inherit; }
.grid a.card:hover { border-color: #4A6785; text-decoration: none; }

ul.bullets, ol.bullets { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); max-width: 76ch; }
ul.bullets li, ol.bullets li { margin-bottom: 8px; font-size: 14.5px; }
ul.bullets li::marker, ol.bullets li::marker { color: var(--accent-fill); }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.hero {
  background:
    radial-gradient(700px 260px at 88% -30%, rgba(169, 140, 195, 0.28), transparent 70%),
    linear-gradient(180deg, #E1E8F0, #17304f);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 30px 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.hero h1 { margin-bottom: 10px; }
.hero .lede { margin-bottom: 20px; }

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-radius: 12px;
  background: var(--accent-wash);
  border: 1px solid rgba(169, 140, 195, 0.55);
}

.next-action .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 3px; }
.next-action strong { font-family: var(--serif); font-size: 19px; font-weight: 600; display: block; color: var(--ink); }
.next-action span.sub { font-size: 13px; color: var(--muted); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 90ms, background 120ms, border-color 120ms;
}

.btn:hover { background: var(--panel-2); border-color: #4A6785; text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(180deg, #A1B2C4, #7A8CA6);
  border-color: #557392;
  color: #0A1B2E;
  font-weight: 600;
}

.btn.primary:hover { background: linear-gradient(180deg, #E1E8F0, #8FA2B9); color: #0A1B2E;}

.btn.ghost { background: transparent; }
.btn.done { background: var(--good-soft); border-color: rgba(14, 122, 79, 0.4); color: var(--good); }

/* ---------- pills / status ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill.done { background: var(--good-soft); color: var(--good); border-color: rgba(14, 122, 79, 0.3); }
.pill.current { background: var(--accent-soft); color: var(--accent); border-color: rgba(169, 140, 195, 0.55); }
.pill.todo { background: var(--panel-2); color: var(--muted); border-color: var(--line); }

/* ---------- curriculum ---------- */

.stage { margin-bottom: 34px; }

.stage-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}

.stage-head h2 { margin: 0; font-size: 21px; border-top: none; padding-top: 0; }
.stage-head .sub { font-size: 12.5px; color: var(--dim); }

.row-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
}

a.row-item:hover { background: var(--panel-2); text-decoration: none; }
.row-item .code { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.row-item .title { font-size: 14.5px; font-weight: 500; }
.row-item .sub { font-size: 12.5px; color: var(--muted); display: block; margin-top: 1px; }

/* ---------- lesson ---------- */

.lesson-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 8px; }
.lesson-meta { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 4px; padding: 0; list-style: none; }
.chips li {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #1B3B5A;
  border: 1px solid var(--line);
  color: #A1B2C4;
}

/* ---------- in-page navigation ---------- */

.toc {
  margin: 18px 0 6px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.toc-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin-bottom: 9px; }

.toc-links { display: flex; flex-wrap: wrap; gap: 6px; }

.toc-link {
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 110ms, background 110ms, color 110ms;
}

.toc-link:hover { border-color: var(--accent-fill); background: var(--accent-wash); color: var(--accent); }

h3[id] { scroll-margin-top: 18px; }

pre {
  background: #1b3459;
  border: 1px solid var(--line);
  border-left: 3px solid #34506D;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.72;
  color: #E1E8F0;
}

code {
  font-family: var(--mono);
  font-size: 0.89em;
  background: var(--accent-wash);
  padding: 1.5px 5px;
  border-radius: 4px;
  color: #C4D2E1;
}

pre code { background: none; padding: 0; color: inherit; }

.callout {
  border-left: 3px solid var(--accent-fill);
  background: var(--accent-wash);
  padding: 15px 18px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 18px;
}

.callout.warn { border-color: var(--bad); background: var(--bad-soft); }
.callout.good { border-color: var(--good); background: var(--good-soft); }
.callout .ct { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; color: var(--accent); }
.callout.warn .ct { color: var(--bad); }
.callout.good .ct { color: var(--good); }
.callout p { color: var(--ink-2); max-width: none; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

table { border-collapse: collapse; width: 100%; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 13px;
  background: #1B3B5A;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

td { padding: 10px 13px; border-top: 1px solid var(--line-soft); color: var(--ink-2); white-space: normal; vertical-align: top; line-height: 1.6; }
tr.hi td { background: var(--accent-wash); }
td.num { font-family: var(--mono); font-size: 12.5px; }

/* ---------- tasks ---------- */

.task {
  display: flex;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 9px;
  background: var(--panel);
  cursor: pointer;
  align-items: flex-start;
}

.task:hover { border-color: #4A6785; }
.task input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--good); flex: 0 0 16px; cursor: pointer; }
.task .t-body { flex: 1; }
.task .t-text { font-size: 14.5px; color: var(--ink-2); }
.task .t-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: none; }
.task .t-hint.show { display: block; }
.task .t-min { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; padding-top: 3px; }
.task.is-done { opacity: 0.62; background: var(--panel-2); }
.task.is-done .t-text { text-decoration: line-through; }

.hint-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0 0;
  font-family: inherit;
}

/* ---------- quiz ---------- */

.quiz { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 22px; box-shadow: var(--shadow); }

.q { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.q:first-of-type { padding-top: 4px; }
.q:last-of-type { border-bottom: none; }

.q-num { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 1px; }
.q-text { font-size: 15px; font-weight: 600; margin: 5px 0 12px; color: var(--ink); }

.opts { display: flex; flex-direction: column; gap: 7px; }

.opt {
  text-align: left;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 110ms, background 110ms;
}

.opt:hover:not(:disabled) { border-color: #4A6785; background: #1B3B5A; }
.opt:disabled { cursor: default; }
.opt.right { background: #16323B; border-color: rgba(14, 122, 79, 0.5); color: #A9D7B8; }
.opt.wrong { background: #3A2130; border-color: rgba(192, 51, 42, 0.45); color: #EFB0BC; }

.why {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 12px;
  display: none;
}

.why.show { display: block; }

.quiz-score {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--accent-wash);
  border: 1px solid rgba(169, 140, 195, 0.5);
  font-size: 14px;
  display: none;
}

.quiz-score.show { display: block; }
.quiz-score b { font-family: var(--serif); font-size: 18px; }

/* ---------- sandbox ---------- */

.sandbox { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px 22px; box-shadow: var(--shadow); }

.sb-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

.sb-row input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  width: 150px;
}

.sb-row input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }

.sb-out {
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #1b3459;
  border: 1px solid var(--line);
  min-height: 52px;
  white-space: pre-wrap;
  line-height: 1.75;
  color: #E1E8F0;
}

.sb-out .ok { color: var(--good); }
.sb-out .err { color: var(--bad); }
.sb-out .note { color: var(--muted); }

/* ---------- progress ---------- */

.stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin: 0 0 6px; }

.stat { min-width: 110px; }
.stat .n { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--ink); }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.9px; color: var(--dim); margin-top: 2px; }

.bar { height: 7px; background: #1B3B5A; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent-fill)); border-radius: 99px; }

.conf-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 8px 0; }
.conf-row .name { font-size: 13.5px; }
.conf-dots { display: flex; gap: 4px; }
.conf-dots i { width: 12px; height: 12px; border-radius: 3px; background: #243D5C; display: block; }
.conf-dots i.on { background: var(--accent-fill); }

.sr-row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.sr-row .d { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

.note-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  line-height: 1.65;
}

.note-input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }

.empty { color: var(--dim); font-size: 13.5px; font-style: italic; }

.lesson-foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- portfolio run-downs ---------- */

ol.run { list-style: none; counter-reset: runc; margin: 0; padding: 0; max-width: 76ch; }

ol.run li {
  counter-increment: runc;
  position: relative;
  padding: 0 0 18px 38px;
  border-left: 1px solid var(--line);
  margin-left: 12px;
}

ol.run li:last-child { border-left-color: transparent; padding-bottom: 0; }

ol.run li::before {
  content: counter(runc);
  position: absolute;
  left: -13px;
  top: -2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #112A46;
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  display: grid;
  place-items: center;
}

.run-step {
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 5px;
  color: var(--ink);
}

.run-time {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--dim);
  white-space: nowrap;
}

.run-what { font-size: 13.5px; color: var(--ink-2); margin: 0 0 6px; }

.run-out {
  font-size: 12px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 6px;
  padding: 5px 9px;
  display: inline-block;
}

ol.run.run-slim li { padding-bottom: 9px; font-size: 13.5px; }

/* ---------- drill cards ---------- */

.flash {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px 18px;
  margin-bottom: 10px;
}

.flash.known { border-color: rgba(14, 122, 79, 0.35); background: #16323B; }
.flash.missed { border-color: rgba(192, 51, 42, 0.35); background: #3A2130; }

.flash-top { display: flex; gap: 7px; align-items: center; margin-bottom: 9px; }
.flash-q { font-size: 14.5px; margin: 0 0 11px; color: var(--ink-2); }

.flash-a {
  border-left: 2px solid var(--accent-fill);
  padding-left: 13px;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.flash-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------- graded exercises ---------- */

.ex {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px 18px;
  margin-bottom: 10px;
}

.ex.solved { border-color: rgba(14, 122, 79, 0.35); background: #16323B; }

.ex-head { display: flex; gap: 11px; align-items: flex-start; }
.ex-n { font-family: var(--mono); font-size: 11px; color: var(--accent); padding-top: 3px; }
.ex-ask { font-size: 14.5px; flex: 1; color: var(--ink-2); }

.ex-row { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; align-items: center; }

.ex-in {
  flex: 1;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.ex-in:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.ex-in:disabled { opacity: 0.72; background: var(--panel-2); }

.ex-hint { display: none; margin-top: 9px; font-size: 12.5px; color: var(--blue); }
.ex-hint.show { display: block; }

.ex-fb { display: none; margin-top: 11px; font-size: 13.5px; padding: 12px 14px; border-radius: 9px; line-height: 1.65; }
.ex-fb.ok, .ex-fb.bad { display: block; }
.ex-fb.ok { background: #16323B; border-left: 3px solid var(--good); color: #A9D7B8; }
.ex-fb.bad { background: #3A2130; border-left: 3px solid var(--bad); color: #EFB0BC; }
.ex-fb .sol { margin-top: 9px; }
.ex-fb code { background: rgba(0, 0, 0, 0.3); color: #E1E8F0; }

/* ---------- walkthrough ---------- */

.stepper { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 18px 20px; box-shadow: var(--shadow); }

.step-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.step-count { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.step-text { font-size: 15px; margin: 0 0 12px; min-height: 44px; color: var(--ink-2); }
.step-actions { display: flex; gap: 9px; margin-top: 13px; }

tbody tr.hl td { background: var(--accent-wash); }
tbody tr.hl td.mark { color: var(--accent); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.6px; }

/* ---------- misc ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.crumb { font-size: 12.5px; color: var(--dim); margin-bottom: 12px; }
.crumb a { color: var(--muted); }

::selection { background: #A1B2C4; color: #112A46; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 16px;
    gap: 14px;
  }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav a { padding: 7px 10px; font-size: 13px; }
  .nav a i { display: none; }
  .side-foot { display: none; }
  .app { padding: 24px 18px 70px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; margin-top: 40px; }
  .split { grid-template-columns: 1fr; }
  .row-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .conf-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- curriculum as days ---------- */

.plan-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin: 16px 0 8px;
  padding: 12px 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.plan-key span { display: inline-flex; align-items: center; gap: 6px; }
.plan-key i { color: var(--ink-2); font-style: italic; }
.plan-key .key-out {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  border-radius: 5px;
  padding: 1px 7px;
}

.plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 26px; }
.plan-bar .bar { flex: 0 0 170px; margin: 0; }

.stage-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.week-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 26px 0 4px;
  padding: 8px 12px;
  background: var(--panel);
  border-left: 3px solid var(--accent-fill);
  border-radius: 0 8px 8px 0;
}

.week-line .wk {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.week-line b { font-size: 14.5px; }
.week-line i { font-size: 12.5px; color: var(--muted); }
.week-line .wk-range { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }

.day {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 6px 13px 8px;
  border-bottom: 1px dashed var(--line-soft);
}

.day.is-done { background: var(--panel-2); }

.day-tick {
  width: 19px;
  height: 19px;
  margin-top: 5px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 110ms, background 110ms;
}

.day-tick span { width: 7px; height: 7px; border-radius: 50%; background: transparent; display: block; }
.day-tick:hover { border-color: var(--accent-fill); }
.day.is-done .day-tick { background: var(--good); border-color: var(--good); }
.day.is-done .day-tick span { background: #112A46; }

.day-body { display: block; min-width: 0; color: inherit; text-decoration: none; }
.day-body:hover { text-decoration: none; }

.day-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }

.day-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2px;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}

.day-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.day.is-done .day-title { color: var(--muted); }

.day.is-next .day-title {
  text-decoration: underline;
  text-decoration-color: var(--accent-fill);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.day-tag { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--dim); white-space: nowrap; }

.day-session {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: var(--dim);
}

.day-focus { display: block; margin-top: 4px; font-size: 13px; font-style: italic; color: var(--muted); }
.day-how { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }

.day-out {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--panel-2);
  border-left: 2px solid var(--accent-fill);
  border-radius: 0 6px 6px 0;
}

.day-out b {
  margin-right: 7px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--accent);
}

@media (max-width: 720px) {
  .plan-bar .bar { flex: 1 1 100%; }
  .day { grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding-left: 2px; }
  .day-tag { margin-left: 0; }
  .week-line .wk-range { margin-left: 0; }
  .stage-head { flex-wrap: wrap; }
}

/* ---------- comfort pass: no hard white surfaces ---------- */

pre { background: #081726; border-left-color: var(--line); color: #C4D2E1; }
.toc-link { background: var(--panel); }
.chips li { background: var(--panel-2); color: var(--ink-2); }
.day-tick { background: var(--panel); }
.week-line { background: var(--panel-2); }
.week-line .wk { background: var(--panel); }
.day-out { background: var(--panel-2); }

.theme-toggle {
  width: 100%;
  margin-top: 12px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--accent-fill); }
.theme-toggle b { color: var(--accent); font-weight: 600; }

.build-stamp {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- dim: same layout, lower light ---------- */

[data-theme="dim"] {
  /* Dusk: the same ladder lifted two steps, for daylight. */
  --bg: #16314C;
  --bg-2: #1B3B5A;
  --panel: #1F4162;
  --panel-2: #274A6C;
  --line: #3F6081;
  --line-soft: #34506D;
  --ink: #F2F6FB;
  --ink-2: #E1E8F0;
  --muted: #C4D2E1;
  --dim: #A1B2C4;
  --accent: #F2F6FB;
  --accent-fill: #C4D2E1;
  --accent-soft: rgba(242, 246, 251, 0.18);
  --accent-wash: #274A6C;
  --teal: #6E8CA8;
  --teal-soft: rgba(110, 140, 168, 0.26);
  --good: #9DD0B3;
  --good-soft: rgba(157, 208, 179, 0.14);
  --bad: #E7AAB5;
  --bad-soft: rgba(231, 170, 181, 0.14);
  --blue: #C4D2E1;
}

[data-theme="dim"] pre { background: #12253f; border-left-color: var(--line); color: #e6d5bd; }
[data-theme="dim"] .week-line,
[data-theme="dim"] .day-out,
[data-theme="dim"] .chips li { background: var(--panel-2); }
[data-theme="dim"] .week-line .wk { background: var(--panel); }

/* ---------- subpages: tabs, cards, pagers ---------- */

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.subnav-link {
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
}

.subnav-link:hover { border-color: var(--accent-fill); text-decoration: none; }
.subnav-link.on { background: var(--ink); border-color: var(--ink); color: var(--bg-2); }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 30px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.pager .btn { font-size: 12.5px; }

.nhl { font-weight: 650; color: var(--ink); }

/* stage identity — one hue per stage, inherited by everything inside */
[data-stage="week0"]    { --stage: #C4D2E1; --stage-soft: #243D5C; }
[data-stage="bridge-a"] { --stage: #A1B2C4; --stage-soft: #1B3B5A; }
[data-stage="bridge-b"] { --stage: #7A8CA6; --stage-soft: #22395A; }
[data-stage="core"]     { --stage: #E1E8F0; --stage-soft: #1B3B5A; }

.stage-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--stage, var(--accent));
  border-radius: 12px;
  background: var(--panel);
}

.stage-card:hover { text-decoration: none; background: var(--panel-2); }
.stage-card .stage-badge { background: var(--stage, var(--accent)); border-color: var(--stage, var(--accent)); color: #0A1B2E; }

.stage-card-body { flex: 1 1 auto; min-width: 0; display: block; }
.stage-card-title { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.stage-card-sub { display: block; margin-top: 3px; font-size: 12.5px; font-style: italic; color: var(--muted); }

.stage-card .sc-bar {
  display: block;
  height: 5px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--panel-2);
  overflow: hidden;
}

.stage-card .sc-bar span { display: block; height: 100%; background: var(--stage, var(--accent)); border-radius: 99px; }
.stage-card-meta { display: block; margin-top: 7px; font-size: 11.5px; color: var(--dim); }
.stage-card-go { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--stage, var(--accent)); padding-top: 3px; }

.week-card {
  display: block;
  margin-top: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage, var(--accent));
  border-radius: 10px;
  background: var(--panel);
}

.week-card:hover { text-decoration: none; background: var(--panel-2); }
.wc-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.wc-code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--stage, var(--accent));
  background: var(--stage-soft, var(--accent-wash));
  border-radius: 5px;
  padding: 2px 6px;
}
.wc-top b { font-size: 15px; }
.wc-top i { font-size: 12.5px; color: var(--muted); }
.wc-days { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

.week-card .wc-bar {
  display: block;
  height: 4px;
  margin-top: 9px;
  border-radius: 99px;
  background: var(--panel-2);
  overflow: hidden;
}

.week-card .wc-bar span { display: block; height: 100%; background: var(--stage, var(--accent)); }

.session-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 24px 0 2px;
  padding: 6px 0 6px 10px;
  border-left: 3px solid var(--stage, var(--accent));
}

.session-link { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); }
.session-link:hover { text-decoration: none; color: var(--stage, var(--accent)); }
.sh-code { font-family: var(--mono); font-size: 10.5px; color: var(--stage, var(--accent)); }
.session-link b { font-size: 15px; }
.sh-sub { font-size: 11.5px; color: var(--dim); }

.stage .day { border-left: 3px solid var(--stage-soft, var(--line-soft)); padding-left: 12px; }
.stage .day-num { color: var(--stage, var(--accent)); border-color: var(--stage-soft, var(--accent-soft)); background: var(--stage-soft, var(--accent-wash)); }
.stage .day.is-next { background: var(--panel); }

.week-note { font-size: 13px; color: var(--ink-2); }

.check-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.check-card:hover { text-decoration: none; border-color: var(--accent-fill); background: var(--panel-2); }
.cc-main { flex: 1 1 auto; min-width: 0; display: block; }
.cc-main b { font-size: 15px; color: var(--ink); }
.cc-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.cc-side { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.cc-score { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.cc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

.piece-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.piece-card:hover { text-decoration: none; border-color: var(--accent-fill); background: var(--panel-2); }
.pc-n { font-family: var(--mono); font-size: 11px; color: var(--accent); padding-top: 2px; }
.pc-body { flex: 1 1 auto; min-width: 0; display: block; }
.pc-title { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.pc-q { display: block; margin-top: 3px; font-size: 12.8px; font-style: italic; color: var(--muted); }
.pc-meta { display: block; margin-top: 6px; font-size: 11.5px; color: var(--dim); }
.pc-go { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--accent); padding-top: 3px; }

/* kill the last hard-white surfaces */
.opt { background: var(--panel); }
.task.is-done { background: var(--panel-2); }
.ex-in:disabled { background: var(--panel-2); }
tr.hi td, tbody tr.hl td { background: var(--accent-wash); }

@media (max-width: 720px) {
  .stage-card, .piece-card, .check-card { flex-wrap: wrap; }
  .stage-card-go, .pc-go { padding-top: 0; }
  .wc-days { margin-left: 0; }
}

/* ---------- blue accent surfaces ---------- */

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, #E1E8F0, #A1B2C4);
  color: #0A1B2E;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.btn.primary {
  background: linear-gradient(180deg, #A1B2C4, #7A8CA6);
  border-color: #557392;
  color: #0A1B2E;
}

.btn.primary:hover { background: linear-gradient(180deg, #E1E8F0, #8FA2B9); color: #0A1B2E; }

.pill.current {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(169, 140, 195, 0.75);
}

.bar span,
.mini-bar span {
  background: linear-gradient(90deg, var(--accent), var(--accent-fill));
}

/* ---------- interactive lesson blocks ---------- */

.icards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.icard {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color 120ms, background 120ms;
}

.icard:hover { border-color: var(--accent-fill); }
.icard.open { border-color: var(--accent); background: var(--bg-2); }
.icard.flip { border-style: dashed; background: var(--accent-wash); }

.icard-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}

.icard.flip .icard-btn { font-weight: 600; color: var(--accent); }
.icard-btn:hover { background: var(--panel-2); }
.icard.flip .icard-btn:hover { background: rgba(255, 255, 255, 0.35); }

.icard-plus {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}

.icard-b {
  display: none;
  padding: 0 14px 13px;
  font-size: 13px;
  line-height: 1.62;
  color: var(--muted);
}

.icard.open .icard-b { display: block; }

.fbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.fbox {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 12px 14px;
}

.fbox-l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--accent);
  margin-bottom: 7px;
}

.fbox code {
  display: block;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--ink);
  word-break: break-word;
}

.fbox-n { font-size: 12px; color: var(--muted); margin-top: 7px; }

.chart {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 15px 17px;
  margin: 16px 0 20px;
}

.chart-t { font-size: 13.5px; font-weight: 650; margin-bottom: 11px; color: var(--ink); }

.cbar {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) 74px;
  gap: 10px;
  align-items: center;
  margin: 7px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.cbar-track {
  height: 12px;
  border-radius: 3px;
  background: var(--panel-2);
  overflow: hidden;
}

.cbar-fill { display: block; height: 100%; background: var(--accent-fill); border-radius: 3px; }
.cbar-v { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.chart-n { margin-top: 10px; font-size: 11.5px; color: var(--dim); }

.steps { list-style: none; margin: 16px 0 20px; padding: 0; }

.steps li {
  position: relative;
  margin-left: 11px;
  padding: 0 0 16px 30px;
  border-left: 2px solid var(--line);
}

.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }

.steps .s-n {
  position: absolute;
  left: -12px;
  top: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0A1B2E;
  font-family: var(--mono);
  font-size: 10.5px;
}

.steps b { font-size: 14px; color: var(--ink); }
.steps p { margin: 3px 0 0; font-size: 12.8px; color: var(--muted); }

@media (max-width: 720px) {
  .cbar { grid-template-columns: 96px minmax(0, 1fr) 62px; font-size: 11.5px; }
}

/* calmer card grid: two columns, no stretched empty boxes */
.icards { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); align-items: start; }
.icard.open { background: var(--panel); }
.icard-b { color: var(--ink-2); }

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

/* hero + selection: last warm surfaces */
.hero { background: linear-gradient(165deg, #112A46, #112A46); border-color: var(--line); }
.next-action { background: var(--panel-2); border-color: var(--line); }
.next-action .label { color: var(--accent); }
::selection { background: #A1B2C4; color: #112A46; }

/* ---------- flowcharts ---------- */

.flow-wrap { margin: 18px 0 22px; }

.flow-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 9px;
}

.flow { display: flex; align-items: stretch; }

.flow-node {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  padding: 11px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.flow-node b { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ink); }
.flow-node span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.45; color: var(--muted); }

.flow-node + .flow-node { margin-left: 28px; }

.flow-node + .flow-node::before {
  content: "→";
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.flow-node.start { border-left: 4px solid var(--accent); background: var(--accent-wash); }
.flow-node.decision { border-style: dashed; border-color: var(--accent); background: var(--bg-2); }
.flow-node.decision b { color: var(--accent); }
.flow-node.end { background: var(--accent); border-color: var(--accent); }
.flow-node.end b, .flow-node.end span { color: #0A1B2E; }

.flow-note { margin-top: 11px; font-size: 11.5px; line-height: 1.6; color: var(--dim); }

@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .flow-node + .flow-node { margin-left: 0; margin-top: 26px; }
  .flow-node + .flow-node::before { content: "↓"; left: 50%; top: -21px; transform: translateX(-50%); }
}

/* ---------- curriculum: each day is its own card ---------- */

.stage .day {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  margin: 10px 0;
  padding: 13px 16px 14px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage, var(--accent));
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(58, 43, 71, 0.05);
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}

.stage .day:hover {
  border-color: var(--stage, var(--accent));
  box-shadow: 0 3px 10px -6px rgba(58, 43, 71, 0.3);
  transform: translateY(-1px);
}

.stage .day.is-done { background: var(--panel-2); }
.stage .day.is-next { border-color: var(--stage, var(--accent)); box-shadow: 0 0 0 2px var(--accent-soft); }

.stage .day-num {
  border-radius: 7px;
  padding: 3px 7px;
  font-weight: 600;
  letter-spacing: 0;
}

.week-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}

.strip-sq {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}

.strip-sq:hover { border-color: var(--stage, var(--accent)); background: var(--panel-2); }
.strip-sq.on { background: var(--accent); border-color: var(--accent); color: #0A1B2E; }
.strip-label { margin-left: 4px; font-size: 11.5px; color: var(--dim); }

/* ---------- day cards as a grid, like the other card sections ---------- */

.days-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 6px 0 4px;
}

@media (min-width: 1150px) {
  .days-grid { grid-template-columns: 1fr 1fr; }
}

.days-grid .day { margin: 0; }

/* ---------- expandable day cards ---------- */

.day-main { min-width: 0; }

.day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.day-head:hover .day-title { color: var(--accent); }
.day-chev { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--accent); }

.day-more {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}

.day.open .day-more { display: block; }
.day.open { box-shadow: 0 4px 16px -10px rgba(58, 43, 71, 0.45); }
.day .day-how { display: block; margin: 0 0 9px; font-size: 12.5px; line-height: 1.62; color: var(--muted); }
.day-open { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--accent); }

.days-grid.is-single { grid-template-columns: 1fr; }

/* =========================================================
   Editorial lesson layout — long-form reading page
   ========================================================= */

.lec { max-width: 860px; }

.lhero { padding-bottom: 24px; border-bottom: 1px solid var(--line); }

.lhero-k {
  display: flex; gap: 9px; align-items: baseline;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent);
}
.lhero-k i { font-style: normal; color: var(--dim); }

.lec .lhero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 14px 0 12px;
  color: var(--ink);
}
.lec .lhero h1 .stop { color: var(--accent-fill); }

.lhero .lede { max-width: 64ch; }

.lhero-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

.chip2 {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2);
}

/* --- aim / why panels --- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 10px; }
.duo.solo { grid-template-columns: 1fr; }

.panel { border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; background: var(--panel); }
.panel .label {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 9px;
}
.panel p { margin: 0; font-size: 14.5px; line-height: 1.66; color: var(--ink-2); }
.panel.tint { background: radial-gradient(circle at 0% 0%, var(--accent-wash), transparent 66%), var(--panel); border-color: #34506D; }
.panel.tint-b { background: radial-gradient(circle at 0% 0%, #1B3B5A, transparent 66%), var(--panel); border-color: #34506D; }
.panel.tint-b .label { color: #C4D2E1; }

/* --- numbered sections --- */
.lsec { margin-top: 54px; }

.lsec .num {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent);
}
.lsec .num::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.lec > .chips { margin: 20px 0 4px; }

.lec .lsec h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 7px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.lec .lsec h3 + p { font-size: 17px; color: var(--ink-2); }

/* the tool sections after the reading */
.lec h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.4vw, 28px);
  margin: 54px 0 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* --- closing panel --- */
.lend {
  margin-top: 42px;
  border: 1px solid #34506D;
  border-radius: 18px;
  padding: 24px 26px;
  background: radial-gradient(circle at 0% 0%, var(--accent-wash), transparent 62%), var(--panel);
}
.lend .lab {
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.lend p { font-family: var(--serif); font-size: 18.5px; line-height: 1.62; margin: 0; color: var(--ink); }

/* --- steps read as a horizontal timeline on wide screens --- */
@media (min-width: 980px) {
  /* horizontal only up to five stages; longer chains read better as a rail */
  .lec ol.steps:not(:has(li:nth-child(6))) { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); margin: 28px 0 30px; }
  .lec ol.steps:not(:has(li:nth-child(6))) li {
    margin: 0; padding: 42px 12px 0; border: 0; text-align: center; position: relative;
  }
  .lec ol.steps:not(:has(li:nth-child(6))) li::before {
    content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 1px; background: var(--line);
  }
  .lec ol.steps:not(:has(li:nth-child(6))) li:first-child::before { left: 50%; }
  .lec ol.steps:not(:has(li:nth-child(6))) li:last-child::before { right: 50%; }
  .lec ol.steps:not(:has(li:nth-child(6))) .s-n {
    left: 50%; top: 1px; transform: translateX(-50%);
    background: var(--panel); color: var(--accent);
    border: 1.5px solid var(--accent-fill);
  }
  .lec ol.steps:not(:has(li:nth-child(6))) b { display: block; font-size: 14.5px; }
  .lec ol.steps:not(:has(li:nth-child(6))) p { font-size: 12.2px; }
}

@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .lec .lhero h1 { font-size: clamp(30px, 7vw, 40px); }
}

/* ---------- pull quotes ---------- */

.lec .figure {
  margin: 0 0 26px;
  padding: 2px 0 2px 24px;
  border-left: 2px solid var(--accent-fill);
}
.lec .figure p {
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  max-width: 60ch;
}
.fig-lab {
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 9px;
}

/* ---------- dashboard ledger ---------- */

.ledger {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 26px 0 8px;
}
.led { padding: 20px 22px 20px 0; border-left: 1px solid var(--line-soft); padding-left: 22px; }
.led:first-child { border-left: 0; padding-left: 0; }
.led b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--ink); }
.led span { display: block; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-top: 7px; }
.led i { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.led-bar { display: block; height: 4px; border-radius: 99px; background: var(--panel-2); margin-top: 12px; overflow: hidden; }
.led-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-fill)); }

/* ---------- thread panels ---------- */

.thread { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.th {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: inherit; text-decoration: none;
  transition: border-color 120ms, transform 120ms, box-shadow 120ms;
}
.th:hover { border-color: var(--accent-fill); transform: translateY(-2px); box-shadow: 0 8px 22px -16px rgba(58, 43, 71, 0.5); text-decoration: none; }
.th-k { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.th-t { font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--ink); }
.th-d { font-size: 13px; line-height: 1.55; color: var(--muted); }
.th-go { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); }

/* ---------- link list ---------- */

.linkage { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.lk {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) 28px;
  gap: 18px; align-items: baseline;
  padding: 15px 4px; border-bottom: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
}
.lk:hover { background: var(--accent-wash); text-decoration: none; }
.lk-t { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.lk-d { font-size: 13px; color: var(--muted); line-height: 1.5; }
.lk-go { color: var(--accent); text-align: right; }

/* ---------- curriculum stage rows ---------- */

.stage-list { display: flex; flex-direction: column; margin-top: 26px; border-top: 1px solid var(--line); }

.stage-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 22px; align-items: start;
  padding: 24px 6px 24px 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
}
.stage-row:hover { background: var(--accent-wash); text-decoration: none; }
.sr-n {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; line-height: 1.2;
  color: #0A1B2E;
  border: 1px solid var(--stage-soft, var(--line));
  background: var(--stage-soft, var(--accent-wash));
  border-radius: 10px; width: 44px; height: 44px;
  display: grid; place-items: center;
}
.sr-body { display: block; min-width: 0; }
.sr-kicker { display: block; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.sr-title { display: block; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 29px); line-height: 1.2; color: var(--ink); margin: 6px 0 5px; }
.sr-sub { display: block; font-size: 13.5px; color: var(--muted); font-style: italic; }
.sr-bar { display: block; height: 4px; border-radius: 99px; background: var(--panel-2); margin: 13px 0 7px; overflow: hidden; max-width: 420px; }
.sr-bar span { display: block; height: 100%; background: var(--stage, var(--accent)); }
.sr-meta { display: block; font-size: 11.5px; color: var(--dim); }
.sr-go { font-size: 12px; font-weight: 600; color: var(--stage, var(--accent)); white-space: nowrap; align-self: center; }

@media (max-width: 860px) {
  .ledger { grid-template-columns: 1fr; }
  .led { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); }
  .led:first-child { border-top: 0; }
  .thread { grid-template-columns: 1fr; }
  .lk { grid-template-columns: minmax(0, 1fr) 24px; }
  .lk-d { display: none; }
  .stage-row { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .sr-go { display: none; }
}

/* ---------- the coach: local, offline ---------- */

.coach {
  margin-top: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(circle at 0% 0%, var(--accent-wash), transparent 58%), var(--panel);
  padding: 24px 26px 26px;
}

.coach-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.coach-k { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.coach-note { font-size: 11.5px; color: var(--dim); }

.coach-tabs { display: flex; gap: 8px; margin: 16px 0 18px; }
.coach-tab {
  font: inherit; font-size: 12.5px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--panel-2); color: var(--ink-2);
}
.coach-tab.on { background: var(--accent); border-color: var(--accent); color: #0A1B2E; }

.coach-lede { font-size: 13px; color: var(--muted); margin: 0 0 16px; max-width: 62ch; }

.cm { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.cm-q { font-family: var(--serif); font-size: 17px; line-height: 1.35; color: var(--ink); display: flex; gap: 10px; }
.cm-n { font-family: var(--mono); font-size: 11px; color: var(--accent); padding-top: 4px; }
.cm-in {
  display: block; width: 100%; margin: 10px 0 8px; padding: 9px 11px;
  font: inherit; font-size: 13.5px; color: var(--ink);
  /* --panel, not a fixed navy: in Arctic Haze this input was navy text on a navy
     box, because only the colour token followed the theme. */
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  resize: vertical;
}
.cm-in::placeholder, .coach-in::placeholder { color: var(--dim); }
.cm-in:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.cm-rev {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--accent);
}
.cm-a {
  margin-top: 11px; padding: 12px 14px; border-left: 2px solid var(--accent-fill);
  background: var(--panel-2); border-radius: 0 8px 8px 0;
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}

.coach-ask { display: flex; gap: 9px; flex-wrap: wrap; }
.coach-in {
  flex: 1 1 260px; padding: 10px 12px; font: inherit; font-size: 13.5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
}
.coach-in:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.coach-go { padding: 10px 16px; }

.coach-out { margin-top: 16px; }
.coach-hit { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.coach-hit-h { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.coach-hit p { margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--ink-2); }
.coach-empty { font-size: 13px; color: var(--muted); font-style: italic; margin: 0; }

/* ---------- online teacher ---------- */
/* Same Galaxy palette as the rest of the site: navy ground, beige type, gold
   accent. No light card, so nothing has to survive a mid-tone fade. */

.teacher {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 210, 225, 0.16), transparent 58%),
    linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 58%, var(--bg-2) 100%);
  box-shadow: 0 14px 34px -26px rgba(0, 0, 0, 0.8);
  padding: 22px 24px 24px;
}

.teacher-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 6px; }
.teacher-k {
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.teacher-note { font-size: 11.5px; color: var(--dim); }
.teacher-lede { font-size: 13px; color: var(--muted); margin: 8px 0 16px; max-width: 64ch; }

.teacher-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tf { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.tf select, .tf input {
  font: inherit; font-size: 13.5px; letter-spacing: 0; text-transform: none;
  padding: 9px 11px; min-width: 220px; color: var(--ink);
  background: #081726; border: 1px solid var(--line); border-radius: 10px;
}
.tf select:focus, .tf input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px rgba(161, 178, 196, 0.3); }

.teacher-status { margin-top: 12px; font-size: 12.5px; color: var(--muted); min-height: 18px; }
.teacher-status.ok { color: var(--good); }
.teacher-status.bad { color: var(--bad); }

.teacher-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 12px; }
.teacher-model { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.t-mini {
  font: inherit; font-size: 11.5px; padding: 5px 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
}
.t-mini:hover { border-color: var(--accent-fill); background: var(--panel-2); color: var(--ink); }

.teacher-log {
  max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-soft);
}
.tmsg { font-size: 13.5px; line-height: 1.62; padding: 10px 13px; border-radius: 12px; max-width: 92%; white-space: pre-wrap; }
.tmsg.me {
  align-self: flex-end; background: var(--accent-fill); color: #0A1B2E;
  border: 1px solid #E1E8F0; box-shadow: 0 2px 8px -6px rgba(0, 0, 0, 0.8);
}
.tmsg.t {
  align-self: flex-start; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--accent-fill);
}

.teacher-ask { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.teacher-ask input {
  flex: 1 1 260px; padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--ink);
  background: #081726; border: 1px solid var(--line); border-radius: 10px;
}
.teacher-ask input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px rgba(161, 178, 196, 0.3); }

[data-theme="dim"] .teacher-log { background: rgba(63, 97, 145, 0.3); }

/* ---------- today card and pace ---------- */

.now {
  margin: 26px 0 6px; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px 18px;
  background: radial-gradient(circle at 0% 0%, rgba(161, 178, 196, 0.14), transparent 55%), var(--panel);
}
.now-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.now-k { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.now-pace { font-size: 11.5px; color: var(--dim); }
.now-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; }
.now-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.now-lab { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.now-col b { font-family: var(--serif); font-size: 16.5px; line-height: 1.3; color: var(--ink); }
.now-sub { font-size: 12px; color: var(--muted); }
.now-focus { font-size: 12.5px; color: var(--ink-2); }
.now-focus i { color: var(--accent); }
.now-main .btn { align-self: flex-start; margin-top: 8px; }
.now-list { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.now-empty { font-size: 12.5px; color: var(--muted); font-style: italic; }
.now-when { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.now-prev { font-size: 14px; font-family: var(--sans); }
.now-bar { position: relative; height: 8px; border-radius: 99px; background: #1B3B5A; margin: 18px 0 8px; }
.now-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--accent-fill)); }
.now-mark { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); opacity: 0.85; }
.now-foot { font-size: 11.5px; color: var(--dim); }

.pace-card { margin: 18px 0 26px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--panel); }
.pace-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
/* the sub-line was running straight into the bold title */
.pace-card .sub { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.pace-nums { text-align: right; font-size: 11.5px; color: var(--dim); display: flex; flex-direction: column; gap: 2px; }
.pace-nums b { font-family: var(--serif); font-size: 20px; color: var(--ink); }
.pace-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- charts ---------- */

.viz { margin: 22px 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 12px; background: var(--panel); }
.viz-t { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.viz-svg { width: 100%; height: auto; display: block; }
.viz-grid { stroke: var(--line-soft); stroke-width: 1; }
.viz-axis { fill: var(--dim); font-size: 11px; font-family: var(--sans); }
.viz-in { fill: var(--ink); }
.viz-val { fill: var(--ink-2); font-size: 11px; font-family: var(--mono); }
.viz-bar { fill: var(--teal); }
.viz-bar.hot { fill: var(--accent-fill); }
.viz-line { fill: none; stroke: var(--accent-fill); stroke-width: 2.4; }
.viz-line.s1 { stroke: var(--teal); }
.viz-dot { fill: var(--accent); }
.viz-dot.s1 { fill: var(--teal); }
.viz-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.viz-cap { font-size: 11.5px; color: var(--dim); margin-top: 6px; font-style: italic; }

/* ---------- case explainer ---------- */

.explain {
  margin: 20px 0 26px; border: 1px solid var(--line); border-left: 3px solid var(--accent-fill);
  border-radius: 0 16px 16px 0; background: var(--panel); padding: 18px 20px;
}
.explain-k { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.explain-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.explain-c { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.explain-c b { color: var(--ink); font-size: 13px; }
.case-steps { margin: 14px 0 12px; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.case-steps li { margin-bottom: 5px; }

/* ---------- snapshot ---------- */

.snap {
  display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-2);
}
.snap-main { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); max-width: 56ch; }
.snap-main b { color: var(--ink); font-size: 13.5px; }
.snap-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- teacher dock and modal ---------- */

/* bottom is 84px, not 20px: Netlify injects its "Built by Netlify" badge into
   the bottom-right corner of every free site, and it sat on top of this button.
   Parking the dock above the badge keeps it clickable without fighting z-index. */
.teacher-dock {
  position: fixed; right: 20px; bottom: 84px; z-index: 2147483000;
  display: flex; align-items: center; gap: 9px;
  font: inherit; font-size: 12.5px; padding: 11px 16px; cursor: pointer; border-radius: 99px;
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--accent-fill);
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.9);
}
.teacher-dock[hidden] { display: none; }
.teacher-dock:hover { background: var(--accent-fill); color: #112A46; }
.td-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); }  .teacher-dock:hover .td-dot { background: #112A46; }

.teacher-modal { position: fixed; inset: 0; z-index: 70; background: rgba(4, 10, 20, 0.74); display: grid; place-items: center; padding: 24px; }
.teacher-modal[hidden] { display: none; }
.teacher-modal-in {
  position: relative; width: min(760px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
}
.teacher-modal-in .teacher { margin-top: 0; }
.teacher-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font: inherit; font-size: 11.5px; padding: 5px 11px; cursor: pointer; border-radius: 99px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.teacher-close:hover { color: var(--ink); border-color: var(--accent-fill); }

@media (max-width: 900px) {
  .now-grid { grid-template-columns: 1fr; gap: 14px; }
  .pace-nums { text-align: left; }
}

/* ---------- box plots ---------- */

.viz-whisk { stroke: var(--dim); stroke-width: 1; }
.viz-box { fill: rgba(99, 125, 146, 0.55); }
.viz-box.hot { fill: rgba(161, 178, 196, 0.8); }
.viz-med { stroke: var(--ink); stroke-width: 2.2; }

/* ---------- gist sync ---------- */

.sync {
  margin: 14px 0 4px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel-2);
}
.sync-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.sync-k { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.sync-status { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.sync-status.ok { color: var(--good); }
.sync-status.bad { color: var(--bad); }
.sync-lede { font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; max-width: 66ch; }
.sync-lede code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.sync-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.sync-form .tf input { min-width: 230px; }
.sync-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sync-stats { display: grid; gap: 10px; margin: 0 0 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sync-stats .ss { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.sync-stats .k { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.sync-stats .v { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.sync-stats .v.ok { color: var(--good); }

@media (max-width: 720px) {
  .sync-form .tf input { min-width: 0; width: 100%; }
}

/* ---------- modern polish ---------- */
/* Flat light-blue primary, hairline card borders, and a 1px lift on hover.
   Depth comes from value, not from shadows stacked on shadows. */

.btn.primary {
  background: linear-gradient(180deg, #D7E2EE, #A9BACE);
  border-color: #8FA6BE;
  color: #0A1B2E;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -12px rgba(0, 0, 0, 0.85);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #EAF1F8, #BDCDDE);
  color: #0A1B2E;
}

.card, .panel, .now, .pace-card, .snap, .sync, .teacher, .viz, .explain, .day, .week-card, .th, .lk, .check-card, .piece-card {
  border-color: rgba(161, 178, 196, 0.26);
}

h1, h2, h3 { letter-spacing: -0.012em; }
.eyebrow { color: var(--dim); }

.hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(196, 210, 225, 0.10), transparent 62%),
    linear-gradient(165deg, var(--panel) 0%, var(--bg-2) 100%);
}

.grid a.card, .week-card, .lk, .check-card, .piece-card, .th, .day {
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}
.grid a.card:hover, .week-card:hover, .lk:hover, .check-card:hover, .piece-card:hover, .th:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 210, 225, 0.5);
}

::selection { background: #C4D2E1; color: #0A1B2E; }

/* ---------- third surface: Arctic Haze (steps 08-10) ---------- */
[data-theme="light"] {
  --bg: #F2F6FB;
  --bg-2: #E1E8F0;
  --panel: #FFFFFF;
  --panel-2: #E8EEF6;
  --line: #C4D2E1;
  --line-soft: #DCE5EF;
  --ink: #0A1B2E;
  --ink-2: #112A46;
  --muted: #34506D;
  --dim: #557392;
  --accent: #1B3B5A;
  --accent-fill: #34506D;
  --accent-soft: rgba(27, 59, 90, 0.16);
  --accent-wash: #DCE5EF;
  --teal: #557392;
  --teal-soft: rgba(85, 115, 146, 0.14);
  --good: #2F6B4F;
  --good-soft: rgba(47, 107, 79, 0.10);
  --bad: #A24457;
  --bad-soft: rgba(162, 68, 87, 0.10);
  --blue: #34506D;
  --shadow: 0 1px 2px rgba(10, 27, 46, 0.06), 0 8px 22px -14px rgba(10, 27, 46, 0.22);
}
[data-theme="light"] pre { background: #E8EEF6; color: #112A46; border-left-color: var(--line); }
[data-theme="light"] .now-bar { background: #DCE5EF; }
[data-theme="light"] .teacher-log { background: rgba(10, 27, 46, 0.04); }
[data-theme="light"] .opt.right { background: #E4F2E9; border-color: rgba(47, 107, 79, 0.45); color: #1F5138; }
[data-theme="light"] .opt.wrong { background: #FBEAEE; border-color: rgba(162, 68, 87, 0.4); color: #7E2F40; }
[data-theme="light"] .ex-fb.ok, [data-theme="light"] .flash.known, [data-theme="light"] .ex.solved { background: #E8F4EC; color: #1F5138; }
[data-theme="light"] .ex-fb.bad, [data-theme="light"] .flash.missed { background: #FBEAEE; color: #7E2F40; }
[data-theme="light"] .btn.primary { background: linear-gradient(180deg, #3E5F80, #1B3B5A); border-color: #16324C; color: #F2F6FB; }
[data-theme="light"] .btn.primary:hover { background: linear-gradient(180deg, #4C7195, #24466A); color: #F2F6FB; }
[data-theme="light"] .brand-mark { background: linear-gradient(150deg, #1B3B5A, #0A1B2E); color: #F2F6FB; }
[data-theme="light"] .tmsg.me { background: #34506D; color: #F2F6FB; border-color: #24466A; }
[data-theme="light"] .conf-take:hover { color: #F2F6FB; }
/* Measured 1.51:1 before this: the active tab kept navy text on a navy pill. */
[data-theme="light"] .coach-tab.on { color: #F2F6FB; }
/* ---------- Arctic Haze: surfaces that assumed a dark backdrop ----------
   These were the unreadable ones: table heads, inline code, the tinted panel
   whose gradient stayed dark, and the end-node of a flow whose text is navy. */
[data-theme="light"] th { background: #E1E8F0; color: #112A46; }
[data-theme="light"] code { background: #E1E8F0; color: #0A1B2E; }
[data-theme="light"] .chips li { background: #E8EEF6; color: #112A46; }
[data-theme="light"] .sb-out { background: #E8EEF6; color: #112A46; }
[data-theme="light"] .panel.tint-b { background: radial-gradient(circle at 0% 0%, #E1E8F0, transparent 66%), var(--panel); border-color: var(--line); }
[data-theme="light"] .panel.tint-b .label { color: var(--accent); }
[data-theme="light"] .flow-node.end { background: #34506D; border-color: #34506D; }
[data-theme="light"] .flow-node.end b, [data-theme="light"] .flow-node.end span { color: #F2F6FB; }

/* Stage hues were pale fills for a navy page; on white they need to be the ink. */
[data-theme="light"] [data-stage="week0"]    { --stage: #34506D; --stage-soft: #E1E8F0; }
[data-theme="light"] [data-stage="bridge-a"] { --stage: #1B3B5A; --stage-soft: #E8EEF6; }
[data-theme="light"] [data-stage="bridge-b"] { --stage: #557392; --stage-soft: #E4EBF3; }
[data-theme="light"] [data-stage="core"]     { --stage: #0A1B2E; --stage-soft: #DCE5EF; }
[data-theme="light"] .stage-card .stage-badge { color: #F2F6FB; }

[data-theme="light"] .viz-bar { fill: #7A8CA6; }
[data-theme="light"] .viz-bar.hot { fill: #1B3B5A; }
[data-theme="light"] .viz-line, [data-theme="light"] .viz-med { stroke: #1B3B5A; }
[data-theme="light"] .viz-dot { fill: #1B3B5A; }

/* ---------- confidence evidence + queue help ---------- */
.conf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.conf-ev { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.conf-take {
  font: inherit; font-size: 11px; padding: 3px 9px; border-radius: 99px; cursor: pointer;
  background: transparent; border: 1px solid var(--accent-fill); color: var(--accent); white-space: nowrap;
}
.conf-take:hover { background: var(--accent-fill); color: #0A1B2E; }
.conf-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.sr-demo {
  margin-top: 10px; font-size: 12.5px; color: var(--ink-2);
  background: var(--panel-2); border-left: 2px solid var(--accent-fill);
  border-radius: 0 8px 8px 0; padding: 9px 12px;
}

/* ---------- one highlight per chart ---------- */
.viz-bar.hot { fill: var(--ink-2); }
.viz-line { stroke: var(--ink-2); }
.viz-dot { fill: var(--ink-2); }
.viz-med { stroke: var(--ink-2); }

.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 6px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }
.viz-legend i { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.viz-swatch.s0 { background: var(--ink-2); }
.viz-swatch.s1 { background: var(--teal); }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static; height: auto; flex-direction: column; gap: 10px;
    padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line-soft); overflow: visible;
  }
  .brand { padding: 0; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .nav a { white-space: nowrap; padding: 7px 11px; font-size: 13px; }
  .nav a i { display: none; }
  .side-foot {
    margin-top: 0; border-top: 0; padding: 0; display: flex;
    align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .mini-label, .mini-count { display: none; }
  .mini-bar { flex: 1 1 120px; margin: 0; }
  .app { padding: 18px 14px 64px; }
  h1 { font-size: 30px; line-height: 1.14; }
  .lede { font-size: 15px; }
  .teacher-dock { right: 12px; bottom: 78px; padding: 10px 14px; font-size: 12px; }
}

/* phone overflow guard: the grid column must be allowed to shrink */
@media (max-width: 860px) {
  html, body { overflow-x: hidden; }
  .app { width: 100%; max-width: 100%; min-width: 0; }
  .hero { padding: 22px 18px 20px; }
  .hero h1, .lhero h1 { font-size: 29px; }
  .now { padding: 16px 14px; }
  .card, .panel, .now, .pace-card, .snap, .sync { max-width: 100%; }
  .teacher-modal { padding: 10px; }
  .table-wrap { overflow-x: auto; }
}

/* ---------- phones: structural fixes, not just smaller type ---------- */
@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .shell { display: block; }
  .app { width: auto; max-width: 100%; padding: 16px 14px 72px; }
  .ledger, .grid, .grid.two, .grid.three, .thread, .linkage, .now-grid {
    display: grid; grid-template-columns: 1fr !important; gap: 12px;
  }
  .hero, .now, .pace-card, .card, .panel, .teacher, .viz, .explain, .snap, .sync {
    width: auto; max-width: 100%;
  }
  .hero { padding: 20px 16px 18px; }
  h1, .hero h1, .lhero h1, .lec .lhero h1 { font-size: 27px; line-height: 1.18; }
  .led, .stat { min-width: 0; }
  .next-action { flex-wrap: wrap; gap: 12px; }
  .teacher-dock { right: 10px; bottom: 72px; padding: 9px 13px; }
}

/* ---------- review panels: DEEPP draft + CV checker ----------
   Both are editors, so they get the same shell: textarea, actions, results.
   Everything is drawn from the existing tokens, so the three themes inherit it. */

.rv {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.rv-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rv-top > div:first-child { flex: 1 1 320px; }

.rv-self { display: flex; align-items: center; gap: 8px; }

.rv-self label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rv-self input {
  width: 68px;
  padding: 6px 8px;
  text-align: center;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 14px;
}

.rv-in {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.62;
}

.rv-in::placeholder { color: var(--dim); }

.rv-in:focus {
  outline: none;
  border-color: var(--accent-fill);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.rv-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.rv-note { flex: 1 1 220px; }

.rv-out:empty, .rv-ai:empty { display: none; }

.rv-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.rv-score { flex: 0 0 auto; }
.rv-score b { color: var(--ink); }

.rv-bar {
  flex: 1 1 120px;
  height: 6px;
  border-radius: 99px;
  background: var(--panel-2);
  overflow: hidden;
}

.rv-bar span { display: block; height: 100%; background: var(--good); }

.rv-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.rv-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.55;
}

.rv-tick {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  color: var(--muted);
}

.rv-list li.ok .rv-tick { color: var(--good); border-color: var(--good); background: var(--good-soft); }
.rv-list li.miss .rv-tick, .rv-list li.warn .rv-tick { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.rv-list li.ok b { color: var(--muted); font-weight: 500; }
.rv-list li.miss b, .rv-list li.warn b { color: var(--ink); }

.rv-ai {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent-fill);
  background: var(--accent-wash);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-wrap;
  color: var(--ink-2);
}

.rv-ai.busy { color: var(--muted); font-style: italic; }

.rv-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.rv-total-n { display: flex; align-items: baseline; gap: 4px; }
.rv-total-n b { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--ink); }
.rv-total-n span { font-size: 13px; color: var(--muted); }

/* ---------- one day of reading, instead of the whole chapter ----------
   The header is a compact strip, not a second page title: the chapter already has an
   h1, and a 30px h2 beside a 120px button wrapped into two lines and looked broken. */

.dayview { margin: 24px 0 26px; }

.dv-top {
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.dv-top > div:first-child { flex: 1 1 340px; min-width: 0; }
.dv-top .btn { flex: 0 0 auto; }

.dayview .eyebrow { margin: 0 0 2px; color: var(--dim); }
/* The global h2 rule opens each major section with a border-top; inside this card it
   drew a rule beside the eyebrow. */
.dayview h2 { font-size: 23px; line-height: 1.3; margin: 6px 0 4px; border-top: 0; }
.dayview p { margin: 0; }

.daystrip { margin: 18px 0 8px; }

/* The day you are reading. Named `.cur`, not `.now`: `.now` is the dashboard's
   gradient block, and reusing it painted a radial gradient into this square. */
.strip-sq.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.strip-label:hover { color: var(--accent); }
a.strip-sq { text-decoration: none; }

/* ---------- SQL dojo ----------
   A query editor has to look like an editor, not a form field: monospace, no
   autocorrect, and enough height to hold a CTE without scrolling. */

.dojo-status {
  display: flex; align-items: center; gap: 9px;
  margin: 4px 0 18px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2);
  font-size: 12.5px; color: var(--muted);
}
.dojo-status.ok { border-color: var(--accent-fill); color: var(--ink-2); }
.dojo-status.ok .td-dot { background: var(--accent); }
.dojo-status.bad { border-color: var(--warn, #C4663F); color: var(--ink); }

.dojo-ref { display: grid; gap: 8px; margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dojo-tbl {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); font-size: 12.5px; color: var(--muted); min-width: 0;
}
.dojo-tbl b { color: var(--ink); font-size: 13px; margin-right: 6px; }
.dojo-tbl .tiny { overflow-wrap: anywhere; }

.dojo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 0 0 16px; font-size: 13px; color: var(--muted);
}
.dojo-bar b { color: var(--ink); }

.dojo-list { display: grid; gap: 14px; }
.dojo-task {
  padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-2);
}
.dojo-task.solved { border-color: var(--accent-fill); }
.dojo-head { display: flex; gap: 12px; align-items: flex-start; }
.dojo-n {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; flex: 0 0 auto;
}
.dojo-t { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.dojo-ask { margin: 12px 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); max-width: 74ch; }

.dojo-ed {
  width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  padding: 12px 14px; border-radius: 10px;
  background: var(--inputs, var(--panel-2)); color: var(--ink);
  border: 1px solid var(--line);
}
.dojo-ed:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.dojo-ed::placeholder { color: var(--dim); }

.dojo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.dojo-hint, .dojo-model { display: none; margin-top: 12px; }
.dojo-hint.show, .dojo-model.show { display: block; }
.dojo-hint {
  padding: 11px 13px; border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0;
  background: var(--panel-2); font-size: 13px; line-height: 1.6; color: var(--ink-2);
}
.dojo-code {
  margin: 0; padding: 12px 14px; border-radius: 9px; overflow-x: auto;
  background: var(--panel-2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.dojo-out { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.dojo-out.bad { color: var(--ink); }
.dojo-verdict { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; }
.dojo-verdict.ok { color: var(--ink); }
.dojo-verdict.bad { color: var(--ink); }
.dojo-verdict code {
  font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--line); overflow-wrap: anywhere;
}
.dojo-table { margin: 6px 0 0; }
.dojo-table table { font-size: 12.5px; }
.dojo-table th { font-family: var(--mono); font-size: 11px; text-transform: none; letter-spacing: 0; }

@media (max-width: 860px) {
  .dojo-task { padding: 14px; }
  .dojo-ref { grid-template-columns: 1fr; }
  .dojo-ed { min-height: 110px; font-size: 12px; }
}

/* ---------- chart lab ----------
   The charts are drawn to look like the ones in the chapters, including the
   defective ones, so they use real ink colours rather than the panel tokens. */

.lab-chart {
  margin: 14px 0 6px; padding: 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.lab-svg { width: 100%; height: auto; display: block; }
.lab-bg { fill: var(--panel-2); }
.lab-grid { stroke: var(--line-soft, var(--line)); stroke-width: 1; opacity: 0.7; }
.lab-axis { stroke: var(--dim); stroke-width: 1; }
.lab-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; }
.lab-line2 { fill: none; stroke: #E4572E; stroke-width: 2.4; stroke-dasharray: 6 4; stroke-linejoin: round; }
.lab-claim { fill: var(--panel-2); stroke: var(--line); }
.lab-big { font-family: var(--mono); font-size: 58px; font-weight: 700; fill: var(--accent); }
.lab-title { font-size: 14px; font-style: italic; fill: var(--ink); }
.lab-t { font-size: 12px; fill: var(--muted); }
.lab-t-small { font-size: 11px; fill: var(--muted); }
text.lab-t, text.lab-t-small, text.lab-title { font-family: var(--mono); }

.lab-opts { display: grid; gap: 8px; margin: 4px 0 0; }
.lab-opt {
  text-align: left; font: inherit; font-size: 13px; line-height: 1.5;
  padding: 11px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2);
}
.lab-opt:hover:not([disabled]) { border-color: var(--accent-fill); color: var(--ink); }
.lab-opt[disabled] { cursor: default; }
.lab-opt.right { border-color: var(--accent-fill); background: var(--accent-soft); color: var(--ink); }
.lab-opt.wrong { border-color: #C4663F; color: var(--ink); }
.lab-opt.quiet { opacity: 0.55; }
.lab-opt.on { border-color: var(--accent-fill); background: var(--accent-soft); color: var(--ink); }
.lab-opt.missed { border-style: dashed; border-color: var(--accent-fill); color: var(--ink-2); }

/* pick-five: fourteen metrics on tiles, five of them belong */
.pick-grid { display: grid; gap: 8px; margin: 10px 0 0; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.pick-tile {
  text-align: left; font: inherit; font-size: 12.5px; line-height: 1.45; padding: 10px 12px;
  border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2);
}
.pick-tile:hover { border-color: var(--accent-fill); color: var(--ink); }
.pick-tile b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 2px; }
.pick-tile .pv { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.pick-tile.on, .pick-tile.right { border-color: var(--accent-fill); background: var(--accent-soft); }
.pick-tile.wrong { border-color: #C4663F; }
.pick-tile.missed { border-style: dashed; border-color: var(--accent-fill); }
.pick-tile.quiet { opacity: 0.5; }
.pick-count { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

@media (max-width: 860px) {
  .lab-chart { padding: 4px; }
  .lab-opt { font-size: 12.5px; padding: 10px 11px; }
}

/* ---------- chart evidence in the DEEPP rubric ----------
   The chart is graded as four decisions plus a title, so the controls have to look
   like decisions rather than a form. The preview sits below them, always live. */

.ce { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.ce-head { margin-bottom: 12px; }
.ce-k { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.ce-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ce-q { display: block; }
.ce-ask { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 6px; }
.ce-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-btn {
  font: inherit; font-size: 12px; line-height: 1.3; padding: 7px 11px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2);
}
.ce-btn:hover { border-color: var(--accent-fill); color: var(--ink); }
.ce-btn.on { border-color: var(--accent-fill); background: var(--accent-soft); color: var(--ink); }
.ce-title { display: block; margin: 14px 0 0; }
.ce-title span { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 6px; }
.ce-title input {
  width: 100%; font: inherit; font-size: 13px; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
}
.ce-title input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.ce-preview { margin: 14px 0 0; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.ce-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ce-shot { display: grid; gap: 12px; grid-template-columns: 1fr 220px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ce-thumb img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.ce .dojo-model { margin-top: 10px; }
.ce-teach { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ce-teach .rv-ai { flex: 1 1 100%; }
@media (max-width: 720px) { .ce-shot { grid-template-columns: 1fr; } }

/* ---------- pitch planner in the DEEPP rubric ----------
   The clock is the whole point, so the total is a bar that moves as she types, with
   a mark at 4:30 — the point below which five minutes reads as a thin pitch. */

.cp { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.cp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.cp-track { position: relative; flex: 1 1 240px; height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.cp-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent-fill); transition: width .16s ease; }
.cp-fill.over { background: #c2503f; }
.cp-fill.under { background: #b98a2f; }
.cp-goal { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--dim); opacity: .6; }
.cp-nums { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cp-nums.ok { color: var(--muted); }
.cp-nums.over { color: #c2503f; }
.cp-nums.under { color: #b98a2f; }
.cp-table { display: grid; gap: 6px; }
.cp-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) 62px 70px 44px; gap: 6px; align-items: center; }
.cp-hr { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.cp-n { font-size: 11px; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.cp-r input {
  width: 100%; font: inherit; font-size: 12.5px; padding: 7px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
}
.cp-r input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.cp-r input.cp-s, .cp-r input.cp-w { text-align: right; font-variant-numeric: tabular-nums; }
.cp-p { font-size: 11.5px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.cp-p.ok { color: var(--muted); }
.cp-p.warn { color: #b98a2f; }
.cp-field { display: block; margin-top: 14px; }
.cp-field > span { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink); margin-bottom: 6px; }
.cp-field > span em { font-style: normal; font-size: 11px; color: var(--dim); }
.cp-ta {
  width: 100%; font: inherit; font-size: 12.5px; line-height: 1.55; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); resize: vertical;
}
.cp-ta:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.cp-out.stale { opacity: .55; }
.cp-out.stale::before { content: "Edited since grading — grade the plan again."; display: block; font-size: 11px; color: var(--dim); margin-bottom: 6px; }
@media (max-width: 720px) {
  .cp-r { grid-template-columns: 20px minmax(0, 1fr) 54px 60px 38px; gap: 4px; }
  .cp-r input { font-size: 12px; padding: 6px 7px; }
}

/* ---------- hostile-stakeholder Q&A ----------
   The question is the loudest thing in the block, because in the room it is the
   only thing she does not control. */

.qa { margin-top: 18px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.qa-card { margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--accent-fill); background: var(--accent-soft); }
.qa-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.qa-q { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.qa .dojo-model { margin-top: 10px; }
.qa .rv-ai:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- M4 audience strip and consultation log ---------- */

.m4-brief { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.m4-k { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.m4-brief b { font-size: 13px; line-height: 1.35; }

.sk { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.sk-row { display: grid; grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 6px; align-items: center; margin-bottom: 6px; }
.sk-hr { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.sk-row input { width: 100%; font: inherit; font-size: 12.5px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
.sk-row input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 720px) {
  .sk-row { grid-template-columns: 20px minmax(0, 1fr); }
  .sk-hr { display: none; }
  .sk-row input { grid-column: 2; }
}

/* The complete gate: shut until three consultation changes are logged. */

.gate { margin: 0 0 12px; padding: 11px 13px; border-radius: 11px; border: 1px solid #b98a2f; background: rgba(185, 138, 47, .10); }
.gate.open { border-color: var(--accent-fill); background: var(--accent-soft); }
.gate-k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #b98a2f; margin-bottom: 3px; }
.gate.open .gate-k { color: var(--accent); }
.gate b { font-size: 13px; }
.gate p { color: var(--muted); }
.warnline { color: #b98a2f; }
.rv-self input:disabled { opacity: .5; cursor: not-allowed; }
