/* Shared course tokens and experiment and task components. */

/* JetBrains Mono Latin, weights 400 and 600, SIL Open Font License 1.1. */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-600.woff2") format("woff2"); }

/* ---------------------------------------------------------------- tokens (no new colours) */
:root {
  --go: #1f4fd8; --go-2: #1638a8; --go-t: #e5ecfd; --wash: #f3f5f8; --ink-2: #4a5466; --line-2: #c8cfda;
  --remi-font: Remi, KaTeX_Main, KaTeX_AMS, sans-serif;
  --ink: #0d1421; --muted: var(--ink-2); --blue: var(--go); --purple: #845cb2; --positive: #16816f; --negative: #ba6552;
  --paper: #fff; --line: #e1e5ec; --figure-rule: var(--line);
  /* values shared/book.css writes in its rules, named here */
  --control-ink: var(--go-2);   /* book.css .figure-controls button */
  --link: var(--go);          /* a; the notebook's accent (--lab-accent) and primary button */
  --link-ink: var(--go-2);      /* .book-sidebar current chapter, .figure-controls output */
  --tint: var(--go-t);          /* .book-sidebar current chapter background */
  --band: #f8faf9;          /* .book-sidebar background */
  --panel: var(--wash);         /* .figure-controls background */
  --reading: #f2f7f4;       /* .figure-reading background */
  --control-line: var(--line-2);  /* .figure-controls button and select border */
  --rule: var(--line);          /* article th rule, .figure-todo border */
  --faint: var(--ink-2);         /* .system-arrow */
  --plot-axis: var(--line-2);     /* .plot svg .axis */
  --plot-grid: var(--line);     /* SITE-FIT: light grid at the ticks */
  --shade: var(--wash);         /* SITE-FIT: light plot band */
  --radius: 12px;            /* .figure-controls button and select, current chapter, code */
  --radius-box: 20px;        /* .figure-todo; notebook .lab-dialog */
  /* lab/notebook.css values */
  --surface: var(--wash);       /* --lab-surface: cell bar */
  --code: var(--wash);          /* book.css pre */
  --orange: #c05f14;        /* --lab-q */
  --red: #b3261e;           /* --lab-bad */
  --amber: #c7901c;         /* --lab-busy */
  --warn-bg: #fff4d6;       /* --lab-warn-bg */
  --warn-ink: #8a5a00;      /* .lab-output .lab-stderr */
  --error-bg: rgba(179, 38, 30, .06); /* .lab-output .lab-error */
  --select: rgb(31 79 216 / .12);   /* --lab-select */
  --tint-strong: var(--line-2);   /* --fb-gain-line */
  --mono: "JetBrains Mono", var(--remi-font);
}

/* ---------------------------------------------------------------- shared components (both page kinds) */
/* Buttons: white with the book's control border; the primary action filled with the notebook's accent
   (its .lab-primary, the 모두 실행 button of the lab toolbar). */
.exp-btn, .task-run, .task-next, .task-apply-check, .task-hint { border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--paper); color: var(--control-ink); cursor: pointer; }
.exp-btn.run, .task-run { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.exp-btn:disabled, .exp-btn.run:disabled, :is(.task-run, .task-next, .task-apply-check, .task-hint):disabled {
  background: var(--wash); color: var(--ink-2); border: 1px solid var(--line); cursor: default; }

/* Typed fields */
.exp-in, .exp-text, .exp-card textarea, .task-prow input { border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); }

/* Cards and number badges */
.exp-card, .task-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-box); }
.exp-pill, .task-num { border-radius: var(--radius); color: var(--paper); font-weight: 700; }

