/* Hallmark · shape: app screen · genre: editorial · theme: Carnival (deal 3/3, seed data-heavy-planning-tool-mmo-ab7f·2691c1c4·2026-11-22·r2) · redesign: full
 * nav: a coral band with the title, then one settings strip and four tabs · signature: the Ariel board as a print, the route to buy in turquoise and owned nodes in coral · states: full, busy, empty, error · carnival: aqua-park
 * axes: light/display-heavy/chromatic-yellow · posture: full-palette · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R3 V5 · weakest: R, poster capitals on every panel head would shout; only the band, the tab row and the three result figures use them at size */
/* Hallmark · waive 39b · the 225-cell board must fit one screen, so a node cell is 30 to 46px · each cell is a node on the Ariel board, not a form control, and shrinking the board is the point */
/* Hallmark · dismissed 23 · the coral band is Carnival's second accent as a whole field, the theme's own band, under the full-palette posture */
/* Hallmark · answered F4 · the selected tab inverts to ink to show which view is open; the turquoise Load button is the planner's one filled action */
/* Hallmark · dismissed 70 · that line draws a bar in the comparison table; no form is submitted and no success message is printed */
@import url("./tokens.css");
@import url("./base.css");

:root { --container: 1560px; --cell: clamp(30px, min(3.1vw, 4.6vh), 46px); --mini: 13px; --control: 40px; --text-poster: 3rem; --press: 1px 1px 0 var(--color-ink); }

h1, h2, h3 { text-transform: uppercase; line-height: 1; }
h3 { font-size: var(--text-lg); }
.num { font-variant-numeric: tabular-nums; }

/* the band */
.band { background: var(--color-accent-2); color: var(--color-paper); }
.band .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-lg); padding-block: var(--space-md); }
.band h1 { max-width: none; font-size: var(--text-poster); }
.band p { color: var(--color-paper); }

/* wells: flat fill, ink border, hard shadow */
.well { border: var(--rule-bar) solid var(--color-ink); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--shadow-card); }

/* settings strip */
.setup { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) auto minmax(0, 1fr); gap: var(--space-lg); margin-block: var(--space-lg); padding: var(--space-md) var(--space-lg); align-items: start; }
@media (max-width: 72rem) { .setup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 40rem) { .setup { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: var(--space-2xs); min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend, .field > .label { padding: 0; font-size: var(--text-sm); font-weight: 500; }
.note { color: var(--color-muted); font-size: var(--text-sm); }
.strip-note { grid-column: 1 / -1; }
.strip-note:empty { display: none; }
.warn { color: var(--color-accent-2); font-weight: 500; }

input[type="number"], input[type="search"], select { min-height: var(--control); min-width: 0; padding: 0 var(--space-sm); border: var(--rule-bar) solid var(--color-ink); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
input::placeholder { color: var(--color-muted); }

.btn { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--space-md); border: var(--rule-bar) solid var(--color-ink); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink);
  box-shadow: var(--shadow-card); font: var(--display-weight) var(--text-lg)/1 var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-paper); }
.btn:active { box-shadow: var(--press); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: var(--shadow-card); }
.btn--quiet { background: var(--color-paper); }
.btn--quiet:hover { background: var(--color-accent); }

.lookup { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.lookup select { flex: 0 1 12ch; }
.lookup input { flex: 1 1 12ch; }
.hits { display: grid; gap: var(--space-xs); max-height: 13rem; margin: 0; padding: var(--space-2xs) var(--space-2xs) var(--space-xs) 0; overflow-y: auto; list-style: none; }
.hits:empty { display: none; }
.hits .btn { width: 100%; font: 500 var(--text-sm)/1 var(--font-body); letter-spacing: 0; text-transform: none; }

.crystals { display: flex; align-items: center; gap: var(--space-sm); }
#crystals { width: 7ch; font: var(--display-weight) var(--text-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
#slider { flex: 1; min-width: 6ch; accent-color: var(--color-accent-2); }

/* a choice between a few: ruled blocks that invert when chosen */
.seg { display: flex; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--space-md); border: var(--rule-bar) solid var(--color-ink); background: var(--color-paper); font-weight: 500; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.seg label + input + label { border-left: 0; }
.seg label:hover { background: var(--color-accent); }
.seg input:checked + label { background: var(--color-ink); color: var(--color-paper); }
.seg input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* board and panel */
.work { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--gap-columns); align-items: start; padding-bottom: var(--space-2xl); }
@media (max-width: 72rem) { .work { grid-template-columns: minmax(0, 1fr); } }
.sheet { min-width: 0; }
@media (min-width: 72rem) { .sheet { position: sticky; top: var(--space-md); } }
.boardwrap { overflow-x: auto; padding: 0 var(--space-xs) var(--space-xs) 0; }
#board { display: grid; grid-template-columns: repeat(15, var(--cell)); grid-auto-rows: var(--cell); gap: var(--space-2xs); width: max-content; padding: var(--space-sm); }
.node { position: relative; display: grid; place-items: center; padding: 0; border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink-2);
  font: 500 calc(var(--cell) * 0.27)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.node:hover { background: var(--color-paper-3); }
