/* On Call: the Academy's screens. An engineering tool, not a landing page: left-aligned, the full width, mono for labels, data and
   navigation, a plain sans for prose only, hairline rules, 2 to 4px radii, no shadows or gradients. One accent (--acc, the blue the
   terminal already uses for a path), used for the selected row, the next step and focus; status colours only ever mean status.
   Every id and class the check scripts read stays. Motion: functional only (a cursor, a rule drawing, a row lighting), all × --m. */
.packdots { display: flex; gap: 6px; margin: 10px 0 2px; }
.packdots span { width: 6px; height: 6px; border-radius: 1px; background: var(--acc); opacity: .35; animation: packdot calc(var(--m) * 1.2s + .001s) steps(1, end) infinite; }
.packdots span:nth-child(2) { animation-delay: calc(var(--m) * .4s); } .packdots span:nth-child(3) { animation-delay: calc(var(--m) * .8s); }
@keyframes packdot { 0%, 100% { opacity: .35; } 20%, 50% { opacity: 1; } }
html[data-motion="calm"] .packdots span { animation: none; opacity: .7; }
.row[data-track="server"] .lvl { color: var(--muted); }

/* ── the shell: these three screens use the width ── */
#scrHome.wrap, #scrStart.wrap, #scrAcademy.wrap { max-width: none; padding-inline: 20px; }
#scrHome, #scrStart, #scrAcademy { font-size: 13.5px; }
.ac-h { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line-2); font: 500 12px var(--mono); letter-spacing: .02em; color: var(--muted); }
.ac-h .dim, .ac-h .muted { font-weight: 400; }
.ac-sec:first-of-type .ac-h { margin-top: 14px; }
.tc-n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn.primary .stars .off { color: rgba(255,255,255,.55); opacity: 1; } .btn.primary .stars { color: #fff; } .btn .stars { margin-left: 8px; }

/* parts */
.ac-bar { height: 2px; border-radius: 0; background: var(--surface-3); overflow: hidden; margin: 6px 0; position: relative; }
.ac-bar span { display: block; height: 100%; background: var(--acc); transform-origin: left; animation: bar-draw calc(var(--m) * .6s) ease-out both; }
@keyframes bar-draw { from { transform: scaleX(0); } to { transform: none; } }
.ac-back { display: inline-block; margin: 12px 0 4px; color: var(--muted); font: 500 12.5px var(--mono); }
.ac-back:hover, .ac-back:focus-visible { color: var(--text); }
#scrAcademy [hidden], #doneCard [hidden], #postmortem [hidden], #scnCard [hidden], .packwait [hidden] { display: none !important; }
#scrAcademy > h1, .tp-head h1 { font: 600 20px/1.2 var(--font); margin: 0 0 4px; letter-spacing: 0; }
#scrAcademy > h1 + .muted { font-size: 13.5px; max-width: 72ch; margin: 0 0 10px; }
#scrAcademy > h2 { font: 600 15px var(--font); margin: 22px 0 8px; }

/* ── home: one status line, then rows ── */
.ac-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 4px 0 0; padding: 7px 0; border-bottom: 1px solid var(--line-2); font: 12.5px var(--mono); color: var(--muted); }
.ac-who { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 2px 0; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ac-who:hover .who-title, .ac-who:focus-visible .who-title { color: var(--acc); }
.who-title { font: 500 12.5px var(--mono); color: var(--text); } .who-dry { color: var(--muted); } .who-days { color: var(--dim); }
.who-title::before { content: '●'; color: var(--ok); margin-right: 8px; font-size: 9px; vertical-align: 1px; }
.ac-st { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }
.ac-next { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 8px 0; font-size: 13.5px; }
.ac-next-k { color: var(--acc); font: 600 13px var(--mono); animation: cur-blink calc(var(--m) * 1.2s) steps(2, end) infinite; }
.ac-next-sub { color: var(--text); }
@keyframes cur-blink { 50% { opacity: 0; } }
.ac-today { display: grid; gap: 0; }
.today-tile { display: grid; grid-template-columns: 9ch minmax(0, 1fr) auto; grid-template-areas: 'k v c' 'k d c'; align-items: center; gap: 0 12px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.today-tile:first-child { border-top: 0; }
.today-h { grid-area: k; font: 500 12px var(--mono); color: var(--muted); }
.today-tile > b { grid-area: v; font-weight: 500; font-size: 13.5px; } .today-tile > .dim { grid-area: d; font: 12px var(--mono); }
.today-tile > .btn, .today-row { grid-area: c; justify-self: end; }
.today-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; max-width: 100%; }
.today-row select { max-width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 6px; font: 12px var(--mono); }
.ac-new { color: var(--muted); font: 12.5px var(--mono); margin: 10px 0 0; padding: 6px 0 6px 12px; border-left: 2px solid var(--warn); }
.ac-new .linkish { font-weight: 500; font-family: var(--font); }
.ac-searchbox { margin: 14px 0 0; }
.ac-searchrow { position: relative; }
.ac-search { width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 3px; padding: 7px 40px 7px 10px; font: 13px var(--mono); }
.ac-search::placeholder { color: var(--dim); }
.ac-search:focus { outline: none; border-color: var(--acc); }
.ac-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 0 6px; font: 11px/18px var(--mono); color: var(--dim); border: 1px solid var(--line-2); border-radius: 2px; pointer-events: none; }
.ac-searchrow:focus-within .ac-kbd { display: none; }
.search-out { display: flex; flex-direction: column; gap: 0; margin-top: 4px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-2); max-height: 50vh; overflow-y: auto; scrollbar-width: thin; }
.search-hit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; text-align: left; padding: 6px 10px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.search-hit:first-child { border-top: 0; } .search-hit b { font-weight: 500; font-size: 13.5px; }
.search-hit:hover, .search-hit:focus-visible { background: var(--surface-2); outline: none; box-shadow: inset 2px 0 0 var(--acc); }
.search-hit .dim { font: 12px var(--mono); overflow-wrap: anywhere; }
#searchNone { padding: 8px 10px; margin: 0; font: 12.5px var(--mono); }
.ac-path { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 4px; }
.ac-path .path-l { flex: 1 1 240px; min-width: 0; display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 0 12px; }
.ac-path .path-l b { font-weight: 500; font-size: 13.5px; } .ac-path .path-l .muted { font: 12px var(--mono); } .ac-path .path-l .dim { font-size: 12px; justify-self: end; }
.ac-path .path-l .ac-bar { grid-column: 1 / -1; margin: 6px 0 0; }
/* the tracks: a table, one row each, the name and a line of prose, three numbers, a progress rule */
.ac-tracks { display: grid; grid-template-columns: minmax(0, 1fr) 7ch 8ch 7ch 150px; gap: 0 14px; align-items: center; }
.tc-head, .track-card { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; }
.tc-head { padding: 0 0 5px; font: 500 11.5px var(--mono); color: var(--dim); }
.tc-head .tc-n, .tc-head .tc-bar { text-align: right; }
.track-card { padding: 8px 0; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; position: relative; transition: background .12s; }
.track-card:hover, .track-card:focus-visible { background: var(--surface); outline: none; box-shadow: inset 2px 0 0 var(--acc); padding-left: 10px; margin-left: -10px; }
.tc-name { display: grid; gap: 1px; min-width: 0; }
.track-card b { font-weight: 500; font-size: 13.5px; } .track-say { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.track-card .tc-n { font-size: 12.5px; color: var(--text); text-align: right; } .track-card .tc-n:empty::before { content: '–'; }
.tc-bar { display: grid; grid-template-columns: minmax(0, 1fr) 4ch; align-items: center; gap: 8px; }
.tc-bar .ac-bar { margin: 0; } .track-count { font: 11.5px var(--mono); color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.ac-more, .ac-drills { display: grid; gap: 0; }
.more-tile { display: grid; grid-template-columns: 14ch minmax(0, 1fr) auto; align-items: baseline; gap: 0 14px; text-align: left; padding: 8px 0; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.more-tile:first-child { border-top: 0; }
.more-tile:hover, .more-tile:focus-visible { background: var(--surface); outline: none; box-shadow: inset 2px 0 0 var(--acc); padding-left: 10px; margin-left: -10px; }
.more-tile b { font: 500 12.5px var(--mono); } .more-tile span { color: var(--muted); font-size: 13px; } .more-tile .dim { color: var(--dim); font-size: 12px; text-align: right; }
.ac-drills { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; } .ac-drills .more-tile { grid-template-columns: minmax(0, 1fr) auto; } .ac-drills .more-tile b { grid-column: 1 / -1; font-family: var(--font); font-size: 13.5px; }

/* ── first start: the onboarding record beside the table of starting paths ── */
.first { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 28px 40px; align-items: start; margin: 18px 0; }
.fs-banner { font: 12.5px/1.6 var(--mono); color: var(--text); padding: 12px 14px 10px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-2); }
.fs-title { color: var(--muted); padding-bottom: 7px; margin-bottom: 7px; border-bottom: 1px solid var(--line-2); font-weight: 500; }
.fs-line, .fs-cursor { display: grid; grid-template-columns: 11ch minmax(0, 1fr); gap: 0 10px; }
.fs-k { color: var(--dim); } .fs-v { color: var(--text); overflow-wrap: anywhere; }
.fs-cursor { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); }
.cur-blink { color: var(--acc); animation: cur-blink calc(var(--m) * 1.1s) steps(2, end) infinite; }
.fs-pick { min-width: 0; }
.choices { display: grid; grid-template-columns: 3ch minmax(0, 1.1fr) minmax(0, 1.6fr) 7ch 8ch 7ch; column-gap: 14px; align-items: baseline; }
.fs-th, .choice { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline; }
.fs-th { padding: 0 0 6px; font: 500 11.5px var(--mono); color: var(--dim); border-bottom: 1px solid var(--line-2); }
.fs-th .ch-c { text-align: right; }
.choice { padding: 9px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: background .1s; }
.choice:first-of-type { border-top: 0; }
.ch-n { font: 500 12px var(--mono); color: var(--dim); } .ch-name { font-weight: 500; font-size: 13.5px; } .ch-say { color: var(--muted); font-size: 13px; line-height: 1.35; }
.ch-c { font: 12.5px var(--mono); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; } .ch-c:empty::before { content: '–'; color: var(--dim); }
.choice:hover { background: var(--surface); }
.choice:focus, .choice:focus-visible { outline: none; background: var(--surface-2); box-shadow: inset 2px 0 0 var(--acc); }
.choice:focus .ch-n, .choice:focus-visible .ch-n { color: var(--acc); }
.fs-hint { margin: 8px 0 0; font: 11.5px var(--mono); text-align: right; }
.fs-foot { margin: 14px 0 0; font: 12.5px var(--mono); } .fs-foot .linkish { font: inherit; color: var(--muted); } .fs-foot .linkish:hover, .fs-foot .linkish:focus-visible { color: var(--acc); text-decoration: underline; }

/* ── a track: a dense list, done / next / ahead, the problems beneath ── */
.tp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 6px; }
.tp-meta { font: 12.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-say { margin: 2px 0 8px; font-size: 13px; max-width: 80ch; }
#trackBar { max-width: 520px; margin: 0; }
.ac-lessonpath.lessons { display: grid; grid-template-columns: 2ch 3ch minmax(0, 1fr) 7ch; gap: 0 12px; margin: 0; counter-reset: none; }
.ac-lessonpath .lesson-b { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline; padding: 7px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.35; text-align: left; position: relative; transition: background .1s; }
.ac-lessonpath .lesson-b:first-child { border-top: 0; }
.ac-lessonpath .lesson-b::before, .ac-lessonpath .lesson-b::after { content: none; }
.ac-lessonpath .lesson-b:hover, .ac-lessonpath .lesson-b:focus-visible { background: var(--surface); outline: none; box-shadow: inset 2px 0 0 var(--acc); }
.lb-st { font: 500 12.5px var(--mono); color: var(--dim); text-align: center; } .lb-n { font: 12px var(--mono); color: var(--dim); }
.lb-body { display: grid; gap: 1px; min-width: 0; } .lb-t { font-weight: 500; } .lb-d { font: 12px var(--mono); } .lb-m { font-size: 12px; color: var(--muted); text-align: right; }
.ac-lessonpath .lesson-b.done .lb-st { color: var(--ok); } .ac-lessonpath .lesson-b.done .lb-t { color: var(--muted); font-weight: 400; }
.ac-lessonpath .lesson-b.next .lb-st { color: var(--acc); animation: cur-blink calc(var(--m) * 1.2s) steps(2, end) infinite; } .ac-lessonpath .lesson-b.next { background: color-mix(in srgb, var(--acc) 5%, transparent); box-shadow: inset 2px 0 0 var(--acc); } .ac-lessonpath .lesson-b.next .lb-n { color: var(--acc); }
.lesson-b.next { border-color: var(--line); }
.lesson-needs { display: block; color: var(--dim); font: 11.5px var(--mono); margin-top: 1px; }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.fchip { padding: 2px 8px; border-radius: 2px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); font: 12px var(--mono); cursor: pointer; transition: border-color .1s, color .1s, background .1s; }
.fchip:hover { color: var(--text); border-color: var(--line-3); } .fchip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--text); }
.row-skills { font: 11.5px var(--mono); margin: 2px 0 0; }
.nodes-note { font: 11.5px var(--mono); color: var(--dim); margin-top: 10px; }