/* Read-only code: the notebook cell's bar and editor colours; one set of syntax colours */
.exp-code, .task-card .lab-cell { border: 1px solid var(--line); border-radius: var(--radius); }
.exp-code, .task-ro { background: var(--code); }
.exp-code-bar, .task-cell-head { border-bottom: 1px solid var(--line); color: var(--muted); }
.exp-code-bar, .task-ro .task-cell-head { background: var(--surface); }
.exp-code li .n, .task-code .ln::before { color: var(--ink-2); }
.exp-code .cm, .task-code .cm { color: var(--muted); }
.exp-code .st, .task-code .st { color: var(--warn-ink); }
.exp-code .kw, .task-code .kw { color: var(--purple); }
.exp-code .nm, .task-code .nm { color: var(--orange); }
.exp-code mark.exp-val, .task-code .task-value { color: var(--ink); border-radius: var(--radius); font-weight: 700; }

/* Tables: the book's (bold ink head over a stronger rule, light rules between rows, no fills) */
table.exp-t td, .task-table th, .task-table td { border-bottom: 1px solid var(--line); }
table.exp-t th, .task-table thead th { color: var(--ink); font-weight: 650; background: none; border-bottom: 1px solid var(--rule); }

/* Error message */
.exp-msg .lab-error, .task-check.fail { background: var(--error-bg); color: var(--red); border: 1px solid var(--red); }

/* ---------------------------------------------------------------- experiment step screen (lab/exp.js, exp.css) */
html.exp-page, html.exp-page body { margin: 0; background: var(--band); }
#exp-app { color-scheme: light; background: var(--band); color: var(--ink); font-family: var(--remi-font); font-size: 19px; line-height: 1.7;
  word-break: keep-all; }
#exp-app code { font-family: var(--mono); font-size: .92em; background: none; padding: 0; white-space: nowrap; }
#exp-app p { margin: 0; }
#exp-app button { font: inherit; }

/* top bar: course, experiment, step chips, device and Python */
.exp-top { gap: 22px; padding: 0 32px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 17px; white-space: nowrap; }
.exp-chips { gap: 4px; margin-left: auto; font-size: 17px; }
.exp-grp { color: var(--muted); font-weight: 650; margin: 0 4px 0 0; }
.exp-chip { padding: 0 7px; border: 1px solid var(--control-line); border-radius: var(--radius); color: var(--control-ink);
  font-variant-numeric: tabular-nums; background: var(--paper); cursor: pointer; }
#exp-app .exp-chip { font-size: 19px; }
.exp-chip[aria-disabled="true"] { cursor: default; opacity: .7; }
.exp-chip.done { background: var(--tint); color: var(--link-ink); }
.exp-chip.now { background: var(--blue); border-color: var(--blue); color: var(--paper); font-weight: 700; opacity: 1; }
.exp-status { gap: 18px; margin-left: 22px; font-size: 15px; color: var(--muted); }
.exp-status span { gap: 7px; }
.exp-dot { border-radius: 50%; background: var(--rule); }
.exp-status .on .exp-dot, .exp-state .exp-dot { background: var(--positive); }
.exp-state.bad .exp-dot { background: var(--red); }

/* body: left text and code, right controls and results */
.exp-left { background: var(--paper); border-right: 1px solid var(--line); padding: 30px 30px 22px; }
.exp-right { padding: 22px 32px; gap: 14px; }
.exp-kicker { font-size: 20px; font-weight: 700; color: var(--blue); letter-spacing: .5px; line-height: 1.3; }
#exp-app h1 { font-size: 30px; line-height: 1.35; margin: 8px 0 18px; font-weight: 680; color: var(--ink); }
.exp-lead { margin: 0 0 26px; font-size: 19px; line-height: 1.75; }
.exp-lead p + p { margin-top: 8px; }
.exp-foot { margin-top: auto; font-size: 15px; color: var(--muted); line-height: 1.6; padding-top: 12px; }

