/* The Board Round: flow games for mining executives. The solo game, the room's main screen, the phones and the
 * results board. The Stratflow look of One Mine, Two Scoreboards and Busy Is Not Productive (always light), with
 * what the board rounds need: a mine of four to eight stations, the board's choices, the time each station lost,
 * and the ranking of the teams. This file stands on its own: nothing outside the boardround folder is needed. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
:root {
  --bg: #f3f5f7; --panel: #ffffff; --panel-2: #eaeef2; --ink: #1d2329; --ink-2: #454c54; --muted: #69717a;
  --line: #dbe1e7; --line-strong: #b4bdc6;
  --accent: #052f5b; --accent-ink: #ffffff; --accent-soft: #e3ebf4;
  --ledger: #3b3a3a; --ledger-ink: #f7f7f7;
  --head: #052f5b; --cta: #8b0000; --cta-ink: #ffffff; --cta-hover: #6c0000; --mark: #8b0000; --gold: #edcd1f; --navy: #052f5b;
  --good: #0ca30c; --good-ink: #0a5c0a; --warn: #fab219; --warn-ink: #6a4900;
  --serious: #ec835a; --serious-ink: #8b3410; --crit: #d03b3b; --crit-ink: #a31f1f;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --grid: #e2e6e9; --axis: #b8c1c8;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head: 'Nunito Sans', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --r: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; padding-block: 22px 56px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1, h2, .callout .hd, .predict label { font-family: var(--font-head); font-weight: 800; letter-spacing: -.01em; color: var(--head); }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.prose { max-width: 70ch; display: grid; gap: 12px; }
.prose p { color: var(--ink-2); }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--head); font-size: .95rem; }
.eyebrow::before { content: ''; display: inline-block; width: 26px; height: 3px; background: var(--gold); vertical-align: middle; margin: -2px 10px 0 0; }
.stack { display: grid; gap: 24px; }
.stack-sm { display: grid; gap: 12px; }
.stack > *, .stack-sm > * { min-width: 0; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 70ch; }

/* ---------- the masthead, the round rail, the company band ---------- */
.masthead { background: var(--panel); border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line); }
.masthead-in { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.masthead .logo { display: block; line-height: 0; flex: 0 0 auto; border-radius: 4px; }
.masthead .logo img { display: block; height: 52px; width: auto; }
.masthead .brand { display: grid; gap: 1px; align-items: start; padding-left: 20px; border-left: 1px solid var(--line-strong); }
.masthead .brand b { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; line-height: 1.2; color: var(--head); }
.masthead .brand span { font-size: .85rem; color: var(--muted); }
.masthead .luck { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); flex-wrap: wrap; }
.luck code { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: .08em; color: var(--ink); }
.luck input { width: 5.5em; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.masthead.slim .masthead-in { padding: 10px 16px; max-width: 520px; }
.masthead.slim .logo img { height: 38px; }
.masthead.slim .brand { padding-left: 14px; }
.masthead.slim .brand b { font-size: 1rem; }
.rail { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line-strong); margin-bottom: 28px; scrollbar-width: thin; }
.rail button { flex: 0 0 auto; border: 0; background: transparent; padding: 10px 12px 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-radius: var(--r) var(--r) 0 0; }
.rail button b { font-weight: 700; margin-right: 6px; color: var(--muted); }
.rail button[aria-current="true"] { background: transparent; color: var(--head); box-shadow: inset 0 -3px 0 var(--gold); }
.rail button[aria-current="true"] b { color: var(--head); }
.rail button:disabled { color: var(--line-strong); cursor: not-allowed; }
.rail button:disabled b { color: var(--line-strong); }
.rail button:not(:disabled):not([aria-current="true"]):hover { background: var(--panel-2); }
.corp { background: var(--navy); color: #ffffff; }
.corp-in { max-width: 1200px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; font-size: .88rem; }
.corp a { color: #ffffff; text-underline-offset: 3px; }
.corp a:hover { color: var(--gold); }
.corp .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: grid; gap: 6px; max-width: 86ch; }
@media (max-width: 640px) {
  .masthead-in { padding: 10px 16px; }
  .masthead .logo img { height: 40px; }
  .masthead .brand { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .masthead .luck { margin-left: 0; }
  .masthead.slim .brand { padding-left: 0; }
  .masthead.slim .brand b { font-size: .95rem; }
  h1 { font-size: 1.9rem; }
  .wrap { padding-inline: 16px; }
}

/* ---------- buttons, panels, notes ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--panel); padding: 9px 16px; border-radius: var(--r); cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); font-weight: 600; }
.btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 8px; text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel.wait { text-align: center; color: var(--ink-2); }
.panel.wait b { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); margin-bottom: 4px; }
.callout { border-left: 4px solid var(--navy); background: var(--panel); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 8px; }
.callout .hd { font-size: 1.3rem; line-height: 1.2; }
.callout p { color: var(--ink-2); max-width: 74ch; }
.callout.teach { border-left-color: var(--gold); }
.note { font-size: .85rem; color: var(--muted); max-width: 80ch; }
.banner { border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.facts div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts dt { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: .95rem; color: var(--ink-2); }
dl { margin: 0; }
.rounds { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rounds li { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; display: grid; gap: 3px; align-content: start; }
.rounds li b { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; }
.rounds li span { font-size: .95rem; color: var(--ink-2); }
.list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 78ch; color: var(--ink-2); }
.list b { color: var(--ink); }

/* ---------- the mine: eight stations with the stock places between them ---------- */
.mine { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.mine-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.mine-head b { color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .04em; text-transform: uppercase; }
.chain-scroll { overflow-x: auto; padding: 16px 12px 10px; }
.chain { display: flex; align-items: stretch; min-width: max-content; }
.tile { width: 90px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); padding: 7px 7px 8px; display: grid; gap: 4px; align-content: start; position: relative; }
.tile.constraint { border-color: var(--mark); box-shadow: inset 0 0 0 1px var(--mark); }
.tile .nm { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; font-size: .76rem; color: var(--ink-2); line-height: 1.1; min-height: 2.2em; }
.tile .plate { display: flex; align-items: baseline; gap: 4px; }
.tile .plate b { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1; }
.tile .plate small { color: var(--muted); font-size: .74rem; }
.tile .fleet { font-size: .72rem; color: var(--ink-2); line-height: 1.25; min-height: 2.5em; }
.tile .meter { height: 8px; background: var(--panel-2); border-radius: 2px; position: relative; overflow: hidden; }
.tile .meter u { position: absolute; inset: 0 auto 0 0; background: var(--s1); width: 0; transition: width .12s linear; }
.tile .meter i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .55; }
.tile .st { font-size: .76rem; min-height: 1.2em; color: var(--muted); white-space: nowrap; }
.tile[data-state="cap"] .st { color: var(--ink-2); }
.tile[data-state="input"] { border-color: var(--warn); } .tile[data-state="input"] .st { color: var(--warn-ink); font-weight: 600; }
.tile[data-state="room"] { border-color: var(--serious); } .tile[data-state="room"] .st { color: var(--serious-ink); font-weight: 600; }
.tile[data-state="down"] { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 10%, var(--bg)); } .tile[data-state="down"] .st { color: var(--crit-ink); font-weight: 600; }
.tile .tag { position: absolute; top: -9px; right: 6px; background: var(--mark); color: #ffffff; font-family: var(--font-display); font-weight: 600; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; }
.tile .flag { position: absolute; bottom: -10px; left: 6px; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.tile .fixed { font-size: .74rem; color: var(--muted); }
.gap { width: 44px; flex: 0 0 auto; display: grid; justify-items: center; align-content: center; gap: 3px; padding-inline: 2px; }
.gap.end { width: 36px; }
.gap .arrow { width: 100%; height: 2px; background: var(--line-strong); position: relative; }
.gap .arrow::after { content: ''; position: absolute; right: 0; top: -3px; border: 4px solid transparent; border-left: 6px solid var(--line-strong); border-right: 0; }
.gap .tank { width: 28px; height: 50px; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 4px 4px; position: relative; background: var(--panel-2); overflow: hidden; }
.gap .tank i { position: absolute; inset: auto 0 0 0; height: 0; background: var(--muted); transition: height .12s linear; }
.gap .tank b { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--ink); opacity: .6; }
.gap .tank[data-zone="green"] i { background: var(--good); } .gap .tank[data-zone="yellow"] i { background: var(--warn); } .gap .tank[data-zone="red"] i { background: var(--crit); }
.gap .gn { font-size: .6rem; color: var(--muted); text-align: center; line-height: 1.1; text-transform: uppercase; letter-spacing: .03em; font-family: var(--font-display); font-weight: 600; }
.gap .lv { font-size: .7rem; color: var(--ink-2); text-align: center; line-height: 1.15; white-space: nowrap; }
.gap .lv small { display: block; color: var(--muted); font-size: .66rem; }
.gap.none .arrow { margin-top: 26px; }
.daybar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px 14px 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.daybar b { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); letter-spacing: .03em; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--ink-2); padding: 0 14px 10px; }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border: 2px solid var(--line-strong); border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .l-input::before { border-color: var(--warn); } .legend .l-room::before { border-color: var(--serious); } .legend .l-down::before { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 30%, transparent); }
.legend .z-green::before { background: var(--good); border-color: var(--good); } .legend .z-yellow::before { background: var(--warn); border-color: var(--warn); } .legend .z-red::before { background: var(--crit); border-color: var(--crit); }