/* ── the small jobs: dense rows by track, nothing that is not a line of text and a mode ── */
#smallBar { max-width: 520px; margin: 0 0 4px; }
#smallNext.ac-next { border-bottom: 1px solid var(--line); }
#smallBoard .ac-h { margin-top: 16px; }
.sj-list { display: grid; grid-template-columns: 2ch minmax(0, 1fr) 7ch auto; gap: 0 12px; }
.sj-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; }
.sj-row:first-child { border-top: 0; }
.sj-row.next { background: color-mix(in srgb, var(--acc) 5%, transparent); box-shadow: inset 2px 0 0 var(--acc); }
.sj-st { font: 500 12.5px var(--mono); color: var(--dim); text-align: center; } .sj-row.done .sj-st { color: var(--ok); } .sj-row.next .sj-st { color: var(--acc); }
.sj-body { display: grid; gap: 1px; min-width: 0; } .sj-t { font-weight: 500; font-size: 13.5px; } .sj-row.done .sj-t { color: var(--muted); font-weight: 400; } .sj-d { font: 12px var(--mono); color: var(--muted); }
.sj-m { font-size: 12px; color: var(--muted); text-align: right; }
.sj-row .modes { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; }
.sj-row .mode-b { padding: 2px 8px; font: 12px var(--mono); white-space: nowrap; }
@media (max-width: 760px) {
  .sj-list { grid-template-columns: 2ch minmax(0, 1fr) 6ch; }
  .sj-row .modes { grid-column: 2 / -1; margin-top: 4px; flex-wrap: wrap; justify-content: flex-start; }
  .sj-row .mode-b { flex: 1 1 auto; }
}