/* read-only code block; the step's line highlighted, a control's value boxed, lines this step does not run dimmed */
.exp-code-bar { gap: 8px; padding: 0 14px; font-size: 15px; }
.exp-code ol { list-style: none; margin: 0; padding: 10px 0; }
.exp-code li { font: 16px/30px var(--mono); color: var(--ink); white-space: pre; border-left: 4px solid transparent; }
.exp-code li .n { text-align: right; padding-right: 12px; user-select: none; }
.exp-code li.dim { opacity: .45; }
.exp-code li.hl { background: var(--tint); border-left-color: var(--blue); color: var(--ink); font-weight: 600; opacity: 1; }
.exp-code li.hl .n { color: var(--ink-2); font-weight: 700; }
.exp-code mark.exp-val { background: var(--tint-strong); padding: 0 4px; margin: 0 1px; outline: 1px solid var(--blue); }

/* controls row: parameters, action, previous/next together, run state */
.exp-ctl { gap: 10px; }
.exp-ctl .lbl { font-size: 17px; font-weight: 650; }
.exp-ctl .vsep { background: var(--line); margin: 0 6px; }
.exp-ctl .val { padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: 18px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-ctl input[type=range] { accent-color: var(--blue); margin: 0 2px; }
.exp-seg button { padding: 0 14px; border: 1px solid var(--control-line); background: var(--paper); color: var(--ink); font-size: 17px;
  cursor: pointer; margin-left: -1px; white-space: nowrap; }
.exp-seg button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.exp-seg button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.exp-seg button.on { background: var(--tint); border-color: var(--blue); color: var(--link-ink); font-weight: 700; }
.exp-seg button:disabled:not(.on) { color: var(--ink-2); background: var(--wash); border-color: var(--line); cursor: default; }
.exp-lock { color: var(--muted); }
.exp-btn { padding: 0 18px; font-size: 17px; line-height: 1; gap: 8px; white-space: nowrap; }
.exp-btn.run { font-weight: 650; }
.exp-nav .exp-btn { border-radius: 0; }
.exp-nav .exp-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.exp-nav .exp-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.exp-state { margin-left: auto; font-size: 15px; color: var(--muted); gap: 7px; white-space: nowrap; }

/* messages of the run: errors, the connect prompt, notes */
.exp-msg { font-size: 16px; }
.exp-msg .lab-error { margin: 0; padding: 10px 14px; border-radius: var(--radius-box); font: 15px/1.5 var(--mono); white-space: pre-wrap; }
.exp-msg .lab-note { margin: 0; color: var(--muted); }
.exp-msg .lab-prompt { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--paper); }
.exp-msg .lab-prompt-actions { gap: 10px; margin-top: 8px; }

/* figures and tables: large text on the right; a figure takes the book's figure rules (.concept-figure: 2 px rule above,
   1 px line below), drawn inside its box so no size changes */
.exp-body { gap: 14px; }
.exp-row { gap: 26px; }
.exp-fig { margin: 0; background-image: linear-gradient(var(--figure-rule), var(--figure-rule)), linear-gradient(var(--line), var(--line));
  background-size: 100% 2px, 100% 1px; background-position: top, bottom; background-repeat: no-repeat; }
.exp-fig figcaption { line-height: 1.2; gap: 4px 20px; padding: 0 20px 0 min(96px, 5vw); }
.exp-fig .pt { font-size: 20px; font-weight: 650; white-space: nowrap; }
.exp-fig .lg { margin-left: auto; gap: 2px 18px; font-size: 17px; color: var(--muted); white-space: nowrap; }
.exp-fig .lg span { gap: 7px; }
.exp-fig .lg i { border-top: 2.5px solid; }
.exp-fig .lg b { border-radius: 50%; }
.exp-fig .lg u { border-radius: 50%; border: 2.4px solid; text-decoration: none; }
table.exp-t { border-collapse: collapse; font-size: 17px; font-variant-numeric: tabular-nums; }
table.exp-t caption { text-align: left; font-size: 18px; font-weight: 650; padding: 0 0 6px; }
table.exp-t caption .exp-rep { margin-left: 8px; vertical-align: 2px; }
table.exp-t th { text-align: right; padding: 7px 14px; font-size: 17px; line-height: 1.35; }
table.exp-t td { text-align: right; padding: 7px 14px; line-height: 1.45; }
table.exp-t :is(th, td):first-child { text-align: left; }
table.exp-t tr.now td { background: var(--tint); font-weight: 650; }
table.exp-t td.miss { color: var(--orange); font-weight: 700; }
.exp-sw { border-top: 3px solid; vertical-align: middle; margin-right: 10px; }

