:root {
  --bg: #14161c;
  --panel: #1d212b;
  --panel-2: #262b38;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  /* Brand: a light tint of the logo's purple, for links, focus, and the active tab.
     Primary buttons are neutral, so colour on the page always means a bracket. */
  --accent: #c4b5fd;
  --primary: #eef0f6;
  --primary-text: #14161c;
  --line: #313849;
  --hit: #5fd38d;
  --close: #e0b25f;
  --miss: #e0685f;
  --slow: #8b93a6;
  --b1: #6fcf97;
  --b2: #56b3e8;
  --b3: #a98bf0;
  --b4: #e8a04b;
  --b5: #e8564b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* A faint wash of the logo's purple at the top, so the page isn't flat black. */
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(169, 139, 240, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

/* One column per page: wide for the game and the report, narrow for the home
   page and forms. The header pads itself to the same column, so the logo and the
   links line up with the page's edges instead of the window's. */
body { --page: 1100px; }
body.narrow { --page: 38rem; }

/* The footer sits at the bottom of the window on short pages too. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100% - var(--page)) / 2 + 1rem));
  background: var(--panel);
  border-bottom: 1px solid #000;
}

.brand { display: block; line-height: 0; }
.brand img { display: block; height: 1.6rem; width: auto; }

.site-footer {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
  border-top: 1px solid var(--line);
}

.site-footer .build { display: block; margin-top: 0.25rem; font-size: 0.75rem; }

/* Buttons and text fields share one shape: same height, corners, and border. */
button.primary, a.primary, button.secondary, a.secondary {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button.primary, a.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
button.primary:hover, a.primary:hover { background: #ffffff; }
button.primary:focus-visible, a.primary:focus-visible, button.secondary:focus-visible, a.secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.secondary, a.secondary { background: transparent; color: var(--text); }
button.secondary:hover, a.secondary:hover { background: var(--panel-2); }

/* home */

.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); max-width: 46rem; }
.pool, .empty { color: var(--muted); font-size: 0.875rem; }
.start-form { display: grid; gap: 1rem; max-width: 26rem; margin: 1.25rem 0; }
.start-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.start-buttons button { width: 100%; }
.start-buttons .daily { grid-column: 1 / -1; order: -1; }

.field { display: grid; gap: 0.4rem; }
.field-label { color: var(--text); font-size: 0.875rem; font-weight: 600; }
.segmented { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; border: 1px solid var(--panel-2); border-radius: 8px; overflow: hidden; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 0.6rem 0.4rem; font-size: 0.95rem; white-space: nowrap; text-align: center; color: var(--muted); font-weight: 600; cursor: pointer; }
.segmented input:checked + span { background: var(--panel-2); color: var(--text); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

.field-inline { display: flex; align-items: center; gap: 0.75rem; }
.field.field-inline input { width: 8rem; padding: 0.5rem 0.75rem; }

.field input {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.25;
}

.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; border-color: var(--accent); }

.stop-form { margin-top: 0.75rem; }
code { background: var(--panel-2); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* Same width as the start form, so the cards sit under it on any screen. */
.bracket-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; max-width: 26rem; }

.bracket-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  background: var(--panel);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}

.bracket-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.bracket-list .blurb { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }

.bracket-chip {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 700;
  color: #11141a;
}

.bracket-1, .fill.bracket-1 { background: var(--b1); }
.bracket-2, .fill.bracket-2 { background: var(--b2); }
.bracket-3, .fill.bracket-3 { background: var(--b3); }
.bracket-4, .fill.bracket-4 { background: var(--b4); }
.bracket-5, .fill.bracket-5 { background: var(--b5); }

/* round */

.round-head { display: flex; align-items: center; gap: 1rem; }
.round-head h1 { font-size: 1.25rem; margin: 0; }
.round-head .stop-form { margin: 0 0 0 auto; }
.round-head .stop-form button { padding: 0.4rem 0.9rem; font-size: 0.875rem; }

.progress {
  flex: 1;
  height: 6px;
  background: var(--panel-2);
  border-radius: 3px;
  overflow: hidden;
}

.progress span { display: block; height: 100%; background: var(--accent); }

/* Two card sizes: commanders are featured (two fit side by side on a phone),
   everything else shares one thumbnail grid. Images keep the card shape while
   they load, so the page doesn't jump. */
.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 488 / 680;
  border-radius: 4.5% / 3.25%;
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%) 0 0 / 300% 100%;
  animation: card-shimmer 1.6s linear infinite;
  /* If an image fails, its alt text (the card name) shows small and centred. */
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
  text-align: center;
  overflow: hidden;
}
a:has(> .card-img) { text-decoration: none; }

@keyframes card-shimmer { to { background-position: -300% 0; } }

.commanders { position: relative; display: flex; justify-content: center; gap: 0.75rem; margin: 1.25rem 0 1.75rem; isolation: isolate; }
.commanders::before {
  content: "";
  position: absolute;
  /* Hug the cards: wide screens shouldn't spread the glow across the page. */
  inset: 8% max(10%, calc(50% - 18rem));
  z-index: -1;
  background: linear-gradient(90deg, var(--glow));
  filter: blur(48px);
  opacity: 0.45;
  border-radius: 50%;
}
.commanders figure { margin: 0; width: clamp(10rem, 50vw, 14rem); }
.commanders.pair figure { width: clamp(9.5rem, 43vw, 13.5rem); }
.commanders .card-img { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.hand h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.card-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; max-width: 56rem; margin-bottom: 1.5rem; }
.card-grid figure { margin: 0; }
.card-grid figcaption { color: var(--text); font-size: 0.8rem; font-weight: 700; text-align: center; padding-top: 0.2rem; }

.commanders figcaption { color: var(--text); font-weight: 600; font-size: 0.9rem; padding-top: 0.5rem; text-align: center; }

.stat-groups { display: grid; grid-template-columns: 2fr 3fr; gap: 0.75rem; margin-bottom: 1.5rem; }
.stat-group { background: var(--panel); border-radius: 8px; padding: 0.9rem 1rem; }
.round > .stat-group { margin-bottom: 1rem; }
.stat-group h2 { margin: 0 0 0.6rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.deck-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.75rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.deck-stats span {
  display: block;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
}

.deck-stats .zero { opacity: 0.4; }

.digest { margin-bottom: 1.5rem; }
.digest h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.full-list { margin-bottom: 2rem; }
.full-list summary { cursor: pointer; color: var(--muted); margin-bottom: 0.75rem; }

.decklist {
  columns: 3 230px;
  column-gap: 1.5rem;
}

.group { break-inside: avoid; margin-bottom: 1.25rem; }
.group h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 0.35rem; }
.group .count { color: var(--text); }
.group ul { list-style: none; padding: 0; margin: 0; }
.group li {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.1rem 0;
}

.card-link { color: var(--text); text-decoration: none; }
.card-link:hover { color: var(--accent); }
.card-price { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

.card-preview {
  display: none;
  position: absolute;
  left: 100%;
  top: -3rem;
  width: 220px;
  border-radius: 10px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.group li:hover .card-preview { display: block; }

/* guessing */

/* Sticky, not fixed: the bar rides the bottom of the screen while you scroll the
   deck, then settles at the end of the page with the footer below it. It spans
   the full window from inside main's column. */
.guess-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 1.5rem calc(50% - 50vw) 0;
  background: var(--panel);
  border-top: 1px solid #000;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
}
main:has(> #guess-bar) { padding-bottom: 0; display: flex; flex-direction: column; }
main:has(> #guess-bar) > * { min-width: 0; }
#guess-bar { margin-top: auto; }
body:has(#guess-bar) { overflow-x: clip; }

.guess-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; max-width: 40rem; margin: 0 auto; }

/* Each guess button wears its bracket's colour: a tinted face, a coloured number,
   and a solid fill on hover. Crossed-off brackets fade out. */
button.guess.bracket-1 { --bc: var(--b1); }
button.guess.bracket-2 { --bc: var(--b2); }
button.guess.bracket-3 { --bc: var(--b3); }
button.guess.bracket-4 { --bc: var(--b4); }
button.guess.bracket-5 { --bc: var(--b5); }

button.guess {
  min-width: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 22%, var(--panel-2)), var(--panel-2));
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--bc) 40%, transparent);
  border-top: 3px solid var(--bc);
  border-radius: 10px;
  padding: 0.35rem 0.2rem 0.4rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, background 0.12s ease;
}

button.guess:hover, button.guess:focus-visible { background: var(--bc); color: var(--primary-text); outline: none; }
button.guess:active { transform: scale(0.96); }
button.guess .num { display: block; font-size: 1.3rem; font-weight: 800; color: var(--bc); }
button.guess:hover .num, button.guess:focus-visible .num { color: inherit; }
button.guess .name { display: block; font-size: 0.7rem; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* htmx-request is set on the form while a guess is in flight: one guess per round. */
.guess-bar.htmx-request button.guess { opacity: 0.5; pointer-events: none; }

/* reveal */

.reveal {
  animation: reveal-in 0.35s ease-out both;
  background: linear-gradient(180deg, color-mix(in srgb, var(--answer, var(--muted)) 16%, var(--panel)) 0, var(--panel) 9rem);
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--slow);
}

