/* Skyline Works design tokens: the signal box over the valley (round 4).
   Dark is the night shift: the valley dims and cools, what the player built stays lit, and the HUD is the box's blued steel panel.
   Light is the day shift: enamel sign plates. Goods carry their own colour (data/goods.yaml color) on the map, the contract board and the lines.
   Safety amber marks the one thing to press and the thing that is selected; nothing else is amber.
   Every panel, the HUD and the Hall interior view (0.6) take their colours, sizes and motion from here. */
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/static/fonts/overpass-latin.woff2") format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/overpass-mono-latin.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  /* surfaces, from the deepest out */
  --bg: #0c1117;          /* behind everything, and the map's surround */
  --well: #0b1016;        /* inset readouts (scrip, clock, the contract board) and tile sockets */
  --panel: #18212b;       /* a panel's body: blued steel */
  --plate: #212c38;       /* a panel's title plate, raised controls */
  --panel2: #26313d;      /* a control's face */
  --line: #2a3644;        /* hairlines between parts */
  --line-strong: #3d4d5e; /* a control's edge */
  --fg: #ece8dd;          /* text */
  --dim: #a7afba;         /* secondary text */
  /* the one accent */
  --amber: #f2b33d; --amber-ink: #161003; --amber-text: #f5c158; --amber-soft: rgba(242, 179, 61, 0.14); --amber-line: rgba(242, 179, 61, 0.55);
  /* state */
  --ok: #72d39c; --bad: #f27a72; --warn: #f39a4c; --focus: #8ec5ff;
  --shade: rgba(10, 13, 17, 0.86);            /* floating over the map */
  --scrim: rgba(5, 7, 10, 0.72);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-float: 0 4px 10px rgba(0, 0, 0, 0.45);
  /* the waybill: a paper docket; dimmer at night so it never outshines the map */
  --paper: #bdb39c; --paper-ink: #1d1a14; --paper-dim: #3f392e; --paper-line: #8f846c; --paper-well: #a99e86; --paper-bar: #8a5200;
  --chart-ground: #5b5340; --chart-band: rgba(111, 208, 224, 0.2); --chart-band-edge: #6fd0e0; --chart-grid: rgba(255, 255, 255, 0.09);

  /* type: Overpass is a road-sign face; the HUD reads like the signs over a yard */
  --font: "Overpass", system-ui, "Segoe UI", sans-serif;
  --font-num: "Overpass Mono", ui-monospace, "Cascadia Mono", monospace;   /* counts, money and clocks only */
  --fs: clamp(13px, 0.28vw + 11.6px, 16px);
  --t-xs: max(11px, 0.75em); --t-s: max(11px, 0.86em); --t-m: 1em; --t-l: 1.18em; --t-xl: 1.5em;
  --w-title: 800; --w-strong: 700; --w-body: 400;

  /* space and shape */
  --s1: 2px; --s2: 4px; --s3: 6px; --s4: 8px; --s5: 12px; --s6: 16px;
  --r: 4px; --r-l: 8px;
  --tap: 32px; --tap-s: 28px;
  --plate-h: 30px;

  /* material: the panels are blued steel plate, brushed along the grain and lit along the top edge; controls stand on a dark foot and sink when pressed */
  --rivet-dark: rgba(0, 0, 0, 0.55);      /* the shadow inside a well and under a pressed control */
  --grain: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  --steel: linear-gradient(180deg, #202b37 0%, #18212b 100%);      /* a plate's face: lit from above */
  --steel-face: linear-gradient(180deg, #2a3644 0%, #212b37 100%);   /* a control's face */
  --plate-hi: rgba(190, 215, 240, 0.1);                               /* the lit top edge of a plate */
  --foot: #070b0f;                                                    /* the shadow line under a raised control */
  --elev-2: 0 10px 28px rgba(0, 0, 0, 0.55);
  /* layout */
  /* the map's floating pieces: the toolbar's width (the banner keeps clear of it) and the bottom stack's right inset (hints, questions, the foreman's note) */
  --modebar-w: 34rem; --stack-right: var(--s4);
  --right-w: clamp(256px, 21vw, 400px);

  /* motion: one ease, short; the map is the thing that moves */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms; --t-med: 220ms; --t-slow: 420ms;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #d9d5ca; --well: #e6e2d8; --panel: #f6f4ee; --plate: #ebe7dc; --panel2: #fbfaf6;
  --line: #cdc6b7; --line-strong: #8b8374;
  --fg: #1b1e23; --dim: #4a505a;
  --amber: #f2b33d; --amber-ink: #161003; --amber-text: #8a5200; --amber-soft: rgba(242, 179, 61, 0.22); --amber-line: #b87a10;
  --paper: #ece5d3; --paper-dim: #574f42; --paper-line: #b4a88e; --paper-well: #dcd2bb;
  --ok: #1d6b3f; --bad: #a3221c; --warn: #9a4a00; --focus: #0b57d0;
  --shade: rgba(246, 244, 238, 0.94); --scrim: rgba(40, 36, 28, 0.45);
  --shadow: 0 4px 14px rgba(60, 50, 30, 0.16), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-float: 0 3px 8px rgba(60, 50, 30, 0.2);
  --steel: linear-gradient(180deg, #fbfaf6 0%, #f1eee6 100%); --steel-face: linear-gradient(180deg, #ffffff 0%, #f3f0e8 100%); --foot: #b9b1a1;
  --rivet-dark: rgba(60, 50, 30, 0.35); --grain: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0 1px, rgba(0, 0, 0, 0) 1px 3px); --plate-hi: rgba(255, 255, 255, 0.7);
  --chart-ground: #b3a784; --chart-band: rgba(11, 87, 208, 0.14); --chart-band-edge: #0b57d0; --chart-grid: rgba(0, 0, 0, 0.12);
}
:root[data-layout="dock"] { --t-xs: max(12px, 0.75em); --t-s: max(12px, 0.86em); }
:root[data-big] { --fs: clamp(16px, 0.5vw + 6px, 20px); --tap: 40px; --tap-s: 36px; --plate-h: 38px; --s4: 10px; --s5: 14px; --s6: 20px; }      /* ui.yaml chrome.flags big: a 2560 px screen read 14 px type and 28 px chips */
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; } }
/* The engine kit (tenshin_kit.css) draws the Help and Settings windows, the yes/no boxes and the map tooltip from these. */
:root {
  --tn-bg: var(--bg); --tn-panel: var(--panel); --tn-ink: var(--fg); --tn-muted: var(--dim); --tn-edge: var(--line-strong);
  --tn-accent: var(--amber); --tn-on-accent: var(--amber-ink); --tn-danger: var(--bad); --tn-on-danger: var(--paper-ink);
  --tn-good: var(--ok); --tn-font: var(--font); --tn-font-ui: var(--font);
}
:root[data-theme="light"] { --tn-on-danger: #ffffff; }
:root[data-motion="off"] { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; }
