/* 블로그(apps/blog)와 같은 틀과 색: 밝은 회색 바탕, 먹색 글자, 화면 끝까지 닿는 얇은 머리줄. 강조색 없이 먹색만 씁니다 */
:root {
  color-scheme: light dark;
  --paper: #f6f6f8;
  --raised: #ffffff;
  --soft: #efeff3;
  --code-bg: #fbfbfc;
  --ink: #141418;
  --ink-2: #4b4b57;
  --muted: #75758a;
  --label: #9d9daf;
  --faint: #cdcdd8;
  --rule: #e6e6ee;
  --ok: #17804c;
  --ok-bg: #edf7f1;
  --bad: #c8372c;
  --bad-bg: #fbefee;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --wide: 1120px;
  --gutter: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0e;
    --raised: #15151a;
    --soft: #22222a;
    --code-bg: #111116;
    --ink: #f3f3f7;
    --ink-2: #bdbdc9;
    --muted: #8a8a9b;
    --label: #626272;
    --faint: #3a3a46;
    --rule: #22222a;
    --ok: #3fbf7f;
    --ok-bg: #12241b;
    --bad: #f0675c;
    --bad-bg: #2a1514;
  }
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1 0 auto; width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--ink) 14%, transparent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
code { padding: 0.12em 0.36em; background: var(--soft); border-radius: 5px; font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; color: var(--ink); }

/* 머리와 꼬리 */
.site-header { width: 100%; padding: 0 max(var(--gutter), calc((100% - var(--wide)) / 2 + var(--gutter))); border-bottom: 1px solid var(--rule); }
.site-header-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 56px; }
.site-header nav { display: flex; align-items: center; gap: 2px; margin-right: -10px; font-size: 13.5px; font-weight: 550; color: var(--muted); }
.site-header nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; white-space: nowrap; transition: color 140ms ease-out, background-color 140ms ease-out; }
@media (hover: hover) { .site-header nav a:hover { color: var(--ink); background: var(--soft); } }
.wordmark { font-size: 18px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; text-decoration: none; }
.wordmark span { margin-left: 6px; font-weight: 700; color: var(--label); }

.site-footer { width: 100%; padding: 0 max(var(--gutter), calc((100% - var(--wide)) / 2 + var(--gutter))); border-top: 1px solid var(--rule); }
.site-footer-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 60px; font-size: 12.5px; color: var(--label); }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 140ms ease-out; }
@media (hover: hover) { .site-footer a:hover { color: var(--ink); } }

/* 진행 막대 */
.progress { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }
.progress-bar { flex: 1; min-width: 40px; height: 4px; overflow: hidden; background: var(--rule); border-radius: 999px; }
.progress-bar > span { display: block; width: var(--p, 0%); height: 100%; background: var(--ink); border-radius: inherit; transition: width 240ms var(--ease-out); }
.progress.is-done { color: var(--ink); }

/* 첫 화면: 왼쪽 차례, 오른쪽 안내 */
.list-page { display: grid; grid-template-columns: minmax(0, 1fr) 240px; column-gap: 64px; align-content: start; max-width: var(--wide); margin: 0 auto; padding: 16px var(--gutter) 80px; }
.parts { min-width: 0; }
.part { padding-top: 28px; }
.part:first-child { padding-top: 8px; }
.part-title { padding-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--label); border-bottom: 1px solid var(--rule); }