/* ---------- the prediction and the reveal ---------- */
.reveal { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); gap: 12px 44px; align-items: end; }
.reveal .big { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: .95; }
.reveal small { display: block; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-display); font-weight: 600; }

/* ---------- the two reports ---------- */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.board > header { padding: 10px 14px; border-radius: var(--r) var(--r) 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.board.cost > header { background: var(--ledger); color: var(--ledger-ink); }
.board.flow > header { background: var(--accent); color: var(--accent-ink); }
.board > header h3 { font-size: 1.2rem; }
.board > header span { font-size: .82rem; opacity: .85; }
.rows { display: grid; }
.rw { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.rw:last-child { border-bottom: 0; }
.rw .k { color: var(--ink-2); font-size: .92rem; }
.rw .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.rw .sub { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.rw .wide { grid-column: 1 / -1; }
.reading { padding: 10px 14px; background: var(--panel-2); font-size: .9rem; color: var(--ink-2); border-radius: 0 0 var(--r) var(--r); }
.reading b { color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip.good { border-color: var(--good); color: var(--good-ink); } .chip.good::before { background: var(--good); }
.chip.watch { border-color: var(--warn); color: var(--warn-ink); } .chip.watch::before { background: var(--warn); border-radius: 1px; transform: rotate(45deg); }
.chip.bad { border-color: var(--crit); color: var(--crit-ink); } .chip.bad::before { background: var(--crit); border-radius: 1px; }
.utilgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.utilgrid div { border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px; font-size: .78rem; display: grid; gap: 1px; align-content: start; }
.utilgrid b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.utilgrid .chip { justify-self: start; font-size: .68rem; padding: 0 6px; }
.pace { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 8px; align-items: center; font-size: .82rem; margin-top: 6px; }
.pace i { display: block; height: 8px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 1px; }
.pace span:nth-child(3n) { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.stockrows { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 3px 10px; font-size: .84rem; margin-top: 6px; align-items: center; }
.stockrows .z { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: -1px; background: var(--muted); }
.stockrows .z.green { background: var(--good); } .stockrows .z.yellow { background: var(--warn); } .stockrows .z.red { background: var(--crit); }
.stockrows > span:not(:nth-child(4n+1)) { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.pos { color: var(--good-ink); font-weight: 600; } .neg { color: var(--crit-ink); font-weight: 600; }

/* ---------- charts ---------- */
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 10px; min-width: 0; }
.chart h3 { margin-bottom: 2px; }
.chart .cap { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.chart svg .lbl { fill: var(--ink-2); font-size: 11.5px; }
.chart svg .lbl-strong { fill: var(--ink); font-weight: 600; font-size: 12px; }
.chart svg .halo { paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.charts2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.lg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
.lg span::before { content: ''; display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--muted); }
.lg .c1::before { background: var(--s1); } .lg .c2::before { background: var(--s2); } .lg .c3::before { background: var(--s3); } .lg .cg::before { background: var(--line-strong); }
.lg .ln::before { height: 0; border-top: 2px dashed var(--ink); background: none; vertical-align: 3px; }
#tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 9px; border-radius: 4px; font-size: .82rem; line-height: 1.35; max-width: 260px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* ---------- tables ---------- */
.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; color: var(--muted); vertical-align: bottom; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td.n { white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: var(--accent-soft); }
tr.sum td { font-weight: 600; border-top: 2px solid var(--line-strong); }

/* ---------- saving cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; cursor: pointer; align-items: start; align-content: start; }
.card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.card input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; }
.card b { font-weight: 600; }
.card .sv { grid-column: 2; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--head); }
.card p { grid-column: 2; font-size: .88rem; color: var(--ink-2); }
.card p.now { font-size: .82rem; color: var(--muted); }
.target { display: grid; gap: 6px; max-width: 640px; }
.target .bar { height: 12px; background: var(--panel-2); border-radius: 3px; position: relative; overflow: hidden; }
.target .bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.target .bar u { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); }

.zonechips { display: flex; flex-wrap: wrap; gap: 6px; }
.zc { border-radius: 99px; padding: 2px 10px; font-size: .82rem; font-weight: 600; border: 1px solid var(--line-strong); }
.zc.green { border-color: var(--good); color: var(--good-ink); background: color-mix(in srgb, var(--good) 10%, var(--panel)); }
.zc.yellow { border-color: var(--warn); color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.zc.red { border-color: var(--crit); color: var(--crit-ink); background: color-mix(in srgb, var(--crit) 10%, var(--panel)); }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.three .panel { display: grid; gap: 4px; }
.three .panel.you { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.three .big { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.three small { color: var(--muted); }
/* ---------- the debrief ---------- */
.statement { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.statement:first-child { border-top: 0; padding-top: 0; }
.statement q { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; quotes: none; }
.statement p { color: var(--ink-2); max-width: 78ch; }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.field { display: grid; gap: 4px; }
.field label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--muted); font-weight: 600; }
.field input[type=text], .field input[type=number], .field select { padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); font-size: 1rem; width: 100%; }
.field input.codein { font-family: var(--font-display); font-size: 2rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi div { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--panel); display: grid; gap: 2px; align-content: start; }
.kpi small { color: var(--muted); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: .82rem; }
.kpi b { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }

/* ---------- the room and the phones ---------- */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .lobby { grid-template-columns: minmax(0, 1fr); } }
.code { font-family: var(--font-display); font-weight: 700; font-size: 5.5rem; letter-spacing: .14em; line-height: 1; }
.joinurl { font-size: 1.05rem; word-break: break-all; color: var(--ink-2); }
.qr { width: 190px; max-width: 100%; background: #ffffff; padding: 8px; border-radius: var(--r); line-height: 0; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }
.seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.seat { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--bg); display: grid; gap: 2px; min-height: 64px; align-content: start; }
.seat b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; color: var(--ink-2); }
.seat span { font-size: .92rem; }
.seat.empty span { color: var(--muted); }
.seat.ready { border-color: var(--good); }
.phone { max-width: 520px; margin: 0 auto; padding-inline: 16px; padding-block: 14px 40px; display: grid; gap: 16px; }
.phone h1 { font-size: 1.8rem; }
.phone .me { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: .9rem; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.phone .me b { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.bigbtn { width: 100%; padding: 14px 16px; font-size: 1.05rem; text-align: left; display: grid; gap: 2px; }
.bigbtn span { font-size: .88rem; font-weight: 400; opacity: .9; }
.picked { border-color: var(--accent) !important; box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft) !important; }
.wait { text-align: center; padding: 28px 16px; color: var(--ink-2); }
.wait b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin-bottom: 6px; }

/* ---------- the results board ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.filters .field { min-width: 10em; }
th button.sort { all: unset; cursor: pointer; }
th button.sort::after { content: ' \2195'; opacity: .4; }
td.who { font-weight: 600; white-space: nowrap; max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
.code-gate { max-width: 34em; }
.code-gate .code-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.code-gate input.code-input { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; min-width: 0; flex: 0 1 14em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- report parts: segmented bars, key lines, table colours ---------- */
.seg { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--panel-2); margin-top: 6px; }
.seg i { display: block; height: 100%; }
.keyline { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .78rem; color: var(--ink-2); margin-top: 6px; }
.keyline span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--muted); }
.seg .g-run { background: var(--s1); } .keyline .g-run::before { background: var(--s1); }
.seg .g-down { background: var(--crit); } .keyline .g-down::before { background: var(--crit); }
.seg .g-starved { background: var(--warn); } .keyline .g-starved::before { background: var(--warn); }
.seg .g-blocked { background: var(--serious); } .keyline .g-blocked::before { background: var(--serious); }
.seg .g-plan { background: var(--line-strong); } .keyline .g-plan::before { background: var(--line-strong); }
.utilgrid.months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
td.ok { color: var(--good-ink); } td.thin { color: var(--warn-ink); } td.short { color: var(--crit-ink); font-weight: 600; }
.stockrows .zc { font-size: .72rem; padding: 0 7px; }
.three .panel span { font-size: .9rem; color: var(--ink-2); }
.tile .fixed { font-size: .74rem; color: var(--muted); min-height: 1.4em; }
.decision .opt:disabled { cursor: default; opacity: .75; }
.decision .opt.picked:disabled { opacity: 1; }
.calc .note { font-size: .78rem; }
@media (max-width: 480px) {
  .utilgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utilgrid.months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reveal .big { font-size: 2.6rem; }
}
.facts.c3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.gap .tank[data-zone="plan"] i { background: var(--line-strong); }
.calc { align-items: start; }
.field label { min-height: 1.3em; }

