/* Runlist design tokens.
   Built from the logo: Ink, Bone, Oxide. The mark is today's list,
   with the current job pulled out onto the run.
   Oxide means "current / on the run." It is not an error color.
   Error uses a distinct wine. Verified WCAG AA — see ../src/contrast.py. */

:root{
  /* ---- Brand (logo) ---- */
  --ink:#141210;
  --bone:#F0E8DC;
  --oxide:#C43822;          /* bars and "on the run" marks only. Fails AA as text on bone (4.39:1). */
  --oxide-ink:#8F2416;      /* text label "On the run" on bone/paper (7.11:1). */
  --oxide-on:#FFFFFF;       /* text sitting on an oxide bar (5.34:1). Do not use bone on oxide. */
  --oxide-soft:#FAEEEA;     /* wash behind a current row (oxide-ink 7.60:1). */
  --steel:#5C564F;          /* captions, AA (5.96:1 on bone). */
  --steel-ui:#7A746C;       /* decoration and icons only. Fails AA as text (3.80:1). */
  --paper:#F4EFE6;          /* page ground (logo supporting). */
  --card:#FBF7F1;
  --sunken:#E8E0D4;
  --sunken-2:#DFD6C8;
  --line:#D9D0C3;
  --line-2:#E8E0D4;
  --line-strong:#C4B9A8;

  /* ---- Ink scale (for aliases and elevation of type) ---- */
  --ink-2:#1C1916;
  --body:#3A3530;           /* 9.98:1 on bone */
  --muted:#5C564F;
  --faint:#7A746C;          /* icons/decoration only */

  /* ---- Semantic status. None of these is oxide. ---- */
  --ok:#1E5C38;
  --ok-soft:#E4F0E8;
  --ok-line:#B5D4C0;
  --warn:#7A4A00;           /* 6.16:1 — amber, not oxide */
  --warn-soft:#F6EBD4;
  --warn-line:#E5C888;
  --danger:#8B1E3F;         /* wine, cooler and darker than oxide, 7.34:1 */
  --danger-soft:#F8E8EE;
  --danger-line:#E8B8C8;
  --info:#215A7A;
  --info-soft:#E4EEF4;
  --info-line:#B3CDE0;
  --violet:#5B4A9E;
  --violet-soft:#EFECF8;
  --held:#5C564F;
  --held-soft:#E8E0D4;

  /* On-the-run role (alias) */
  --on-run:var(--oxide);
  --on-run-ink:var(--oxide-ink);
  --on-run-soft:var(--oxide-soft);
  --on-run-on:var(--oxide-on);

  /* ---- Semantic surfaces ---- */
  --bg:var(--paper);
  --fg:var(--ink-2);
  --primary:var(--ink);
  --primary-ink:var(--ink);
  --primary-soft:var(--sunken);
  --accent:var(--oxide);    /* reserved for "on the run." Do not use for primary buttons or errors. */
  --focus:0 0 0 2px var(--bone),0 0 0 4px var(--ink);
  --focus-on-ink:0 0 0 2px var(--ink),0 0 0 4px var(--bone);

  /* Legacy teal aliases — remapped to ink/bone so inherited CSS does not stay teal. */
  --teal-950:#141210; --teal-900:#1C1916; --teal-850:#241F1B; --teal-800:#2C2722;
  --teal-700:#141210; --teal-600:#2A2520; --teal-500:#5C564F;
  --teal-300:#A89F93; --teal-200:#C4B9A8; --teal-100:#E8E0D4; --teal-50:#F4EFE6;
  /* Saffron kept as amber (warnings), not remapped to oxide. */
  --saffron-500:#C4892A; --saffron-600:#A06E18; --saffron-100:#F6EBD4; --saffron-50:#F9F1E2;
  --mint-400:#2E9B67; --sage-400:#4F6B3A; --copper-500:#A8541A; --copper-700:#7A3E1D;

  /* ---- Type ----
     Display and labels: IBM Plex Sans Condensed (the wordmark's living relative).
     Body: IBM Plex Sans, highly readable. Do not substitute Inter or a rounded geometric. */
  --font:"IBM Plex Sans",ui-sans-serif,system-ui,sans-serif;
  --font-display:"IBM Plex Sans Condensed",var(--font);
  --font-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  --t-display:700 40px/44px var(--font-display);
  --t-h1:700 28px/34px var(--font-display);
  --t-h2:600 18px/24px var(--font-display);
  --t-h3:600 15px/22px var(--font-display);
  --t-body:400 14px/21px var(--font);
  --t-small:400 13px/19px var(--font);
  --t-micro:600 11px/16px var(--font-display);
  --t-kpi:700 28px/32px var(--font-display);
  --t-label:600 11.5px/16px var(--font-display);
  --track-tight:-0.02em;
  --track-display:-0.03em;
  --track-label:0.08em;

  /* ---- Space (4px grid) ---- */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s7:32px; --s8:40px; --s9:56px;

  /* ---- Radii: square, to echo the bars. Avatars and chips are squared. Circles stay only for true dots (pulse, radio). ---- */
  --r-xs:0px; --r-sm:0px; --r-md:2px; --r-lg:2px; --r-xl:2px; --r-pill:2px;
  --pc-radius:2px;

  /* ---- Elevation (warm, tight — a job ticket, not a SaaS card) ---- */
  --sh-1:0 1px 0 rgba(20,18,16,.06);
  --sh-2:0 1px 0 rgba(20,18,16,.06),0 8px 24px -12px rgba(20,18,16,.18);
  --sh-3:0 2px 4px rgba(20,18,16,.06),0 20px 48px -16px rgba(20,18,16,.28);
  --sh-btn:0 1px 0 rgba(255,255,255,.12) inset;
  --sh-dark:0 30px 60px -30px rgba(0,0,0,.55);

  /* ---- Motion. Same curve as the logo intro. ---- */
  --ease-out:cubic-bezier(.2,.75,.2,1);
  --ease-in-out:cubic-bezier(.65,0,.35,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --d-1:120ms; --d-2:200ms; --d-3:320ms; --d-4:850ms;
  --run-offset:18px;       /* the middle bar's shift, at logo scale */

  /* ---- Layout ---- */
  --side-w:252px; --rail-w:76px; --topbar-h:60px; --appbar-h:56px; --tabbar-h:68px; --page-max:1240px;
  --tap:44px;
}

/* Dark mode: ink ground, bone type, oxide still "on the run." */
@media (prefers-color-scheme:dark){
  :root:not([data-theme=light]){ --_dark:1; }
}
:root[data-theme=dark],
html[data-theme=dark],
body[data-theme=dark]{
  --_dark:1;
}
:root[data-theme=dark],
html[data-theme=dark],
:root:not([data-theme=light]){
  /* applied via the [data-theme] or the helper class; prefers-color-scheme wired below */
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    --bg:#0E0C0B;
    --card:#1C1916;
    --paper:#141210;
    --sunken:#241F1B;
    --sunken-2:#2C2722;
    --line:#3A3530;
    --line-2:#2C2722;
    --line-strong:#5C564F;
    --fg:#F0E8DC;
    --ink:#F0E8DC;
    --ink-2:#F0E8DC;
    --body:#E8E0D4;
    --muted:#C4B9A8;
    --faint:#A89F93;
    --steel:#C4B9A8;
    --primary:#F0E8DC;
    --primary-ink:#F0E8DC;
    --primary-soft:#241F1B;
    --oxide-ink:#F07864;          /* 7.04:1 on #0E0C0B */
    --oxide-soft:#3A1C16;
    --oxide-on:#FFFFFF;
    --on-run-ink:var(--oxide-ink);
    --on-run-soft:var(--oxide-soft);
    --ok:#7EC89A; --ok-soft:#143022; --ok-line:#1E5C38;
    --warn:#E0B05A; --warn-soft:#3A2C10; --warn-line:#7A4A00;
    --danger:#E890A8; --danger-soft:#3A1522; --danger-line:#8B1E3F;
    --info:#8CBAD4; --info-soft:#152838; --info-line:#215A7A;
    --violet:#C4B8EC; --violet-soft:#2A2440;
    --held:#C4B9A8; --held-soft:#241F1B;
    --teal-950:#0E0C0B; --teal-900:#1C1916; --teal-850:#241F1B; --teal-800:#2C2722;
    --teal-700:#F0E8DC; --teal-600:#E8E0D4; --teal-500:#C4B9A8;
    --teal-300:#A89F93; --teal-200:#5C564F; --teal-100:#241F1B; --teal-50:#1C1916;
    --saffron-50:#3A2C10; --saffron-100:#3A2C10;
    --focus:0 0 0 2px #0E0C0B,0 0 0 4px #F0E8DC;
    --focus-on-ink:0 0 0 2px #F0E8DC,0 0 0 4px #C43822;
    --sh-1:0 1px 0 rgba(0,0,0,.4);
    --sh-2:0 8px 24px -12px rgba(0,0,0,.55);
    --sh-3:0 20px 48px -16px rgba(0,0,0,.65);
  }
}
/* Explicit dark via attribute, even if the OS is light. */
[data-theme=dark]{
  --bg:#0E0C0B;
  --card:#1C1916;
  --paper:#141210;
  --sunken:#241F1B;
  --sunken-2:#2C2722;
  --line:#3A3530;
  --line-2:#2C2722;
  --line-strong:#5C564F;
  --fg:#F0E8DC;
  --ink:#F0E8DC;
  --ink-2:#F0E8DC;
  --body:#E8E0D4;
  --muted:#C4B9A8;
  --faint:#A89F93;
  --steel:#C4B9A8;
  --primary:#F0E8DC;
  --primary-ink:#F0E8DC;
  --primary-soft:#241F1B;
  --oxide-ink:#F07864;
  --oxide-soft:#3A1C16;
  --oxide-on:#FFFFFF;
  --on-run-ink:var(--oxide-ink);
  --on-run-soft:var(--oxide-soft);
  --ok:#7EC89A; --ok-soft:#143022; --ok-line:#1E5C38;
  --warn:#E0B05A; --warn-soft:#3A2C10; --warn-line:#7A4A00;
  --danger:#E890A8; --danger-soft:#3A1522; --danger-line:#8B1E3F;
  --info:#8CBAD4; --info-soft:#152838; --info-line:#215A7A;
  --violet:#C4B8EC; --violet-soft:#2A2440;
  --held:#C4B9A8; --held-soft:#241F1B;
  --teal-950:#0E0C0B; --teal-900:#1C1916; --teal-850:#241F1B; --teal-800:#2C2722;
  --teal-700:#F0E8DC; --teal-600:#E8E0D4; --teal-500:#C4B9A8;
  --teal-300:#A89F93; --teal-200:#5C564F; --teal-100:#241F1B; --teal-50:#1C1916;
  --saffron-50:#3A2C10; --saffron-100:#3A2C10;
  --focus:0 0 0 2px #0E0C0B,0 0 0 4px #F0E8DC;
  --focus-on-ink:0 0 0 2px #F0E8DC,0 0 0 4px #C43822;
  --sh-1:0 1px 0 rgba(0,0,0,.4);
  --sh-2:0 8px 24px -12px rgba(0,0,0,.55);
  --sh-3:0 20px 48px -16px rgba(0,0,0,.65);
}
/* Explicit light wins over OS dark, for marketing product frames. */
[data-theme=light]{
  --bg:#F4EFE6;
  --fg:#1C1916;
  --ink:#141210;
  --ink-2:#1C1916;
  --body:#3A3530;
  --muted:#5C564F;
  --oxide-ink:#8F2416;
  --oxide-soft:#FAEEEA;
  --primary:#141210;
  --primary-ink:#141210;
  --primary-soft:#E8E0D4;
  --card:#FBF7F1;
  --paper:#F4EFE6;
  --sunken:#E8E0D4;
  --line:#D9D0C3;
  --focus:0 0 0 2px #F0E8DC,0 0 0 4px #141210;
}

@media (prefers-reduced-motion:reduce){
  :root{
    --d-1:0ms; --d-2:0ms; --d-3:0ms; --d-4:0ms;
  }
}

/* Also published at the package root for a short import path. */
