/* Blinktax design tokens and base styles. Source of truth: DESIGN.md (#64).
   Colour names match DESIGN.md's frontmatter; tests/test_ui.py checks the values. */

@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/InterVariable.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-display: swap; src: url("/assets/fonts/figtree-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 800; font-display: swap; src: url("/assets/fonts/figtree-800-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;

  /* Colour */
  --bright-green: #9fe870;
  --bright-green-hover: #80e142;
  --forest: #163300;
  --forest-hover: #224d02;
  --ink: #0e0f0c;
  --ink-2: #454745;
  --ink-3: #5f625e;
  --ground: #ffffff;
  --neutral: #ecefea;
  --neutral-hover: #e2e6df;
  --neutral-strong: #d5dad1;
  --line: #e1e3df;
  --line-strong: #8b8e8a;

  --problem-fg: #a8200d;   --problem-bg: #fde8e4;   --problem-solid: #c8301b;
  --attention-fg: #5c4300; --attention-bg: #fff1b8; --attention-solid: #edc843; --attention-ink: #3a2b00;
  --progress-fg: #0d4f55;  --progress-bg: #d9f1f1;  --progress-solid: #a0e1e1;
  --done-fg: #2f5711;      --done-bg: #e2f5d2;      --done-solid: #9fe870;
  --unknown-line: #8b8e8a;

  /* State fills that are not status meanings */
  --missing-fill: #fffaea;
  --check-fill: #fffbea;
  --check-line: #c79a00;
  --row-hover: #f8f9f7;
  --row-selected: #f1fae9;

  /* Roles */
  --primary-bg: var(--bright-green);
  --primary-bg-hover: var(--bright-green-hover);
  --primary-fg: var(--forest);
  --secondary-bg: var(--neutral);
  --secondary-bg-hover: var(--neutral-hover);
  --secondary-fg: var(--forest);
  --link: var(--forest);
  --focus: var(--forest);

  /* Type */
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Figtree", "Inter", ui-sans-serif, system-ui, sans-serif;
  --display-size: 44px; --display-lh: 48px;
  --figure-size: 40px;  --figure-lh: 44px;
  --headline-size: 26px; --headline-lh: 32px;
  --title-size: 20px;   --title-lh: 26px;
  --text-row: 16px;     --lh-row: 22px;
  --text-body: 14px;    --lh-body: 20px;
  --text-small: 13px;   --lh-small: 18px;

  /* Shape */
  --radius-field: 12px;
  --radius-row: 16px;
  --radius-overlay: 20px;
  --radius-panel: 24px;
  --radius-pill: 999px;

  /* Space */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --page-gutter: 40px;
  --section-gap: 48px;
  --column-gap: 56px;

  /* Size */
  --control-h: 44px;
  --control-h-s: 36px;
  --avatar: 48px;
  --avatar-s: 36px;
  --sidebar-w: 248px;

  /* Depth and motion */
  --shadow-float: 0 8px 24px rgb(14 15 12 / 0.12), 0 2px 6px rgb(14 15 12 / 0.08);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 160ms;
}

@media (prefers-reduced-motion: reduce) { :root { --dur: 0ms; } }
@media (max-width: 860px) {
  :root { --display-size: 34px; --display-lh: 38px; --headline-size: 22px; --headline-lh: 28px; --figure-size: 32px; --figure-lh: 36px; --page-gutter: 16px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--text-body)/var(--lh-body) var(--font-body);
  font-feature-settings: "cv05", "cv08", "ss03";
  -webkit-font-smoothing: antialiased;
  caret-color: var(--forest);
}
::selection { background: var(--bright-green); color: var(--forest); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--neutral-strong) transparent; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.id { font-feature-settings: "zero", "ss01", "cv05"; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.nw { white-space: nowrap; }
