:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1d1f21;
  --muted: #5d6268;
  --border: #d9dbde;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --focus: #8a5a00; /* dark amber: 3:1+ against the light page and cards */
  --card: #fbf7ec;
  --card-text: #2a2418;
  --agent: #2e8540;
  --agent-text: #ffffff;
  --assassin: #1d1f21;
  --mine: #9a5517;
  --theirs: #6b4fa0;
  --error: #b42318;
  --dead: #e4e2dc;
  --warn: #9a3c07;
  --warn-bg: rgba(181, 71, 8, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141619;
    --surface: #1c1f23;
    --text: #e8eaed;
    --muted: #a5abb2;
    --border: #353a40;
    --accent: #6fb1ff;
    --accent-text: #0d1116;
    --focus: #f0b400;
    --card: #2a2620;
    --card-text: #f1ead9;
    --agent: #4caf63;
    --agent-text: #0d1a10;
    --assassin: #f1f1f1;
    --mine: #e59a52;
    --theirs: #b59cf0;
    --error: #ff8a80;
    --dead: #24262a;
    --warn: #f5a524;
    --warn-bg: rgba(245, 165, 36, 0.15);
  }
}
:root[data-theme="dark"] {
  --bg: #141619; --surface: #1c1f23; --text: #e8eaed; --muted: #a5abb2; --border: #353a40;
  --accent: #6fb1ff; --accent-text: #0d1116; --focus: #f0b400; --card: #2a2620; --card-text: #f1ead9;
  --agent: #4caf63; --agent-text: #0d1a10; --assassin: #f1f1f1; --mine: #e59a52;
  --theirs: #b59cf0; --error: #ff8a80; --dead: #24262a; --warn: #f5a524; --warn-bg: rgba(245, 165, 36, 0.15);
}