/* student task: tinted left panel, task cards, report marks */
.exp-left.task { background: var(--reading); padding-top: 24px; }
.exp-pill { padding: 0 16px; background: var(--blue); font-size: 20px; letter-spacing: .5px; }
.exp-left.task h1 { margin: 8px 0 12px; }
.exp-card { border-left: 3px solid var(--blue); padding: 8px 18px 12px; margin-bottom: 10px; }
.exp-ch { gap: 12px; font-size: 19px; font-weight: 700; color: var(--blue); line-height: 1.6; margin-bottom: 2px; }
.exp-ch .exp-rep { margin-left: auto; }
.exp-card p { font-size: 19px; line-height: 1.7; }
.exp-given { margin-bottom: 4px !important; }
.exp-prow { gap: 10px; font-size: 19px; margin-top: 6px; }
.exp-in { padding: 0 12px; font: 20px var(--remi-font); text-align: right; font-variant-numeric: tabular-nums; }
.exp-in:read-only { background: var(--surface); }
.exp-in:disabled { background: var(--surface); border-style: dashed; }
.exp-in.bad { border: 1px solid var(--orange); }
.exp-auto { padding: 0 12px; border-radius: var(--radius); background: var(--surface); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.exp-prow .unit { color: var(--muted); font-size: 17px; }
.exp-save-row { margin-top: 8px; }
.exp-save { font-size: 16px; }
.exp-save.done { color: var(--positive); border-color: var(--positive); }
.exp-card textarea { padding: 6px 12px; font: 18px/1.6 var(--remi-font); }
.exp-card textarea::placeholder { color: var(--faint); }
.exp-left.task .exp-code { background: var(--paper); }
.exp-left.task .exp-foot { padding-bottom: 8px; }
.exp-replist { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px; gap: 6px 16px; }
.exp-left.task .exp-foot + .exp-replist { margin-top: 0; }
.exp-replist .i { gap: 6px; }
.exp-replist b { color: var(--positive); font-weight: 700; }
.exp-replist em { font-style: normal; color: var(--muted); }
.exp-rep { gap: 5px; padding: 0 9px; border: 1px solid var(--control-line); border-radius: var(--radius); color: var(--control-ink); font-size: 15px;
  font-weight: 600; line-height: 1; background: var(--paper); white-space: nowrap; }
.exp-fig .lg .exp-rep { font-size: 17px; }

/* narrower screens (1536×864 and the like): the course name gives way to the step chips (exp.css) */
@media (max-width: 1700px) {
  .exp-top { gap: 16px; padding: 0 20px; }
  .exp-status { gap: 12px; margin-left: 12px; }
}
#exp-app .exp-fig .lg em { font-style: normal; }

/* shorter screens (1536×864 and the like): tighter spacing on the left, the same text sizes; exp.js scales the column
   down as a whole only if it still does not fit */
@media (max-height: 1000px) {
  .exp-left { padding: 18px 24px 14px; }
  .exp-left.task { padding-top: 16px; }
  #exp-app h1 { font-size: 26px; margin: 4px 0 10px; }
  .exp-left.task h1 { margin: 4px 0 8px; }
  .exp-lead { margin-bottom: 16px; line-height: 1.6; }
  .exp-card { padding: 4px 14px 8px; margin-bottom: 7px; }
  .exp-ch { line-height: 1.45; }
  .exp-card p { line-height: 1.55; }
  .exp-prow { margin-top: 3px; }
  .exp-save-row { margin-top: 4px; }
  .exp-card textarea { padding: 4px 10px; line-height: 1.5; }
  .exp-code ol { padding: 6px 0; }
  .exp-code li { line-height: 25px; font-size: 15px; }
  .exp-foot { padding-top: 6px; }
  .exp-replist { padding-top: 6px; }
  .exp-right { padding: 14px 24px; gap: 10px; }
  .exp-body { gap: 10px; }
}

/* formula box (설명 2-2): formulas left, values right */
.exp-formula { gap: 4px 36px; padding: 12px 22px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--paper); font-size: 20px; }
.exp-formula i { font-family: KaTeX_Math; font-style: italic; font-size: 22px; }
.exp-formula .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.exp-pseg button { font-size: 16px; }

