/* Scrapyard design tokens. Source of truth for Tailwind theme (office) and Flutter ThemeData (phone).
   Names map 1:1 to DESIGN.md. Light is the default; dark is phone-only. */
@import url("fonts.css");

:root {
  /* colour: neutrals (steel) */
  --c-ink: #1E2329;          /* graphite, primary text, dark surfaces */
  --c-ink-2: #39414B;        /* secondary text */
  --c-muted: #5A636E;        /* tertiary text, 5.9:1 on white */
  --c-subtle: #8A939E;       /* icons, chart secondary, non-text only */
  --c-line: #DCE0E5;         /* hairlines, card borders */
  --c-line-strong: #C4CAD2;  /* input borders */
  --c-canvas: #ECEEF1;       /* app background */
  --c-surface: #FFFFFF;      /* cards */
  --c-surface-2: #F5F6F8;    /* insets, table heads, hover */
  --c-inverse: #1E2329;      /* dark cards (vehicle context, yard tag) */
  --c-on-inverse: #FFFFFF;
  --c-on-inverse-muted: #B7BEC7;

  /* colour: brand signal (hi-vis yellow) */
  --c-signal: #FFC81F;       /* primary action fill; text on it is always --c-ink (10.9:1) */
  --c-signal-press: #F0B400;
  --c-signal-soft: #FFF3C4;
  --c-on-signal: #1E2329;

  /* colour: AI (cobalt) - everything the AI proposed or computed */
  --c-ai: #2F4FD8;           /* 6.4:1 on white */
  --c-ai-soft: #EBEEFE;

  /* colour: status */
  --c-ok: #1B7A43;   --c-ok-soft: #E2F3E8;
  --c-check: #A64B00; --c-check-soft: #FFEEDC;   /* "provjeri": medium confidence, needs a look */
  --c-danger: #B42318; --c-danger-soft: #FDECEA;
  --c-offline: #1E2329;      /* offline uses graphite + yellow dot, never red: it is a state, not an error */

  /* type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wd-display: 118;  /* Archivo width axis for display text */
  --wd-body: 100;

  /* spacing (4 base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* radius: grows with the size of the thing */
  --r-xs: 6px;    /* chips inside rows, badges */
  --r-sm: 10px;   /* office buttons, inputs */
  --r-md: 14px;   /* phone buttons, tiles, list thumbs */
  --r-lg: 20px;   /* cards */
  --r-xl: 28px;   /* sheets, docks */
  --r-pill: 999px;

  /* elevation */
  --e-0: 0 0 0 1px var(--c-line);
  --e-1: 0 1px 2px rgba(30,35,41,.06), 0 0 0 1px rgba(30,35,41,.05);
  --e-2: 0 10px 30px -12px rgba(30,35,41,.28), 0 0 0 1px rgba(30,35,41,.06);
  --e-3: 0 24px 60px -20px rgba(30,35,41,.40);

  /* motion */
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-in-out: cubic-bezier(.6,0,.2,1);
  --t-fast: 120ms; --t-base: 200ms; --t-slow: 360ms;
}

/* Phone dark theme (optional, night shifts and the hall). Same roles, own steps. */
[data-theme="dark"] {
  --c-ink: #F2F4F7; --c-ink-2: #CDD3DA; --c-muted: #A3ACB7; --c-subtle: #77818C;
  --c-line: #2E353D; --c-line-strong: #434C56;
  --c-canvas: #12161A; --c-surface: #1B2026; --c-surface-2: #232931;
  --c-inverse: #2A3139; --c-on-inverse: #FFFFFF; --c-on-inverse-muted: #B7BEC7;
  --c-signal: #FFC81F; --c-signal-press: #FFD452; --c-signal-soft: #3A3115; --c-on-signal: #1E2329;
  --c-ai: #9DAEFF; --c-ai-soft: #222A4D;
  --c-ok: #6FD49A; --c-ok-soft: #173826;
  --c-check: #FFB46B; --c-check-soft: #3D2A16;
  --c-danger: #FF8A80; --c-danger-soft: #3F1E1B;
  --e-1: 0 0 0 1px var(--c-line);
  --e-2: 0 10px 30px -12px rgba(0,0,0,.6), 0 0 0 1px var(--c-line);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-variation-settings: "wdth" var(--wd-body);
  color: var(--c-ink); background: var(--c-canvas);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
.display { font-variation-settings: "wdth" var(--wd-display); letter-spacing: -0.01em; }
.code { font-family: var(--font-code); font-feature-settings: normal; letter-spacing: 0; }
.i { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--c-ai); outline-offset: 2px; }
button { font: inherit; color: inherit; }
a { color: inherit; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