/* ── paths, exams ── */
/* paths and exams: one row each */
.ac-paths { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 8px; border-top: 1px solid var(--line-2); }
.path-card { display: grid; grid-template-columns: 200px minmax(0, 1fr) 170px auto; grid-template-areas: 'n s b a' 'n s c a'; align-items: center; column-gap: 16px; row-gap: 2px; padding: 9px 0 9px 10px; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; min-width: 0; }
.path-card:first-child { border-top: 0; }
.path-card > b { grid-area: n; font-weight: 500; font-size: 13.5px; }
.path-card.on { box-shadow: inset 2px 0 0 var(--acc); background: color-mix(in srgb, var(--acc) 4%, transparent); } .path-card p { grid-area: s; margin: 0; font-size: 12.5px; color: var(--muted); } .path-card .ac-bar { grid-area: b; margin: 0; align-self: end; } .path-card > .dim { grid-area: c; font: 11.5px var(--mono); align-self: start; } .path-card .actions { grid-area: a; margin: 0; justify-content: flex-end; }
.path-card .tag { font: 500 12px var(--mono); color: var(--acc); padding: 3px 0; }
#examList .path-card { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: 'n s a'; }
.ac-pathlist { padding-left: 22px; } .ac-pathlist li { margin: 4px 0; } .ac-pathlist li.done .linkish { color: var(--muted); } .ac-pathlist li.next .linkish { color: var(--acc); }
.ac-pathlist .linkish { text-align: left; }