/* task card v2 (1안): 근거 line, mean and range per quantity, 비교 answer and verdict, two 고찰 fields */
.exp-text { padding: 0 12px; font: 17px var(--remi-font); }
.exp-text:read-only { background: var(--surface); }
.exp-prow .exp-spread { font-size: 15px; color: var(--muted); text-align: left; white-space: nowrap; }
.exp-prow.stack .exp-seg button { margin-left: 0; margin-top: -1px; border-radius: 0; text-align: left; padding: 4px 12px; }
.exp-prow.stack .exp-seg button:first-child { border-radius: var(--radius) var(--radius) 0 0; margin-top: 0; }
.exp-prow.stack .exp-seg button:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.exp-verdict { margin-top: 6px !important; font-size: 18px; font-weight: 700; gap: 4px 16px; }
.exp-verdict.ok { color: var(--positive); }
.exp-verdict.bad { color: var(--orange); }
.exp-verdict .exp-diff { font-size: 16px; font-weight: 600; color: var(--ink); }
.exp-field { margin-top: 4px; }
.exp-field > span { font-size: 16px; color: var(--muted); line-height: 1.5; }

/* task cards fold (FIXES-v2-fable F2): a finished card is one summary line, a later card its name only */
.exp-card.shut { padding-bottom: 8px; }
.exp-card.shut .exp-ch { margin-bottom: 0; }
.exp-card.later { border-left-color: var(--control-line); }
.exp-card.later .exp-ch { color: var(--muted); }
.exp-ch.exp-tog { cursor: pointer; }
.exp-ch.exp-tog:hover, .exp-ch.exp-tog:focus-visible { text-decoration: underline; text-underline-offset: 4px; outline: none; }
.exp-sum { text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink); }
.exp-sum + .exp-rep { margin-left: 0; }
.exp-after { margin-top: 6px !important; color: var(--purple); font-weight: 600; }
.exp-differ { color: var(--orange); font-weight: 700; }
.exp-verdict.ok .exp-differ { color: var(--orange); }
@media (max-height: 1000px) {
  .exp-card.shut { padding-bottom: 5px; }
}

/* ---------------------------------------------------------------- task cards (lab/task.js, task.css) */
/* The mockups' colour roles (2026-11-09) in the book's colours: prediction orange, the code line linked to a control
   amber, read-only cells grey, input cells framed blue. */
html.task-page main { padding: 18px 28px 60px; background: var(--band); }
html.task-page .lab-toolbar { background: var(--paper); margin: 0 -28px 18px; padding: 8px 28px; font-size: 15px; }
html.task-page .lab-toolbar button { font-size: 15px; }
html.task-page article { gap: 0 22px; line-height: 1.7; }
html.task-page .task-flow > h1 { margin-top: 0; }

/* Index of cards: the book's chapter list (current item tinted) */
.task-index { gap: 2px; padding: 10px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-box); font-size: 15px;
  line-height: 1.35; }
