/* Eidos / Shipr brand tokens.
   Palette context: html[data-palette="paper"|"ink"|"system"].
   Brand Center sets this explicitly. Without data-palette, OS preference applies. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: 'Space Grotesk', -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 3px;
  --panel-side-min: 360px;
  --panel-side-comfort: 420px;
  --panel-dense-pad: 0.55rem 0.75rem;
  --panel-row-h: 2.75rem;
}

/* —— Paper (light) —— */
:root,
html[data-palette="paper"] {
  color-scheme: light;
  --bg: #f0ebe4;
  --surface: #e4ded6;
  --raised: #f7f3ed;
  --ink: #1e1a17;
  --ink-soft: #8a8078;
  --ink-mid: #5c534c;
  --line: #d4cec6;
  --accent: #9a6d35;
  --accent-ink: #faf5ec;
  --stop: #b4573b;
  --stop-ink: #ffffff;
  --user-bg: #e4ded6;
  --tool-bg: #e9e3da;
  --badge-wip-bg: #e4ded6;
  --badge-wip-ink: #8a8078;
  --bad: #a04a32;
  --ship-inflight: #9a6d35;
  --ship-inflight-ink: #faf5ec;
  --ship-ok: #4a7c59;
  --ship-ok-ink: #f4faf5;
  --ship-blocked: #8a7040;
  --ship-blocked-ink: #faf6ec;
  --ship-failed: #a04a32;
  --ship-failed-ink: #ffffff;
  --badge-count-bg: #9a6d35;
  --badge-count-ink: #faf5ec;
}

/* —— Ink (dark) —— */
html[data-palette="ink"] {
  color-scheme: dark;
  --bg: #161210;
  --surface: #1e1a17;
  --raised: #241f1a;
  --ink: #dcd5cb;
  --ink-soft: #8b8179;
  --ink-mid: #b5aaa0;
  --line: #332c26;
  --accent: #c4935a;
  --accent-ink: #1e1a17;
  --stop: #c4694f;
  --stop-ink: #161210;
  --user-bg: #2a241e;
  --tool-bg: #211c17;
  --badge-wip-bg: #28221c;
  --badge-wip-ink: #8b8179;
  --bad: #c4694f;
  --ship-inflight: #c4935a;
  --ship-inflight-ink: #1e1a17;
  --ship-ok: #6a9a78;
  --ship-ok-ink: #121810;
  --ship-blocked: #c4a06a;
  --ship-blocked-ink: #1e1a17;
  --ship-failed: #c4694f;
  --ship-failed-ink: #161210;
  --badge-count-bg: #c4935a;
  --badge-count-ink: #1e1a17;
}

/* —— System: follow OS unless Brand Center overrides —— */
@media (prefers-color-scheme: dark) {
  html:not([data-palette]),
  html[data-palette="system"] {
    color-scheme: dark;
    --bg: #161210;
    --surface: #1e1a17;
    --raised: #241f1a;
    --ink: #dcd5cb;
    --ink-soft: #8b8179;
    --ink-mid: #b5aaa0;
    --line: #332c26;
    --accent: #c4935a;
    --accent-ink: #1e1a17;
    --stop: #c4694f;
    --stop-ink: #161210;
    --user-bg: #2a241e;
    --tool-bg: #211c17;
    --badge-wip-bg: #28221c;
    --badge-wip-ink: #8b8179;
    --bad: #c4694f;
    --ship-inflight: #c4935a;
    --ship-inflight-ink: #1e1a17;
    --ship-ok: #6a9a78;
    --ship-ok-ink: #121810;
    --ship-blocked: #c4a06a;
    --ship-blocked-ink: #1e1a17;
    --ship-failed: #c4694f;
    --ship-failed-ink: #161210;
    --badge-count-bg: #c4935a;
    --badge-count-ink: #1e1a17;
  }
}

* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px;
  border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }
