@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Azeret Mono";
  src: url("assets/fonts/azeret-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

/* The Patio Line — a patio at dusk. Terracotta is the live burner and the
   action; ember is heat; basil is a fit; clay is a blocked placement. */

:root {
  --ground: #1b1410;
  --raise: #241a14;
  --raise-2: #2c2119;
  --ink: #f2e7d5;
  --muted: #bda893;
  --line: rgba(242, 231, 213, 0.16);
  --line-strong: rgba(242, 231, 213, 0.32);
  --terra: #b5522d;
  --terra-deep: #8f3d20;
  --ember: #e8a24b;
  --basil: #8fae72;
  --clay: #d9695a;
  --serif: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* A faint tile grid, like a patio laid in the dark. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(242, 231, 213, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 231, 213, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 14px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */

.bar {
  border-bottom: 1px solid var(--line);
  background: rgba(27, 20, 16, 0.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.bar-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--ink);
}
.brand-a { font-weight: 800; letter-spacing: -0.03em; font-size: 1.2rem; }
.brand-b {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
}
.bar-tool { margin: 0 auto 0 0; color: var(--muted); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; }

.reset {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  min-height: 40px;
}
.reset:hover { border-color: var(--ember); color: var(--ember); }

/* ---------- hero ---------- */

.intro {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(20px, 4vw, 56px) clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 1.1rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 14ch;
  text-wrap: balance;
}

.standfirst {
  margin: 1.4rem 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.intro-note {
  margin: 1.1rem 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.8rem;
  border-left: 2px solid var(--line-strong);
  padding-left: 0.85rem;
}

/* ---------- ticket ---------- */

.ticket {
  margin: 0;
  background: var(--raise);
  border: 1px solid var(--line-strong);
  position: relative;
}
.ticket::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(242, 231, 213, 0.12);
  pointer-events: none;
}
.ticket-top, .ticket-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.ticket-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.ticket-body { padding: 1.2rem 1rem 1.1rem; }
.ticket-big {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.ticket-sub { margin: 0.35rem 0 1.1rem; color: var(--muted); font-size: 0.86rem; }
.ticket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
  margin: 0;
}
.ticket-grid dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ticket-grid dd { margin: 0.2rem 0 0; font-size: 0.95rem; }
.ticket-foot span:first-child { font-size: 0.86rem; color: var(--muted); }
.stamp {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ember);
  border: 1px solid var(--ember);
  line-height: 1;
  padding: 0.35rem 0.5rem;
}

/* ---------- shared section ---------- */

.build, .table, .verdict, .catalogue, .method {
  border-top: 1px solid var(--line);
}

.build-in, .pass-in, .verdict-in, .catalogue, .method {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 4.5rem) clamp(20px, 4vw, 56px);
}

.build-head, .sec-head, .pass-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 20ch;
}
.build-head .mono, .sec-head .mono, .pass-head .mono { margin: 0 0 0.55rem; }
.build-note, .sec-note { margin: 0; max-width: 46ch; color: var(--muted); font-size: 0.9rem; }

/* ---------- build grid ---------- */

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
}

.controls { display: grid; gap: 1.3rem; }

.control { border: 0; padding: 0; margin: 0; min-width: 0; }
.control legend, .budget-control > label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
  padding: 0;
  display: block;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--ember); }
.chip[aria-pressed="true"] {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff4e6;
}
.chip:focus-visible, .lever:focus-visible, .reset:focus-visible, .game-btn:focus-visible, .result-link:focus-visible, .result-name:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.hint { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.78rem; min-height: 1.2em; }

.cautions { display: grid; gap: 0.45rem; }
.caution {
  margin: 0;
  border-left: 2px solid var(--ember);
  padding: 0.15rem 0 0.15rem 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- patio board ---------- */

.board-wrap {
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--raise);
}
#board {
  display: block;
  width: 100%;
  height: auto;
  background: var(--raise);
  touch-action: manipulation;
  user-select: none;
}
.board-wrap figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
#boardVerdict { text-align: right; }
#boardVerdict.fit { color: var(--basil); }
#boardVerdict.blocked { color: var(--clay); }

/* ---------- table controls ---------- */

.table-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 2rem;
  align-items: start;
}
.budget-control { align-self: start; }
.budget-row { display: flex; align-items: center; gap: 1rem; }
.budget-row input[type="range"] {
  flex: 1;
  accent-color: var(--terra);
  min-height: 44px;
}
#budgetOut { font-family: var(--mono); font-size: 0.95rem; color: var(--ink); min-width: 4ch; }

