:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --text: #1d1c1a;
  --muted: #66625a;
  --line: #e2ded4;
  --accent: #2f5d8a;
  --accent-soft: #e3ecf5;
  --x: #d0503c;
  --o: #2f7f9a;
  --win: #f4d35e;
  --ok: #3f9b5b;
  --degraded: #e0a33b;
  --refused: #c8483a;
  --aborted: #8e44ad;
  --unavailable: #a9a59c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .05);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1d1c1a;
    --surface-2: #262522;
    --text: #ecebe6;
    --muted: #a19d93;
    --line: #34322e;
    --accent: #8fb6dc;
    --accent-soft: #22303d;
    --x: #f07a63;
    --o: #6cc0d9;
    --win: #8a7420;
    /* lifted so it reads as text on the dark table (5.4:1); its cells take dark ink (5.4:1) */
    --refused: #e0645a;
    --on-refused: #141412;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---- layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand .logo { display: inline-grid; grid-template-columns: repeat(3, 6px); gap: 2px; }
.brand .logo i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.brand .logo i.x { background: var(--x); }
.brand .logo i.o { background: var(--o); }
nav.main { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
/* fade whichever edge hides more links (set by the header script) */
nav.main.more-l { --fl: 28px; }
nav.main.more-r { --fr: 36px; }
nav.main.more-l, nav.main.more-r {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent);
}
nav.main a {
  color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap; font-size: .95rem;
}
nav.main a:hover { color: var(--text); background: var(--surface-2); }
nav.main a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 600; }
@media (max-width: 560px) {
  header.site .wrap { gap: 10px; }
  .brand span.name { display: none; }
  nav.main a { padding: 6px 7px; font-size: .9rem; }
}
main { padding: 32px 0 64px; }
footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }

