/* Copied verbatim from first-impact-design design-system/tokens/tokens.css at commit 1fe8629. Do not edit here; re-copy. */
/* First Impact tokens.

   Two worlds, one set of semantic names (language.md §1, §7, §12):

     paper       khaki, what the shooter reads, writes and annotates
     instrument  dark, where measured or computed numbers are read

   The dark theme IS the instrument set applied globally — §12: "the light field
   variant IS the paper set … the dark instrument set is its twin. Semantics are
   identical in both." So the instrument values are declared once and bound three
   ways: by the dark theme, by the OS preference, and by .fl-instrument for a
   cluster sitting inside a paper page (§1: on desk screens the page never inverts).

   The --fl- prefix is public API. Do not rename it and do not add a second one. */


/* ── raw palette ────────────────────────────────────────────────────────────
   The literal values, one name each, never used directly by a component.
   Everything below binds to these, so a value exists in exactly one place. */
:root {
  /* paper — language.md §7, "Paper world (Field Light base)" */
  --fl-paper-ground:      #F2EFE6;
  --fl-paper-panel:       #FFFFFF;
  --fl-paper-rule:        #D9D3C3;
  --fl-paper-rule-faint:  rgba(217, 211, 195, .6);  /* table row separators */
  --fl-paper-text:        #1C1F1A;
  --fl-paper-muted:       #666B5D;
  --fl-paper-olive:       #4F6A2D;
  --fl-paper-olive-tint:  #E4EAD6;
  --fl-paper-good:        #2F7A3A;
  --fl-paper-warn:        #916413;       /* F2 then W1, 19 Sep: carries white at 5.20:1, and reads as text on the ground at 4.53:1 */
  --fl-paper-alarm:       #B4332A;
  --fl-paper-ink-on-fill: #FFFFFF;       /* ink on olive / good / alarm fills */

  /* instrument — language.md §7, "Instrument world (derived, canon)" */
  --fl-inst-ground:       #1C1F1A;
  --fl-inst-module:       #23271F;
  --fl-inst-rule:         #3A3F33;
  --fl-inst-rule-faint:   rgba(58, 63, 51, .6);
  --fl-inst-text:         #F2EFE6;
  --fl-inst-muted:        #B7B3A5;
  --fl-inst-olive:        #A9C173;
  --fl-inst-olive-tint:   rgba(169, 193, 115, .14);  /* not in §7 — taken from the
                             mockups, which needed a selected-row fill on dark */
  --fl-inst-good:         #6FBF7A;
  --fl-inst-warn:         #D99A2B;
  --fl-inst-alarm:        #DE6157;
  --fl-emboss:            #181B15;   /* §7 — relief letters only, darker than ground */
}


/* ── semantic roles ─────────────────────────────────────────────────────────
   What components reference. Paper is the default binding. */
:root {
  --fl-ground:      var(--fl-paper-ground);       /* page, top bar, table header row */
  --fl-panel:       var(--fl-paper-panel);        /* cards, chips, quiet buttons, drawer */
  --fl-rule:        var(--fl-paper-rule);         /* 1px borders and dividers */
  --fl-rule-faint:  var(--fl-paper-rule-faint);
  --fl-text:        var(--fl-paper-text);         /* all text and numbers */
  --fl-muted:       var(--fl-paper-muted);        /* labels, hints, idle dot */
  --fl-olive:       var(--fl-paper-olive);        /* the one accent */
  --fl-olive-tint:  var(--fl-paper-olive-tint);   /* selected row or drawer item */
  --fl-good:        var(--fl-paper-good);         /* connected, streaming, running */
  --fl-warn:        var(--fl-paper-warn);         /* scanning, connecting, standby */
  --fl-alarm:       var(--fl-paper-alarm);        /* error, time over, no detection */

  /* Ink on a saturated fill. Inverts with the theme because the fills do: olive,
     good and alarm are dark on paper and light on instrument. */
  --fl-ink-on-fill: var(--fl-paper-ink-on-fill);
  /* F2 then W1, 19 Sep: the paper warn is #916413, dark enough to carry white — 5.20:1
     on the pill and on the standby timer. The instrument warn is still bright amber,
     so it keeps dark ink; white on #D99A2B is about 2:1. */
  --fl-ink-on-warn: var(--fl-paper-ink-on-fill);
  --fl-readout-bg:  var(--fl-inst-ground);   /* a dark cluster on a paper page */
}

/* The instrument bindings, referenced twice below. Values come from the raw layer,
   so the two copies cannot drift apart in value — only in coverage. */
