/* POLISCI 158 · Section 2 lab site
   Palette and type follow the course's academic standard:
   warm neutral ground, near-black text, Stanford Cardinal as a restricted accent. */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --fg: #161719;
  --muted: #62666c;
  --line: #e8e1da;
  --accent: #8c1515;
  --accent-soft: #f3e6e6;
  --ok: #2f6b45;
  --ok-soft: #e5f0e8;
  --code-bg: #f4f1ec;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font-body);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 .5rem; }
h2 { font-size: 1.7rem; margin: 3rem 0 .75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .4rem; }

code, pre, kbd { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--code-bg); padding: .08em .35em; border-radius: 4px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--surface); }

.wrap { max-width: 50rem; margin: 0 auto; padding: 0 1.25rem; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 .5rem;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 248, 244, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.topbar .brand { font-family: var(--font-heading); font-weight: 600; margin-right: auto; color: var(--fg); text-decoration: none; }
.topbar nav { display: flex; gap: 1rem; font-size: .92rem; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }
@media (max-width: 720px) { .topbar nav { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 1rem; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.5rem; }

.controls {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
@media (max-width: 640px) { .controls { grid-template-columns: 1fr; } }
.controls label, .field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.controls .hint { font-size: .82rem; color: var(--muted); margin: .35rem 0 0; }

.segmented { display: inline-flex; border: 1px solid var(--fg); border-radius: var(--radius); overflow: hidden; }
.segmented button {
  font: inherit; font-size: .95rem; padding: .4rem .9rem; border: 0; background: var(--surface); color: var(--fg); cursor: pointer;
}
.segmented button + button { border-left: 1px solid var(--fg); }
.segmented button[aria-pressed="true"] { background: var(--fg); color: #fff; }

input[type="text"], textarea, select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--fg);
  background: var(--surface); border: 1px solid #cfc6bc; border-radius: var(--radius);
  padding: .45rem .6rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

.progress { margin-top: 1rem; display: flex; align-items: center; gap: .75rem; font-size: .92rem; color: var(--muted); }
.progress .bar { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }

/* ---------- Route-specific content ---------- */
body[data-route="claude"] [data-only="codex"],
body[data-route="codex"] [data-only="claude"] { display: none !important; }
.route-tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 4px; padding: 0 .35rem; margin-right: .35rem; color: var(--muted);
  vertical-align: .1em;
}

/* ---------- Outcome row ---------- */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.outcomes li { border-top: 2px solid var(--fg); padding-top: .6rem; }
.outcomes strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; }
@media (max-width: 640px) { .outcomes { grid-template-columns: 1fr; } }

/* ---------- Chat vs agent sorter ---------- */
.sorter { display: grid; gap: .6rem; margin-top: 1rem; }
.scenario {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem;
}
.scenario .choices { display: flex; gap: .4rem; }
.scenario .choices button {
  font: inherit; font-size: .88rem; padding: .25rem .7rem; border-radius: var(--radius);
  border: 1px solid #cfc6bc; background: var(--bg); cursor: pointer;
}
.scenario .choices button:hover { border-color: var(--fg); }
.scenario .feedback { grid-column: 1 / -1; font-size: .92rem; margin: 0; display: none; }
.scenario.answered .feedback { display: block; }
.scenario.right .feedback::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.scenario.wrong .feedback::before { content: "Not quite — "; color: var(--accent); font-weight: 700; }
.scenario button[data-picked] { background: var(--fg); color: #fff; border-color: var(--fg); }

/* ---------- Pipeline diagram ---------- */
.pipeline {
  display: flex; align-items: stretch; gap: 0; margin: 1.25rem 0 0; padding: 0; list-style: none;
  overflow-x: auto;
}
.pipeline li { flex: 1 1 0; min-width: 7.2rem; display: flex; align-items: center; }
.pipeline li + li::before { content: "→"; color: var(--muted); padding: 0 .3rem; font-size: 1.1rem; }
.pipeline button {
  flex: 1; font: inherit; text-align: left; cursor: pointer; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .6rem .7rem;
}
.pipeline button:hover { border-color: var(--fg); }
.pipeline button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pipeline .where { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.pipeline .what { display: block; font-weight: 600; line-height: 1.25; margin-top: .15rem; }
.pipeline-detail {
  margin-top: .8rem; padding: .9rem 1.1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); min-height: 6rem;
}
.pipeline-detail h3 { margin-top: 0; }
@media (max-width: 720px) {
  .pipeline { flex-direction: column; }
  .pipeline li + li::before { content: "↓"; padding: .15rem 0 .15rem .8rem; }
  .pipeline li { flex-direction: column; align-items: stretch; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: step; }
.step { border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step details > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .8rem; align-items: center;
  padding: .9rem 0;
}
.step details > summary::-webkit-details-marker { display: none; }
.step .num {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--fg);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.step.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.step .title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; }
.step .title small { display: block; font-family: var(--font-body); font-size: .88rem; color: var(--muted); font-weight: 400; }
.step .when { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.step .chev { transition: transform .2s; color: var(--muted); }
.step details[open] .chev { transform: rotate(90deg); }
.step .body { padding: 0 0 1.25rem 3rem; }
@media (max-width: 640px) { .step .body { padding-left: 0; } .step .when { display: none; } }
.step .body ol, .step .body ul { padding-left: 1.2rem; }
.step .body li { margin: .25rem 0; }
.expect {
  background: var(--ok-soft); border-radius: var(--radius); padding: .6rem .8rem; margin: .8rem 0; font-size: .95rem;
}
.expect strong { color: var(--ok); }
.warn {
  border-left: 3px solid var(--accent); padding: .1rem 0 .1rem .8rem; margin: .8rem 0; font-size: .95rem;
}
.done-toggle {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .6rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--fg); border-radius: var(--radius); padding: .35rem .8rem; background: var(--surface); font: inherit; font-size: .92rem;
}
.done-toggle[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Prompt blocks ---------- */
.prompt {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: .8rem 0;
}
.prompt .bar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .35rem .6rem .35rem .9rem; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted);
  font-weight: 600; letter-spacing: .03em;
}
.prompt pre {
  margin: 0; padding: .8rem .9rem; white-space: pre-wrap; word-break: break-word; font-size: .85rem; line-height: 1.5;
  max-height: 28rem; overflow: auto;
}
.prompt .ph { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 .15em; }
.copy {
  font: inherit; font-size: .8rem; cursor: pointer; border: 1px solid #cfc6bc; background: var(--bg);
  border-radius: var(--radius); padding: .15rem .6rem;
}
.copy:hover { border-color: var(--fg); }
.copy.copied { background: var(--ok); color: #fff; border-color: var(--ok); }

/* ---------- Builder ---------- */
.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } }
.builder .field { margin-bottom: .8rem; }
.builder .field .hint { font-size: .8rem; color: var(--muted); margin: .2rem 0 0; }
.builder .out { position: sticky; top: 4.5rem; align-self: start; }
.privacy-note { font-size: .82rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.chip {
  font: inherit; font-size: .88rem; cursor: pointer; text-align: left;
  border: 1px solid #cfc6bc; background: var(--surface); border-radius: 99px; padding: .3rem .8rem;
}
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: #fff; }

/* ---------- Four moves / compare ---------- */
.moves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; padding: 0; list-style: none; }
.moves li { border-top: 2px solid var(--fg); padding-top: .5rem; font-size: .95rem; }
.moves strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; }
@media (max-width: 720px) { .moves { grid-template-columns: 1fr 1fr; } }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare .prompt .bar.weak { color: var(--accent); }
.compare .prompt .bar.strong { color: var(--ok); }
.compare ul { font-size: .92rem; margin: 0; padding: .1rem .9rem .8rem 2rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* ---------- Troubleshooting ---------- */
.faq-search { margin: .6rem 0 1rem; }
.faq details { border-top: 1px solid var(--line); padding: .15rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: .55rem 0; font-weight: 600; }
.faq details > div { padding: 0 0 .8rem 1rem; }
.faq .empty { color: var(--muted); display: none; }

/* ---------- Glossary ---------- */
dl.gloss { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem 1.2rem; }
dl.gloss dt { font-weight: 700; }
dl.gloss dd { margin: 0; }
@media (max-width: 560px) { dl.gloss { grid-template-columns: 1fr; } dl.gloss dd { margin-bottom: .6rem; } }

/* ---------- Callout / assignment ---------- */
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1rem 0; }
.callout h3:first-child { margin-top: 0; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--fg); color: #fff; border: 1px solid var(--fg); border-radius: var(--radius); padding: .5rem 1rem;
}
.btn.secondary { background: var(--surface); color: var(--fg); }
.btn:hover { opacity: .9; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }

footer.site-footer { margin: 4rem 0 0; padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

.linkbtn { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  .topbar, .controls, .done-toggle, .copy, .faq-search, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  details { display: block; }
  details > * { display: block !important; }
  a { color: inherit; }
}

/* ---------- Why Git ---------- */
.gitwhat { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.gitwhat div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; font-size: .95rem; }
.gitwhat strong { display: block; font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: .2rem; }
@media (max-width: 640px) { .gitwhat { grid-template-columns: 1fr; } }
.benefits { padding-left: 1.2rem; }
.benefits li { margin: .35rem 0; }

/* ---------- Commit / push demo ---------- */
.gitsim { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1rem 0; }
.gs-buttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.gs-buttons .btn { font-size: .9rem; padding: .35rem .8rem; }
.gs-buttons .btn:disabled { opacity: .4; cursor: not-allowed; }
.gs-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.gs-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gs-track { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-height: 2rem; }
.gs-commit { font-size: .82rem; border: 1.5px solid var(--fg); border-radius: 99px; padding: .15rem .6rem; background: var(--surface); }
.gs-commit.new { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.gs-pending { font-size: .82rem; border: 1.5px dashed var(--accent); color: var(--accent); border-radius: 99px; padding: .15rem .6rem; }
.gs-empty { font-size: .85rem; color: var(--muted); font-style: italic; }
.gs-msg { margin: .6rem 0 0; font-size: .95rem; min-height: 1.5em; }
@media (max-width: 560px) { .gs-row { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Principles ---------- */
.principles { counter-reset: pr; list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.principles li { counter-increment: pr; position: relative; padding: .8rem 0 .8rem 2.8rem; border-top: 1px solid var(--line); }
.principles li::before {
  content: counter(pr); position: absolute; left: 0; top: .8rem; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1.5px solid var(--fg); display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.principles strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; }
.principles .eg { display: block; margin-top: .35rem; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); background: var(--code-bg); border-radius: 4px; padding: .3rem .5rem; }
@media (max-width: 720px) { .principles { grid-template-columns: 1fr; } }

.optional-builder { margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem 1.1rem; }
.optional-builder > summary { cursor: pointer; padding: .7rem 0; font-weight: 600; display: flex; gap: .8rem; flex-wrap: wrap; align-items: baseline; }
.optional-builder[open] { padding-bottom: 1rem; }

/* =====================================================================
   Section 2 additions
   ===================================================================== */

/* ---------- Recap ---------- */
.nest { font-size: .92rem; }
.nest div { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .45rem .7rem .55rem; margin-top: .45rem; color: var(--muted); }
.nest > div { margin-top: 0; }
.nest div div { background: var(--bg); } .nest div div div { background: var(--surface); } .nest div div div div { background: var(--bg); }
.nest div div div div div { background: var(--accent-soft); border-color: #e3caca; }
.nest b { color: var(--fg); margin-right: .35rem; font-family: var(--font-heading); }

.compare-flow { display: grid; gap: .6rem; }
.compare-flow > div { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; color: var(--muted); }
.compare-flow .where { width: 9.5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.compare-flow .pill { border: 1.5px solid var(--fg); color: var(--fg); border-radius: 99px; padding: .1rem .65rem; font-size: .9rem; font-weight: 600; background: var(--surface); }
.compare-flow .pill.out { border-color: var(--accent); color: var(--accent); }

.recap-fig { display: grid; grid-template-columns: 22rem 1fr; gap: 1.25rem; align-items: center; }
.recap-fig svg { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; }
.recap-fig p { margin-top: 0; }
@media (max-width: 720px) { .recap-fig { grid-template-columns: 1fr; } }

.scenario .choices { flex-wrap: wrap; }

/* ---------- Lab shell ---------- */
.lab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.25rem 0 1rem; }
#lab1 { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.5rem; }
.lab-chart, .lab-record { grid-column: 1 / -1; }
@media (max-width: 760px) { #lab1 { grid-template-columns: minmax(0, 1fr); } .map-wrap { width: auto; } }

.map-wrap { position: relative; padding: 0 0 1.4rem 1.4rem; width: max-content; max-width: 100%; }
#map { display: block; width: 340px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.axis-x { position: absolute; left: 1.4rem; right: 0; bottom: 0; text-align: center; font-size: .78rem; color: var(--muted); }
.axis-y { position: absolute; left: 0; top: 0; bottom: 1.4rem; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: .78rem; color: var(--muted); }
.check-inline { display: flex; align-items: center; gap: .45rem; margin: .35rem 0; cursor: pointer; }
.check-inline input { accent-color: var(--fg); width: 1rem; height: 1rem; }

.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ctrl-l { font-weight: 600; font-size: .92rem; }
.segmented button { font-size: .88rem; padding: .3rem .7rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--fg); border-radius: var(--radius); overflow: hidden; }
.stepper button { font: inherit; width: 2rem; height: 2rem; border: 0; background: var(--surface); cursor: pointer; font-size: 1.1rem; }
.stepper button:hover { background: var(--bg); }
.stepper output { min-width: 2.2rem; text-align: center; font-weight: 700; border-left: 1px solid var(--fg); border-right: 1px solid var(--fg); line-height: 2rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

dl.stats { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; margin: .8rem 0 0; font-size: .95rem; }
dl.stats dt { color: var(--muted); }
dl.stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
dl.stats dd.em { color: var(--accent); font-size: 1.1rem; }

.chart-head { margin-bottom: .3rem; }
#chart { display: block; width: 100%; height: auto; }
.swatch { display: inline-block; width: 1.4rem; height: 0; vertical-align: middle; margin: 0 .3rem 0 .6rem; border-top: 2px solid var(--fg); }
.swatch:first-child { margin-left: 0; }
.sw-test { border-top: 2px dashed var(--accent); }
.sw-best { border-top: 2px dotted var(--muted); }
.lab-record { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .2rem; }

.key { display: inline-block; font-weight: 600; padding: 0 .4rem; border-radius: 4px; }
.k-pass { background: #dbe5ee; color: #2b5c8a; }
.k-fail { background: #f4e2d2; color: #8f4f17; }

/* ---------- Runs + tasks ---------- */
table.runs { font-size: .85rem; font-variant-numeric: tabular-nums; }
table.runs th { font-size: .8rem; }
table.runs.truth-hidden .t { color: transparent; text-shadow: 0 0 6px rgba(22,23,25,.45); user-select: none; }
table.runs.truth-hidden th.t { color: var(--muted); text-shadow: none; }

.tasks { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.tasks li { border-top: 1px solid var(--line); padding: .9rem 0; }
.tasks li p { margin: 0 0 .5rem; }
.task-h { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; }
textarea.tall { min-height: 9rem; }

/* ---------- Part 2 ---------- */
.lab2-ctrl .check-inline { display: inline-flex; margin-right: 1.2rem; }
.res2 { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.res-h { font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .4rem 0 0; }
table.metrics { font-variant-numeric: tabular-nums; margin: .5rem 0; }
table.metrics td { text-align: right; width: 16%; }
table.metrics th[scope="row"] { font-weight: 400; background: none; }
table.metrics tr.hl th, table.metrics tr.hl td { font-weight: 700; color: var(--accent); }
.truth-box { margin-top: .8rem; background: var(--bg); border: 1px dashed #cfc6bc; border-radius: var(--radius); padding: .7rem .9rem; }
.truth-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.truth-head .btn { font-size: .88rem; padding: .3rem .8rem; }

/* ---------- Submit ---------- */
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.checklist li { padding: .2rem 0 .2rem 1.6rem; position: relative; break-inside: avoid; color: var(--muted); }
.checklist li::before { content: "○"; position: absolute; left: 0; color: var(--muted); }
.checklist li.ok { color: var(--fg); }
.checklist li.ok::before { content: "✓"; color: var(--ok); font-weight: 700; }
@media (max-width: 640px) { .checklist { columns: 1; } }
#preview { max-height: 20rem; }