.task-index-head { margin: 0 6px 6px; font-weight: 700; color: var(--muted); font-size: 15px; }
.task-index a { gap: 8px; padding: 7px 8px; border-radius: var(--radius); color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.task-index a:hover { background: var(--panel); }
.task-index a[aria-current] { background: var(--tint); color: var(--link-ink); font-weight: 650; }
.task-index-num { font-family: var(--mono); font-size: inherit; }
.task-index a.done .task-index-num::after { color: var(--positive); }

/* Cards */
.task-card { margin: 0 0 22px; padding: 18px 24px 20px; }
.task-card.current { border-color: var(--blue); box-shadow: none; }
.task-head { gap: 14px; }
.task-head h2 { margin: 0 !important; font-size: 23px; line-height: 1.3; border: 0; padding: 0; }
.task-num { background: var(--ink); padding: 2px 10px; font-size: 18px; font-family: var(--mono); }
.task-time { color: var(--muted); font-size: 15px; }
.task-steps { margin: 0 0 0 auto; padding: 0; list-style: none; gap: 4px; font-size: 15px; color: var(--faint); }
.task-steps li { padding: 3px 10px; border-radius: var(--radius); }
.task-steps li.done { color: var(--positive); font-weight: 650; }
.task-info .task-text { font-size: 17px; }
.task-box-label { margin: 0 0 6px !important; font-weight: 700; font-size: 16px; color: var(--muted); }

.task-read { margin: 14px 0 0; padding: 12px 16px 6px; background: var(--reading); border: 1px solid var(--line); border-radius: var(--radius-box);
  font-size: 16px; line-height: 1.55; }
.task-read ul { margin: 0 0 6px; padding-left: 20px; }
.task-read li { margin: 0 0 6px; }
.task-read a { font-weight: 650; }
.task-read-outside { margin: 4px 0 4px !important; font-size: 15px; font-weight: 700; color: var(--muted); }
.task-background { margin: 14px 0 0; font-size: 17px; line-height: 1.6; }
.task-background > p, .task-background > ul { margin: 0 0 10px; }
/* 배경 as numbered points (PI 2026-11-09 "point by point explanation"): one idea per point, figures between points. */
.task-background > ol { margin: 0 0 8px; padding-left: 2.2em; }
.task-background > ol > li { margin: 0 0 7px; padding-left: 4px; }
.task-background > ol > li::marker { font-weight: 700; color: var(--link-ink); }
.task-background > p:has(+ table), .task-background > p.task-figure-label { margin: 2px 0 4px 2.6em; font-size: 15.5px; color: var(--muted); }
/* A table in 배경: the book's rules between rows only (the vertical borders stay, transparent, so no width changes). */
.task-background > table { margin: 2px 0 12px 2.6em; border-collapse: collapse; font-size: 16px; }
.task-background > table th, .task-background > table td { border: 1px solid transparent; border-bottom-color: var(--line); padding: 3px 12px;
  text-align: center; }
.task-background > table th { font-size: 17px; font-weight: 650; border-bottom-color: var(--rule); }
.task-background > table td:first-child { text-align: left; font-weight: 600; }
.task-background > table th:first-child { text-align: left; }
.task-background .katex-display { margin: 4px 0 12px 2.6em; text-align: left; }
.task-background .katex-display > .katex { text-align: left; }
/* A static figure between the points of 배경 (실습 4: the chain and the Gray map). */
.task-background > .task-svg { margin: 2px 0 12px 2.6em; }
.task-background h3 { font-size: 18px; margin: 14px 0 6px; }
.task-question { margin: 12px 0 0; padding: 10px 14px; background: var(--reading); border-left: 3px solid var(--figure-rule); font-size: 18px; line-height: 1.55; }
.task-question p { margin: 0; }
.task-question .task-box-label { margin-right: 10px !important; color: var(--ink); }

/* Two columns: code left, results right */
.task-cols { gap: 26px; margin-top: 16px; }
.task-left, .task-right { gap: 12px; }

/* Cells */
.task-card .lab-cell { margin: 0; border-left-width: 1px; }
.task-cell-head { gap: 8px; padding: 5px 12px; font-size: 15px; line-height: 1.4; }
.task-cell-head .task-tag { margin-left: auto; }
.task-lock { color: var(--muted); }
.task-code { margin: 0; padding: 8px 0; background: transparent; font: 15.5px/26px var(--mono); color: var(--ink); }
.task-code .ln { padding: 0 14px 0 0; white-space: pre; }
.task-code .ln::before { text-align: right; margin-right: 14px; }
.task-code .hl { background: linear-gradient(var(--amber), var(--amber)) left / 3px 100% no-repeat var(--warn-bg); }
.task-code .task-value { background: var(--paper); outline: 1px solid var(--amber); padding: 0 5px; }
.task-in { background: var(--paper); border: 1px solid var(--blue) !important; }
.task-in .task-cell-head { background: var(--tint); color: var(--link-ink); }
.task-in .task-cell-head button { font-size: 15px; padding: 2px 10px; }
.task-in .lab-editor { background: var(--paper); }
.task-in .lab-editor .lab-lines, .task-in .lab-editor textarea { font: 15.5px/26px var(--mono); }
.task-card .lab-output { font-size: 15px; }
.task-card .lab-output pre { font-size: 15px; }
.task-card .lab-note-todo { font-size: 15px; }

/* Hints */
.task-hints { margin: -4px 0 0; }
.task-hint-row { gap: 8px; }
.task-hint-label { color: var(--muted); font-size: 15px; }
.task-hint { padding: 3px 12px; font-size: 15px; }
.task-hint.open { border-color: var(--orange); color: var(--orange); }
.task-hint-text { margin-top: 8px; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-box); font-size: 15.5px; line-height: 1.6; }
.task-hint-text code { font-size: 15px; }