.rows { padding: 0; list-style: none; }
.rows > li { border-bottom: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 20px; padding: 20px 0; text-decoration: none; }
.row-num { flex: none; align-self: flex-start; width: 24px; padding-top: 3px; font-size: 13px; font-weight: 700; color: var(--label); font-variant-numeric: tabular-nums; }
.row.is-soon { opacity: 0.55; }
.row-text { flex: 1; min-width: 0; }
.row h2 { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.row p { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.row .progress { flex: none; width: 104px; }
@media (hover: hover) { .row:hover h2 { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; } }
.row:focus-visible { outline-offset: 4px; }

.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 12.5px; font-weight: 500; color: var(--label); font-variant-numeric: tabular-nums; }
.meta > * + *::before { content: "·"; margin-right: 8px; color: var(--faint); }

.sources { padding-top: 48px; }
.sources-text { margin-top: 12px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; margin-top: 16px; padding: 0; list-style: none; }
.repos li { font-size: 13.5px; line-height: 1.5; }
.repos a { font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1.5px; overflow-wrap: anywhere; }
@media (hover: hover) { .repos a:hover { text-decoration-color: currentColor; } }
.repos .stars { margin-left: 8px; font-size: 12px; color: var(--label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.repos p { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

.side { position: sticky; top: 24px; align-self: start; padding-top: 32px; }
.side-title { margin: 24px 0 8px; font-size: 12px; font-weight: 700; color: var(--label); }
.side > .side-title:first-child { margin-top: 0; }
.side-text { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.side-meta { margin-top: 6px; font-size: 12.5px; color: var(--label); }
.side-link { margin-top: 12px; font-size: 13.5px; font-weight: 650; }
.side-link a { text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1.5px; }
@media (hover: hover) { .side-link a:hover { text-decoration-color: currentColor; } }
.tips { display: grid; gap: 6px; padding-left: 1.1em; font-size: 13px; line-height: 1.6; color: var(--muted); }
.tips li::marker { color: var(--faint); }
.reset { margin-top: 20px; padding: 0; background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--label); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { .reset:hover { color: var(--ink); } }

/* 장 화면: 글 화면과 같은 틀. 왼쪽 본문, 오른쪽 목차 */
.page { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 16px var(--gutter) 80px; }
.stage-head { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.stage-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; font-weight: 500; color: var(--label); font-variant-numeric: tabular-nums; }
.stage-meta > * + *::before { content: "·"; margin-right: 8px; color: var(--faint); }
.stage-meta a { color: var(--muted); text-decoration: none; transition: color 140ms ease-out; }
@media (hover: hover) { .stage-meta a:hover { color: var(--ink); } }
.stage-head h1 { margin-top: 6px; font-size: clamp(24px, 3vw, 30px); font-weight: 750; line-height: 1.3; letter-spacing: -0.045em; text-wrap: balance; }
.stage-goal { max-width: 68ch; margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.stage-head .progress { max-width: 280px; margin-top: 16px; }

.stage-layout { display: grid; grid-template-columns: minmax(0, 720px) 190px; gap: 64px; justify-content: space-between; }
.stage-main { min-width: 0; padding-top: 32px; }

.toc { position: sticky; top: 24px; align-self: start; max-height: calc(100dvh - 48px); overflow-y: auto; padding-top: 36px; text-align: right; scrollbar-width: none; }
.toc-title { margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--label); }
.toc ul { display: grid; gap: 6px; padding: 0; list-style: none; }
.toc a { font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--muted); text-decoration: none; transition: color 140ms ease-out; }
@media (hover: hover) { .toc a:hover { color: var(--ink); } }
.toc-letters ul { grid-template-columns: repeat(4, auto); justify-content: end; gap: 6px 12px; }

/* 본문 */
.prose { font-size: 16px; font-weight: 450; line-height: 1.8; letter-spacing: -0.02em; color: var(--ink-2); text-wrap: pretty; }
.prose > * + * { margin-top: 0.7em; }
.prose > :first-child { margin-top: 0; }
.prose > :is(pre, .table, aside, dl, .checklist, .qa),
.prose > :is(pre, .table, aside, dl, .checklist, .qa) + * { margin-top: 1.2em; }
.prose :is(h2, h3) { color: var(--ink); line-height: 1.4; letter-spacing: -0.035em; font-weight: 700; scroll-margin-top: 24px; text-wrap: balance; }
.prose h2 { margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--rule); font-size: 1.3em; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 1.7em; font-size: 1.1em; }
.prose > :is(h2, h3) + * { margin-top: 0.5em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color 140ms ease-out; }
@media (hover: hover) { .prose a:hover { text-decoration-color: currentColor; } }
.prose a.term { text-decoration-style: dotted; text-decoration-color: var(--label); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.25em; }
.prose li > :is(ul, ol, p, pre) { margin-top: 0.3em; }
.prose li::marker { color: var(--label); }
.prose pre { position: relative; overflow-x: auto; padding: 16px 18px; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 12px; font-size: 13.5px; line-height: 1.65; letter-spacing: 0; }
.prose pre[data-lang] { padding-top: 34px; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 11px; left: 18px; font: 600 11px/1 var(--mono); letter-spacing: 0; color: var(--label); }
.prose pre code { padding: 0; background: none; font-size: inherit; color: var(--ink); white-space: pre; }

.prose .table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-size: 13px; font-weight: 650; color: var(--ink); border-bottom-color: var(--faint); white-space: nowrap; }
.prose td:first-child { font-weight: 600; color: var(--ink); }
.prose td code, .prose th code { white-space: nowrap; }

.prose aside.note { padding: 14px 18px; background: var(--raised); border: 1px solid var(--rule); border-radius: 12px; font-size: 15px; }
.prose aside.note > * + * { margin-top: 0.5em; }

/* 그림: SVG를 본문에 바로 넣어 같은 색 토큰을 씁니다. 그림 안에서는 아래 이름표만 씁니다 */
.prose > .fig { margin-top: 1.8em; }
.prose > .fig + * { margin-top: 1.8em; }
.fig-body { overflow-x: auto; scrollbar-width: thin; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 12px; }
.fig figcaption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
/* 글자 기본값은 svg에 두어, <g>에 준 글자 class가 안쪽 글자에 그대로 이어지게 합니다 */
.fig svg { font-size: 13px; font-weight: 500; fill: var(--ink-2); letter-spacing: -0.01em; }
.fig .bx { fill: var(--raised); stroke: var(--faint); stroke-width: 1; }
.fig .bx-soft { fill: var(--soft); stroke: none; }
.fig .bx-ink { fill: var(--ink); stroke: none; }
.fig .bx-line { fill: none; stroke: var(--faint); stroke-width: 1; }
.fig .bx-dash { fill: none; stroke: var(--faint); stroke-width: 1; stroke-dasharray: 4 4; }
.fig .ln { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.fig .ln-ink { fill: none; stroke: var(--ink); stroke-width: 2; }
.fig .ln-faint { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.fig .ln-dash { stroke-dasharray: 5 4; }
.fig .ah { fill: var(--muted); }
.fig .ah-ink { fill: var(--ink); }
.fig .dot { fill: var(--ink); }
.fig .dot-soft { fill: var(--label); }
.fig .tx-b { font-weight: 700; fill: var(--ink); }
.fig .tx-s { font-size: 11.5px; fill: var(--muted); }
.fig .tx-l { font-size: 11px; font-weight: 650; fill: var(--label); letter-spacing: 0.02em; }
.fig .tx-inv { fill: var(--paper); }
.fig .tx-m { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }

/* 문제: 보기를 누르면 바로 맞았는지 보여 줍니다. 맞음과 틀림에만 초록과 빨강을 씁니다 */
.prose > .quiz-set { margin-top: 1.2em; }
.quiz-set { display: flex; flex-direction: column; gap: 12px; }
.quiz { padding: 16px 18px; background: var(--raised); border: 1px solid var(--rule); border-radius: 12px; }
.quiz-q { font-size: 15px; font-weight: 650; line-height: 1.6; color: var(--ink); }
.quiz-q::before { content: "문제"; display: inline-block; margin-right: 8px; padding: 1px 7px; vertical-align: 1px; background: var(--soft); border-radius: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.prose .quiz-options { display: grid; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.prose .quiz-options li + li { margin-top: 0; }
.quiz-option { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 9px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 9px; font: inherit; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); text-align: left; cursor: pointer; transition: border-color 140ms ease-out, background-color 140ms ease-out; }
@media (hover: hover) { .quiz-option:not(:disabled):hover { border-color: var(--label); color: var(--ink); } }
.quiz-option:disabled { cursor: default; }
.quiz-mark { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--faint); border-radius: 6px; font: 650 11px/1 var(--mono); color: var(--muted); }
.quiz.is-answered .quiz-option:not(.is-correct):not(.is-picked) { opacity: 0.55; }
.quiz-option.is-correct { border-color: var(--ok); background: var(--ok-bg); color: var(--ink); }
.quiz-option.is-correct .quiz-mark { border-color: var(--ok); background: var(--ok); color: var(--paper); }
.quiz-option.is-picked:not(.is-correct) { border-color: var(--bad); background: var(--bad-bg); color: var(--ink); }
.quiz-option.is-picked:not(.is-correct) .quiz-mark { border-color: var(--bad); background: var(--bad); color: var(--paper); }
.quiz-input { display: flex; gap: 8px; margin-top: 12px; }
.quiz-input input { flex: 1; min-width: 0; padding: 8px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 9px; font: inherit; font-size: 14.5px; color: var(--ink); }
.quiz-input input:focus { outline: none; border-color: var(--label); }
.quiz-input button { padding: 8px 14px; background: var(--ink); border: 0; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--paper); cursor: pointer; }
.quiz-input :disabled { cursor: default; }
.quiz-input button:disabled { opacity: 0.4; }
.quiz.is-right .quiz-input input { border-color: var(--ok); background: var(--ok-bg); }
.quiz.is-wrong .quiz-input input { border-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; }
.quiz-result:empty { display: none; }
.quiz-result { margin-top: 10px; font-size: 13.5px; font-weight: 650; }
.quiz.is-right .quiz-result { color: var(--ok); }
.quiz.is-wrong .quiz-result { color: var(--bad); }
.quiz-explain { margin-top: 10px; font-size: 14.5px; }
.quiz-explain summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.quiz-explain .answer { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--rule); line-height: 1.75; }
.quiz-explain .answer > * + * { margin-top: 0.5em; }
.quiz-score { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 2px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.quiz-score button { padding: 0; background: none; border: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { .quiz-score button:hover { color: var(--ink); } }

.prose dl.terms { border-top: 1px solid var(--rule); }
.term-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.term-row dt { font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--ink); }
.term-row dd { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.term-row:target { background: linear-gradient(var(--soft), var(--soft)) no-repeat; background-size: calc(100% + 24px) 100%; background-position: -12px 0; }

/* 직접 해보기 */
.checklist { padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.checklist > li { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.prose .checklist > li + li { margin-top: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input, .finish input { appearance: none; position: relative; flex: none; width: 18px; height: 18px; margin-top: 4px; background: var(--raised); border: 1.5px solid var(--faint); border-radius: 5px; cursor: pointer; transition: background-color 140ms ease-out, border-color 140ms ease-out; }
.check input:checked, .finish input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after, .finish input:checked::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 5px; height: 9px; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (hover: hover) { .check:hover input:not(:checked), .finish:hover input:not(:checked) { border-color: var(--label); } }
.check > span { font-size: 15.5px; font-weight: 650; line-height: 1.6; color: var(--ink); transition: color 140ms ease-out; }
.check input:checked + span { color: var(--muted); }
.check-body { margin-top: 6px; padding-left: 30px; font-size: 15px; }
.check-body > * + * { margin-top: 0.7em; }

/* 스스로 점검 */
.qa { border-top: 1px solid var(--rule); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary { display: flex; gap: 10px; padding: 14px 0; font-size: 15.5px; font-weight: 600; line-height: 1.6; color: var(--ink); list-style: none; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: ""; flex: none; width: 0; height: 0; margin: 0.6em 2px 0 2px; border-left: 6px solid var(--label); border-block: 4.5px solid transparent; transition: transform 140ms var(--ease-out); }
.qa details[open] summary::before { transform: rotate(90deg); }
.qa .answer { padding: 0 0 16px 18px; font-size: 15px; line-height: 1.75; }
.qa .answer > * + * { margin-top: 0.6em; }

.finish { display: flex; gap: 12px; align-items: center; margin-top: 48px; padding: 16px 18px; background: var(--raised); border: 1px solid var(--rule); border-radius: 12px; font-size: 15px; font-weight: 650; cursor: pointer; }
.finish input { margin-top: 0; }

.stage-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
.stage-nav a { display: grid; gap: 2px; font-size: 14.5px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.stage-nav a span { font-size: 12px; font-weight: 500; color: var(--label); }
.stage-nav .next { margin-left: auto; text-align: right; }
@media (hover: hover) { .stage-nav a:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-decoration-thickness: 1.5px; } }

/* 용어 사전 */
.filter { display: block; width: 100%; max-width: 360px; margin-top: 16px; padding: 9px 12px; background: var(--raised); border: 1px solid var(--rule); border-radius: 10px; font: inherit; font-size: 14.5px; color: var(--ink); }
.filter::placeholder { color: var(--label); }
.filter:focus { outline: none; border-color: var(--label); }
.term-group { scroll-margin-top: 16px; }
.term-group + .term-group { margin-top: 28px; }
.term-group h2 { padding-bottom: 6px; font-size: 15px; font-weight: 750; color: var(--ink); border-bottom: 1px solid var(--rule); }
.term-group .term-row:last-child { border-bottom: 0; }
.term-from { margin-left: 6px; font-size: 12.5px; font-weight: 600; color: var(--label); text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .term-from:hover { color: var(--ink); text-decoration: underline; } }
.empty { padding: 24px 0; font-size: 14px; color: var(--muted); }

@media (max-width: 1023px) {
  .list-page { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: -1; padding-top: 16px; padding-bottom: 8px; }
  .stage-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .site-header-in { height: 52px; }
  .wordmark { font-size: 17px; }
  .row { gap: 12px; padding: 18px 0; }
  .row h2 { font-size: 16px; }
  .row p { font-size: 13.5px; }
  .row .progress { width: auto; }
  .row .progress-bar { display: none; }
  .stage-head h1 { font-size: 24px; }
  .prose { font-size: 15.5px; }
  .prose pre { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  .fig svg { min-width: 600px; }
  .term-row { grid-template-columns: minmax(0, 1fr); }
  .check-body { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