/* ── the skills board ── */
.ac-sugg { display: grid; gap: 0; margin-bottom: 12px; }
.sugg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; text-align: left; padding: 7px 0 7px 12px; background: none; border: 0; border-top: 1px solid var(--line); border-left: 2px solid var(--acc); color: var(--text); font: inherit; cursor: pointer; }
.sugg:first-child { border-top: 0; } .sugg b { font-weight: 500; }
.sugg span { color: var(--muted); font-size: 12.5px; } .sugg:hover, .sugg:focus-visible { background: var(--surface); outline: none; }
.ac-skills { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.skill { position: relative; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 6px 0 6px 12px; min-width: 0; }
.skill::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 1px; background: var(--line-3); }
.skill.st-solid::before { background: var(--ok); } .skill.st-going::before { background: var(--acc); } .skill.st-again::before { background: var(--warn); }
.skill[open] { grid-column: 1 / -1; background: var(--bg-2); }
.skill summary { display: grid; grid-template-columns: minmax(0, 1fr) 16ch 14ch; align-items: baseline; gap: 2px 12px; cursor: pointer; list-style: none; } .skill summary::-webkit-details-marker { display: none; }
.skill[open] { grid-column: auto; }
.skill summary b { font-weight: 500; font-size: 13.5px; }
.skill-word { font: 12px var(--mono); color: var(--muted); } .skill-n { font: 12px var(--mono); margin-left: 0; white-space: nowrap; text-align: right; grid-column: 3; }
.skill.st-solid .skill-word { color: var(--ok); } .skill.st-going .skill-word { color: var(--acc); } .skill.st-again .skill-word { color: var(--warn); }
.skill p { margin: 6px 0 4px; font-size: 13px; } .skills-more { margin-top: 16px; } .skills-more summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .skills-more summary::-webkit-details-marker { display: none; } .skills-more summary::before { content: '▸'; color: var(--acc); font: 12px var(--mono); transition: transform .12s; } .skills-more[open] summary::before { transform: rotate(90deg); } .skills-more h2 { display: inline; margin: 0; font: 600 15px var(--font); }
.skill-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 6px; margin-bottom: 4px; } .skill-list .linkish { text-align: left; font: 12px var(--mono); padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--text); } .skill-list .linkish:hover { border-color: var(--acc); }

