/* EARTH WATCH · next · ink.css — the tokens (card W2, the look).
 *
 * One Ink grammar: one solid ground, one ink, ONE highlight used as a filled shape with ink type on it,
 * hairline rules, big confident type. No gradients and no shadows in the chrome. Colour beyond that belongs
 * to the planet and the data: the event kinds and the temperature ramp keep their colours in both schemes.
 *
 * The scheme follows the device (prefers-color-scheme). A page may pin one with <html data-scheme="light|dark">
 * (the look sheet does, to show both side by side); nothing else sets it.
 *
 * The default tokens below are take C (the planet in colour, the chrome in ink). The look sheet's takes A and B
 * override them in look/takes.css; whichever take Kris picks becomes this file.
 *
 * Fonts are self-hosted (OFL, licences beside them), subset to Latin, font-display: swap. No outside request.
 */

@font-face {
  font-family: "Archivo Black";
  src: url("fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ground, ink, the one highlight */
  --ground: #FAF7F0;        /* DENBOW brand cream */
  --surface: #FFFFFF;       /* a card is a white card on the cream, like the printed ones */
  --ink: #171410;           /* DENBOW ink */
  --ink-2: #5A544B;         /* second voice: source and time lines (>= 6:1 on ground and surface) */
  --rule: #D8D1C4;          /* hairline */
  --rule-ink: #171410;      /* a rule that is the ink itself (cards, chips) */
  --hi: #E2600E;            /* the ONE highlight: DENBOW house orange, the same in both schemes */
  --on-hi: #000000;         /* ink type on the highlight (never thin highlight-coloured type) */

  /* tiers (data, not chrome): a filled tag with ink type on it, the alarm card also wears it as a border */
  --alarm: #FF6B6B;
  --active: var(--ink);     /* active wears ink: an amber here would be a second highlight (take A's amber is dE 7 from it) */
  --on-active: var(--ground);
  --quiet: transparent;
  --on-tier: #11131A;

  /* event kinds (Sunshine palette by day, Midnight by night; from the mobile app's GlobePalette.cs) */
  --k-quake: #D98200;
  --k-volcano: #D33030;
  --k-cyclone: #5F4BD8;
  --k-fire: #DA5A16;
  --k-hazard: #138F84;

  /* the temperature ramp, the same in both schemes (°C stops) */
  --t-m40: #3B1F78; --t-m25: #3557C8; --t-m10: #3FA0E0; --t-0: #A9DDEB; --t-8: #9FD49A;
  --t-16: #E9D86A; --t-24: #F2A443; --t-32: #E2553A; --t-40: #A51F45;

  /* type */
  --f-display: "Archivo Black", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --w-label: 700;           /* caps labels */
  --track-label: 0.07em;
  --track-mark: 0.06em;

  --t-cap: 15px;            /* the floor: nothing on the page is smaller */
  --t-body: 17px;
  --t-line: 18px;           /* the card's plain-words line */
  --t-mark: 20px;           /* the wordmark */
  --t-title: 28px;          /* a card's title */
  --t-big: 40px;            /* a headline number */

  /* shape */
  --tap: 48px;              /* every touch target */
  --hair: 1px;
  --edge: 2px;              /* an ink edge (chips, the alarm card) */
  --r-card: 14px;
  --r-chip: 999px;
  --gap: 12px;
  --pad: 16px;
}

/* dark: the device says so, unless the page pins light */
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    color-scheme: dark;
    --ground: #0B0A09;
    --surface: #171512;
    --ink: #FAF7F0;
    --ink-2: #B8B1A5;
    --rule: #36312B;
    --rule-ink: #FAF7F0;
    --on-hi: #000000;
    --k-quake: #FFB547; --k-volcano: #FF5C5C; --k-cyclone: #A796FF; --k-fire: #FF8A3D; --k-hazard: #4FD1C5;
  }
}
:root[data-scheme="dark"] {
  color-scheme: dark;
  --ground: #0B0A09;
  --surface: #171512;
  --ink: #FAF7F0;
  --ink-2: #B8B1A5;
  --rule: #36312B;
  --rule-ink: #FAF7F0;
  --on-hi: #000000;
  --k-quake: #FFB547; --k-volcano: #FF5C5C; --k-cyclone: #A796FF; --k-fire: #FF8A3D; --k-hazard: #4FD1C5;
}

/* the base every page in /next/ stands on */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.45;
  font-feature-settings: "cv11" 1;       /* Inter's single-storey a: reads better at a glance */
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
::selection { background: var(--hi); color: var(--on-hi); }
:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
