[hidden] { display: none !important; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-opsz-normal.woff2) format("woff2-variations"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); }
:root { --ink: #1f2430; --muted: #646b78; --paper: #fbf9f4; --accent: #a8650f; --panel: #f3efe6; --panel-edge: #e2dbcb;
  --serif: "Source Serif 4", Charter, Georgia, serif; --sans: Inter, system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
main { max-width: 820px; margin: 0 auto; padding: 40px 20px 72px; }
h1 { font: 650 2.4em/1.08 var(--serif); letter-spacing: -0.02em; margin: 0 0 0.3em; }
h2 { font: 650 1.3em/1.2 var(--serif); }
.dek { font: 400 1.15em/1.5 var(--serif); color: #3d4452; margin: 0 0 1.4em; max-width: 660px; }
a { color: #1e5b9c; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid #4a90d9; outline-offset: 3px; }
.levels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.levels button { min-width: 2.4em; padding: 7px 10px; }
.levels button.solved { background: #e4f1e7; border-color: #9cc7a7; }
.panel { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 14px; padding: 20px 22px; }
.chapter { font: 600 12px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.title { margin: 0 0 8px; font-size: 1.45em; }
.question { font: 600 1.08em/1.45 var(--serif); margin: 0 0 10px; max-width: 680px; }
.count { display: flex; gap: 4px; align-items: center; margin: 0 0 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.count .pip { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #94856a; background: #fff; }
.count .pip.used { background: #3a404c; border-color: #3a404c; }
.count .lab { margin-left: 8px; }
.stage { background: #fff; border: 1px solid var(--panel-edge); border-radius: 10px; padding: 10px; }
svg.board { width: 100%; max-width: 600px; display: block; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
svg .edge { stroke: #767d8a; stroke-width: 2.2; stroke-linecap: round; }
svg .edge.new { stroke: #b0721a; stroke-width: 4; }
svg .item { cursor: pointer; }
svg .item:focus { outline: none; }
svg .item .ring { fill: #fff; stroke: #3a404c; stroke-width: 2; }
svg .item:focus-visible .ring { stroke: #4a90d9; stroke-width: 4; }
svg .item.sel .ring { fill: #fdf1dc; stroke: #a8650f; stroke-width: 4; }
svg .item.answer .ring { fill: #1d7a48; stroke: #11502e; }
svg .item.answer .lbl { fill: #fff; }
svg .lbl { font: 700 16px var(--sans); text-anchor: middle; dominant-baseline: central; pointer-events: none; fill: var(--ink); }
svg .rowline { stroke: #f0ebe0; stroke-width: 1; }
button { font: 600 14px/1 var(--sans); background: #fff; color: var(--ink); border: 1px solid #d3cab6; border-radius: 999px;
  padding: 9px 15px; cursor: pointer; box-shadow: 0 1px 0 rgba(31,36,48,.06); }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
button:disabled { opacity: 0.4; cursor: default; }
button[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
button.quiet { font-weight: 500; color: var(--muted); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.status { min-height: 1.5em; font-size: 15px; margin: 8px 0 4px; }
.log { margin: 4px 0 0; padding-left: 1.6em; font-size: 14px; color: #343a47; columns: 2; max-width: 520px; }
.log li { break-inside: avoid; }
.verdict { margin: 10px 0 0; max-width: 680px; }
.verdict .won { font: 650 1.25em/1.3 var(--serif); color: #1d7a48; margin: 0 0 6px; }
.verdict .lost { font: 650 1.25em/1.3 var(--serif); color: #b42d22; margin: 0 0 6px; }
.verdict p { margin: 0 0 8px; }
.hint { background: #fff; border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; margin: 8px 0 0; font-size: 15px; max-width: 660px; }
.how { max-width: 680px; margin-top: 28px; }
.how p, footer p { color: #3d4452; }
footer { margin-top: 28px; font-size: 14px; color: var(--muted); }
@media (max-width: 480px) { main { padding: 24px 12px 56px; } h1 { font-size: 2em; } .dek { font-size: 1.02em; } .panel { padding: 16px 12px; } .stage { padding: 4px; } .log { columns: 1; } .levels button { min-width: 0; padding: 6px 8px; font-size: 12.5px; } }
.levels .sep { width: 10px; }
svg.coins .pan { fill: #f6f1e6; stroke: #d3cab6; }
svg.coins .panlab { font: 600 12px var(--sans); fill: #5f6670; text-anchor: middle; dominant-baseline: central; }
svg .coin .ring { fill: #f7e7b8; stroke: #a8650f; }
svg .coin.st-h .ring { fill: #fbd9c9; stroke: #b4552d; }
svg .coin.st-l .ring { fill: #d6e6f7; stroke: #3f7bbf; }
svg .coin.st-g .ring { fill: #eceae4; stroke: #b5b0a5; }
svg .coin.st-g .lbl { fill: #646b78; }
svg .coin.onL .ring, svg .coin.onR .ring { stroke-width: 4; stroke: #1f2430; }
svg .coin .mark { font: 600 10.5px var(--sans); text-anchor: middle; dominant-baseline: central; fill: #4a505c; pointer-events: none; }
.legend { font-size: 13.5px; color: var(--muted); margin: 0 0 8px; max-width: 680px; }
