/* Talira's design tokens: every colour, size, corner, shadow and timing the components use. docs/DESIGN_SYSTEM.md
   explains them. The look is "Survey": graphite surfaces, hairlines, one jade accent, numbers that line up.
   Brand mint #00d492 is the mark's colour only: it's 1.6:1 on a light page, so text and focus use --accent and links --link. */
/* Geist and Geist Mono (SIL Open Font License, fonts/OFL.txt), served from Talira's own server: pages make no requests
   to font services. One variable file each covers every weight. */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The mark (m::brand): mint stones and a white top stone on a dark tile, in both themes. Never a theme colour. */
  --brand: #00d492;
  --mark-tile: #0c1a14;
  --mark-edge: transparent;
  /* Surfaces: the page, what sits on it (fields, cards, menus), and a step above that (a hovered row, a code panel). */
  --paper: #f6f7f7;
  --card: #ffffff;
  --raised: #fbfcfc;
  /* Text: body, secondary, quiet. --ink-3 is 4.7:1 on --paper, so it's fine for small text. */
  --ink: #0f1312;
  --ink-2: #4a5351;
  --ink-3: #677170;
  /* Lines: hairlines between things, and the stronger edge of a control. */
  --rule: #e3e6e5;
  --edge: #cfd5d3;
  /* The one accent: focus, the chosen option, every meter's bar, and links (--link, its shade for text). */
  --accent: #0b7a57;
  --accent-wash: #e3f5ee;
  /* Links (style.css `a`), always underlined: 4.97:1 on --paper and 3.5:1 against --ink, so a link stands out from
     the words around it by its colour as well as its underline. Hover is a step darker. In dark mode it's a deeper
     jade than the accent (5.3:1 on --card, 3.1:1 against --ink: the accent's mint is 1.6:1 against the text), and hover
     brightens it to the accent. Dark mode's --accent-wash is dark enough for it to keep 4.6:1 there. */
  --link: #0b7a57;
  --link-hover: #075c42;
  --ok: #0b7a57;
  --ok-wash: #e3f5ee;
  --warn: #8f5400;
  --warn-wash: #fbf0dc;
  --bad: #b42318;
  --bad-wash: #fbe4e1;
  /* A meter's or map's empty track. */
  --bar: #e3e6e5;
  /* The main button: graphite on a light page, near-white on a dark one. */
  --button: #0f1312;
  --button-hover: #2a302e;
  --on-button: #ffffff;
  --focus: #0b7a57;
  /* Behind a logo that's a mark on a transparent background (images::Backdrop), the same in both themes: white, since
     most logos are drawn for a white page, or ink behind a white mark. */
  --logo-tile: #ffffff;
  --logo-tile-dark: #0c1a14;
  /* Behind an SVG logo that draws itself differently in dark mode: the light page's white or the dark page's ink. */
  --logo-tile-theme: #ffffff;
  --logo-scheme: light;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type sizes. Body text is --text-md; small print, controls and labels --text-sm; captions --text-xs. Headings use
     --text-xl and --text-2xl, and a page's title --text-display. */
  --text-xs: 12.5px;
  --text-sm: 13.5px;
  --control: 13.5px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 22px;
  --text-2xl: 32px;
  --text-display: clamp(36px, 5.2vw, 60px);

  /* Spacing, on a 4px step: the gaps inside a row and between its parts (--space-1 to --space-3), between a list's
     columns and around its rows (--space-4, --space-5), and between blocks (--space-6, --space-7). */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Corners: controls (buttons, fields, chips' rows), cards and menus, and the search box and dialogs. */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Elevation: a hairline ring for anything that sits on the page (cards, panels), and one soft shadow for what
     floats above it (the search box, open menus, dialogs). Nothing else casts a shadow. */
  --ring: 0 1px 2px rgb(15 19 18 / 0.05), 0 0 0 1px var(--rule);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.9) inset, 0 12px 32px -12px rgb(15 19 18 / 0.18), 0 0 0 1px var(--edge);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent);
  /* The hero's faint grid. */
  --grid-line: rgb(15 19 18 / 0.045);

  /* Motion: state changes only (hover, open, press), never on load or scroll. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 140ms;
  color-scheme: light;
}
/* Dark: follows the system unless data-theme on <html> says otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mark-tile: #172720;
    --mark-edge: #2d4439;
    --paper: #0b0d0d;
    --card: #111414;
    --raised: #161a19;
    --ink: #edf0ef;
    --ink-2: #a1aaa8;
    --ink-3: #7f8886;
    --rule: #212726;
    --edge: #2e3634;
    --accent: #44d9a2;
    --accent-wash: #0d251c;
    --link: #2d9a72;
    --link-hover: #44d9a2;
    --ok: #44d9a2;
    --ok-wash: #0f2a20;
    --warn: #f0bd6a;
    --warn-wash: #2c2312;
    --bad: #f97066;
    --bad-wash: #3a1a17;
    --bar: #252c2b;
    --button: #edf0ef;
    --button-hover: #ffffff;
    --on-button: #0b0d0d;
    --focus: #44d9a2;
    --logo-tile-theme: #0c1a14;
    --logo-scheme: dark;
    --ring: 0 0 0 1px var(--rule);
    --shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 16px 40px -16px rgb(0 0 0 / 0.7), 0 0 0 1px var(--edge);
    --grid-line: rgb(237 240 239 / 0.035);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mark-tile: #172720;
  --mark-edge: #2d4439;
  --paper: #0b0d0d;
  --card: #111414;
  --raised: #161a19;
  --ink: #edf0ef;
  --ink-2: #a1aaa8;
  --ink-3: #7f8886;
  --rule: #212726;
  --edge: #2e3634;
  --accent: #44d9a2;
  --accent-wash: #0d251c;
  --link: #2d9a72;
  --link-hover: #44d9a2;
  --ok: #44d9a2;
  --ok-wash: #0f2a20;
  --warn: #f0bd6a;
  --warn-wash: #2c2312;
  --bad: #f97066;
  --bad-wash: #3a1a17;
  --bar: #252c2b;
  --button: #edf0ef;
  --button-hover: #ffffff;
  --on-button: #0b0d0d;
  --focus: #44d9a2;
  --logo-tile-theme: #0c1a14;
  --logo-scheme: dark;
  --ring: 0 0 0 1px var(--rule);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 16px 40px -16px rgb(0 0 0 / 0.7), 0 0 0 1px var(--edge);
  --grid-line: rgb(237 240 239 / 0.035);
  color-scheme: dark;
}
/* Nothing moves for someone who asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