:root[data-theme="dark"],
.fl-instrument {
  --fl-ground:      var(--fl-inst-ground);
  --fl-panel:       var(--fl-inst-module);
  --fl-rule:        var(--fl-inst-rule);
  --fl-rule-faint:  var(--fl-inst-rule-faint);
  --fl-text:        var(--fl-inst-text);
  --fl-muted:       var(--fl-inst-muted);
  --fl-olive:       var(--fl-inst-olive);
  --fl-olive-tint:  var(--fl-inst-olive-tint);
  --fl-good:        var(--fl-inst-good);
  --fl-warn:        var(--fl-inst-warn);
  --fl-alarm:       var(--fl-inst-alarm);
  --fl-ink-on-fill: var(--fl-inst-ground);
  --fl-ink-on-warn: var(--fl-inst-ground);
  --fl-readout-bg:  var(--fl-inst-module);   /* a module on instrument ground */
}

/* THEME · SYSTEM (§12) — follow the OS unless the user pinned LIGHT. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fl-ground:      var(--fl-inst-ground);
    --fl-panel:       var(--fl-inst-module);
    --fl-rule:        var(--fl-inst-rule);
    --fl-rule-faint:  var(--fl-inst-rule-faint);
    --fl-text:        var(--fl-inst-text);
    --fl-muted:       var(--fl-inst-muted);
    --fl-olive:       var(--fl-inst-olive);
    --fl-olive-tint:  var(--fl-inst-olive-tint);
    --fl-good:        var(--fl-inst-good);
    --fl-warn:        var(--fl-inst-warn);
    --fl-alarm:       var(--fl-inst-alarm);
    --fl-ink-on-fill: var(--fl-inst-ground);
    --fl-ink-on-warn: var(--fl-inst-ground);
  --fl-readout-bg:  var(--fl-inst-module);   /* a module on instrument ground */
  }
}

/* A paper module inside an instrument page — §1 allows it only as a full module
   (the journal card in a dark side rail), never a bare white field on dark. */
.fl-paper {
  --fl-ground:      var(--fl-paper-ground);
  --fl-panel:       var(--fl-paper-panel);
  --fl-rule:        var(--fl-paper-rule);
  --fl-rule-faint:  var(--fl-paper-rule-faint);
  --fl-text:        var(--fl-paper-text);
  --fl-muted:       var(--fl-paper-muted);
  --fl-olive:       var(--fl-paper-olive);
  --fl-olive-tint:  var(--fl-paper-olive-tint);
  --fl-good:        var(--fl-paper-good);
  --fl-warn:        var(--fl-paper-warn);
  --fl-alarm:       var(--fl-paper-alarm);
  --fl-ink-on-fill: var(--fl-paper-ink-on-fill);
  /* F2 then W1, 19 Sep: the paper warn is #916413, dark enough to carry white — 5.20:1
     on the pill and on the standby timer. The instrument warn is still bright amber,
     so it keeps dark ink; white on #D99A2B is about 2:1. */
  --fl-ink-on-warn: var(--fl-paper-ink-on-fill);
  --fl-readout-bg:  var(--fl-inst-ground);   /* a dark cluster on a paper page */
}


/* ── theme-invariant ────────────────────────────────────────────────────────
   Values that must NOT flip with the theme. */
:root {
  /* An instrument readout or idle timer stays dark on a paper page and on a dark
     one. These three are the original names and keep their original values. */
  --fl-dark-panel:     var(--fl-inst-ground);
  --fl-text-on-dark:   var(--fl-inst-text);
  --fl-muted-on-dark:  var(--fl-inst-muted);

  /* Drawer scrim — already a dark wash, correct over either world. */
  --fl-scrim:          rgba(28, 31, 26, .45);
}


/* ── type ───────────────────────────────────────────────────────────────── */
:root {
  --fl-font-display: "Oswald", sans-serif;               /* numbers, labels, buttons, titles */
  --fl-font-body: "Source Sans 3", system-ui, sans-serif; /* running text */
}


/* ── space and shape ────────────────────────────────────────────────────── */
:root {
  --fl-unit: 8px;
  --fl-gutter: 16px;       /* screen side padding */
  --fl-stack: 10px;        /* gap between stacked blocks on a screen */
  --fl-panel-pad: 14px;
  --fl-radius: 10px;       /* panels, tables, readouts, buttons */
  --fl-radius-pill: 4px;   /* class pills */
  --fl-control: 52px;      /* default button height */
  --fl-control-compact: 36px;
  --fl-control-tall: 72px;
  --fl-control-timer: 64px;
  --fl-screen-width: 360px;
}