/* ---------- the room: departments, votes, the phones' entries ---------- */
.tally { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; font-size: .92rem; }
.tally i { display: block; height: 12px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.tally span:nth-child(3n) { font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line-strong); border-radius: 99px; padding: 2px 10px; font-size: .88rem; background: var(--panel); }
.pill b { font-variant-numeric: tabular-nums; }
.decision .opt .votes { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--accent); }
.kpi .chip, .kpi .zc { justify-self: start; }
.note.nudge { color: var(--crit-ink); font-weight: 600; }
.chart details { margin-top: 8px; font-size: .85rem; }
.chart summary, details > summary { cursor: pointer; }
.chart summary { color: var(--accent); }
.phone .callout .hd { font-size: 1.15rem; }
.phone .said { font-size: .9rem; }
.banner pre { margin: 0; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; font-size: .82rem; }
#save-status { color: var(--ink-2); }
td.nw { white-space: nowrap; }
.filters input[type=date], .filters input[type=text], .filters select { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }

/* ======================================================================================================
 * The board rounds
 * ====================================================================================================== */
:root { --tied: #9b7fc4; --k-capacity: #052f5b; --k-buffer: #1baf7a; --k-practice: #2a78d6; --k-saving: #6b6a6a; }

/* ---------- choosing a mine ---------- */
.mines { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.minecard { text-align: left; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); padding: 14px 16px; display: grid; gap: 6px; cursor: pointer; align-content: start; font: inherit; color: inherit; }
.minecard:hover { border-color: var(--accent); }
.minecard[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.minecard b { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; line-height: 1.2; color: var(--head); }
.minecard span { font-size: .9rem; color: var(--ink-2); }
.minecard small { font-size: .82rem; color: var(--muted); }
.mines.small { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- the strip: wider gaps for the longer stock names; labels wrap, never cut ----------
 * A station's name wraps between words. A word longer than the tile (Development) widens that tile instead of breaking. */
.tile { width: 100px; min-width: min-content; }
.tile .nm { overflow-wrap: normal; letter-spacing: 0; }
.gap { width: 70px; }
.gap .gn { min-height: 2.3em; display: flex; align-items: flex-end; justify-content: center; overflow-wrap: anywhere; hyphens: auto; letter-spacing: 0; }
.tile .tag { top: auto; bottom: -10px; left: 6px; right: auto; }
.tile.constraint { margin-bottom: 6px; }
.swipe { display: none; font-size: .78rem; color: var(--muted); padding: 0 14px 10px; }
@media (max-width: 900px) { .swipe { display: block; } }
details.lastyear { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 10px 14px; }
details.lastyear > summary { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
details.lastyear[open] > summary { margin-bottom: 10px; }
table.compact { font-size: .84rem; }
table.compact th, table.compact td { padding: 6px 8px; }
.joinbig { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1.1; letter-spacing: .02em; overflow-wrap: anywhere; color: var(--ink); margin: 0; }
.roombar .joinline b { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .02em; }
/* the room's main screen is read from across a room */
body.room .wrap { font-size: 1.12rem; }
body.room table { font-size: 1rem; }
body.room .rw .k, body.room .rw .sub, body.room .note, body.room .keyline, body.room .timebars { font-size: inherit; }
body.room .lead { font-size: 1.2rem; }
.gap.bin .tank { height: 26px; width: 22px; }
.gap .tank[data-zone="bin"] i { background: var(--line-strong); height: 60%; }
.gap.none .arrow { margin-top: 18px; }
.gap.none .lv small { margin-top: 4px; }
.tile .st { white-space: normal; }

/* ---------- the year's figures ---------- */
.big3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.big3 > div { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.big3 small { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; color: var(--muted); }
.big3 b { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.big3 span { font-size: .86rem; color: var(--ink-2); }
.kpi span.note { font-size: .8rem; }

/* ---------- where each station's time went ---------- */
.timebars { display: grid; grid-template-columns: minmax(6.5em, max-content) minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: .84rem; }
.timebars .seg { margin-top: 0; height: 16px; }
.timebars .nm { color: var(--ink-2); line-height: 1.15; }
.timebars .nm.con { font-weight: 700; color: var(--mark); }
.timebars .dd { color: var(--muted); font-size: .78rem; text-align: right; }
.seg .g-tied { background: var(--tied); } .keyline .g-tied::before { background: var(--tied); }

/* ---------- the board's choices ---------- */
.planpick { gap: 16px; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding-block: 8px; }
.meter2 { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 9px 12px; display: grid; gap: 5px; }
.meter2 .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: .9rem; color: var(--ink-2); }
.meter2 .top b { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.meter2 .bar { height: 10px; background: var(--panel-2); border-radius: 3px; position: relative; overflow: hidden; }
.meter2 .bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .15s linear; }
.meter2.over { border-color: var(--crit); } .meter2.over .bar i { background: var(--crit); }
.meter2.met .bar i { background: var(--good); }
.meter2 small { color: var(--muted); font-size: .8rem; }
.optgroup { display: grid; gap: 8px; }
.optgroup > h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.optgroup > h3 small { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .86rem; color: var(--muted); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; align-items: start; }
.opt { border: 1px solid var(--line-strong); border-left: 5px solid var(--k, var(--line-strong)); border-radius: var(--r); background: var(--panel); padding: 10px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; cursor: pointer; align-content: start; }
.opt input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; }
.opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); border-left-color: var(--k, var(--accent)); box-shadow: inset 0 0 0 1px var(--accent); }
.opt:has(input:disabled) { cursor: default; }
.opt b { font-weight: 600; line-height: 1.3; }
.opt p { grid-column: 2; font-size: .86rem; color: var(--ink-2); }
.opt .cost { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.opt .cost b { font-weight: 700; color: var(--ink); }
.opt .held { grid-column: 2; font-size: .8rem; font-weight: 600; color: var(--accent); }
.opt.off { opacity: .55; }
.opt.k-capacity, .pill.k-capacity { --k: var(--k-capacity); } .opt.k-buffer, .pill.k-buffer { --k: var(--k-buffer); }
.opt.k-practice, .pill.k-practice { --k: var(--k-practice); } .opt.k-saving, .pill.k-saving { --k: var(--k-saving); }
.optset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 8px; }
.optset .setnote { grid-column: 1 / -1; font-size: .84rem; color: var(--muted); }
.pill[class*="k-"] { border-left: 4px solid var(--k); }
.pill b { color: var(--accent); font-weight: 600; font-size: .8rem; }

/* ---------- the prediction ---------- */
.quiz button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }

/* ---------- the debrief's bars ---------- */
.hbars { display: grid; grid-template-columns: minmax(9em, 16em) minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; font-size: .92rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.hbars .nm { line-height: 1.2; }
.hbars .nm small { display: block; color: var(--muted); font-size: .78rem; }
.hbars .nm.you { font-weight: 700; color: var(--accent); }
.hbars .track { position: relative; height: 20px; background: var(--panel-2); border-radius: 3px; }
.hbars .track i { position: absolute; top: 3px; bottom: 3px; background: var(--s1); border-radius: 2px; }
.hbars .track i.neg { background: var(--crit); }
.hbars .track i.you { background: var(--accent); }
.hbars .track u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .7; }
.hbars .v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.hbars .v.you { color: var(--accent); }
tr.base td { color: var(--muted); }
tr.hl td .chips { flex-wrap: wrap; }
td .chips { gap: 4px; } td .pill { font-size: .78rem; padding: 1px 8px; }

/* ---------- the room ---------- */
.clock { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clock.late { color: var(--crit-ink); }
.roombar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 10px 14px; }
.roombar .code-sm { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: .12em; }
.seat .plan { font-size: .8rem; color: var(--muted); }
.rank td.first { font-weight: 700; }
.rank td.who { max-width: 14em; }
.phone .big3 b { font-size: 1.8rem; }
.phone .boards { grid-template-columns: minmax(0, 1fr); }
.phone .opts { grid-template-columns: minmax(0, 1fr); }
.phone .meters { top: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.tabs button { border: 0; background: transparent; padding: 8px 12px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-radius: var(--r) var(--r) 0 0; }
.tabs button[aria-selected="true"] { color: var(--head); box-shadow: inset 0 -3px 0 var(--gold); }

@media (max-width: 640px) {
  .tile { width: 88px; }
  .gap { width: 58px; }
  .big3 b { font-size: 1.8rem; }
  .timebars { grid-template-columns: minmax(5.5em, max-content) minmax(0, 1fr) auto; font-size: .8rem; }
  .hbars { grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row dense; gap: 2px 10px; }
  .hbars .track { grid-column: 1 / -1; margin-bottom: 8px; }
  .clock { font-size: 2rem; }
}
@media (max-width: 640px) {
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding-block: 6px; }
  .meter2 { padding: 6px 8px; gap: 3px; }
  .meter2 .top { flex-direction: column; gap: 0; font-size: .78rem; }
  .meter2 .top b { font-size: 1.1rem; }
  .meter2 small { display: none; }
  .opt { padding: 9px 10px; }
}
/* the day chart: 365 days under the month chart */
.chart svg.days { cursor: crosshair; touch-action: pan-y; }
.chart .daycount { margin: 8px 0 0; font-size: .92rem; color: var(--ink-2); }
.chart .daycount b { color: var(--ink); font-weight: 600; }
.chart .dayread { margin: 2px 0 0; min-height: 1.5em; }