/* How quickly you got there: green first try, amber in 2-3, grey after. */
.reveal.hit { border-top-color: var(--hit); }
.reveal.close { border-top-color: var(--close); }
.reveal.miss { border-top-color: var(--slow); }
.reveal h2 { margin: 0.75rem 0 0; font-size: 1.15rem; }
.reveal.hit h2 { color: var(--hit); }
.reveal .beat { margin: 0.25rem 0 0; color: var(--hit); font-weight: 600; }
.verdict-row { margin-top: 1rem; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

.verdict-row { display: grid; gap: 0.5rem; margin-bottom: 1.25rem; }
.verdict-row { grid-template-columns: max-content auto minmax(0, 1fr); align-items: center; column-gap: 0.75rem; }
.verdict-cell { display: contents; }
.verdict-cell .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.verdict-cell .name { color: var(--muted); font-size: 0.875rem; }
.verdict-cell .path { display: flex; gap: 0.3rem; grid-column: 2 / -1; }

.community h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.vote-count { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.6rem; }
.community .count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.bar-row { display: grid; grid-template-columns: 1rem minmax(0, 1fr) 2.5rem 6.5rem; gap: 0.5rem; align-items: center; margin-bottom: 0.3rem; }
.bar { background: var(--panel-2); border-radius: 4px; height: 14px; overflow: hidden; }
.bar .fill { display: block; height: 100%; transform-origin: left; animation: bar-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.bar-value { text-align: right; }
.bar-tags { display: flex; gap: 0.25rem; }
.tag { font-size: 0.7rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 999px; }
.tag.you { background: var(--accent); color: #0d1117; }
.tag.builder { border: 1px solid var(--text); color: var(--text); }

@keyframes bar-grow { from { transform: scaleX(0); } }
.bar-label, .bar-value { color: var(--muted); font-size: 0.8rem; }
.consensus, .attribution { color: var(--muted); font-size: 0.875rem; }
.global-stat { color: var(--muted); }
.global-stat strong { color: var(--text); font-size: 1.1rem; }

.next { margin-top: 1rem; }

/* results */

.results h1 { font-size: 1.75rem; }
.score-line .accuracy { color: var(--muted); font-weight: 600; white-space: nowrap; }
.score-line .accuracy::before { content: "· "; }
.result-rows { list-style: none; padding: 0; display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }

.result-rows li {
  display: grid;
  grid-template-columns: 2rem 1fr 1fr;
  grid-template-areas: "num name gold" "num guess crowd";
  gap: 0.15rem 0.75rem;
  align-items: center;
  background: var(--panel);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border-left: 4px solid var(--muted);
  font-size: 0.9rem;
}

.result-rows li.hit { border-left-color: var(--hit); }
.result-rows li.close { border-left-color: var(--close); }
.result-rows li.miss { border-left-color: var(--miss); }
.result-rows .round-number, .result-rows .guessed, .result-rows .gold { color: var(--muted); }
.result-rows .deck-name { text-decoration: none; }
.result-rows .round-number { grid-area: num; }
.result-rows .deck-name { grid-area: name; }
.result-rows .guessed { grid-area: guess; }
.result-rows .gold { grid-area: gold; }
.result-rows .crowd { grid-area: crowd; color: var(--muted); font-size: 0.8rem; }
.global-compare { color: var(--muted); margin: -0.5rem 0 1rem; }
.global-compare strong { color: var(--text); }

@media (max-width: 700px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
  .stat-groups { grid-template-columns: 1fr; }
  .decklist { columns: 1; }
  .card-preview { display: none !important; }
  /* Number down the left; your guess and the actual bracket share a line under the name. */
  .result-rows li {
    grid-template-columns: 1.5rem 1fr;
    grid-template-areas: "num name" "num gold" "num guess" "num crowd";
    column-gap: 0.75rem;
    row-gap: 0.2rem;
  }
  .result-rows .round-number { grid-area: num; align-self: start; }
  .result-rows .deck-name { grid-area: name; }
  .result-rows .guessed, .result-rows .gold { font-size: 0.875rem; }
}

/* results: share, and the perfect-run celebration */
.results .start-buttons form { display: contents; }
.seed-note { color: var(--muted); font-size: 0.875rem; }
.run-label { margin: 0; color: var(--accent); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; }

.perfect-banner {
  margin: 0 0 0.25rem;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--b1), var(--b2), var(--b3), var(--b4), var(--b5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: perfect-pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes perfect-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.celebration { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 10; }

.celebration i {
  position: absolute;
  top: -2rem;
  width: 0.55rem;
  height: 0.9rem;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall var(--dur) ease-in var(--delay) forwards;
}

.celebration .b1 { background: var(--b1); }
.celebration .b2 { background: var(--b2); }
.celebration .b3 { background: var(--b3); }
.celebration .b4 { background: var(--b4); }
.celebration .b5 { background: var(--b5); }

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .celebration { display: none; }
  .perfect-banner, .reveal, .bar .fill { animation: none; }
}

/* clues */
.clue-status { margin: -0.5rem 0 0.5rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.bracket-chip.small { width: 1.4rem; height: 1.4rem; font-size: 0.8rem; }
.bracket-chip.missed { opacity: 0.45; text-decoration: line-through; }
button.guess:disabled { opacity: 0.2; filter: saturate(0); cursor: not-allowed; background: var(--panel-2); }
button.guess:disabled .name { text-decoration: line-through; }

/* The clue that just unlocked: anchored under the header and briefly lit up. */
[data-new-clue] { scroll-margin-top: 1rem; border-radius: 8px; animation: new-clue 1.6s ease-out both; }

@keyframes new-clue {
  0%, 35% { box-shadow: 0 0 0 8px rgba(196, 181, 253, 0.10), 0 0 0 10px var(--accent), 0 0 28px 10px rgba(196, 181, 253, 0.25); }
  100% { box-shadow: 0 0 0 2px transparent; }
}

.guess-distribution { margin-bottom: 1.25rem; }
.dist-title { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
/* Wordle-style: each bar carries its count; an empty row still shows its 0. */
.guess-distribution .bar-row { grid-template-columns: 1rem minmax(0, 1fr); }
.guess-distribution .bar { height: 1.4rem; }
.guess-distribution .fill { display: flex; align-items: center; justify-content: flex-end; min-width: 1.6rem; padding: 0 0.45rem; box-sizing: border-box; color: #14161c; font-size: 0.8rem; font-weight: 700; }
.guess-distribution .fill.empty { background: var(--panel-2); color: var(--muted); }
.fill.solved-1 { background: var(--hit); }
.fill.solved-2, .fill.solved-3 { background: var(--close); }
.fill.solved-4, .fill.solved-5 { background: var(--miss); }

@media (prefers-reduced-motion: reduce) {
  [data-new-clue] { animation: none; box-shadow: 0 0 0 8px rgba(196, 181, 253, 0.10), 0 0 0 10px var(--accent); }
}

/* Bracket guide inside the guess bar: opens upward, above the buttons. */
.bracket-help { max-width: 40rem; margin: 0 auto 0.4rem; }
.bracket-help summary { list-style: none; cursor: pointer; text-align: center; color: var(--muted); font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0; }
.bracket-help summary::-webkit-details-marker { display: none; }
.bracket-help summary::after { content: " ▴"; }
.bracket-help[open] summary::after { content: " ▾"; }
.bracket-help-list { list-style: none; margin: 0.35rem 0 0.25rem; padding: 0; display: grid; gap: 0.5rem; max-height: 45vh; overflow-y: auto; font-size: 0.85rem; color: var(--muted); }
.bracket-help-list li { display: flex; gap: 0.5rem; align-items: flex-start; }
.bracket-help-list strong { color: var(--text); }
.bracket-help-list .bracket-chip { flex: none; }

/* site menu: the logo opens a list of the games */
.site-header { align-items: center; }
/* Top bar: one link per game, the builder, and the report. */
.site-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 0.4rem 0.6rem; border-radius: 6px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); background: var(--panel-2); }
.site-nav a[aria-current] { color: var(--text); background: var(--panel-2); }
/* On phones the links sit beside the logo when they fit and wrap under it when not. */
@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; row-gap: 0.5rem; }
  .site-nav { flex-wrap: wrap; justify-content: flex-end; }
  .site-nav a { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
}

/* Guess the Commander */
.cmdr-guess { background: var(--panel); border-radius: 10px; padding: 0.9rem; margin-bottom: 1rem; }
.cmdr-guess-form { display: flex; gap: 0.5rem; }
.cmdr-guess-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font: inherit;
}
.cmdr-guess-form input:focus { outline: none; border-color: var(--accent); }
.notice { margin: 0.5rem 0 0; color: var(--close); font-weight: 600; font-size: 0.9rem; }
.score-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.75rem; font-size: 0.8rem; }
.score-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.dots { display: flex; gap: 2px; flex: 1; min-width: 0; }
.dots i { flex: 0 1 8px; aspect-ratio: 1; min-width: 4px; border-radius: 50%; background: var(--panel-2); }
.dots i.on { background: var(--b4); }
.score-value { font-weight: 700; }
.score-note { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.8rem; }
.score-note s { color: var(--text); }

.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.tile { background: var(--panel); border-radius: 10px; padding: 0.75rem; min-height: 6.5rem; display: flex; flex-direction: column; scroll-margin-top: 1rem; }
.tile h2, .clue-list h2 { margin: 0 0 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tile .reveal-form { flex: 1; display: grid; }
.tile-value { margin: auto 0; font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tile-value.small { font-size: 0.9rem; font-weight: 600; }
.tile-value .type-line { display: block; }

.reveal-btn {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #000;
  border-radius: 8px;
  padding: 0.6rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.reveal-btn:hover { border-color: var(--accent); }
.reveal-btn .cost { display: inline-block; margin-left: 0.35rem; padding: 0 0.4rem; border-radius: 4px; background: #9a5a32; color: #fff; font-size: 0.8rem; }

.pip { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: 0.85rem; font-weight: 800; color: #11141a; }
.pip-W { background: #f3edd0; }
.pip-U { background: #6aa8e0; }
.pip-B { background: #a99c95; }
.pip-R { background: #e07a5f; }
.pip-G { background: #6cbf84; }

.clue-list { background: var(--panel); border-radius: 10px; padding: 0.9rem; margin-bottom: 1rem; }

.cmdr-answer { background: var(--panel); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; border-left: 4px solid var(--miss); }
.cmdr-answer.won { border-left-color: var(--hit); }
.cmdr-answer h1 { margin: 0; font-size: 1.6rem; }
.cmdr-answer .start-buttons { max-width: 26rem; }
.cmdr-answer .start-buttons form { display: contents; }
.give-up { margin-bottom: 1rem; }

/* build a quiz */
.create-form { display: grid; gap: 0.9rem; max-width: 36rem; margin-top: 1rem; }
.deck-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.deck-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
.deck-row input, .deck-row select, .create-form .field-inline select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-2);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  min-width: 0;
}
.deck-row input:focus, .deck-row select:focus { outline: none; border-color: var(--accent); }
.deck-row.has-error input { border-color: var(--miss); }
.deck-row .row-error { grid-column: 1 / -1; margin: 0; color: var(--miss); font-size: 0.85rem; }
.add-row { justify-self: start; padding: 0.5rem 1rem; font-size: 0.9rem; }
.created h1 { font-size: 1.6rem; }
.created .start-buttons { max-width: 26rem; margin: 1rem 0; }
.created-decks { list-style: none; padding: 0; display: grid; gap: 0.4rem; max-width: 30rem; }
.created-decks li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; background: var(--panel); border-radius: 8px; padding: 0.55rem 0.75rem; }
.muted { color: var(--muted); font-size: 0.85rem; }

/* commander: one reveal per card type */
.type-clues { list-style: none; margin: 0; padding: 0; display: grid; }
.type-clues > li { scroll-margin-top: 1rem; border-top: 1px solid var(--panel-2); padding: 0.6rem 0; }
.type-clues > li:first-child { border-top: 0; padding-top: 0; }
.type-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.6rem; }
.type-name { font-weight: 700; }
.type-name .count { color: var(--muted); font-weight: 600; margin-left: 0.25rem; }
.type-head .reveal-btn { width: auto; padding: 0.5rem 0.9rem; }
.type-cards { list-style: none; margin: 0.35rem 0 0; padding: 0; columns: 2; column-gap: 1rem; font-size: 0.85rem; line-height: 1.35; }
.type-cards li { break-inside: avoid; padding: 0.12rem 0; }
.type-cards a { color: var(--text); text-decoration: none; }
.type-cards a:hover { color: var(--accent); }

/* Archidekt bracket report */
.report h1 { margin-bottom: 0.25rem; }
.report h2 { font-size: 1.05rem; margin: 2rem 0 0.6rem; }
.report-lede { color: var(--muted); margin-top: 0; }
.report-note { color: var(--muted); font-size: 0.875rem; margin: 0.5rem 0; }
.report-note.small { font-size: 0.8rem; margin-top: 2rem; }
.mix-legend { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.85rem; color: var(--muted); }
.mix-legend li { display: flex; align-items: center; gap: 0.35rem; }
.swatch { width: 0.75rem; height: 0.75rem; border-radius: 3px; display: inline-block; }
.mix-rows { display: grid; gap: 0.7rem; }
.mix-rows.tags { gap: 0.55rem; }
.mix-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.5rem; align-items: baseline; }
.mix-name { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mix-meta .n { opacity: 0.75; }
.mix-row.high .mix-meta, .mix-row.low .mix-meta { color: var(--text); }
.mix-row.baseline { padding-bottom: 0.55rem; border-bottom: 1px solid var(--panel-2); }
.mix-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 18px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.mix-bar .seg { display: flex; align-items: center; justify-content: center; min-width: 0; font-size: 0.68rem; font-weight: 700; color: #14161c; font-variant-numeric: tabular-nums; }
.report-table summary { cursor: pointer; color: var(--muted); font-size: 0.875rem; margin-top: 2rem; }
.table-scroll { overflow-x: auto; }
.report-table table { border-collapse: collapse; font-size: 0.8rem; margin-top: 0.5rem; font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: 0.25rem 0.5rem; text-align: right; white-space: nowrap; }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table thead th { color: var(--muted); font-weight: 600; }
.report-table tbody tr + tr td { border-top: 1px solid var(--panel-2); }

/* Report: tags as one figure of vertical stacked columns */
.tag-sort { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.tag-sort span { margin-right: 0.2rem; }
.tag-sort a { min-width: 2rem; padding: 0.3rem 0.55rem; text-align: center; border: 1px solid var(--panel-2); border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; }
.tag-sort a[aria-current] { background: var(--panel-2); border-color: var(--muted); }
.tag-chart-scroll { overflow-x: auto; margin: 0 -1rem; padding: 0 1rem 0.5rem; -webkit-overflow-scrolling: touch; }
.tag-chart { display: flex; align-items: flex-start; gap: 6px; width: max-content; }
.tag-col { display: flex; flex-direction: column; align-items: center; width: 28px; }
.tag-col.baseline { margin-right: 10px; }
.tag-value { font-size: 0.65rem; color: var(--muted); font-variant-numeric: tabular-nums; height: 1rem; }
.tag-col.baseline .tag-value, .tag-col.baseline .tag-label { color: var(--text); font-weight: 700; }
.tag-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; height: 170px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.tag-stack .seg { display: flex; align-items: center; justify-content: center; min-height: 0; font-size: 0.6rem; font-weight: 700; color: #14161c; font-variant-numeric: tabular-nums; }
.tag-stack .seg.dim { opacity: 0.35; }
.tag-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.75rem; margin-top: 0.4rem; max-height: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* Report: deck prices */
.price-chart { display: grid; gap: 0.55rem; }
.price-row { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 3.6rem; gap: 0.5rem; align-items: center; }
.price-track { position: relative; height: 18px; }
.price-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--panel-2); }
.price-band { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; opacity: 0.85; }
.price-median { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.price-pool { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; transform: rotate(45deg); border: 2px solid var(--text); background: var(--bg); }
.price-value { text-align: right; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-axis .price-track { height: 1rem; }
.price-tick { position: absolute; transform: translateX(-50%); font-size: 0.7rem; color: var(--muted); }
.price-legend { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.8rem; color: var(--muted); }
.price-legend li { display: flex; align-items: center; gap: 0.4rem; }
.key-band { width: 1.1rem; height: 0.6rem; border-radius: 3px; background: var(--muted); }
.key-median { width: 3px; height: 0.9rem; border-radius: 2px; background: var(--text); }
.key-pool { width: 7px; height: 7px; transform: rotate(45deg); border: 2px solid var(--text); }
.outlier-columns { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.outlier-title { font-size: 0.9rem; margin: 1.25rem 0 0.5rem; }
.outliers { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.outliers li { display: grid; grid-template-columns: 1.4rem 4.2rem minmax(0, 1fr); gap: 0.5rem; align-items: baseline; }
.outlier-price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.outlier-body { display: flex; flex-direction: column; min-width: 0; }
.outlier-body a { color: var(--text); font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outlier-meta { color: var(--muted); font-size: 0.78rem; }
.report-table table + table { margin-top: 1rem; }

/* Report: creators vs everyone else */
.dumbbell-bar { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--muted); }
.mark-others, .mark-creators, .mark-precon { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.mark-others { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--text); background: var(--bg); }
.mark-creators { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.mark-precon { width: 8px; height: 8px; border-radius: 1px; background: var(--muted); }
.key-creators { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.key-others { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--text); }
.key-precon { width: 8px; height: 8px; border-radius: 1px; background: var(--muted); }
.ratio-chart { display: grid; gap: 0.45rem; }
.ratio-row { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr) 3.2rem; gap: 0.5rem; align-items: center; }
.ratio-row.reference { margin-top: 0.3rem; padding-top: 0.55rem; border-top: 1px solid var(--panel-2); }
.ratio-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ratio-name a { font-size: 0.8rem; font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ratio-meta { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.panel-tag { color: var(--accent); font-weight: 600; }
.ratio-row.reference .ratio-name a { color: var(--muted); }
.ratio-track { position: relative; height: 16px; }
.ratio-track .price-grid.one { background: var(--muted); }
.ratio-bar { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--accent); opacity: 0.45; }
.ratio-dot { position: absolute; top: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.ratio-row.reference .ratio-dot { background: var(--muted); }
.ratio-row.reference .ratio-bar { background: var(--muted); }
.ratio-value { text-align: right; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ratio-value .muted { color: var(--muted); font-weight: 400; font-size: 0.72rem; }
.price-chart.tiers .price-row { grid-template-columns: 2.6rem minmax(0, 1fr) 3.6rem; }
.tier-label { font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tier-label span { color: var(--muted); font-weight: 400; font-size: 0.7rem; }
.mark-creators { background: var(--accent); }

/* Report: Universes Beyond adoption */
.key-ub, .key-magic { width: 1.1rem; height: 0.6rem; border-radius: 3px; }
.key-ub { background: var(--accent); }
.key-magic { background: var(--muted); opacity: 0.6; }
.adoption-chart { display: grid; gap: 0.4rem; margin-top: 0.75rem; }
.adoption-row { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr) 2.6rem; gap: 0.5rem; align-items: center; }
.adoption-name { display: flex; flex-direction: column; font-size: 0.8rem; font-weight: 600; line-height: 1.2; min-width: 0; }
.adoption-date { color: var(--muted); font-weight: 400; font-size: 0.7rem; }
.adoption-track { height: 14px; }
.adoption-bar { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--muted); opacity: 0.6; }
.adoption-row.ub .adoption-bar { background: var(--accent); opacity: 1; }
.adoption-value { text-align: right; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ub-cards li { grid-template-columns: 3.2rem minmax(0, 1fr); }
.ub-cards .card-name { font-weight: 600; font-size: 0.9rem; }

/* Report: quiz pool decks per account */
.pool-authors { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; max-width: 30rem; }
.pool-authors li { display: grid; grid-template-columns: minmax(0, 1fr) auto 2rem; gap: 0.5rem; align-items: center; }
.pool-author { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-brackets { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 11rem; }
.deck-dot { width: 8px; height: 12px; border-radius: 2px; }
.pool-count { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Footer: sources, privacy, and the Fan Content Policy notice */
.site-footer p { margin: 0 auto 0.5rem; max-width: 40rem; }
.site-footer .footer-links a { color: var(--text); }
.site-footer .fan-content { font-size: 0.7rem; line-height: 1.45; opacity: 0.7; }
.site-footer .fan-content a { color: inherit; }
.error-actions { max-width: 26rem; grid-template-columns: 1fr; }

/* Reveal: "Wrong label?" */
/* Hover or tap a dotted term for its definition; the note spans the panel under the stats. */
.deck-stats { position: relative; }
.deck-stats .tip { display: inline; color: inherit; font-size: inherit; font-weight: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; outline-offset: 2px; }
.deck-stats .tip::after {
  content: attr(data-tip); position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.5rem);
  padding: 0.5rem 0.65rem; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-size: 0.8rem; line-height: 1.35; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.deck-stats .tip:hover::after, .deck-stats .tip:focus::after { opacity: 1; }
.label-report { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--muted); }
.floor-reasons { grid-column: 1 / -1; list-style: none; margin: -0.2rem 0 0 1rem; padding: 0; color: var(--muted); font-size: 0.85rem; }
.floor-reasons li { margin: 0.15rem 0; }
.floor-reasons strong { color: var(--text); font-weight: 600; }
.label-report summary { cursor: pointer; display: inline-block; }
.label-report form { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem; flex-wrap: wrap; }
.label-report .label-prompt { margin-right: 0.2rem; }
.label-report button.small { min-width: 2.4rem; padding: 0.35rem 0.6rem; }
.label-thanks { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 1rem; }

/* Stats page */
.stat-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.5rem; margin: 1rem 0 0.25rem; }
.stat-total { background: var(--panel); border-radius: 8px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; }
.stat-number { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.75rem; color: var(--muted); }
.stats-table { border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 0.3rem 0.6rem; text-align: right; white-space: nowrap; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table thead th { color: var(--muted); font-weight: 600; }
.stats-table tbody tr + tr td { border-top: 1px solid var(--panel-2); }
.stat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; font-size: 0.85rem; }
.stat-list li { display: flex; justify-content: space-between; gap: 1rem; }
.stat-list li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Feedback */
.feedback-form textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--panel-2); border-radius: 8px; padding: 0.6rem 0.75rem; resize: vertical; }
.feedback-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.feedback-list li { background: var(--panel); border-radius: 8px; padding: 0.6rem 0.75rem; }
.feedback-list p { margin: 0 0 0.25rem; white-space: pre-wrap; }

/* Visual refresh: the clue track, the reveal's answer, and the active tab. */
.clue-track { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 1rem; flex-wrap: wrap; }
.clue-count { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.clue-track ol { list-style: none; display: flex; gap: 0.3rem; margin: 0; padding: 0; flex: 1; min-width: 14rem; }
.clue-track li { flex: 1; }
.clue-track a {
  display: block;
  padding-top: 0.35rem;
  border-top: 3px solid var(--panel-2);
  color: var(--muted);
  font-size: 0.68rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clue-track li.done a { border-top-color: var(--muted); color: var(--text); }
.clue-track li.current a { border-top-color: var(--accent); color: var(--accent); font-weight: 700; }
.clue-track li.locked a { pointer-events: none; opacity: 0.55; }

.answer { display: flex; align-items: center; gap: 0.9rem; }
.answer-chip.bracket-chip { width: 3.5rem; height: 3.5rem; font-size: 1.75rem; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--answer) 25%, transparent); animation: answer-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both 0.1s; }
.answer-text { display: flex; flex-direction: column; }
.answer-text .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.answer-name { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }

@keyframes answer-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .answer-chip.bracket-chip { animation: none; }
  .card-img { animation: none; }
  button.guess { transition: none; }
}

/* The "3" in the home headline wears bracket 3's colour, like the logo. */
.hero h1 .three { color: var(--b3); }

/* Every clue is a panel: the card clues match the stat panels. */
.hand, .digest { background: var(--panel); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.hand h2, .digest h2 { margin: 0 0 0.6rem; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); }
.hand .card-grid, .digest .card-grid { margin-bottom: 0; }
.stat-group { margin-bottom: 0.75rem; }

/* /dev: visitors per day as columns */
.visit-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; margin: 0.5rem 0 1.25rem; }
.visit-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.visit-bar { width: 100%; min-height: 2px; background: var(--accent); }
.visit-day { font-size: 0.6rem; color: var(--muted); }
.dev-more { margin: 0.5rem 0 1.5rem; }
.dev-more summary { cursor: pointer; color: var(--muted); }
.dev-notes { display: grid; gap: 1rem; margin-bottom: 2rem; }
.dev-notes textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; line-height: 1.45; color: var(--text); background: var(--panel); border: 1px solid var(--line); padding: 0.6rem 0.75rem; resize: vertical; }
.dev-notes-actions { display: flex; align-items: center; gap: 1rem; }
.dev-notes .saved { color: var(--hit); font-weight: 700; }

/* Reports home and the crumb back to it */
.report-crumb { margin: 0 0 0.25rem; font-size: 0.9rem; }
.report-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.report-list li { display: grid; gap: 0.25rem; background: var(--panel); padding: 0.9rem 1rem; }
.report-list span { color: var(--muted); }

/* Clues: the decklist with unrevealed cards blacked out. */
.redacted-list { background: var(--panel); padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.redacted-list h2 { margin: 0 0 0.6rem; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.redacted-list .decklist { columns: 2 14rem; column-gap: 1.5rem; }
.redacted-list li { padding: 0.12rem 0; line-height: 1.3; }
.redacted-list li.shown { font-weight: 700; }
.redacted { display: inline-block; max-width: 100%; height: 0.85em; vertical-align: middle; background: #15110d; }
.clue-empty { color: var(--muted); margin: 0; }
.commanders.no-glow::before { display: none; }

/* "Do you agree?" on the reveal */
.agree { margin: 0.25rem 0 1.25rem; padding: 0.75rem 0.9rem; background: var(--panel-2); }
.agree-q { margin: 0 0 0.6rem; font-weight: 700; font-size: 1.05rem; }
.agree.done .agree-q { margin: 0; }
.agree-thumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-start; }
.thumb { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 1rem; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid var(--line); background: var(--panel); color: var(--text); list-style: none; }
.thumb::-webkit-details-marker { display: none; }
.thumb-down[open] .thumb.down { background: var(--panel-2); }
.agree-pick { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.agree-pick .guess-chip { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

.start-buttons.stack { grid-template-columns: 1fr; }
.daily-done { text-align: center; }

/* Results: Wordle-style statistics */
.stat-board { margin: 0.75rem 0 1.25rem; text-align: center; }
.stat-title { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.stat-tiles.global { grid-template-columns: minmax(0, 1fr); margin-top: 0.9rem; }
.stat-tile { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.stat-big { font-size: 2.4rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-name { font-size: 0.75rem; line-height: 1.2; color: var(--text); max-width: 5.5rem; }
.fill.missed { background: var(--slow); }

/* Results: the commander card pops up over its name */
.deck-name { position: relative; }
.commander-preview { display: none; position: absolute; z-index: 20; left: 0; top: calc(100% + 0.4rem); gap: 0.4rem; pointer-events: none; }
.commander-preview img { width: 11rem; aspect-ratio: 488 / 680; border-radius: 4.5% / 3.25%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.deck-name:hover .commander-preview, .deck-name:focus-visible .commander-preview { display: flex; }
.clue-note { margin: -0.25rem 0 0.6rem; font-weight: 700; }

/* "It's really ..." opens under the thumbs, flush with the Yes button. */
.agree-thumbs { position: relative; }
.thumb-down { position: static; }
.agree:has(.thumb-down[open]) .agree-thumbs { padding-bottom: 3.4rem; }
.thumb-down .agree-pick { position: absolute; left: 0; bottom: 0; margin: 0; }
.crowd-line { margin: 0.35rem 0 0; font-weight: 600; }
.full-reveal li { font-weight: 500; }

.stat-board .stat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-board .stat-tiles.rates { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.stat-everyone { font-size: 0.85rem; color: var(--muted); }