.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.9rem;
  cursor: pointer;
  align-self: end;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--terra); }

/* ---------- the pass ---------- */

.pass { border-top: 1px solid var(--line); }
.pass-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 4.5rem) clamp(20px, 4vw, 56px);
}
.pass-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(1.2rem, 2.5vw, 2rem);
}
.pass-head .mono { margin: 0 0 0.55rem; }
.pass-note { margin: 0; max-width: 54ch; color: var(--muted); font-size: 0.9rem; }

.how { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.how summary { padding: 0.65rem 0; }
.how ol { margin: 0 0 0.6rem 1.1rem; padding: 0; display: grid; gap: 0.4rem; max-width: 78ch; }
.how li { font-size: 0.82rem; color: var(--muted); }
.how li b { color: var(--ink); font-weight: 600; }
.how .fine { margin: 0 0 0.8rem; }

.plan-picker { margin-bottom: 1.2rem; }
.plan-picker > .mono { display: block; margin-bottom: 0.5rem; }
.select-label { margin-top: 0.7rem; }
#ovenSelect {
  appearance: none;
  width: 100%;
  max-width: 34rem;
  background: var(--raise-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.55rem 0.65rem;
  min-height: 44px;
}

.oven-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.oven-tab {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
  min-height: 44px;
  cursor: pointer;
  text-align: left;
}
.oven-tab b { display: block; font-size: 0.92rem; }
.oven-tab span { display: block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.15rem; }
.oven-tab:hover { border-color: var(--ember); }
.oven-tab[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); }
.oven-tab[aria-pressed="true"] span { color: #ffe9d2; }

.game-shell {
  border: 1px solid var(--line-strong);
  background: var(--raise);
}
.game-hud {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr 1fr;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  align-items: end;
}
.hud-cell { min-width: 0; }
.hud-cell .mono { display: block; margin-bottom: 0.2rem; }
.hud-cell strong { display: block; font-size: 1.1rem; letter-spacing: -0.02em; line-height: 1.1; }
.hud-small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.2rem; }
.temp-track, .fuel-track {
  position: relative;
  height: 8px;
  background: rgba(242, 231, 213, 0.12);
  margin-top: 0.4rem;
  overflow: hidden;
}
.temp-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(143, 174, 114, 0.28);
}
.temp-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: var(--ember);
  transition: left 0.2s linear;
}
.fuel-bar {
  display: block;
  height: 100%;
  background: var(--ember);
  transition: width 0.2s linear;
}
.hud-temp strong { color: var(--ember); }
.hud-clock strong { font-family: var(--mono); font-size: 1.35rem; }

.game-board-wrap { position: relative; }
#gameBoard {
  display: block;
  width: 100%;
  height: auto;
  background: var(--raise);
  touch-action: manipulation;
  user-select: none;
}
.game-event {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  background: rgba(27, 20, 16, 0.92);
  border: 1px solid var(--ember);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  max-width: 42%;
  text-align: left;
}
.game-event.show { opacity: 1; }

.game-hud {
  position: sticky;
  top: 64px;
  z-index: 6;
  background: var(--raise);
}
.game-foot {
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: var(--raise);
  border-top: 1px solid var(--line);
}
.game-shell.is-done .game-hud,
.game-shell.is-done .game-foot { position: static; }
.service-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  padding: 0.5rem 0.9rem;
  border-top: 1px solid var(--line);
}
.service-list { min-width: 0; }
.service-list > .mono { display: block; margin-bottom: 0.3rem; }
.guest-list, .pass-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.guest-chip, .pass-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.22rem 0.4rem;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
}
.guest-chip b, .pass-chip b { display: block; font-size: 0.72rem; font-weight: 600; }
.guest-chip span, .pass-chip span { display: block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--muted); }
.guest-chip:hover, .pass-chip:hover { border-color: var(--ember); }
.guest-chip.served { border-color: rgba(143, 174, 114, 0.55); }
.guest-chip.served span { color: var(--basil); }
.guest-chip.left { border-color: rgba(217, 105, 90, 0.55); opacity: 0.6; }
.guest-chip.left span { color: var(--clay); }
.pass-chip { border-color: rgba(232, 162, 75, 0.4); }
.pass-chip.on { border-color: var(--ink); background: rgba(242, 231, 213, 0.08); }
.list-empty { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); }

