/* Calm, plain, and large. The student side is read by a nervous fourteen-year-old
   at an unfamiliar laptop (§11 risk 2), so nothing here counts down, fills up,
   turns red, or otherwise suggests they are doing badly. */

:root {
  --ink:        #16202a;
  --ink-soft:   #3d4a57;
  --muted:      #6a7784;
  --line:       #e2e7ec;
  --line-soft:  #eef2f5;
  --bg:         #f4f6f9;
  --card:       #ffffff;
  --accent:     #2a6fc4;
  --accent-ink: #21598f;
  --ok:         #1baf7a;
  --no:         #e34948;
  --flag:       #c98a1c;

  --radius:     14px;
  --shadow-sm:  0 1px 2px rgba(19, 32, 45, .05);
  --shadow-md:  0 2px 10px rgba(19, 32, 45, .07);
  --shadow-lg:  0 12px 38px rgba(19, 32, 45, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 12% -8%, #eaf1fa 0%, transparent 62%),
    radial-gradient(900px 480px at 92% 4%, #eaf7f1 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
}

main { width: 100%; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 44px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.page { max-width: 1180px; margin: 0 auto; padding: 34px 26px 72px; }

/* ------------------------------------------------------------------ brand */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  font-size: 1.06rem;
  letter-spacing: -.01em;
  margin: 0 0 26px;
}
.brand span { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.brand a { color: inherit; text-decoration: none; }
.mark { flex: 0 0 auto; border-radius: 8px; box-shadow: var(--shadow-sm); }

h1 { font-size: 1.55rem; line-height: 1.25; letter-spacing: -.018em; margin: 0 0 12px; }
h2 {
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 34px 0 12px;
}

.lede { color: var(--ink-soft); margin: 0 0 26px; max-width: 60ch; }
.hint { color: var(--muted); font-size: .86rem; margin: 10px 0 0; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- forms */

label {
  display: block;
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 20px 0 7px;
}

input[type="text"], input[type="search"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 12px 15px;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color .14s, box-shadow .14s;
}

select[multiple] { min-height: 250px; }

/* ------------------------------------------------------- groups / matching */

.groups-page { max-width: 1100px; }
.groups-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.groups-layout > section, .group-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm);
}
.groups-layout > section > h2 { margin-top: 4px; }
.group-card { margin-top: 10px; box-shadow: none; }
.group-card p { margin: 4px 0; }
.group-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.match { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 10px; }
.match-ok { border-left: 3px solid var(--ok); }
.match-no { border-left: 3px solid var(--no); }
.match-head { display: flex; justify-content: space-between; gap: 12px; }
.match p { margin: 6px 0 0; }
.match-veto { color: #a22f2d; }
.assignment-current { background: #edf8f3; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.assignment-current p { margin: 3px 0 0; }
.assign-form { display: grid; grid-template-columns: .7fr 1.4fr auto; gap: 8px; margin-top: 12px; }
.assign-form button { margin: 0; padding: 9px 14px; }
.assign-form input { padding: 9px 11px; }

@media (max-width: 760px) {
  .groups-layout { grid-template-columns: 1fr; }
  .group-fields { grid-template-columns: 1fr; }
  .assign-form { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- demo */
.demo-page { max-width: 1180px; }
.demo-hero { padding: 34px 0 28px; max-width: 900px; }
.demo-hero h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); line-height: 1.02; max-width: 13ch; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.demo-flow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.demo-flow span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.demo-flow span + span::before { content: "→"; color: var(--muted); margin-right: 10px; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-md); }
.story-card h2 { color: var(--ink); font-size: 1.25rem; letter-spacing: -.01em; text-transform: none; margin: 0 0 10px; }
.story-facts { margin: 20px 0 0; }
.story-facts div { padding: 9px 0; border-top: 1px solid var(--line-soft); }
.story-facts dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.story-facts dd { margin: 2px 0 0; }
.story-card .button { width: 100%; text-align: center; margin-top: 18px; }
.demo-close { margin-top: 20px; padding: 24px; border-radius: 16px; background: #16202a; color: #fff; }
.demo-close h2 { color: #b9c5cf; margin-top: 0; }
@media (max-width: 850px) { .story-grid { grid-template-columns: 1fr; } }
input[type="text"]:hover, input[type="password"]:hover, select:hover { border-color: #cfd8e0; }
input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 111, 196, .16);
}

button, .button {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 550;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: background .14s, box-shadow .14s, transform .06s;
  box-shadow: var(--shadow-sm);
}
button:hover, .button:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
button:active, .button:active { transform: translateY(1px); }
button:focus-visible, .button:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(42, 111, 196, .3);
}

button.quiet {
  background: none;
  color: var(--muted);
  border-color: transparent;
  box-shadow: none;
}
button.quiet:hover { background: var(--line-soft); color: var(--ink-soft); border-color: transparent; }

.actions { display: flex; gap: 12px; align-items: center; }
.wide { width: 100%; text-align: center; }

/* ------------------------------------------------------------- question */

.question .step {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

.instruction { margin: 0 0 8px; color: var(--ink-soft); font-size: .95rem; }

.statement {
  font-size: 1.75rem;
  margin: 8px 0 30px;
  overflow-x: auto;
  padding-bottom: 6px;
  color: var(--ink);
}

.options { display: grid; gap: 10px; }

.option {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 1.12rem;
  text-align: left;
  margin: 0;
  color: var(--ink);
  width: 100%;
  box-shadow: none;
  transition: border-color .14s, background .14s;
}
.option:hover { border-color: var(--accent); background: #fafcfe; }
.option:has(input:checked) { border-color: var(--accent); background: #f2f7fc; }

/* Practice only. The real exam never shows a student whether they were right. */
.option.right { border-color: var(--ok); background: #f1faf6; }
.option.wrong { opacity: .45; }

input.typed { font-size: 1.12rem; }

/* --------------------------------------------------------------- report */

/* The report is read top to bottom by one person deciding one thing, so it is
   capped at a reading width and each §9 section is its own card -- on the flat
   version the four sections ran together into one grey column. */
.report { max-width: 980px; }
.report-head h1 { margin-bottom: 6px; }
.report-head > .muted { margin: 0; }
.decision-line .tag { margin: 4px 4px 0 0; }
.catchup-plan li { margin: 10px 0; }

.report > section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 26px 26px;
  margin-top: 18px;
}
.report > section > h2 { margin-top: 6px; }
.report > details { margin-top: 22px; }

.status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
}
.status-complete   { color: #147a56; background: #edf8f3; }
.status-borderline { color: #7a6428; background: #f4f1e8; }
.status-running    { color: var(--muted); background: #f1f4f7; }

.flag {
  background: #fdf8ec;
  border-left: 3px solid var(--flag);
  padding: 12px 16px;
  margin: 20px 0 0;
  color: #6d5720;
}

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; }

.edges td, .edges th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.edges tr.has-gap th { color: var(--no); }

.pill {
  display: inline-block;
  background: #fbeeec;
  color: var(--no);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: .8rem;
}

.gap {
  border: 1px solid var(--line);
  border-left: 3px solid var(--no);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fff;
  margin-bottom: 14px;
}
.gap-title { font-weight: 600; margin: 0 0 4px; font-size: 1.05rem; }
.gap ul { margin: 6px 0 0; padding-left: 20px; }
.gap li { margin-bottom: 8px; }

.label {
  font-size: .78rem;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 16px 0 0;
}

.note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}

details { margin-top: 36px; }
summary { cursor: pointer; color: var(--muted); font-size: .9rem; }

.history { margin-top: 14px; font-size: .88rem; }
.history td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.history tr.ok td:first-child { border-left: 3px solid var(--ok); }
.history tr.no td:first-child { border-left: 3px solid var(--no); }

/* ------------------------------------------------------- sittings list */

.list-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 18px;
}
.list-head h1 { margin: 0; }
.list-head .muted { font-size: .88rem; }

.sessions { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.list-head { max-width: 860px; }

.sessions li + li { margin-top: 8px; }

.sessions a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "name tags go" "meta tags go";
  align-items: center;
  column-gap: 16px;
  padding: 15px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: border-color .14s, box-shadow .14s, transform .08s;
}
.sessions a:hover {
  border-color: #c9d7e6;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.sessions a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 111, 196, .18);
}

.s-name { grid-area: name; font-weight: 600; font-size: 1.04rem; }
.s-meta { grid-area: meta; font-size: .85rem; }
.s-meta .dot { color: var(--line); margin: 0 6px; }
.s-tags { grid-area: tags; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.s-go { grid-area: go; color: var(--muted); font-size: 1.15rem; transition: color .14s, transform .14s; }
.sessions a:hover .s-go { color: var(--accent); transform: translateX(2px); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 550;
  letter-spacing: .01em;
  white-space: nowrap;
}
.tag-done    { background: #edf8f3; color: #147a56; }
.tag-running { background: #f1f4f7; color: var(--muted); }
.tag-gap     { background: #fceeed; color: #b4322f; }
.tag-plain   { background: #f4f1e8; color: #7a6428; }

.empty {
  text-align: center;
  padding: 62px 24px 70px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 18px;
}
.empty-mark {
  font-size: 2rem;
  color: var(--accent);
  opacity: .35;
  margin: 0 0 6px;
}
.empty .lede { margin: 0 auto; max-width: 34ch; }

@media (max-width: 640px) {
  .card { padding: 26px 22px; }
  .statement { font-size: 1.35rem; }
  .sessions a {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name go" "meta go" "tags tags";
    row-gap: 8px;
  }
  .s-tags { justify-content: flex-start; }
}

.edges tr.head th {
  font-size: .72rem;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 4px;
}

.locale-switch {
  float: right;
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .06em;
}
.locale-switch a, .locale-switch .current {
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
}
.locale-switch a { color: var(--accent); }
.locale-switch a:hover { background: var(--line); }
.locale-switch .current { color: var(--muted); background: var(--line); }

/* §6.4 hint. Distinct from the question, but calm — a student reading this is
   mid-measurement, not being marked. */
.hint-box {
  background: #f2f6fa;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 0 0 24px;
  color: #2b3a47;
  line-height: 1.6;
}

.slope-headline { font-size: 1.15rem; margin: 0 0 8px; }
.slope-headline strong { letter-spacing: .06em; margin-right: 10px; }
.slope-steep { color: var(--ok); }
.slope-standard { color: var(--accent); }
.slope-shallow { color: var(--flag); }
.timing-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.timing-summary div { padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.timing-summary strong, .timing-summary span { display: block; }
.timing-summary span { color: var(--muted); font-size: .78rem; }
@media (max-width: 640px) { .timing-summary { grid-template-columns: 1fr 1fr; } }

.working-label { margin-top: 22px; }

.overrides { margin-top: 12px; }
.override {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  background: #fff;
  margin-bottom: 10px;
}
.override-head { margin: 0 0 4px; }
.override-head span { margin-left: 10px; font-size: .85rem; }
.override p:last-child { margin: 0; }
.pill-plain {
  background: var(--line);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: .8rem;
}
.override-form {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 4px 18px 20px;
  margin-top: 12px;
}
/* Two fields side by side -- the row used to be `display: flex` with the label
   and the input as equal children, which put a hand's width of nothing between
   a label and the box it names. */
.override-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.override-row label { margin-top: 16px; }

/* ------------------------------------------------------- curriculum map */
/*
   Full-height app shell. The map is the page, not an illustration below four
   paragraphs of preamble — the first version buried it under 470px of header
   and then letterboxed it, which made every column tiny.
*/

body.app { height: 100vh; overflow: hidden; }
body.app main { height: 100vh; }

.map-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 22px;
  height: 58px;
  flex: 0 0 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.app-bar .brand { margin: 0; font-size: 1.05rem; }
.app-bar .staff-nav { margin: 0; border: none; padding: 0; }
.bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.bar-right .button { margin: 0; padding: 8px 18px; font-size: .88rem; }
.bar-right .locale-switch { float: none; }

.mini-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mini-progress .progress { width: 130px; margin: 0; }

.progress { height: 7px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #2a78d6, #1baf7a);
  transition: width .5s ease;
}
.progress.slim { height: 6px; margin: 8px 0; }

/* ---------------------------------------------------------- toolbar */

.app-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.search {
  width: 210px;
  padding: 8px 14px;
  font: inherit;
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  margin: 0;
  padding: 7px 14px;
  font-size: .84rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.legend {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0 0 0 auto;
  font-size: .85rem;
  color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

.zoomers { display: flex; gap: 5px; }
.icon-btn {
  margin: 0;
  width: 32px; height: 32px;
  padding: 0;
  font-size: .95rem; line-height: 1;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); filter: none; }

/* ------------------------------------------------------------ stage */

.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, #dde3e9 1px, transparent 0) 0 0/24px 24px,
    #f6f8fa;
  cursor: grab;
  touch-action: none;
}
.map-stage.grabbing { cursor: grabbing; }
.curriculum-map { display: block; }

.map-hint {
  position: absolute;
  left: 18px; bottom: 14px;
  margin: 0;
  padding: 6px 14px;
  font-size: .8rem;
  color: var(--muted);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}

.col-band { fill: #fff; opacity: .9; }
.col-accent { opacity: .85; }
.col-head { font-size: 13.5px; font-weight: 650; fill: var(--ink); }
.col-sub { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }

.node-box {
  fill: #fff;
  stroke: #d5dbe1;
  stroke-width: 1;
  transition: stroke .14s, fill .14s;
}
.node-label { font-size: 12px; fill: #2c353e; pointer-events: none; }
.node { cursor: pointer; outline: none; }
.node:hover .node-box, .node:focus-visible .node-box {
  stroke: var(--accent); stroke-width: 1.8;
}
.node.dim { opacity: .25; }
.node.faded { opacity: .18; }
.node.found .node-box { stroke: #eda100; stroke-width: 2.4; fill: #fffbf2; }
.node.root .node-box { stroke: var(--accent); stroke-width: 2.6; fill: #eef4fb; }
.node.lit .node-box {
  stroke: #eda100; stroke-width: 2; fill: #fffbf2;
  animation: pop .36s ease both;
  animation-delay: var(--delay, 0s);
}
@keyframes pop {
  0%   { opacity: .35; }
  55%  { opacity: 1; }
  100% { opacity: 1; }
}

.edge { transition: stroke-opacity .15s, stroke-width .15s; }
.edge.within { stroke-opacity: .38; }
.edge.cross { stroke-opacity: .95; }
.edge.hidden { display: none; }
.focusing .edge { stroke-opacity: .05 !important; }
.focusing .edge.lit { stroke-opacity: 1 !important; stroke-width: 3.2 !important; }
.edge.tracing.lit {
  stroke-dasharray: 6 5;
  animation: crawl 1s linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes crawl { to { stroke-dashoffset: -22; } }

@media (prefers-reduced-motion: reduce) {
  .node.lit .node-box, .edge.tracing.lit, .progress span { animation: none; transition: none; }
}

/* ----------------------------------------------------------- panel */

.detail {
  position: absolute;
  top: 14px; right: 14px;
  width: 320px;
  max-height: calc(100% - 28px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 10px 34px rgba(16,24,32,.15);
}
.detail .close {
  position: absolute; top: 6px; right: 10px;
  margin: 0; padding: 2px 8px;
  background: none; border: none; color: var(--muted);
  font-size: 1.35rem; cursor: pointer;
}
.detail .close:hover { color: var(--ink); filter: none; }
.detail-strand {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 5px;
}
.detail h2 {
  font-size: 1.12rem; color: var(--ink); letter-spacing: 0;
  margin: 0 0 5px; text-transform: none; line-height: 1.3;
}
.detail .muted { font-size: .84rem; margin: 0; }
.trace-btn { width: 100%; margin: 15px 0 0; font-size: .88rem; }
.trace-note {
  font-size: .82rem; color: var(--muted); line-height: 1.5;
  margin: 10px 0 0; padding-left: 11px; border-left: 2px solid #eda100;
}
.detail-lists { margin-top: 18px; }
.detail-lists .label { margin: 14px 0 2px; }
.detail-lists ul { list-style: none; padding: 0; margin: 2px 0 0; }
.detail-lists li { font-size: .87rem; padding: 3px 0; line-height: 1.35; }
.detail-lists a { color: var(--accent); text-decoration: none; }
.detail-lists a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .legend { display: none; }
  .detail { top: auto; bottom: 0; right: 0; left: 0; width: auto; border-radius: 14px 14px 0 0; }
  .search { width: 100%; }
}

/* ------------------------------------------------------------- review */

.review .review-question {
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 12px;
}
.pair { display: grid; gap: 10px; }
.pair-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
}
.pair-item.requires { border-left: 3px solid var(--accent); }
.pair-role { font-size: .76rem; letter-spacing: .04em; color: var(--muted); margin: 0 0 5px; }
.pair-name { font-size: 1.15rem; font-weight: 600; margin: 0 0 5px; line-height: 1.3; }
.pair-item p:last-child { margin: 0; font-size: .85rem; }
.pair-arrow {
  text-align: center; font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

.cross-flag {
  background: #f2f6fa;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 18px 0 0;
  font-size: .89rem;
  color: #2b3a47;
}

.verdicts { display: flex; gap: 10px; flex-wrap: wrap; }
.verdicts button { flex: 1 1 120px; }
.v-keep { background: #1baf7a; border-color: #1baf7a; }
.v-drop { background: #e34948; border-color: #e34948; }
.v-unsure { background: #fff; color: var(--muted); border-color: var(--line); }

/* ----------------------------------------------------------- overview */

.overview { max-width: 1180px; }
.overview h1 { font-size: 2.2rem; letter-spacing: -.022em; margin-bottom: 10px; }
.overview .lede { max-width: 70ch; font-size: 1.06rem; line-height: 1.6; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px;
  margin: 28px 0 12px;
}
.tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(16,24,32,.04);
}
.tile strong {
  display: block; font-size: 2.15rem; line-height: 1.05;
  letter-spacing: -.032em; font-weight: 650;
}
.tile span { color: var(--muted); font-size: .86rem; }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
@media (max-width: 940px) { .split { grid-template-columns: 1fr; gap: 8px; } }

ul.plain { list-style: none; padding: 0; }
ul.plain li {
  border-left: 3px solid var(--line);
  padding: 6px 0 6px 18px;
  margin-bottom: 18px;
  max-width: 72ch;
  line-height: 1.6;
}

ol.needed { padding-left: 22px; }
ol.needed li { margin-bottom: 20px; }
ol.needed li.done > strong { text-decoration: line-through; color: var(--muted); }
ol.needed span { display: block; font-size: .85rem; margin-top: 3px; line-height: 1.5; }
ol.needed a { color: var(--accent); font-size: .87rem; }

.tryrow { display: flex; gap: 12px; flex-wrap: wrap; }
.button.quiet-btn { background: #fff; color: var(--accent); }

/* One row: brand, navigation, language. The border under it is the only line
   on these pages that runs edge to edge -- everything below is cards. */
.topbar {
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 28px;
}
.topbar .brand { margin: 0; flex: 0 0 auto; }
.topbar .staff-nav {
  margin: 0;
  border: none;
  padding: 0;
  flex: 1 1 auto;
  align-self: flex-end;
  padding-bottom: 2px;
}
.topbar .locale-switch { flex: 0 0 auto; float: none; margin-left: auto; }

.staff-nav {
  display: flex;
  gap: 22px;
  margin: -14px 0 26px;
  font-size: .9rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}
.staff-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.staff-nav a:hover { color: var(--accent); }
.staff-nav a.here { color: var(--ink); font-weight: 600; }

.needed-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 4px 26px 26px;
  position: sticky;
  top: 24px;
}
.needed-card h2:first-child { margin-top: 26px; }

/* Coverage rows on the overview: keep "12 / 12" on one line, and give the bar
   the room instead. */
.overview .edges th { font-weight: 500; padding-right: 12px; }
.overview .edges td.num { white-space: nowrap; padding: 9px 14px 9px 0; }

/* ------------------------------------------------------------- mobile */
/*
   A 103-node map on a 390px phone will never be the good way to review the
   curriculum — that is desk work. But it must not arrive broken, so the bars
   scroll instead of overflowing and the map is allowed to shrink further than
   it would on a desktop.
*/
@media (max-width: 760px) {
  .app-bar {
    gap: 14px;
    padding: 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .app-bar::-webkit-scrollbar { display: none; }
  .app-bar .brand { font-size: .95rem; }
  .app-bar .staff-nav { gap: 14px; font-size: .85rem; }
  .bar-right { gap: 10px; }
  .mini-progress .progress { width: 64px; }
  .bar-right .button { padding: 7px 13px; font-size: .82rem; white-space: nowrap; }

  .app-tools {
    gap: 8px;
    padding: 9px 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .app-tools::-webkit-scrollbar { display: none; }
  .search { width: 148px; flex: 0 0 auto; }
  .chips { flex-wrap: nowrap; }
  .chip { font-size: .8rem; padding: 6px 12px; }
  .zoomers { margin-left: 8px; flex: 0 0 auto; }

  .map-hint { font-size: .74rem; left: 12px; bottom: 10px; padding: 5px 11px; }

  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 15px 16px; }
  .tile strong { font-size: 1.6rem; }
  .overview h1 { font-size: 1.6rem; }
  .needed-card { position: static; padding: 4px 18px 20px; }
  .page { padding: 20px 16px 48px; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .topbar, .override-form, .assign-form, .button { display: none !important; }
  .page, .report { max-width: none; padding: 0; }
  .report > section, .story-card { box-shadow: none; break-inside: avoid; }
  details, details > * { display: block; }
  a { color: inherit; text-decoration: none; }
}

/* ------------------------------------------------ executive presentation */
.pitch { --pitch-navy:#10202d; --pitch-blue:#245cff; --pitch-mint:#2fc69c; background:#f4f1ea; color:var(--pitch-navy); scroll-snap-type:y mandatory; }
.pitch-nav { position:fixed; z-index:50; left:24px; right:24px; top:18px; min-height:46px; display:flex; align-items:center; gap:20px; padding:0 16px; border:1px solid rgba(16,32,45,.12); border-radius:14px; background:rgba(255,255,255,.88); backdrop-filter:blur(14px); box-shadow:0 8px 30px rgba(16,32,45,.08); }
.pitch-brand { display:flex; align-items:center; gap:8px; color:var(--pitch-navy); text-decoration:none; font-weight:700; }
.pitch-brand .mark { width:22px; height:22px; }
.pitch-dots { display:flex; align-items:center; justify-content:center; gap:8px; flex:1; }
.pitch-dots a { width:7px; height:7px; border-radius:50%; background:#c6cbd0; transition:.2s; }
.pitch-dots a.active { width:24px; border-radius:4px; background:var(--pitch-blue); }
.pitch-counter { font-variant-numeric:tabular-nums; color:#6a737a; font-size:.82rem; }
.pitch-languages{display:flex;gap:3px;padding:3px;border-radius:8px;background:#eef1f3}.pitch-languages a{padding:4px 7px;border-radius:6px;color:#6a737a;text-decoration:none;font-size:.68rem;font-weight:800}.pitch-languages a.active{background:#fff;color:var(--pitch-blue);box-shadow:0 1px 4px rgba(16,32,45,.12)}
.pitch-exit { color:var(--pitch-blue); text-decoration:none; font-weight:650; font-size:.84rem; }
.pitch-slide { position:relative; min-height:100vh; box-sizing:border-box; padding:110px clamp(30px,7vw,120px) 90px; display:flex; align-items:center; scroll-snap-align:start; overflow:hidden; }
.pitch-slide:nth-child(even) { background:#fff; }
.pitch-copy { width:min(980px,100%); margin:auto; position:relative; z-index:2; }
.pitch-copy.wide { width:min(1180px,100%); }
.pitch-kicker { margin:0 0 18px; color:var(--pitch-blue); text-transform:uppercase; letter-spacing:.16em; font-size:.72rem; font-weight:800; }
.pitch h1,.pitch h2 { margin:0; max-width:1050px; font-weight:670; letter-spacing:-.045em; line-height:.98; color:var(--pitch-navy); }
.pitch h1 { font-size:clamp(3.2rem,7vw,7.2rem); }
.pitch h2 { font-size:clamp(2.7rem,5vw,5.6rem); }
.pitch h1 em,.pitch h2 em { color:var(--pitch-blue); font-style:normal; }
.pitch-lede { max-width:760px; margin:30px 0; font-size:clamp(1.15rem,2vw,1.55rem); line-height:1.55; color:#52606a; }
.pitch-actions { display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:34px; }
.pitch-status { display:inline-flex; align-items:center; gap:8px; font-size:.84rem; color:#68737b; }
.pitch-status i { width:8px; height:8px; border-radius:50%; background:#a6adb2; }.pitch-status i.online{background:var(--pitch-mint);box-shadow:0 0 0 4px rgba(47,198,156,.15)}
.pitch-hero-mark { position:absolute; right:5vw; bottom:12vh; display:grid; grid-template-columns:auto auto; align-items:end; color:rgba(36,92,255,.10); transform:rotate(-5deg); }
.pitch-hero-mark strong { grid-row:1/3; grid-column:2; font-size:16rem; line-height:.7; }.pitch-hero-mark span{font-size:1rem;font-weight:800;text-transform:uppercase;letter-spacing:.2em}
.speaker-note { position:absolute; z-index:3; left:clamp(30px,7vw,120px); right:clamp(30px,7vw,120px); bottom:24px; border-left:3px solid #e7b32f; padding:5px 12px; font-size:.78rem; line-height:1.4; color:#6b6d6e; }
.contrast-grid { display:grid; grid-template-columns:1fr 110px 1fr; align-items:stretch; gap:22px; margin:48px 0 28px; }
.contrast-grid article { position:relative; border:1px solid #dfe3e5; border-radius:20px; padding:28px; background:#fff; box-shadow:0 12px 35px rgba(16,32,45,.06); }
.contrast-grid article>span { display:grid; place-items:center; width:38px;height:38px;border-radius:50%;background:#edf1ff;color:var(--pitch-blue);font-weight:800}.contrast-grid h3{font-size:1.45rem;margin:20px 0 8px}.contrast-grid p{color:#66717a;line-height:1.55;margin:0}.same-score{display:grid;place-items:center;font-size:1.55rem;font-weight:800;color:var(--pitch-blue)}
.pitch-thesis,.pitch-rule { margin:24px 0 0; padding:18px 22px; border-left:4px solid var(--pitch-blue); background:#edf1ff; font-size:1.05rem; line-height:1.5; }.pitch-rule.amber{border-color:#e7a923;background:#fff7df}
.loop-row { display:grid; grid-template-columns:repeat(9,auto); align-items:center; gap:12px; margin:54px 0; }.loop-row div{min-width:0}.loop-row b{display:block;color:var(--pitch-blue);font-size:.7rem}.loop-row strong{display:block;font-size:1.15rem;margin:8px 0}.loop-row span{display:block;color:#69757d;font-size:.82rem;line-height:1.4}.loop-row i{font-style:normal;color:#b7bec3;font-size:1.5rem}
.metric-strip,.ai-proof,.test-proof { display:flex; justify-content:space-between; gap:20px; padding:22px 28px; border-radius:18px; background:var(--pitch-navy); color:#fff; }.metric-strip span,.ai-proof span{font-size:.85rem;color:#cbd4da}.metric-strip b,.ai-proof b{font-size:1.65rem;color:#fff;margin-right:7px}
.two-ideas,.boundary-grid,.readiness-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin:46px 0 28px; }.two-ideas article,.boundary-grid article,.readiness-grid article{padding:32px;border:1px solid #dce2e5;border-radius:20px;background:#fff}.idea-icon{font-size:4rem;color:var(--pitch-blue);line-height:1}.two-ideas h3,.boundary-grid h3,.readiness-grid h3{font-size:1.45rem;margin:20px 0 10px}.two-ideas p,.readiness-grid li,.boundary-grid li{color:#5d6972;line-height:1.6}.boundary-grid ul,.readiness-grid ul{padding-left:20px}.boundary-grid li,.readiness-grid li{margin:9px 0}.boundary-grid .yes{border-top:5px solid var(--pitch-mint)}.boundary-grid .no{border-top:5px solid #ef705d}
.pitch-stories { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-top:46px; }.pitch-stories article{min-height:290px;padding:28px;border-radius:20px;background:#fff;border-top:6px solid var(--pitch-blue);box-shadow:0 14px 40px rgba(16,32,45,.08);display:flex;flex-direction:column}.pitch-stories .mira{border-color:#e7a923}.pitch-stories .samir{border-color:var(--pitch-mint)}.pitch-stories span{font-size:.7rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#72808a}.pitch-stories h3{font-size:2rem;margin:20px 0 10px}.pitch-stories p{color:#5d6972;line-height:1.55}.pitch-stories a{margin-top:auto;color:var(--pitch-blue);font-weight:700;text-decoration:none}
.decision-layout { display:grid;grid-template-columns:1fr 60px 1fr;gap:24px;align-items:center;margin:44px 0}.decision-inputs{display:grid;grid-template-columns:1fr 1fr;gap:12px}.decision-inputs span{padding:16px;border-radius:12px;background:#eef1f3;font-weight:650}.decision-arrow{text-align:center;font-size:2rem;color:var(--pitch-blue)}.decision-card{padding:28px;border-radius:20px;background:var(--pitch-navy);color:white}.decision-card small{color:#9cabb5;letter-spacing:.14em}.decision-card>strong{display:block;font-size:1.8rem;margin:12px 0}.decision-card p{color:#c8d1d7;line-height:1.45}.decision-card hr{border:0;border-top:1px solid #3b4a56;margin:20px 0}
.ai-proof { margin-top:22px; }.ai-proof span{flex:1}.trust-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:44px 0}.trust-grid article{padding:24px;border-radius:16px;background:#fff;border:1px solid #dde2e5}.trust-grid article>b{font-size:2rem;color:var(--pitch-blue)}.trust-grid h3{margin:18px 0 8px}.trust-grid p{font-size:.88rem;color:#62707a;line-height:1.5}.test-proof{align-items:center}.test-proof strong{font-size:2rem;color:#fff}.test-proof span{color:#bdc9d1;font-size:.82rem;margin-right:auto}
.readiness-grid article:first-child{border-top:5px solid var(--pitch-mint)}.readiness-grid article:last-child{border-top:5px solid #e7a923}.pitch-closing blockquote{max-width:880px;margin:38px 0 0;padding:0;border:0;font-size:clamp(1.2rem,2vw,1.6rem);line-height:1.55;color:#58656e}.boss-qa{margin-top:28px;max-width:900px;border:1px solid #d8dfe2;border-radius:14px;background:#fff}.boss-qa summary{padding:16px 20px;font-weight:700;cursor:pointer}.boss-qa div{padding:0 20px 16px;display:grid;grid-template-columns:1fr 1fr;gap:4px 24px}.boss-qa p{font-size:.82rem;line-height:1.45;color:#58656e}
@media(max-width:800px){.pitch-nav{left:8px;right:8px;top:8px}.pitch-dots{display:none}.pitch-slide{padding:90px 20px 90px;min-height:auto}.contrast-grid,.two-ideas,.boundary-grid,.readiness-grid,.pitch-stories,.trust-grid{grid-template-columns:1fr}.same-score{padding:0}.loop-row{grid-template-columns:1fr}.loop-row i{transform:rotate(90deg);text-align:center}.decision-layout{grid-template-columns:1fr}.decision-arrow{transform:rotate(90deg)}.metric-strip,.ai-proof,.test-proof{flex-wrap:wrap}.speaker-note{left:20px;right:20px}.boss-qa div{grid-template-columns:1fr}}
.learning-banner{margin:0 0 24px;padding:14px 16px;border-radius:12px;background:#eef4ff;border-left:4px solid var(--accent);line-height:1.45}.learning-banner strong{display:block;margin-bottom:3px;color:var(--ink)}.learning-banner span{color:var(--muted);font-size:.9rem}.learning-transfer{background:#eefaf5;border-left-color:#1baf7a}.learning-hinting{background:#fff8e8;border-left-color:#eda100}
@media print{.pitch{background:#fff}.pitch-nav,.speaker-note{display:none!important}.pitch-slide{min-height:auto;display:block;padding:35px 25px;break-after:page;overflow:visible}.pitch h1{font-size:44pt}.pitch h2{font-size:34pt}.pitch-stories article{min-height:0}.boss-qa{display:block}.boss-qa div{display:grid}}
.operator-auth{min-height:100vh;display:grid;place-items:center;background:#f3f6f8}.operator-auth main{width:min(92vw,460px)}.auth-card{padding:36px;border:1px solid #dce3e7;border-radius:20px;background:#fff;box-shadow:0 18px 55px rgba(17,38,54,.10)}.auth-card h1{margin:8px 0 10px}.auth-card p{color:var(--muted);line-height:1.5}.auth-card form{display:grid;gap:10px;margin-top:26px}.auth-card input{padding:13px 14px;border:1px solid #cbd4da;border-radius:10px;font:inherit}.auth-card button{margin-top:8px;padding:13px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:750;cursor:pointer}.auth-error{margin-top:18px;padding:12px;border-radius:9px;background:#fff0ed;color:#9b2c20}

/* Learning profile (teacher report) */
.profile { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 8px 0 10px; }
.profile div { display: contents; }
.profile dt { font-weight: 600; }
.profile dd { margin: 0; }
/* On a phone the labels ("Darslarni shu mavzudan boshlash tavsiya etiladi")
   would take the whole width and push the values off the card: stack them. */
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; gap: 2px; }
  .profile dd { margin-bottom: 10px; }
}

/* Errors under a form field (start page, ticket login, reception desk) */
.error { margin: 10px 0 0; padding: 10px 14px; border-radius: 9px; background: #fff0ed; color: #9b2c20; font-size: .92rem; }

/* Buttons that read as links: row actions, sign-out */
.link-btn { display: inline; width: auto; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--accent); font: inherit; font-size: .9rem; cursor: pointer; }
.link-btn:hover { background: none; text-decoration: underline; }
.link-btn.danger { color: #b4322f; }
.signed-in { display: flex; align-items: center; gap: 10px; margin: 0 0 0 14px; font-size: .88rem; white-space: nowrap; }

/* Reception desk (/tickets) */
.tickets-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ticket-form, .ticket-result, .ticket-list {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm);
}
.ticket-form button[type="submit"] { margin-top: 22px; }
.ticket-list { margin-top: 24px; }
.ticket-credentials { display: grid; gap: 14px; margin: 6px 0 14px; }
.ticket-credentials div { display: grid; gap: 2px; }
.ticket-credentials dt { color: var(--muted); font-size: .84rem; }
.ticket-credentials dd { margin: 0; font-size: 2.2rem; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.ticket-print { margin: 12px 0; font-weight: 550; }
.ticket-print.ok { color: #147a56; }
.ticket-print.failed { color: #9b2c20; }
.ticket-login-cell { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket-actions { white-space: nowrap; }
.ticket-actions form { display: inline; margin-left: 12px; }
.ticket-waiting   { background: #eef4ff; color: var(--accent); }
.ticket-testing   { background: #f1f4f7; color: var(--ink-soft); }
.ticket-finished  { background: #edf8f3; color: #147a56; }
.ticket-expired, .ticket-cancelled { background: #f1f4f7; color: var(--muted); }
.ticket-locked    { background: #fceeed; color: #b4322f; }

/* Staff accounts (/staff) */
.staff-card { margin-top: 12px; }
.staff-card.inactive { opacity: .6; }
.staff-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staff-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { width: 190px; padding: 8px 12px; }
.inline-form .button { margin: 0; padding: 8px 14px; font-size: .86rem; white-space: nowrap; }

@media (max-width: 760px) {
  .tickets-layout { grid-template-columns: 1fr; }
  .ticket-table { display: block; overflow-x: auto; }
}
@media print {
  .signed-in, .ticket-form, .ticket-actions { display: none !important; }
}

/* The staff bar grew Tickets, Staff and the signed-in name: let it wrap
   instead of running off the edge (it already did on a phone). */
[hidden] { display: none !important; }
.topbar { flex-wrap: wrap; row-gap: 10px; }
.topbar .staff-nav { display: flex; flex-wrap: wrap; row-gap: 6px; }
.topbar .signed-in { margin-left: auto; }
.ticket-actions a { color: var(--accent); text-decoration: none; font-size: .9rem; }
.ticket-actions a:hover { text-decoration: underline; }

/* Printer connection on the reception desk (serial_printer.js) */
.printer-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0 0 20px; padding: 14px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.printer-state { margin: 0; flex: 1 1 320px; }
.printer-state.ok { color: #147a56; font-weight: 550; }
.printer-bar .button { margin: 0; padding: 8px 16px; font-size: .9rem; }
.printer-help { flex-basis: 100%; margin: 0; font-size: .84rem; }

/* Question bank (/questions) */
.questions-page .list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.questions-page .list-head .button { margin: 0; }
.question-strand { margin-top: 28px; }
.topic-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.topic-list li + li { border-top: 1px solid var(--line); }
.topic-list a { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; color: inherit; text-decoration: none; }
.topic-list a:hover { background: #f7f9fb; }
.topic-name { font-weight: 550; }
.topic-meta { font-size: .86rem; }
.topic-counts { margin-left: auto; display: flex; gap: 6px; }
.question-block { margin-top: 24px; }
.question-card { margin-top: 12px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.question-card.inactive { opacity: .55; }
.question-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.question-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.question-actions form { display: inline; margin: 0; }
.question-actions a { color: var(--accent); text-decoration: none; font-size: .9rem; }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 10px; }
.q-preview { margin-top: 10px; }
.sample-grid .q-preview { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; margin: 0; }
.q-instruction { margin: 0 0 6px; color: var(--ink-soft); white-space: pre-line; }
.q-statement { margin: 4px 0 10px; overflow-x: auto; }
.q-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-options li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.q-options li.right { border-color: #9fd8bf; background: #f1faf5; }
.q-mark { color: #147a56; font-weight: 700; margin-left: auto; }
.q-why { margin-left: auto; font-size: .8rem; text-align: right; }
.q-typed { margin: 4px 0 0; }
.question-form-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.question-form, .question-preview-pane { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.question-preview-pane { position: sticky; top: 16px; }
.question-form textarea { width: 100%; padding: 10px 14px; font: inherit; border: 1px solid var(--line); border-radius: 11px; resize: vertical; }
.question-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.segmented { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 0; }
.segmented label, .option-correct { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.question-form fieldset { border: none; padding: 0; margin: 20px 0 0; }
.question-form legend { font-size: .84rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 8px; }
.option-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 200px); gap: 10px; align-items: center; margin-bottom: 8px; }
.option-row select { padding: 9px 10px; font-size: .86rem; }
.formula-editor { display: block; width: 100%; padding: 6px 10px; font-size: 1.15rem; border: 1px solid var(--line); border-radius: 11px; }
.formula-editor[hidden] { display: none; }
.formula-source { font-family: ui-monospace, Menlo, monospace; }
.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.form-actions a { color: var(--muted); }
@media (max-width: 860px) {
  .question-form-layout, .question-fields { grid-template-columns: 1fr; }
  .question-preview-pane { position: static; }
  .option-row { grid-template-columns: auto minmax(0, 1fr); }
  .option-row select { grid-column: 2; }
}