/* ── the staff record ── */
.ac-prof { margin: 6px 0 10px; padding: 10px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.ac-prof h1 { margin: 0; font: 600 20px var(--font); } .ac-prof p { margin: 2px 0; } .ac-prof > .dim:first-child { font: 500 11.5px var(--mono); letter-spacing: .02em; }
#careerBar { height: 2px; max-width: 520px; } #careerNext { margin: 2px 0 14px; font: 12.5px var(--mono); }
.ac-streak { margin: 12px 0; color: var(--muted); } .ac-sync { margin-top: 14px; }
.ac-keys { margin: 14px 0; } .ac-keys summary { cursor: pointer; color: var(--muted); }

/* ── a row of runs: the pager between pages ── */
.sh-row { display: grid; grid-template-columns: 9ch minmax(0, 1fr); align-items: start; gap: 0 14px; padding: 8px 0; border-top: 1px solid var(--line); } .sh-row:first-of-type { border-top: 1px solid var(--line-2); margin-top: 8px; }
.sh-k { font: 500 12px var(--mono); color: var(--muted); padding-top: 4px; }
#shiftNote { font: 12.5px var(--mono); margin: 10px 0; }
.seq-stat.low b { color: var(--bad); }
.seq-pager { max-width: 640px; margin: 18px 0; padding: 0; text-align: left; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-2); }
.seq-pager > .dim:first-child { display: block; margin: 0; padding: 6px 14px; font: 500 11.5px var(--mono); letter-spacing: .04em; color: #fff; background: var(--bad-strip, #a8322b); }
.seq-pager h1 { font: 600 18px var(--font); margin: 12px 14px 2px; } .seq-pager h1 + .muted { margin: 0 14px 10px; font: 12.5px var(--mono); }
.seq-pager .actions { justify-content: flex-start; gap: 6px; margin: 0; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
/* the budget: a health rule. The track carries the colours, the span's width says how much is left and covers the rest */
.seq-budget { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; margin: 0; padding: 10px 14px 12px; text-align: left; font: 12px var(--mono); color: var(--muted); border-top: 1px solid var(--line); }
.seq-budget > span { grid-column: 1; }
.seq-budget b { grid-column: 2; grid-row: 1 / span 2; color: var(--text); font: 500 18px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seq-budget .ac-bar { grid-column: 1; margin: 0; height: 8px; border-radius: 1px; background: var(--surface-3); }
.seq-budget .ac-bar::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bad) 0 30%, var(--warn) 30% 60%, var(--ok) 60%); transform-origin: left; animation: bar-draw calc(var(--m) * .8s) ease-out both; }
.seq-budget .ac-bar span { position: relative; height: 100%; background: transparent; animation: none; }
.seq-budget .ac-bar span::after { content: ''; position: absolute; left: 100%; top: 0; bottom: 0; width: 300vw; background: var(--surface-3); }
.seq-budget .ac-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--bg) calc(10% - 1px) 10%); pointer-events: none; }
.seq-banner { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 6px 10px; margin-bottom: 12px; font: 12.5px var(--mono); border: 1px solid var(--line-2); border-left: 2px solid var(--acc); border-radius: 0 3px 3px 0; }
/* the shift report, the exam result: a page of the record */
.seq-report { margin-top: 10px; } .seq-report > .dim:first-child { font: 500 11.5px var(--mono); letter-spacing: .02em; margin: 0 0 8px; } .seq-report h1 { font: 600 20px var(--font); margin-bottom: 4px; } .seq-report h1 + .muted { font-size: 13.5px; margin: 0 0 14px; }
#shiftTable { margin: 6px 0 14px; max-width: 760px; } .stars-cell { color: var(--warn); white-space: nowrap; letter-spacing: 1px; }
table.plain { max-width: 100%; }