/* Muli (now Mulish), the same self-hosted font as ryanward.dev's blog. SIL Open Font License 1.1. */
@font-face { font-family: "Muli"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("fonts/muli-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Muli"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("fonts/muli-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Muli", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { font-weight: 900; line-height: 1.25; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

header.site, main, footer.site { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header.site { padding-top: 12px; font-size: 0.9rem; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-right: -10px;
  padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 1.15rem; cursor: pointer; }
.theme-toggle:hover { color: var(--text); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
}
header.site .home { color: var(--muted); text-decoration: none; }
footer.site { color: var(--muted); font-size: 0.85rem; padding: 24px 16px 32px; }
h1 { margin: 12px 0 4px; font-size: 2rem; }
h2 { margin: 0 0 12px; font-size: 1.2rem; }
.lede { margin: 0 0 16px; color: var(--muted); }
.muted { color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-start; margin-bottom: 12px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 6px 16px; flex-wrap: wrap; }
legend { font-weight: 600; margin-bottom: 4px; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
select { max-width: 100%; }
select, input[type="text"], input[type="number"] {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
button {
  font: inherit; cursor: pointer; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
}
button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.rules { margin-top: 12px; }
.rules summary, .log summary { cursor: pointer; color: var(--accent); }
.rules li { margin: 4px 0; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin: 0 0 10px; }
.topbar > * { white-space: nowrap; }
.scoreboard { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 12px 0 10px; font-weight: 600; }
#turns { padding: 2px 10px; border-radius: 999px; border: 1px solid transparent; }
#turns.low { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
#turns.pulse { animation: pulse 1.2s ease-out 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--warn-bg); } }
@media (prefers-reduced-motion: reduce) { #turns.pulse { animation: none; } }
.topbar .odds-toggle { margin: 0 0 0 auto; flex-wrap: nowrap; gap: 6px; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
@media (max-width: 480px) {
  .topbar #partner-name { flex-basis: 100%; }
  .topbar .odds-toggle { margin-left: 0; }
  .topbar .link-button { margin-left: auto; }
}
.link-button {
  margin-left: 0; padding: 4px 10px; min-height: 44px; border: 0; background: none; color: var(--muted);
  font-size: 0.9rem; font-weight: 500; text-decoration: none; border-radius: 6px;
}
.link-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .board { gap: 4px; } .card { padding: 18px 1px 8px; letter-spacing: 0; } }
.card {
  position: relative; min-height: 64px; padding: 18px 4px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--card-text);
  font-size: clamp(0.72rem, 2.6vw, 0.95rem); font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-align: center;
}
.card[aria-disabled="true"] { cursor: default; }
.card.guessable { cursor: pointer; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card.guessable:hover { transform: translateY(-1px); }
.card.found { background: var(--agent); color: var(--agent-text); border-color: var(--agent); }
.card.dead { background: var(--dead); color: var(--muted); }
.card.assassin-hit { background: var(--assassin); color: var(--bg); }
.card.flash { animation: flash 1s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--focus); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .card.flash { animation: none; } .card.guessable:hover { transform: none; } }

.key { position: absolute; top: 5px; left: 6px; display: flex; gap: 3px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.dot.agent { background: var(--agent); border: 1px solid var(--agent-text); }
.dot.assassin { background: var(--assassin); border: 1px solid var(--bg); }
.dot.partner { outline: 2px dashed var(--muted); outline-offset: 1px; }
.marks { position: absolute; top: 3px; right: 4px; display: flex; gap: 1px; }
.mark { display: inline-flex; width: 18px; height: 18px; line-height: 0; }
.mark .pawn { width: 100%; height: 100%; filter: drop-shadow(0 0 1px var(--card)); }
.mark.theirs .pawn { transform: rotate(180deg); }
.legend .mark { width: 16px; height: 16px; vertical-align: -3px; }
.mark.mine { color: var(--mine); }
.mark.theirs { color: var(--theirs); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.85rem; margin: 8px 0 14px; }
.legend i { font-style: normal; }
.legend .dot.partner { margin: 0 3px; }

.action { display: flex; flex-direction: column; gap: 10px; }
.action p { margin: 0; }
.clue-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.clue-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.clue-form input[type="text"] { width: 12em; text-transform: uppercase; }
.clue-form input[type="number"] { width: 5em; }
.big-clue { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.04em; }
.error { color: var(--error); min-height: 1.4em; margin: -6px 0 10px; }
.log ol { margin: 8px 0 0; padding-left: 22px; }
.log li { margin: 2px 0; }
#thoughts { list-style: none; padding-left: 0; }
#thoughts > li { margin: 6px 0; }
.outcome-G { color: var(--agent); font-weight: 600; }
.outcome-N { color: var(--mine); }
.outcome-A { color: var(--error); font-weight: 700; }
.card .word { display: inline-block; max-width: none; }
.card .word.wrap { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }

.assassin-icon { display: inline-flex; width: 15px; height: 15px; color: var(--assassin); line-height: 0; }
.assassin-icon .skull { width: 100%; height: 100%; }
.card .assassin-icon { width: 20px; height: 20px; filter: drop-shadow(0 0 1px var(--card)); }
.card.found .assassin-icon { color: var(--agent-text); filter: drop-shadow(0 0 1px var(--agent)); }
.card.assassin-hit .assassin-icon { color: var(--bg); filter: none; }
.assassin-icon.partner { color: var(--theirs); }
.legend .assassin-icon { vertical-align: -3px; }
.hint { font-size: 0.8rem; }

/* ---------- setup: who starts, and partner cards ---------- */
#setup fieldset { display: block; margin-bottom: 18px; }
#setup legend { margin-bottom: 8px; }
.segmented {
  display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.segmented label { position: relative; }
.segmented input, .partner-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 10px 16px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.segmented label:hover span { color: var(--text); }
.segmented input:checked + span { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.partner-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.partner-card:hover { border-color: var(--muted); }
.partner-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.partner-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.partner-card .tier { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.partner-card .desc { font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
.badge {
  display: inline-block; vertical-align: 3px; margin-left: 4px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; border: 1px solid var(--border); color: var(--muted);
}

/* GloVe explainer: shown on hover or keyboard focus, sized to the card so it never runs off-screen. */
.term { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; color: var(--text); }
.term::after {
  content: attr(data-tip); position: absolute; left: 6px; width: max(calc(100% - 12px), 260px); top: calc(100% + 6px); z-index: 10;
  padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--bg);
  font-size: 0.8rem; font-weight: 400; line-height: 1.4; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  visibility: hidden; opacity: 0; transition: opacity 0.12s;
}
.term:hover::after, .term:focus-visible::after, .term:focus::after { visibility: visible; opacity: 1; }
.term[data-dismissed]::after { visibility: hidden; opacity: 0; }
.tip { display: none; }
@media (prefers-reduced-motion: reduce) { .term::after { transition: none; } }

/* ---------- advanced tips ---------- */
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; min-height: 44px; font-weight: 600; flex-wrap: wrap; }
.check .muted { font-weight: 400; font-size: 0.85rem; }
.tips { font-size: 0.9rem; }
.tips .pace { margin: 0 0 8px; font-weight: 600; }
.tips table { border-collapse: collapse; width: 100%; max-width: 520px; }
.tips caption { text-align: left; color: var(--muted); font-size: 0.82rem; margin-bottom: 4px; }
.tips th, .tips td { padding: 3px 8px; text-align: right; border-bottom: 1px solid var(--border); }
.tips th[scope="row"], .tips thead th:first-child { text-align: left; font-weight: 500; }
.tips .risky, .chance.risky { color: var(--error); font-weight: 700; }
.tips .hint { margin: 8px 0 0; }
.card .chance { position: absolute; bottom: 2px; right: 5px; font-size: 0.68rem; font-weight: 600; color: var(--muted); }
.check select { font: inherit; padding: 4px 8px; }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border); }
.tabs [role="tab"] {
  padding: 8px 14px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none;
  color: var(--muted); font-weight: 600; white-space: nowrap; margin-bottom: -1px;
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
#setup fieldset.options { margin-top: 4px; }
.options .check { font-weight: 600; }
.options .check .muted { font-weight: 400; font-size: 0.85rem; }
#start { margin-top: 2px; }
.prose { line-height: 1.5; }
.prose > p, .prose > ul { max-width: 42rem; }
.prose h2 { margin-bottom: 8px; }
.prose h3 { margin: 18px 0 6px; font-size: 1.05rem; }
.prose li { margin: 6px 0; }
.prose table { border-collapse: collapse; margin: 8px 0 12px; font-size: 0.92rem; }
.prose th, .prose td { padding: 4px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.prose td.num, .prose th.num { text-align: right; }
.badge.recommended { color: var(--accent); border-color: var(--accent); }
@media (max-width: 420px) { .tabs { gap: 0; } .tabs [role="tab"] { padding: 8px 5px; font-size: 0.9rem; } }

.check input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.error:empty { display: none; }
#setup-error { margin: 10px 0 0; }
.action:focus { outline: none; }
.action:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.action progress { width: 100%; max-width: 360px; height: 8px; accent-color: var(--accent); }
.partner-card .status { font-size: 0.8rem; color: var(--accent); min-height: 0; }
.partner-card .status:empty { display: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Windows high contrast: colours are replaced, so mark state with borders the system colours keep. */
@media (forced-colors: active) {
  .partner-card:has(input:checked), .segmented input:checked + span { border: 3px solid Highlight; }
  .segmented span { border: 1px solid transparent; }
  .tabs [role="tab"] { border-bottom-color: Canvas; }
  .tabs [role="tab"][aria-selected="true"] { border-bottom-color: Highlight; }
  .card.guessable { border: 2px solid Highlight; }
  .card.found { border: 4px double CanvasText; }
  .dot { forced-color-adjust: none; }
}

/* ---------- "Why I built it" figures (assets/why.js) ---------- */
.fig { margin: 20px 0 24px; }
.fig figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; line-height: 1.45; }
.fig-title { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.prose .footnote { color: var(--muted); font-size: 0.88rem; }
.prose .lede { font-size: 1.02rem; }
.fig-error { color: var(--muted); font-style: italic; }
.fig details { margin-top: 6px; font-size: 0.88rem; }
.fig details summary { cursor: pointer; color: var(--accent); }

/* Architecture: a column of boxes joined by labelled arrows, so it reads at phone width. */
.arch { display: grid; gap: 0; max-width: 560px; }
.arch-node { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.arch-node h4 { margin: 0; font-size: 0.98rem; }
.arch-node .where { color: var(--muted); font-size: 0.82rem; margin: 0 0 4px; }
.arch-node ul { margin: 4px 0 0; padding-left: 18px; font-size: 0.88rem; }
.arch-node li { margin: 2px 0; }
.arch-node.modal { border-color: var(--accent); }
.arch-link { display: flex; align-items: center; gap: 10px; padding: 2px 0 2px 22px; min-height: 44px; color: var(--muted); font-size: 0.82rem; }
.arch-link::before { content: ""; align-self: stretch; width: 0; border-left: 2px solid var(--accent); margin-right: 2px; }
.arch-link span::before { content: "↓ " / ""; color: var(--accent); font-weight: 700; }
.arch-group { border: 1px dashed transparent; }
.arch-side { margin-top: 14px; }

/* Bar rows (progress, models, cost): HTML, so labels wrap on a phone. */
.bars { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 0.88rem; }
.bars .label { line-height: 1.25; }
.bars .label small { display: block; color: var(--muted); }
.bars .track { position: relative; height: 14px; }
.bars .bar { position: absolute; top: 0; bottom: 0; left: 0; background: var(--muted); opacity: 0.8; border-radius: 0 4px 4px 0; }
.bars .bar.range { border-radius: 4px; }
.bars .hi .bar { background: var(--accent); opacity: 1; }
.bars .value { font-variant-numeric: tabular-nums; text-align: right; min-width: 3.2rem; }
.bars .hi { font-weight: 700; }
.bars .sep { grid-column: 1 / -1; border-top: 1px solid var(--border); margin: 4px 0; }
.bars .axis { grid-column: 2; position: relative; height: 1.3em; color: var(--muted); font-size: 0.75rem; border-top: 1px solid var(--border); }
.bars .axis span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.bars .axis span:first-child { transform: none; }
.bars .axis span:last-child { transform: translateX(-100%); }
.bars .row { display: contents; }
@media (max-width: 520px) {
  /* Labels go above their bars, so the bars keep the full width. */
  .bars { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .bars .label { grid-column: 1 / -1; margin-top: 6px; }
  .bars .axis { grid-column: 1; }
  .bars .axis-pad { display: none; }
}

/* One clue, step by step */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.steps button { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.steps button[aria-current="step"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.clue-walk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
@media (max-width: 680px) { .clue-walk { grid-template-columns: 1fr; } }
.mini-board { container-type: inline-size; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.mini-board span { position: relative; background: var(--card); color: var(--card-text); border-radius: 5px; padding: 12px 2px 6px; text-align: center; font-size: min(0.62rem, 2.25cqi); font-weight: 700; white-space: nowrap; overflow: hidden; outline: 2px solid transparent; outline-offset: -2px; }
.mini-board span::before { content: ""; position: absolute; top: 3px; left: 4px; width: 7px; height: 7px; border-radius: 50%; }
.mini-board .G::before { background: var(--agent); }
/* The same skull as the main board, as a mask so it takes the theme's assassin colour. */
.mini-board .A::before { top: 2px; left: 3px; width: 11px; height: 11px; border-radius: 0; background: var(--assassin);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1C4.1 1 1.5 3.6 1.5 7c0 2 .9 3.4 2.3 4.2V13a1 1 0 0 0 1 1h.9v-1.5h1V14h2.6v-1.5h1V14h.9a1 1 0 0 0 1-1v-1.8c1.4-.8 2.3-2.2 2.3-4.2C14.5 3.6 11.9 1 8 1zM5.3 9.6a1.6 1.6 0 1 1 0-3.2 1.6 1.6 0 0 1 0 3.2zm5.4 0a1.6 1.6 0 1 1 0-3.2 1.6 1.6 0 0 1 0 3.2zM8 11.2l-.9-1.6h1.8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1C4.1 1 1.5 3.6 1.5 7c0 2 .9 3.4 2.3 4.2V13a1 1 0 0 0 1 1h.9v-1.5h1V14h2.6v-1.5h1V14h.9a1 1 0 0 0 1-1v-1.8c1.4-.8 2.3-2.2 2.3-4.2C14.5 3.6 11.9 1 8 1zM5.3 9.6a1.6 1.6 0 1 1 0-3.2 1.6 1.6 0 0 1 0 3.2zm5.4 0a1.6 1.6 0 1 1 0-3.2 1.6 1.6 0 0 1 0 3.2zM8 11.2l-.9-1.6h1.8z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mini-board .target { outline-color: var(--accent); }
.mini-board .guessed { box-shadow: inset 0 -3px 0 var(--accent); }
.mini-legend { color: var(--muted); font-size: 0.78rem; margin-top: 6px; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ideas button { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.86rem; padding: 6px 9px; cursor: pointer; }
.ideas button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ideas .clueword { font-weight: 700; }
.ideas .detail { display: block; color: var(--muted); font-size: 0.8rem; }
.ideas .chosen { color: var(--agent); font-weight: 700; }
.ideas .out { border-style: dashed; }
.ideas .out .clueword { font-weight: 400; }
.walk-note { font-size: 0.88rem; margin: 0 0 10px; min-height: 4.2em; }
.walk-reason { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; font-style: italic; }


@media (forced-colors: active) {
  /* Keep the figures' bars, marks and selected states visible in high-contrast modes. */
  .bars .bar, .mini-board span::before { forced-color-adjust: none; background: CanvasText; fill: CanvasText; opacity: 1; }
  .bars .hi .bar { background: Highlight; fill: Highlight; }
  .steps button[aria-current="step"], .ideas button[aria-pressed="true"] { border: 3px solid Highlight; }
  .mini-board .target { outline-color: Highlight; }
  .mini-board .guessed { box-shadow: none; text-decoration: underline 3px; }
}