/* ---- components ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: .95rem; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
select, input[type="number"], input[type="range"] { font: inherit; color: var(--text); }
select, input[type="number"] {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0;
}
input[type="number"] { width: 4.5em; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.stat { font-size: 1.8rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 1em; font-size: .95rem; }
.note.warn { border-color: var(--degraded); background: color-mix(in srgb, var(--degraded) 14%, var(--surface)); }
.note.bad { border-color: var(--refused); background: color-mix(in srgb, var(--refused) 12%, var(--surface)); }

table.data { border-collapse: collapse; width: 100%; font-size: .93rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.data td.num, table.data th.num { text-align: right; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- hero ---- */
.hero { padding: 24px 0 8px; }
.hero p.lede { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.hero .row { margin-top: 20px; }
.kicker { font-size: .85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }

/* ---- board ---- */
.board {
  --cells: 3;
  display: grid;
  grid-template-columns: repeat(var(--cells), 1fr);
  gap: 3px;
  background: var(--line);
  padding: 3px;
  border-radius: 10px;
  width: min(100%, var(--board-max, 520px));
  aspect-ratio: var(--aspect, 1);
  user-select: none;
  touch-action: manipulation;
}
.board.gravity { background: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cell {
  position: relative; background: var(--surface); border: 0; padding: 0; margin: 0;
  border-radius: 4px; cursor: default; display: grid; place-items: center;
  font: inherit; color: inherit; min-width: 0; min-height: 0;
}
.board.small-gap { gap: 1px; padding: 2px; }
.board.small-gap .cell { border-radius: 2px; }
.cell.playable { cursor: pointer; }
.cell.playable:hover::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 2px dashed var(--muted); opacity: .45; }
.cell .stone { width: 72%; height: 72%; border-radius: 50%; }
.cell .stone.x { background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--x) 70%, #fff), var(--x)); }
.cell .stone.o { background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--o) 70%, #fff), var(--o)); }
.cell.last .stone { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.cell.win { background: var(--win); }
.cell .heat { position: absolute; inset: 0; border-radius: inherit; }
.cell .beads { position: relative; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cell .coord { position: absolute; left: 3px; top: 1px; font-size: 9px; color: var(--muted); opacity: .6; }
.board.drop .cell .stone { animation: drop .18s ease-out; }
@keyframes drop { from { transform: scale(.4); opacity: .2; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .board.drop .cell .stone { animation: none; } }

/* ---- play page ---- */
.play-layout { display: grid; grid-template-columns: minmax(0, var(--play-board, 1fr)) minmax(300px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .play-layout { grid-template-columns: minmax(0, 1fr); } }
.status { font-size: 1.15rem; font-weight: 600; min-height: 1.6em; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.dot.x { background: var(--x); }
.dot.o { background: var(--o); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel h3 { margin-top: 0; }
aside .panel + .panel { margin-top: 16px; }
.panel .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel .fields .full { grid-column: 1 / -1; }
.panel .fields > * { min-width: 0; }
.panel .fields select { width: 100%; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.presets button { font-size: .82rem; padding: 4px 9px; }
.presets button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.movelog { font-family: var(--mono); font-size: .85rem; max-height: 180px; overflow-y: auto; color: var(--muted); }
.movelog span { display: inline-block; margin-right: 8px; }
.think { font-size: .85rem; color: var(--muted); min-height: 1.4em; }
.score { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }

/* ---- feasibility map ---- */
.fmap { border-collapse: separate; border-spacing: 3px; font-size: .85rem; }
.fmap th { font-weight: 600; color: var(--muted); padding: 4px 6px; white-space: nowrap; }
.fmap th.agent { text-align: right; }
/* agent names stay put while the boards scroll sideways; the shadow covers the 3px gap and marks the edge */
.fmap th.agent, .fmap thead th:first-child {
  position: sticky; left: 0; z-index: 2; background: var(--surface);
  box-shadow: 3px 0 0 var(--surface), 7px 0 6px -4px rgba(0, 0, 0, .14);
}
.fmap thead th { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; height: 120px; vertical-align: bottom; }
.fmap td { position: relative; width: 44px; min-width: 38px; height: 30px; border-radius: 5px; text-align: center; cursor: pointer; font-weight: 700; font-size: .75rem; }
.fmap td:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.fmap td.sel { outline: 2px solid var(--text); outline-offset: 1px; }
/* Status never rests on colour alone: every cell and legend swatch carries a symbol.
   Green, amber and grey take fixed dark ink (5:1 or more); red and violet take white,
   except the lighter dark-mode red, which takes dark ink too. */
.s-ok { background: var(--ok); color: #1d1c1a; --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.s-degraded { background: var(--degraded); color: #1d1c1a; --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 9c1.8-2.6 3.6-2.6 5.5 0s3.7 2.6 5.5 0'/%3E%3C/svg%3E"); }
.s-refused { background: var(--refused); color: var(--on-refused, #fff); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7'/%3E%3C/svg%3E"); }
.s-aborted { background: var(--aborted); color: #fff; --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3.5v5.5M8 12.5v.01'/%3E%3C/svg%3E"); }
.s-unavailable { background: var(--unavailable); color: #1d1c1a; --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8h7'/%3E%3C/svg%3E"); }
.fmap td::before, .legend i::before {
  content: ""; display: block; width: 14px; height: 14px; margin: auto;
  background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat;
}
/* estimate only (not probed): a dot in the corner, separate from the status symbol */
.fmap td.est::after, .legend i.est::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--muted); margin: 10px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { position: relative; display: inline-grid; place-items: center; width: 20px; height: 18px; border-radius: 4px; flex: none; }
.legend i::before { width: 12px; height: 12px; }
.legend i.est { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.legend i.est::before { content: none; }
.legend i.est::after { top: 3px; right: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--surface); padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--bg); font-weight: 600; }
.detail { min-height: 110px; }

/* ---- bars ---- */
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 150px 1fr 52px; gap: 10px; align-items: center; font-size: .88rem; }
.bar .track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 480px) { .bar { grid-template-columns: 110px 1fr 44px; } }

/* ---- prose (research page) ---- */
.prose { max-width: 760px; }
.prose table { border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; margin: 0 0 1.2em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 5px 10px; text-align: left; }
.prose th { color: var(--muted); }
.prose pre { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { display: block; margin: 1em auto; border-radius: 8px; background: #fff; }
.prose blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }

canvas.chart { width: 100%; height: 260px; display: block; }

[hidden] { display: none !important; }
.bar .track, .bar .fill { display: block; }
.map-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.map-layout > .card:first-child { flex: 0 1 auto; max-width: 100%; }
.map-layout > .detail { flex: 1 1 280px; }

/* ---- goban: stones on the intersections (gomoku-sized boards) ---- */
:root { --wood: #dcb46e; --wood-edge: #c89a4e; --grid: #3d2e1a; }
@media (prefers-color-scheme: dark) { :root { --wood: #b08a4c; --wood-edge: #8f6d36; --grid: #2a1f10; } }
.board.goban {
  gap: 0; padding: 0; border-radius: 6px;
  background: var(--wood);
  box-shadow: inset 0 0 0 1px var(--wood-edge), var(--shadow);
}
.board.goban .cell {
  /* horizontal line, vertical line and (on star points) a dot, all through the centre;
     edge cells draw only the inner half of their lines so the grid stops at the outer lines */
  --hx: 0%; --hw: 100%; --vy: 0%; --vh: 100%; --dot: 0px;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, var(--grid) 0 var(--dot), transparent calc(var(--dot) + .6px)),
    linear-gradient(var(--grid), var(--grid)) var(--hx) 50% / var(--hw) 1px no-repeat,
    linear-gradient(var(--grid), var(--grid)) 50% var(--vy) / 1px var(--vh) no-repeat;
}
.board.goban .cell.el { --hx: 100%; --hw: 50%; }
.board.goban .cell.er { --hx: 0%; --hw: 50%; }
.board.goban .cell.et { --vy: 100%; --vh: 50%; }
.board.goban .cell.eb { --vy: 0%; --vh: 50%; }
.board.goban .cell.star { --dot: 2.5px; }
.board.goban .cell .stone { width: 88%; height: 88%; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); position: relative; }
.board.goban .cell.last .stone::after {
  content: ""; position: absolute; inset: 34%; border-radius: 50%; background: rgba(255, 255, 255, .85);
}
.board.goban .cell.win .stone { box-shadow: 0 0 0 2px var(--grid), 0 0 0 4px var(--win); z-index: 1; }
.board.goban .cell.playable:hover::after { inset: 12%; border-color: var(--grid); }

/* ---- arena ---- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.live-grid:empty { display: none; }
.live-slot { background: var(--surface-2); border-radius: 8px; padding: 8px; }
.live-slot canvas { width: 100%; aspect-ratio: 1; display: block; }
.live-slot .cap { margin-top: 6px; line-height: 1.35; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.rr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; font-size: .9rem; }
.btn.small { font-size: .82rem; padding: 4px 9px; }
.btn.icon { padding: 2px 9px; font-size: 1rem; line-height: 1.2; }
table.data tr.notes td { border-bottom-style: dashed; padding-top: 0; }
optgroup { font-style: normal; color: var(--muted); }
.grid.steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps .card { position: relative; padding-top: 18px; }
.steps .step { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.steps h3 { margin-top: 10px; }

/* ---- hero: the answer, then the same game on boards that keep growing ---- */
.hero h1 { max-width: 22em; text-wrap: balance; }
.hero .answer { font-size: 1.5rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; max-width: 36em; margin: 0 0 4px; text-wrap: pretty; }
.hero .byline { margin: 18px 0 0; font-size: .95rem; color: var(--muted); }
.hero .lede { margin: 28px 0 0; }
.growth { --cell: clamp(8px, 1.1vw, 12px); margin: 40px 0 0; }
.growth-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.growth-strip li { min-width: 0; }
.mini-slot { height: calc(15 * var(--cell)); display: flex; align-items: flex-end; }
svg.mini { display: block; width: calc(var(--n, 3) * var(--cell)); height: calc(var(--m, 3) * var(--cell)); overflow: visible; }
svg.mini line, svg.mini .bed { vector-effect: non-scaling-stroke; stroke-width: 1; }
svg.mini.tiles .bed { fill: var(--surface); stroke: var(--line); }
svg.mini.tiles line { stroke: var(--line); }
svg.mini.gravity .bed, svg.mini.gravity line { stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); }
svg.mini.goban .bed { fill: var(--wood); stroke: var(--wood-edge); }
svg.mini.goban line { stroke: var(--grid); }
svg.mini .star { fill: var(--grid); }
svg.mini .win { fill: var(--win); }
svg.mini .stone.x { fill: var(--x); }
svg.mini .stone.o { fill: var(--o); }
svg.mini.goban .stone { filter: drop-shadow(0 .5px .6px rgba(0, 0, 0, .35)); }
.growth-strip .board-name { margin: 14px 0 4px; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.growth-strip .cfg { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.survivors { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 4px; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pips { display: inline-flex; gap: 3px; }
.pips:empty { display: none; }
.pip { width: 9px; height: 9px; border-radius: 50%; }
.pip.p-ok { background: var(--ok); }
.pip.p-degraded { background: var(--degraded); }
.pip.p-refused { box-shadow: inset 0 0 0 1.5px var(--refused); }
.growth-strip .verdict { margin: 0; font-size: .875rem; color: var(--muted); }
.growth figcaption { margin-top: 18px; font-size: .85rem; color: var(--muted); max-width: 46em; }
@media (max-width: 720px) {
  .hero .answer { font-size: 1.25rem; }
  .growth { --cell: 8px; }
  .growth-strip { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .growth-strip li { display: grid; grid-template-columns: calc(15 * var(--cell)) minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .growth-strip li > :not(.mini-slot) { grid-column: 2; }
  .mini-slot { grid-row: 1 / span 3; height: auto; align-items: flex-start; }
  .growth-strip .board-name { margin-top: 0; }
}

/* ---- built end to end: five stages as five stones in a row, joined by the winning line ---- */
.built-intro { max-width: 640px; color: var(--muted); }
.proof {
  --stone: 22px; --gap: 24px;
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap);
}
.proof li { position: relative; padding-top: calc(var(--stone) + 14px); min-width: 0; }
/* each stage draws the stretch of winning line to the next stone's centre */
.proof li:not(:last-child)::after {
  content: ""; position: absolute; z-index: 0;
  left: calc(var(--stone) / 2); top: calc(var(--stone) / 2 - 2px);
  width: calc(100% + var(--gap)); height: 4px;
  background: var(--win);
}
.proof li::before {
  content: ""; position: absolute; z-index: 1; left: 0; top: 0;
  width: var(--stone); height: var(--stone); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--x) 70%, #fff), var(--x));
  box-shadow: 0 0 0 3px var(--bg), 0 1px 3px 3px rgba(0, 0, 0, .12);
}
.proof h3 { margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.proof p { font-size: .93rem; color: var(--muted); margin: 0 0 2px; }
/* 44px-tall hit areas; the negative margin keeps stacked links visually close */
.proof a { display: block; width: fit-content; font-size: .93rem; font-weight: 600; line-height: 1.4; padding: 12px 0; margin: -4px 0; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.proof a:hover { text-decoration-thickness: 2px; }
.proof a:focus-visible, .byline a:focus-visible, .built-more a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.built-more { margin: 28px 0 0; color: var(--muted); }
@media (max-width: 900px) {
  .proof { grid-template-columns: minmax(0, 1fr); --gap: 22px; }
  .proof li { padding: 0 0 0 calc(var(--stone) + 16px); }
  .proof li:not(:last-child)::after {
    left: calc(var(--stone) / 2 - 2px); top: calc(var(--stone) / 2);
    width: 4px; height: calc(100% + var(--gap));
  }
}

/* play page: the secondary cards sit in an even row under the board */
.play-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; align-items: start; }
.play-extras .panel h3 { margin-top: 0; }
.play-extras .movelog { max-height: 150px; }

/* ---- touch: every control on the overview gets a 44px target ---- */
@media (pointer: coarse), (max-width: 720px) {
  .brand { min-height: 44px; padding-right: 4px; }
  nav.main a { display: flex; align-items: center; min-height: 44px; }
  .btn, .seg button { min-height: 44px; }
  .fmap td { width: 44px; min-width: 44px; height: 44px; }
}