/* 예측 */
.task-predict { border: 1px solid var(--orange); border-radius: var(--radius-box); padding: 10px 14px 12px; background: var(--paper); }
.task-predict > .task-box-label { color: var(--orange); gap: 12px; }
.task-lockline { font-weight: 400; color: var(--muted); font-size: 15px; }
.task-prow { gap: 4px 10px; margin: 0 0 8px; font-size: 16px; }
.task-plabel { font-weight: 650; color: var(--ink); }
.task-plabel code { font-size: 15px; }
.task-prow input { padding: 5px 10px; font: 16px/18px var(--mono); }
.task-prow input.wide { font-family: inherit; }
.task-prow input.bad { border-color: var(--red); background: var(--error-bg); }
.task-prow input[readonly], .task-reason textarea[readonly] { background: var(--surface); color: var(--ink); }
.task-unit { color: var(--muted); }
.task-forms { font-size: 15px; color: var(--faint); line-height: 1.3; }
.task-parse { color: var(--red); font-size: 15px; }
.task-reason { margin: 4px 0 0 !important; gap: 10px; }
.task-reason textarea, .task-explain textarea, .task-apply textarea { font: 16px/1.5 inherit; padding: 6px 10px !important;
  border: 1px solid var(--control-line) !important; border-radius: var(--radius); background: var(--paper); color: var(--ink); }

/* Run row */
.task-runrow { gap: 12px; }
.task-run { border: 1px solid var(--blue); padding: 8px 19px; font-weight: 700; font-size: 17px; }
.task-next, .task-apply-check { padding: 8px 18px; font-weight: 700; font-size: 16px; }
.task-gate { color: var(--positive); font-size: 15px; }
.task-gate.wait { color: var(--faint); }

/* Right column: the control row as the book's figure controls */
.task-control { gap: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--panel); font-size: 15px; }
.task-control-name { font: 700 15px var(--mono); }
.task-control input[type="range"] { accent-color: var(--amber); }
.task-control-range { color: var(--muted); font-size: 15px; }
.task-control-value { font: 700 16px var(--mono); text-align: right; }
.task-link { font: 15px var(--mono); color: var(--warn-ink); background: var(--warn-bg); border-radius: var(--radius); padding: 1px 8px; }
.task-control-note { color: var(--muted); font-size: 15px; }
.task-placeholder { margin: 0; padding: 40px 16px; text-align: center; color: var(--faint); border: 1px dashed var(--control-line);
  border-radius: var(--radius-box); font-size: 16px; }
