/* Design tokens. Chrome is monochrome; colour is reserved for data. */

@font-face {
  font-family: 'TASA Orbiter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/tasa-orbiter-latin-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'TASA Orbiter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/tasa-orbiter-latin.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;
}

:root {
  color-scheme: dark;

  /* Space and surfaces. Panels are flat and opaque; blur is kept for small chips that float over the globe. */
  --space: #000000; /* behind the globe: actual space */
  --night: #0b0f15; /* panel colour, blue-black like a polar sky */
  --night-2: #111721; /* a raised step on a panel: inputs, the selected row */
  --night-glass: rgb(11 15 21 / 0.72); /* chips over the globe only */
  --raise-1: rgb(255 255 255 / 0.045); /* inset groups */
  --raise-2: rgb(255 255 255 / 0.085); /* hover, pressed, selected */
  --hairline: rgb(255 255 255 / 0.09);
  --hairline-strong: rgb(255 255 255 / 0.16);
  --glass-blur: blur(18px) saturate(140%);

  /* Ink */
  --snow: #f1f4f7; /* primary text */
  --mist: #a6b0bd; /* secondary text */
  --dusk: #768191; /* tertiary text, axis labels */
  --ink-on-color: #06110b; /* text set on a status fill */

  /* Activity scale: the colours the sky itself moves through as activity rises.
     Grey (nothing) -> faint teal -> oxygen green (557.7 nm) -> nitrogen violet -> oxygen red (630 nm).
     Checked for colour-blind separation on --night (worst pair dE 12.3) and >= 3:1 contrast. */
  --level-0: #748291; /* Quiet            Kp below 3- */
  --level-1: #75c2b3; /* Unsettled        Kp 3- to 3+ */
  --level-2: #6ef7a6; /* Active           Kp 4- to 4+ */
  --level-3: #ce7df1; /* Storm G1-G2      Kp 5- to 6+ */
  --level-4: #ed4c3a; /* Severe storm G3+ Kp 7- and up */

  /* Type */
  --font: 'TASA Orbiter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-2xs: 0.6875rem; /* 11 axis ticks */
  --text-xs: 0.75rem; /* 12 captions */
  --text-sm: 0.8125rem; /* 13 secondary */
  --text-md: 0.9375rem; /* 15 body, rows */
  --text-lg: 1.0625rem; /* 17 emphasised rows */
  --text-xl: 1.25rem; /* 20 */
  --text-2xl: 1.5rem; /* 24 */
  --text-3xl: 1.875rem; /* 30 times */
  --text-4xl: 2.5rem; /* 40 verdict */

  /* Space: 4px grid */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;

  /* Shape: radius follows hierarchy, not habit */
  --r-panel: 26px; /* the sheet and the timeline dock */
  --r-group: 14px; /* inset groups and inputs */
  --r-mark: 3px; /* data ends of bars */
  --r-full: 999px;

  /* Layout */
  --edge: 14px; /* gap between floating panels and the viewport */
  --panel-w: 392px;
  --dock-h: 148px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --t-fast: 140ms;
  --t-med: 280ms;
  --t-sheet: 460ms;

  --focus: 0 0 0 2px var(--night), 0 0 0 4px var(--snow);

  /* Marks for nights that rest on an outlook, not a forecast. Plain white at low opacity, so they cannot be
     read as the blue-grey "Quiet" of --level-0. */
  --neutral-mark: rgb(255 255 255 / 0.3); /* the typical level */
  --neutral-range: rgb(255 255 255 / 0.12); /* the likely range around it */
  --neutral-line: rgb(255 255 255 / 0.26); /* outlines of hollow marks */

  /* The legend's ramp: the globe's own green, from the faintest it draws to where it washes out. */
  --aurora-faint: rgb(60 190 130 / 0.16);
  --aurora-mid: #3fbf86;
  --aurora-bright: #c9ffd9;

  /* Stacking: the globe, what floats on it, the panels. Dialogs use the top layer. */
  --z-stage: 0;
  --z-chrome: 1;
  --z-panel: 2;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-med: 0ms;
    --t-sheet: 0ms;
  }
}