.bake-strip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
}
.bake-track {
  position: relative;
  flex: 1;
  height: 10px;
  background: rgba(242, 231, 213, 0.12);
  overflow: hidden;
}
.bake-zone { position: absolute; top: 0; bottom: 0; }
.bake-zone.turn { left: 33.6%; width: 24%; background: rgba(143, 174, 114, 0.28); }
.bake-zone.pull { left: 68%; width: 18.4%; background: rgba(232, 162, 75, 0.3); }
.bake-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--terra);
  transition: width 0.1s linear;
}
.bake-text { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); min-width: 17ch; text-align: right; }

.game-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.game-hint { margin: 0; color: var(--muted); font-size: 0.82rem; max-width: 40ch; }
.game-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.game-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
  min-height: 44px;
  cursor: pointer;
}
.game-btn:hover:not(:disabled) { border-color: var(--ember); color: var(--ember); }
.game-btn.primary { background: var(--terra); border-color: var(--terra); color: #fff4e6; }
.game-btn.primary:hover:not(:disabled) { background: var(--terra-deep); color: #fff4e6; }
.game-btn:disabled { opacity: 0.32; cursor: not-allowed; }

.game-report { border-top: 1px solid var(--line-strong); padding: 1rem 0.9rem 1.1rem; scroll-margin-top: 76px; }
.game-report:empty { display: none; }
.report-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; flex-wrap: wrap; margin-bottom: 0.8rem; }
.report-head h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.report-head p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.8rem; }
.report-stamp { font-family: var(--mono); font-size: 2rem; color: var(--ember); border: 1px solid var(--ember); padding: 0.15rem 0.4rem; line-height: 1; }
.report-stars { letter-spacing: 0.18em; color: var(--ember); font-size: 0.9rem; }
.report-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.6rem; margin: 0 0 0.8rem; }
.report-grid dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.report-grid dd { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 700; }
.report-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.report-table th, .report-table td { padding: 0.4rem 0.5rem; font-size: 0.78rem; border-bottom: 1px solid var(--line); text-align: left; }
.report-table th { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.report-actions .game-btn { border-color: var(--line-strong); }

.game-log { margin: 0.7rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.game-log li { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; border: 1px solid var(--line); padding: 0.2rem 0.35rem; color: var(--muted); }
.game-log li.good { border-color: rgba(143, 174, 114, 0.55); color: var(--basil); }
.game-log li.bad { border-color: rgba(217, 105, 90, 0.55); color: var(--clay); }

/* ---------- game board pieces ---------- */

.game-pizza { cursor: pointer; }
.game-guest { cursor: pointer; }
.game-guest:hover .guest-table { stroke: var(--ember); }
.game-guest.served { opacity: 0.55; }
.game-guest.left { opacity: 0.3; }
.game-guest.left .guest-head { fill: #6b5b4d; }
#board:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
[data-plan-oven] { touch-action: none; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.noscript {
  max-width: 1240px;
  margin: 1rem auto 0;
  padding: 0.6rem clamp(20px, 4vw, 56px);
  color: var(--muted);
  font-size: 0.82rem;
  border-left: 2px solid var(--ember);
}
.game-dough { cursor: pointer; }
.game-dough:hover circle { stroke: var(--ember); }
/* ---------- results ---------- */

.results { display: grid; gap: 0; border-top: 1px solid var(--line); }
.result-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1.2fr) minmax(0, 1.6fr) 5rem 6rem;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--ink);
  text-align: left;
  font: inherit;
  width: 100%;
}
.result-row:hover { background: rgba(242, 231, 213, 0.03); }
.result-row[aria-pressed="true"] { background: rgba(181, 82, 45, 0.08); }
.result-rank { font-family: var(--mono); font-size: 0.75rem; color: var(--ember); }
.result-name {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}
.result-name:hover { color: var(--ember); }
.result-name span { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); letter-spacing: 0; margin-top: 0.2rem; }
.result-why { font-size: 0.84rem; color: var(--muted); }
.result-why b { color: var(--ink); font-weight: 500; }
.result-score { font-family: var(--mono); font-size: 1.1rem; color: var(--ember); text-align: right; }
.result-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--terra);
  text-decoration: none;
  padding: 0.35rem 0;
  white-space: nowrap;
}
.result-link:hover { color: var(--ember); border-color: var(--ember); }

.empty {
  border-left: 3px solid var(--clay);
  padding: 0.9rem 1rem;
  background: rgba(217, 105, 90, 0.07);
}
.empty h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.empty p { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.88rem; }
.empty b { color: var(--ink); }

.levers { margin-top: 1.8rem; }
.lever-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.55rem; }
.lever {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  min-height: 40px;
  cursor: pointer;
}
.lever:hover { border-color: var(--ember); color: var(--ember); }
.lever-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.82rem; min-height: 1.2em; }