.task-plot-output { padding: 0 !important; border: 0 !important; }
.task-plot-output .lab-plot { margin: 0 0 4px; }
.task-plot-output .lab-record-output { margin: 0 0 18px; }
.task-plot-output .lab-plot-readout, .task-plot-output .lab-plot-tools button, .task-plot-output .lab-record-add { font-size: 15px; }
.task-plot-output .lab-plot-note { font-size: 15px; }
/* A table that the page's Python prints under a plot (실습 4) reads at the cards' table size. */
.task-plot-output .lab-table table { font-size: 16px; }
.task-plot-output .lab-table th, .task-plot-output .lab-table td { padding: 4px 10px; }
.task-table table { border-collapse: collapse; font-size: 16px; }
.task-table caption { text-align: left; font-weight: 650; padding: 0 0 4px; font-size: 15px; color: var(--muted); }
.task-table th, .task-table td { padding: 5px 10px; text-align: center; }
.task-table thead th, .task-plot-output .lab-table th { font-size: 17px; font-weight: 650; }
.task-table tbody th { text-align: left; font-weight: 600; }
.task-table td { font-family: var(--mono); white-space: nowrap; }
.task-table td.task-mark { color: var(--positive); font-family: inherit; }
.task-table tr.off td.task-mark { color: var(--orange); }
.task-check { margin: 0; padding: 9px 14px; border-radius: var(--radius-box); font-size: 16px; line-height: 1.5; }
.task-check.pass { background: var(--paper); color: var(--positive); border: 1px solid var(--positive); }
.task-check.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--amber); }

/* 적용, 설명 */
.task-apply { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--band); }
.task-apply-q { font-size: 16.5px; margin: 0 0 10px; }
.task-explain { margin: 16px 0 0 !important; border: 1px solid var(--line); border-radius: var(--radius-box); padding: 10px 14px; background: var(--paper); }
.task-explain-q { font-size: 16.5px; margin: 0 0 8px; line-height: 1.55; }
.task-explain-q .task-box-label { margin-right: 10px !important; color: var(--ink); }

@media (max-width: 1499px) {
  .task-index { margin: 0 0 14px; padding: 6px 8px; }
  .task-index a { padding: 4px 10px; }
  .task-code, .task-in .lab-editor .lab-lines, .task-in .lab-editor textarea { font-size: 15px; line-height: 24px; }
  .task-card { padding: 16px 18px 18px; }
}

/* Tables the page's Python draws with show.table inside a card (실습 2 on): card-sized text. */
.task-plot-output .lab-table table { font-size: 16px; }
.task-plot-output .lab-table caption { font-size: 15px; color: var(--muted); }
.task-plot-output .lab-table th, .task-plot-output .lab-table td { padding: 5px 12px 5px 0; }
.task-plot-output .lab-table td { font-family: var(--mono); }
/* An extra table column may hold a sentence (실습 3, 3-3 verdicts): it wraps instead of running past the card. */
.task-table td.task-extra { white-space: normal; font-family: inherit; text-align: left; font-size: 16px; line-height: 1.45; }

/* No ligatures in code: JetBrains Mono would draw Python ">=" as one "≥" glyph (also "->", "!=", "==", "<=", "**"),
   which students would read and type (wes-experiments D:0add38, 실험 1-3). Every element that uses the mono face. */
#exp-app code, .exp-code li, .exp-msg .lab-error, .task-index-num, .task-num, .task-code,
.task-in .lab-editor .lab-lines, .task-in .lab-editor textarea, .task-prow input, .task-control-name,
.task-control-value, .task-link, .task-table td, .task-plot-output .lab-table td,
.lab-count, .lab-cell-name, .lab-table .num, .lab-snippet code,
code, pre, kbd, samp, textarea {
  font-variant-ligatures: none !important;
  font-feature-settings: "liga" 0, "calt" 0 !important;
}

/* Lab overview card tables (inside .task-info .task-text) take the same values as the other lab tables
   (web-design D:ddd885: head 17 px / 650, body 16 px); the round-3 selectors missed them. */
.task-info .task-text table { font-size: 16px; }
.task-info .task-text th { font-size: 17px; font-weight: 650; }
