/* Takker design tokens — direction "Hi-Vis".
   Light is the default. Dark applies when the OS prefers dark (unless the user forced light),
   or when any ancestor has data-theme="dark". The dark block is repeated on purpose (no build step). */

:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #F3F0E8;          /* warm bone — less glare than white in sunlight */
  --surface: #FFFFFF;
  --surface-2: #EAE6DC;   /* insets, disabled, track */
  --ink: #16140F;
  --ink-2: #3A362E;
  --muted: #6E685C;
  --line: #16140F;        /* strong outline (primary card, primary button) */
  --line-strong: #16140F; /* secondary button outline */
  --line-soft: #DDD7CA;   /* hairlines, card borders */

  --accent: #FF5B1F;      /* safety orange — primary actions only */
  --accent-hover: #F24E12;
  --accent-press: #E04406;
  --on-accent: #16140F;
  --accent-soft: #FFE4D8;

  --ok: #1C7A3B;      --ok-soft: #DDF0E2;
  --warn: #8F5600;    --warn-soft: #FBEAC4;   /* sober amber: trial < 6h, paused */
  --danger: #B42318;  --danger-soft: #FBE1DD;

  --shadow: #16140F;      /* hard "press" shadow under primary button */
  --focus: #16140F;
  --scrim: rgba(22, 20, 15, .45);
  --toast-bg: #16140F;  --toast-ink: #F3F0E8;  --toast-muted: #A9A294;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121110; --surface: #1D1B18; --surface-2: #2A2723;
    --ink: #F3F0E8; --ink-2: #D6D0C4; --muted: #9C9586;
    --line: #FF6A2B; --line-strong: #5A544B; --line-soft: #2E2B26;
    --accent: #FF6A2B; --accent-hover: #FF7D45; --accent-press: #E85A1E; --on-accent: #121110; --accent-soft: #3A2015;
    --ok: #5CC985; --ok-soft: #173222;
    --warn: #F0B04A; --warn-soft: #362810;
    --danger: #FF7B6B; --danger-soft: #3B1814;
    --shadow: #7A2E0E; --focus: #F3F0E8; --scrim: rgba(0, 0, 0, .6);
    --toast-bg: #F3F0E8; --toast-ink: #16140F; --toast-muted: #6E685C;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110; --surface: #1D1B18; --surface-2: #2A2723;
  --ink: #F3F0E8; --ink-2: #D6D0C4; --muted: #9C9586;
  --line: #FF6A2B; --line-strong: #5A544B; --line-soft: #2E2B26;
  --accent: #FF6A2B; --accent-hover: #FF7D45; --accent-press: #E85A1E; --on-accent: #121110; --accent-soft: #3A2015;
  --ok: #5CC985; --ok-soft: #173222;
  --warn: #F0B04A; --warn-soft: #362810;
  --danger: #FF7B6B; --danger-soft: #3B1814;
  --shadow: #7A2E0E; --focus: #F3F0E8; --scrim: rgba(0, 0, 0, .6);
  --toast-bg: #F3F0E8; --toast-ink: #16140F; --toast-muted: #6E685C;
}

:root {
  --font-sans: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* type scale (px) */
  --t-display: 34px; --t-h1: 28px; --t-h2: 21px; --t-body: 16px; --t-small: 14px; --t-label: 11px;

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

  /* radius */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;

  /* sizes */
  --tap: 48px;            /* default control height (min tap target is 44) */
  --tap-lg: 60px;         /* the one primary action per screen */
  --screen-max: 480px;    /* app column width on desktop */
}