.node:active { border-color: var(--color-ink); }
.node:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; z-index: var(--z-raised); }
.node.route { border: var(--rule-bar) solid var(--color-ink); background: var(--color-accent); color: var(--color-accent-ink); }
.node.owned { border: var(--rule-bar) solid var(--color-ink); background: var(--color-accent-2); color: var(--color-paper); }
.node.start, .node:disabled { border: var(--rule-bar) solid var(--color-ink); background: var(--color-ink); color: var(--color-paper); cursor: default; }
.node .step { position: absolute; top: 1px; left: 3px; font: 500 calc(var(--cell) * 0.22)/1 var(--font-body); font-variant-numeric: tabular-nums; }
.node .pips { position: absolute; bottom: 2px; left: 0; right: 0; display: flex; justify-content: center; gap: var(--space-3xs); }
.pips i { width: 3px; height: 3px; background: currentColor; }
#hint { min-height: 1lh; margin-top: var(--space-sm); }
.key { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin: var(--space-xs) 0 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.key li { display: flex; align-items: center; gap: var(--space-xs); }
.swatch { display: inline-block; width: 16px; height: 16px; border: var(--rule-bar) solid var(--color-ink); background: var(--color-paper); }
.swatch.route, .swatch.a { background: var(--color-accent); }
.swatch.owned, .swatch.b { background: var(--color-accent-2); }
.swatch.both { background: var(--color-ink); }
.key .pips { display: inline-flex; gap: var(--space-3xs); }

/* tabs: a row of capitals, the picked one inverts */
.panel { min-width: 0; }
.tabs { display: flex; overflow-x: auto; border-bottom: var(--rule-bar) solid var(--color-ink); }
.tabs button { min-height: 48px; padding: 0 var(--space-lg); border: 0; border-radius: 0; background: transparent; color: var(--color-ink); font: var(--display-weight) var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.tabs button:hover { background: var(--color-accent); }
.tabs button:active { background: var(--color-paper-3); }
.tabs button[aria-selected="true"] { background: var(--color-ink); color: var(--color-paper); }
.tabs button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -4px; }
.pane { padding: var(--space-lg); }
.pane > section + section { margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: var(--rule-bar) solid var(--color-accent-2); }
.pane h2 { margin-bottom: var(--space-sm); font-size: var(--text-2xl); }
.pane h2 + .note { margin: calc(var(--space-xs) * -1) 0 var(--space-sm); max-width: 70ch; }
.pane p + p, .pane table + .note, .pane .scroll + .note { margin-top: var(--space-sm); }

/* figures: a fact in the capitals */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin: 0; }
.figures div + div { padding-left: var(--space-md); border-left: var(--rule-bar) solid var(--color-ink); }
.figures dd { margin: 0; font: var(--display-weight) var(--text-poster)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-display); white-space: nowrap; }
.figures dt { margin-top: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; }
.figures .sub { display: block; color: var(--color-muted); font-weight: 400; }
.figures.small dd { font-size: var(--text-3xl); font-variant-numeric: tabular-nums; }

.scroll { overflow-x: auto; }
.register { max-height: 26rem; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
#pane-compare th { white-space: normal; vertical-align: bottom; }
th { position: sticky; top: 0; padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-bar) solid var(--color-ink); background: var(--color-paper-2); font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-accent-2); vertical-align: top; }
#order td:nth-child(2) { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td small { display: block; color: var(--color-muted); font-size: var(--text-xs); }
tr.major td { font-weight: 500; }
tr.current td { background: var(--color-ink); color: var(--color-paper); font-weight: 500; }
tr.current td:first-child { padding-left: var(--space-xs); }
tr.current td small { color: var(--color-paper); }
tr.faint td { color: var(--color-muted); }
td.ahead { color: var(--color-success); font-weight: 500; }
td.behind { color: var(--color-error); font-weight: 500; }
tbody:empty::after { content: "Nothing to show yet."; display: block; padding: var(--space-sm) 0; color: var(--color-muted); }

/* bars: zero baseline, one accent series, the rest neutral */
td.track { width: 34%; min-width: 96px; vertical-align: middle; }
.bar { display: block; height: 14px; border: var(--rule-bar) solid var(--color-ink); background: var(--color-paper-3); transform-origin: left center; transform: scaleX(var(--v, 0)); }
.bar.zero { border-width: 0 0 0 var(--rule-bar); transform: none; width: 0; }
.bar.lead, tr.current .bar { background: var(--color-accent); }

/* compare */
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.side { display: grid; gap: var(--space-sm); align-content: start; min-width: 0; }
.mini { display: grid; grid-template-columns: repeat(15, var(--mini)); grid-auto-rows: var(--mini); gap: 1px; width: max-content; max-width: 100%; padding: var(--space-xs); border: var(--rule-bar) solid var(--color-ink); background: var(--color-paper); }
.mini i { background: var(--color-paper-3); }
.mini i.on { background: var(--color-ink); }
.mini i.only-a { background: var(--color-accent); outline: 1px solid var(--color-ink); }
.mini i.only-b { background: var(--color-accent-2); }
.mini i.start { background: var(--color-ink); border-radius: var(--radius-pill); }
.cfg { display: grid; grid-template-columns: repeat(auto-fit, minmax(14ch, 1fr)); gap: var(--space-sm); }
.cfg[hidden] { display: none; }

.fields { display: grid; grid-template-columns: minmax(0, 1fr) 10ch; gap: var(--space-xs) var(--space-sm); align-items: center; font-size: var(--text-sm); }
.fields input { width: 100%; min-height: 32px; padding: 0 var(--space-xs); font-variant-numeric: tabular-nums; }
.fields .sub { grid-column: 1 / -1; margin-top: var(--space-xs); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-accent-2); color: var(--color-muted); }
pre { margin: var(--space-sm) 0; padding: var(--space-sm); overflow-x: auto; border: var(--rule-bar) solid var(--color-ink); background: var(--color-paper); font-size: var(--text-xs); line-height: 1.6; }
.how ul { margin: 0; padding-left: var(--space-md); max-width: 70ch; font-size: var(--text-sm); }
.how li { margin-bottom: var(--space-2xs); }
.stack { display: grid; gap: var(--space-sm); justify-items: start; }

.busy #board, .busy .pane { opacity: 0.55; }