.not-buy {
  margin: 1.8rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 76ch;
}
.not-buy b { color: var(--ink); }

/* ---------- catalogue ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th, td { text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--line-strong);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(242, 231, 213, 0.03); }
td { font-size: 0.84rem; }
.cat-name { font-weight: 600; }
.cat-name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.cat-name a:hover { color: var(--ember); border-color: var(--ember); }
.cat-sub { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 400; margin-top: 0.15rem; max-width: 34ch; }
.cat-fit { font-family: var(--mono); font-size: 0.95rem; color: var(--ember); }
.cat-link {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--terra);
  white-space: nowrap;
}
.cat-link:hover { color: var(--ember); border-color: var(--ember); }
.cat-out { color: var(--muted); font-size: 0.76rem; }
.table-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.76rem; max-width: 80ch; }

/* ---------- method ---------- */

details { border-top: 1px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
}
summary::-webkit-details-marker { display: none; }
summary .mono:first-child { color: var(--ink); }
summary::after { content: "+"; font-family: var(--mono); color: var(--ember); }
details[open] summary::after { content: "−"; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 3rem);
  padding: 0.6rem 0 1rem;
}
.method h3 { margin: 0 0 0.6rem; font-size: 1rem; letter-spacing: -0.01em; }
.method p, .method li { font-size: 0.82rem; color: var(--muted); }
.weights { list-style: none; padding: 0; margin: 0.8rem 0; border-top: 1px solid var(--line); }
.weights li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.weights li span:last-child { font-family: var(--mono); color: var(--ember); }
.conflicts, .sources { padding-left: 1.05rem; margin: 0 0 1rem; }
.conflicts li, .sources li { margin-bottom: 0.55rem; }
.conflicts b { color: var(--ink); font-weight: 600; }
.fine { font-size: 0.74rem; color: var(--muted); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line-strong); }
.foot-disclosure {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.3rem clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.foot-disclosure p { margin: 0; font-size: 0.76rem; color: var(--muted); max-width: 90ch; }
.foot-disclosure b { color: var(--ink); }
.foot-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.1rem clamp(20px, 4vw, 56px) 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
}
.foot-in p { margin: 0; }
.foot-mark { font-weight: 700; }
.foot-in a { color: var(--muted); }

/* ---------- responsive ---------- */

@media (min-width: 1021px) {
  .game-hud {
    position: sticky;
    top: 64px;
    z-index: 6;
    background: var(--raise);
  }
  .game-foot {
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: var(--raise);
  }
  .game-shell.is-done .game-foot,
  .game-shell.is-done .game-hud {
    position: static;
  }
}

@media (max-width: 1020px) {
  .intro { grid-template-columns: 1fr; align-items: start; }
  .ticket { max-width: 520px; }
  .build-grid { grid-template-columns: 1fr; }
  .game-hud { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .bar-tool { display: none; }
  .build-head, .sec-head, .pass-head { flex-direction: column; align-items: start; gap: 1rem; }
  .table-controls { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .result-row {
    grid-template-columns: 2.2rem minmax(0, 1fr) 4rem;
    grid-template-areas:
      "rank name score"
      "rank why why"
      "rank link link";
    row-gap: 0.4rem;
  }
  .result-rank { grid-area: rank; }
  .result-name { grid-area: name; }
  .result-why { grid-area: why; }
  .result-score { grid-area: score; }
  .result-link { grid-area: link; justify-self: start; }
  .game-bar { flex-direction: column; align-items: start; }
  .game-hint { max-width: none; }
  .game-hud { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .hud-cell strong { font-size: 0.95rem; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .mono { font-size: 0.75rem; }
  .chip, .lever { font-size: 0.82rem; }
  .foot-in { flex-direction: column; }
  .report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-hud { grid-template-columns: 1fr; }
  .game-actions { gap: 0.3rem; }
  .game-btn { font-size: 0.72rem; min-height: 44px; }
  .game-hint { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Related decisions, last-checked line and touch targets (added 2026-11-06) */
.related-tools { padding-top: 1.6rem; }
.related-title { margin: 0 0 0.5rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
.related-tools ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.related-tools a { color: inherit; opacity: 0.9; }
.related-tools a:hover { opacity: 1; text-decoration: underline; }
.last-checked { margin: 0.55rem 0 0; font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.7; }

/* The quotable answer under the h1. */
.lede-answer { max-width: 62ch; margin: 0 0 0.9rem; font-size: 1.06em; line-height: 1.6; }