/* ── the certificate: the one piece of paper in the tool, kept plain ── */
.cert-wrap { margin: 16px 0; max-width: 760px; }
.cert-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font: 12.5px var(--mono); }
.cert-form input { flex: 1 1 180px; min-width: 0; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 3px; padding: 6px 9px; font: 13px var(--mono); }
.certificate { padding: 22px 26px 20px; background: #f4f4f1; color: #16191d; border: 1px solid #16191d; border-radius: 0; text-align: left; font: 13px/1.5 var(--mono); }
.certificate p { margin: 0; } .cert-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; } .cert-co { font: 600 15px var(--mono); letter-spacing: .04em; } .cert-rec { font-size: 12px; color: #5b6168; } .cert-small { font-size: 12px; color: #5b6168; margin: 2px 0 12px; padding-bottom: 10px; border-bottom: 1px solid #16191d; }
.cert-grid { display: grid; gap: 0; } .cert-row { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: 0 14px; padding: 6px 0; border-top: 1px solid #d3d5d8; align-items: baseline; } .cert-row:first-child { border-top: 0; } .cert-k { color: #5b6168; font-size: 12px; }
.cert-name { display: block; font: 600 18px/1.3 var(--mono); overflow-wrap: anywhere; } .cert-title { font: 600 15px/1.3 var(--mono); } .cert-num { font-variant-numeric: tabular-nums; }
.cert-fine { font-size: 11.5px; color: #5b6168; margin-top: 14px; padding-top: 10px; border-top: 1px solid #16191d; }
@media print { body:has(#certificate) * { visibility: hidden; } body:has(#certificate) .certificate, body:has(#certificate) .certificate * { visibility: visible; } body:has(#certificate) .certificate { position: absolute; left: 0; top: 0; width: 100%; box-sizing: border-box; } }

/* ── lessons' decks, postmortem extras ── */
.deck-offer { margin: 12px 0; padding: 8px 12px; border: 1px solid var(--line-2); border-left: 2px solid var(--acc); border-radius: 0 3px 3px 0; } .deck-offer h3 { margin: 0 0 4px; font: 500 12.5px var(--mono); color: var(--muted); }
.deck-list { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; } .deck-list code { overflow-wrap: anywhere; }
.replay { margin: 20px 0; } .replay-chart { margin-bottom: 8px; }
.replay-mark { stroke: var(--warn); stroke-width: 1.5; }
.replay-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; } .replay-head { margin: 0; color: var(--muted); font: 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.replay-cmd { display: block; padding: 8px 10px 6px; background: var(--term-bg); color: var(--term-fg-bright); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 3px 3px 0 0; margin-top: 8px; font: 13px/1.4 var(--mono); overflow-wrap: anywhere; cursor: default; }
.replay-cmd::after { display: none; }
.replay-out { padding: 4px 10px 8px; background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--line-2); border-top: 1px dashed var(--line); border-radius: 0 0 3px 3px; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.replay-text { margin: 0; font: 12.5px/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; } .replay-text.err { color: var(--term-err); }
.replay-out .dim { color: var(--term-dim); margin: 2px 0; font-size: 12.5px; }
.replay-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .replay-ctl input { flex: 1; min-width: 40px; }
.pm-words { width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 3px; padding: 8px 10px; font: inherit; resize: vertical; }
.pm-sharebox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; } .pm-share { flex: 1 1 220px; min-width: 0; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line-2); border-radius: 3px; padding: 6px 9px; font: 12.5px var(--mono); }

/* ── drills ── */
.drill-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#drillCount { font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.drill-body { max-width: 760px; }
/* the sign as a type specimen: big, between two dim reference letters that give it a baseline and an x-height, so ; and i, : and ., ' and ` cannot be mistaken; its name and code point beneath */
.drill-specimen { display: inline-grid; grid-template-columns: auto auto auto; align-items: baseline; column-gap: 6px; margin: 10px 0 4px; padding: 10px 18px 8px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 3px; font: 400 72px/1.1 var(--mono); position: relative; }
.drill-specimen::before { content: ''; position: absolute; left: 10px; right: 10px; top: 50%; border-top: 1px dashed var(--line-2); pointer-events: none; }
.drill-ref { color: var(--line-3); font: inherit; user-select: none; }
.drill-big { display: inline; margin: 0; padding: 0; font: inherit; color: var(--text); background: none; border: 0; min-width: 1ch; text-align: center; }
.drill-code { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.drill-means { margin: 4px 0 8px; font-size: 13px; max-width: 70ch; }
.drill-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 28px; margin: 8px 0; }
.drill-input { display: block; width: min(180px, 100%); box-sizing: border-box; margin: 10px 0; padding: 8px 12px; background: var(--term-bg); color: var(--term-fg-bright); border: 1px solid var(--line-2); border-radius: 3px; font: 16px var(--mono); caret-color: var(--term-fg); }
.drill-input.wide { width: 100%; }
.drill-input:focus { outline: none; border-color: var(--acc); }
.drill-say { color: var(--muted); min-height: 22px; font-size: 13.5px; } .drill-say p { margin: 4px 0; }
.drill-say .okc, .okc.drill-yes { color: var(--ok); font: 500 13.5px var(--mono); }
.drill-line { display: block; position: relative; padding: 10px 12px 10px 30px; background: var(--term-bg); color: var(--term-dim); border: 1px solid var(--line-2); border-radius: 3px; font: 16px/1.5 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; }
.drill-line::before { content: '$'; position: absolute; left: 12px; top: 10px; color: var(--term-prompt); }
.dl-done { color: var(--term-fg-bright); }
.dl-next { color: var(--term-bg); background: var(--term-fg-bright); animation: cur-block calc(var(--m) * 1.1s) steps(2, end) infinite; }
@keyframes cur-block { 50% { background: transparent; color: var(--term-fg-bright); box-shadow: inset 0 -2px 0 var(--term-fg-bright); } }
.drill-ask { display: block; font: 16px/1.4 var(--mono); padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-left: 2px solid var(--acc); border-radius: 0 3px 3px 0; overflow-wrap: anywhere; margin: 6px 0 10px; } .drill-ask.plain { font: 15px/1.45 var(--font); }
.drill-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; margin: 8px 0; }
.drill-opt { position: relative; text-align: left; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 3px; color: var(--text); font: inherit; cursor: pointer; min-width: 0; overflow-wrap: anywhere; transition: border-color .1s, background .1s; }
.drill-opt:hover:not(:disabled), .trace-line:hover:not(:disabled) { border-color: var(--acc); }
.drill-opt.yes, .trace-line.yes { border-color: var(--ok); background: var(--ok-soft); }
.drill-opt.yes { padding-right: 30px; } .drill-opt.yes::after { content: '✓'; position: absolute; right: 10px; top: 8px; color: var(--ok); font: 500 13px var(--mono); }
.drill-opt.not, .trace-line.not { border-color: var(--line-3); opacity: .6; }
.drill-opt:disabled, .trace-line:disabled { cursor: default; color: var(--text); }
.drill-trace { display: flex; flex-direction: column; gap: 1px; margin: 8px 0; padding: 6px; background: var(--term-bg); border: 1px solid var(--line-2); border-radius: 3px; }
.trace-line { text-align: left; padding: 4px 8px; background: transparent; color: var(--term-fg); border: 1px solid transparent; border-radius: 2px; font: 12.5px/1.45 var(--mono); cursor: pointer; overflow-wrap: anywhere; white-space: pre-wrap; }
.trace-line:hover:not(:disabled) { background: var(--term-sel); }
.drill-diff code { padding: 1px 4px; border-radius: 2px; } .dw-missing { outline: 1px dashed var(--warn); color: var(--warn); } .dw-extra { color: var(--muted); text-decoration: line-through; } .dw-same { color: var(--text); }
.kb-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font: 12.5px var(--mono); color: var(--muted); }
.drill-done { margin: 8px 0 14px; padding: 10px 0 0; border-top: 1px solid var(--line-2); }
.drill-done h2 { margin: 0 0 2px; font: 600 18px var(--font); } .drill-done p { margin: 0; }
.dd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; margin-top: 10px; background: var(--line-2); border: 1px solid var(--line-2); max-width: 520px; }
.dd-cell { background: var(--bg); padding: 8px 10px; } .dd-cell b { display: block; font: 500 16px var(--mono); font-variant-numeric: tabular-nums; } .dd-cell span { font: 11.5px var(--mono); color: var(--muted); }
.drill-say .okc::before { content: '✓ '; }

