/* The topic pages (src/seoTopics.ts, topicsCss): the app's colours and figure styles, and their own layout. Made by the build. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --paper: #fbfcfe;
  --grid: #dfe6f0;
  --ink: #18212f;
  --muted: #5a6678;
  --line: #d9e0ea;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e3ecfa;
  --support: #d6265b;
  --support-soft: #fde8ee;
  --pen: #c2410c;
  --math: #1f5fbf;
  --phys: #0e7490;
  --chem: #be185d;
  --cj: #7c3aed;
  --good: #1d7a4a;
  --good-soft: #e2f3ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --bad: #a63a3a;
  --bad-soft: #f8e4e4;
  --logic: #0e7490;
  --hist: #8a4b2a;
  --genius: #7e22ce;
  --genius-ink: #ffffff;
  
  --g0: #d1343f;
  --g1: #2563c9;
  --g2: #1f8a4c;
  --g3: #e0a400;
  --g4: #8b4fd8;
  --g5: #6b7280;
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #10151d;
    --surface: #171e29;
    --paper: #131a24;
    --grid: #253042;
    --ink: #e6ebf2;
    --muted: #9aa6b8;
    --line: #2a3443;
    --accent: #7aa8ef;
    --accent-ink: #0d1520;
    --accent-soft: #1c2a40;
    --support: #ff7aa2;
    --support-soft: #3a1d29;
    --pen: #fb923c;
    --math: #7aa8ef;
    --phys: #5ccfe6;
    --chem: #f48fb8;
    --cj: #b69cf7;
    --good: #6fcf9b;
    --good-soft: #16302a;
    --warn: #e6b45c;
    --warn-soft: #33291a;
    --bad: #ec8f8f;
    --bad-soft: #3a2023;
    --logic: #5cc6db;
    --hist: #e0a27c;
    --genius: #c4a1ff;
    --genius-ink: #1a1030;
    --g0: #f0727a;
    --g1: #74a6f2;
    --g2: #5ccf8c;
    --g3: #f2c94c;
    --g4: #b794f4;
    --g5: #a3abb8;
    color-scheme: dark;
  } }
:root[data-theme="dark"] {
  --bg: #10151d;
  --surface: #171e29;
  --paper: #131a24;
  --grid: #253042;
  --ink: #e6ebf2;
  --muted: #9aa6b8;
  --line: #2a3443;
  --accent: #7aa8ef;
  --accent-ink: #0d1520;
  --accent-soft: #1c2a40;
  --support: #ff7aa2;
  --support-soft: #3a1d29;
  --pen: #fb923c;
  --math: #7aa8ef;
  --phys: #5ccfe6;
  --chem: #f48fb8;
  --cj: #b69cf7;
  --good: #6fcf9b;
  --good-soft: #16302a;
  --warn: #e6b45c;
  --warn-soft: #33291a;
  --bad: #ec8f8f;
  --bad-soft: #3a2023;
  --logic: #5cc6db;
  --hist: #e0a27c;
  --genius: #c4a1ff;
  --genius-ink: #1a1030;
  --g0: #f0727a;
  --g1: #74a6f2;
  --g2: #5ccf8c;
  --g3: #f2c94c;
  --g4: #b794f4;
  --g5: #a3abb8;
  color-scheme: dark;
}
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.1; margin: 0 3px; font-variant-numeric: tabular-nums; }
.frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px; }
.figure { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; padding: 6px; }
.figure svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.figure svg.clickable { cursor: crosshair; touch-action: manipulation; }
.figure .gl { stroke: var(--grid); stroke-width: 1; }
.figure .axis { stroke: var(--muted); stroke-width: 1.2; }
.figure .shape { fill: none; stroke: var(--ink); stroke-width: 2; }
.figure .shape.thin { stroke-width: 1.2; }
.figure .tile { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.figure .dot { fill: var(--ink); }
.figure .tap { fill: var(--surface); stroke: var(--ink); stroke-width: 2; cursor: pointer; }
.figure .tap.sel { fill: var(--accent); stroke: var(--accent); }
.figure .mark { fill: var(--pen); }
.figure .solution { fill: none; stroke: var(--good); stroke-width: 2; stroke-dasharray: 4 3; }
.figure .guide { stroke: var(--warn); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.figure text { fill: var(--ink); font-family: var(--body); font-size: 14px; }
.figure text.small { fill: var(--muted); font-size: 11px; }
.figure .balances { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.figure .balances svg { margin: 0; }
.figure.small { padding: 2px; border: none; background: transparent; }
.figure.small svg { max-height: 120px; width: auto; max-width: 100%; }
.figure .cell { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.figure .q { fill: var(--muted); font-family: var(--display); font-weight: 700; }
.figure text.big { font-size: 16px; font-weight: 700; }
.figure .stand { fill: var(--line); stroke: var(--ink); stroke-width: 1.5; }
.figure .cellbg { fill: var(--surface); }
.figure .gl-cell { fill: none; stroke: var(--grid); stroke-width: 1; }
.figure .frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.figure .punch-paper { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.figure .punch-ghost { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.figure .punch-arrow { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.figure .punch-head { fill: var(--ink); }
.figure .hole { fill: var(--ink); }
.figure .mirror { stroke: var(--pen); stroke-width: 2; stroke-dasharray: 6 4; }
.figure .domino, .figure .die { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.figure .pip { fill: var(--ink); }
.figure .clock { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.figure .tick { stroke: var(--muted); stroke-width: 1.5; }
.figure .hand { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.figure .hand.hour { stroke-width: 4; }
.figure .set { fill-opacity: 0.12; stroke-width: 2; }
.figure .set.a { fill: var(--g1); stroke: var(--g1); }
.figure .set.b { fill: var(--g0); stroke: var(--g0); }
.figure .street { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.figure .via { fill: var(--g3); stroke: var(--ink); stroke-width: 1.5; }
.figure .face { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.figure .face.front { fill: var(--paper); }
.figure .face.side { fill: var(--grid); }
.figure .struck { opacity: 0.25; }
.figure .paper, .figure .shape.paper { fill: var(--paper); }
.figure .shape.thick { stroke-width: 4; }
.figure .liquid { fill: var(--accent-soft); stroke: none; }
.figure .liquid-dot { fill: var(--accent); }
.figure .liquid-stream { fill: none; stroke: var(--accent); stroke-width: 4; opacity: 0.6; }
.figure .stone { fill: var(--muted); stroke: var(--ink); stroke-width: 1.2; }
.figure .ray { fill: none; stroke: var(--pen); stroke-width: 2.5; }
.figure .ray-head { fill: var(--pen); }
.figure .guide-static { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 4; }
.figure .glass { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.figure .hot { fill: #d43a2f; }
.figure .flame { fill: #f59e0b; stroke: #d43a2f; stroke-width: 1.5; }
.figure .steam { fill: none; stroke: var(--muted); stroke-width: 2; }
.figure .north { fill: #d43a2f; }
.figure .south { fill: #2f6fd6; }
.figure .north-stroke { fill: none; stroke: #d43a2f; stroke-width: 16; }
.figure .south-stroke { fill: none; stroke: #2f6fd6; stroke-width: 16; }
.figure text.pole { fill: #ffffff; font-weight: 700; font-size: 16px; }
.figure .electron { fill: var(--accent); }
.figure .nucleus { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 2; }
.figure .cell { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.figure .hl { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 3; }
.figure text.sym { font-weight: 700; font-size: 16px; }
.figure text.seg { fill: var(--pen); font-weight: 700; }
.figure .ghs-frame { fill: #ffffff; stroke: #d40000; stroke-width: 9; }
.figure .ghs-ink { fill: #111111; }
.figure .paper-filter { fill: #f3efe2; stroke: var(--muted); stroke-width: 1; }
.figure .muddy { fill: #a07850; opacity: 0.7; }
.figure .sediment { fill: #a07850; }
.figure .sand { fill: #c9a86a; }
.figure .filing { stroke: var(--ink); stroke-width: 2.2; }
.figure .spot1 { fill: #2f6fd6; }
.figure .spot2 { fill: #d43a2f; }
.figure .spot3 { fill: #e0a400; }
.blindmap svg { touch-action: manipulation; }
.blindmap .mr {
  fill: var(--accent-soft);
  fill-rule: evenodd;
  stroke: var(--muted);
  stroke-width: 1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.blindmap .mr.hl { fill: var(--pen); }
.blindmap .mr.pick { cursor: pointer; }
.blindmap .mr.pick:hover { fill: color-mix(in srgb, var(--accent) 35%, var(--accent-soft)); }
.blindmap .mr.sel, .blindmap .mr.sel:hover { fill: var(--accent); }
.blindmap .mr.ok { fill: var(--good); }
.blindmap .mr.bad { fill: var(--bad); }
.blindmap .mr:focus { outline: none; }
.blindmap .mr-edge {
  fill: none;
  fill-rule: evenodd;
  stroke: var(--ink);
  stroke-width: 2px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.blindmap .mr-edge.focus { stroke: var(--accent); stroke-width: 3px; }
.blindmap .mc {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
.blindmap .mc.hl { fill: var(--pen); stroke: var(--ink); }
.blindmap .mc.pick { cursor: pointer; }
.blindmap .mc.sel { fill: var(--accent); stroke: var(--ink); }
.blindmap .mc.ok { fill: var(--good); stroke: var(--ink); }
.blindmap .mc.bad { fill: var(--bad); stroke: var(--ink); }
.blindmap .mc:focus { outline: none; }
.blindmap .mc.focus { stroke: var(--accent); stroke-width: 3px; }
.blindmap svg.live { cursor: pointer; }
.blindmap .map-credit { color: var(--muted); font-size: 11px; text-align: right; line-height: 1; margin-top: 2px; }
:root {
  --inf: #4d55c8;
  --inf-soft: #e7e8fb;
  --inf-code: #f3f5f9;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --inf: #9aa1f5;
    --inf-soft: #262a52;
    --inf-code: #0e141d;
  } }
:root[data-theme="dark"] {
  --inf: #9aa1f5;
  --inf-soft: #262a52;
  --inf-code: #0e141d;
}
.figure .robot-cell { fill: var(--surface); stroke: var(--grid); stroke-width: 1; }
.figure .robot-wall { fill: var(--muted); stroke: var(--ink); stroke-width: 1; }
.figure .robot-frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.figure .robot-star { fill: var(--g3); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.figure .robot-body { fill: var(--inf); stroke: var(--ink); stroke-width: 1.5; }
.figure .robot-eye { fill: var(--surface); }
.figure .robot-dir { fill: var(--surface); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.figure .robot-mark { fill: var(--inf-soft); stroke: var(--inf); stroke-width: 1.5; }
.figure .robot-mark-text { fill: var(--ink); font-family: var(--display); font-size: 16px; font-weight: 700; }
.inf-code {
  margin: 0;
  padding: 10px 12px;
  background: var(--inf-code);
  border-radius: 8px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
  color: var(--ink);
}
.inf-code .ln { display: inline-block; min-width: 2ch; margin-right: 12px; color: var(--muted); text-align: right; user-select: none; }
.inf-blocks { display: grid; gap: 4px; padding: 6px; justify-items: start; }
.inf-block {
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-left: 6px solid var(--inf);
  background: var(--inf-soft);
  color: var(--ink);
}
.inf-block.control { border-left-color: var(--warn); background: var(--warn-soft); }
.inf-block.say { border-left-color: var(--g4); }
.inf-table { border-collapse: collapse; margin: 4px auto; font-variant-numeric: tabular-nums; }
.inf-table th, .inf-table td { border: 1px solid var(--line); padding: 4px 12px; text-align: right; }
.inf-table th { background: var(--inf-soft); font-weight: 600; text-align: center; }
:root { --display: system-ui, -apple-system, 'Segoe UI', sans-serif; --body: system-ui, -apple-system, 'Segoe UI', sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body); }
a { color: var(--accent); }
header.site { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 820px; margin: 0 auto; padding: 12px 16px; }
header.site .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
header.site .start { font-weight: 600; font-size: 0.9rem; text-align: center; text-decoration: none; padding: 6px 10px; border: 1px solid var(--accent); border-radius: 8px; white-space: nowrap; }
main { max-width: 820px; margin: 0 auto; padding: 0 16px 32px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(24px, 5vw, 34px); color: var(--accent); margin: 8px 0 12px; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
p { margin: 8px 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 4px; }
.lead { font-size: 1.05rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.types { color: var(--muted); }
.rule { background: var(--accent-soft); border-radius: 12px; padding: 4px 16px; margin: 16px 0; }
.rule h2 { font-size: 1.05rem; margin: 12px 0 4px; }
.samples { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-wrap: anywhere; }
.sample .level { font-size: 0.8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.sample .prompt { font-weight: 600; }
.sample .passage { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--ink); background: var(--paper); }
.sample ol, .sample ul { padding-left: 24px; }
.sample .options { list-style: none; padding-left: 0; }
.sample .options li { margin: 2px 0; }
.sample .options .figure { display: inline-block; vertical-align: middle; }
.sample .gap { display: inline-block; min-width: 2em; border-bottom: 2px solid var(--muted); text-align: center; }
.sample .choices, .sample .source { color: var(--muted); font-size: 0.9rem; }
.sample .figure { margin: 8px 0; }
.sample details { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.sample summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.sample .answer { margin-top: 8px; color: var(--good); }
.sample .answer ol { color: var(--ink); }
.sample .filled { color: var(--good); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cta { margin: 32px 0 8px; padding: 16px; border-radius: 12px; background: var(--surface); border: 2px solid var(--accent); }
.cta h2 { margin-top: 0; }
.cta .button { display: inline-block; margin-top: 4px; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.related ul, .topics, .subjects { padding-left: 20px; }
.related li, .topics li, .subjects li { margin: 4px 0; }
.grade { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.subjects { font-size: 1.1rem; }
footer { max-width: 820px; margin: 0 auto; padding: 16px 16px 40px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
footer a { margin-right: 14px; }