@media (max-width: 860px) {
  #scrHome.wrap, #scrStart.wrap, #scrAcademy.wrap { padding-inline: 14px; }
  .first { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 10px 0; }
  .choices { grid-template-columns: 2.5ch minmax(0, 1fr) 5ch 5ch 6ch; column-gap: 8px; }
  .fs-th .ch-say, .choice .ch-say { grid-column: 2 / -1; grid-row: 2; font-size: 12px; }
  .fs-th .ch-say { display: none; }
  .ch-name { font-size: 13px; }
  .ac-tracks { grid-template-columns: minmax(0, 1fr) 5ch 5ch 6ch; column-gap: 8px; }
  .tc-head .tc-bar, .track-card .tc-bar { grid-column: 1 / -1; grid-row: 2; }
  .tc-head .tc-bar { display: none; } .track-card .tc-bar { margin-top: 4px; }
  .track-say { display: none; }
  .ac-status .ac-st { margin-left: 0; width: 100%; }
  .today-tile { grid-template-columns: 7ch minmax(0, 1fr); grid-template-areas: 'k v' 'k d' 'k c'; } .today-tile > .btn, .today-row { justify-self: start; margin-top: 4px; }
  .more-tile { grid-template-columns: minmax(0, 1fr) auto; } .more-tile b { grid-column: 1; } .more-tile > span:not(.dim) { grid-column: 1 / -1; grid-row: 2; font-size: 12.5px; }
  .ac-lessonpath.lessons { grid-template-columns: 2ch 3ch minmax(0, 1fr) 6ch; column-gap: 8px; }
  .btn.primary .stars .off { color: rgba(255,255,255,.55); opacity: 1; }
  .ac-path .path-l { grid-template-columns: auto 1fr; } .ac-path .path-l .dim { grid-column: 1 / -1; justify-self: start; }
  .skill summary { grid-template-columns: minmax(0, 1fr) auto; } .skill-n { grid-column: 1 / -1; text-align: left; }
  .path-card, #examList .path-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'n' 's' 'b' 'c' 'a'; padding-left: 0; } .path-card.on { padding-left: 10px; } .path-card .actions { justify-content: flex-start; margin-top: 4px; }
  .sh-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .drill-specimen { font-size: 56px; padding: 8px 14px 6px; }
  .seq-budget b { font-size: 16px; }
}
html[data-motion="calm"] .ac-next-k, html[data-motion="calm"] .cur-blink, html[data-motion="calm"] .ac-lessonpath .lesson-b.next .lb-st, html[data-motion="calm"] .ac-bar span, html[data-motion="calm"] .seq-budget .ac-bar::before, html[data-motion="calm"] .dl-next { animation: none !important; }
@media print { .ac-back, .cert-form, .seq-pager .actions { display: none !important; } }
