/* Space Grotesk, the face the door wears, self-hosted so no page needs a font CDN. SIL OFL, one variable
   file covering 400 to 700 in the latin subset, 22 KB. Only fetched by a theme that names it. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-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;
}

/* ══ zpe: the door's own language, measured from the live app on 2026-10-26 ══════════════════════════
   The door is React and Tailwind, and its taste is this scope: the ground #050507, ink #e0e7ff, the violet
   accent, Space Grotesk. On 2026-10-28 the door stopped carrying a palette of its own and reads these roles
   by name (zpe-vc/src/app/globals.css), so a value written here is the value the door renders.

   The accent is the one value that moved. The door's text accent had been its own electric purple #6b21a8,
   which measures 2.34:1 on the void; --accent is #a78bfa at 7.48:1, and that is what the door renders now.
   #6b21a8 survives only as the first stop of --accent-grad, because a gradient is a surface and its label
   sits on --accent-grad-ink, never on --accent-ink: the flat accent is pale and takes a dark ink (#0b0713,
   7.32:1), the gradient is dark and takes white. Read as one ink, the mark's glyph measured 2.28:1 on the
   violet stop and 3.52:1 on the blue, which on the live 24px mark is a smudge. White on those two stops
   measures 8.72:1 and 5.67:1.

   It lives in its own file rather than in tokens.css so a product palette does not grow the canonical file
   every time one appears, and so a page opts in with one extra <link>. */
:root[data-theme="zpe"] {
  /* THE UA MUST BE TOLD, or every part it paints itself stays light on a near-black page: a date popup, a
     scrollbar, an autofilled field. Measured 2026-10-29 on this theme: an untyped input reported
     background rgb(255,255,255) against a surface that is rgb(5,5,7), and the popup and scrollbar followed it.
     Costs no token and fixes all three. */
  color-scheme: dark;
  --bg:#050507;
  --sunken:#030304;
  --raised:#0a0a0f;
  --ink:#e0e7ff;
  --ink2:#b6bfe0;
  --muted:#8b93b8;
  --line:#1c1c2a;
  /* THE CONTROL BOUNDARY CLEARS 3:1, and the card rung does not (yet). A border is a UI boundary, not
     decoration, and the floor for it is 3:1: tape moved #333333 -> #606060 (1.57 -> 3.16) for the same
     reason. Measured on this theme 2026-11-05: #2a2a3d read 1.45:1 on --bg and 1.41:1 on --raised, so a
     button separated only by its border read as text with a faint edge. #60607e is 3.37:1 on --bg and
     3.27:1 on --raised, and it keeps the violet cast rather than landing a neutral grey on it.
     `--line` is NOT raised with it: it draws dividers and card edges, and a 3:1 hairline between table
     rows would be a rule, not a divider. A card on this theme still separates at 1.21:1, which is the
     second finding and not this one. */
  --line2:#60607e;

  --accent:#a78bfa;
  --accent-hover:#c4b5fd;
  --accent-ink:#0b0713;
  --accent-soft:#141430;
  --accent-grad:linear-gradient(96deg,#6b21a8,#3b5bdb);
  /* the gradient's own label ink: white, 8.72:1 on the violet stop and 5.67:1 on the blue.
     --accent-ink (#0b0713) stays the ink for the FLAT accent, where it reads 7.32:1. */
  --accent-grad-ink:#ffffff;

  --ok:#6ee7a0;      --ok-soft:#12251a;      --ok-line:#1f4430;
  --warn:#f0b46b;    --warn-soft:#2a1f10;    --warn-line:#4a3618;
  --alert:#f08c8c;   --alert-soft:#2a1416;   --alert-line:#4a2222;

  --scrim:rgba(0,0,0,.62);
  --shadow:0 1px 2px rgba(0,0,0,.4),0 1px 3px rgba(0,0,0,.3);
  --shadow-lg:0 12px 32px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.35);
  --ring:0 0 0 2px var(--bg),0 0 0 4px var(--accent);

  --font-sans:"Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* @contrast --ink on --bg 7
     @contrast --ink on --raised 7
     @contrast --ink2 on --bg 4.5
     @contrast --muted on --bg 4.5
     @contrast --muted on --raised 4.5
     @contrast --accent on --bg 4.5
     @contrast --accent-ink on --accent 4.5
     @contrast --ok on --bg 4.5
     @contrast --warn on --bg 4.5
     @contrast --alert on --bg 4.5
     @contrast --ink on --accent-soft 4.5
    */
}

/* ══ print: the same page as a document ══════════════════════════════════════════════════════════════
   A dark theme prints white-on-white, because a driver drops background graphics by default and the ink
   tokens are near-white. Measured on zpe.vc/answers, 3 November 2026: the print medium kept rgb(224,231,255)
   body text on an unprinted ground, so the sheet arrived blank.

   THE FIX BELONGS IN THE THEME, NOT IN EACH PAGE. The theme owns colour, so print is another mode of it:
   the same roles re-pointed at paper values, once, for every page that opts into this theme. A page-level
   override cannot do this honestly anyway, because the fleet's design check refuses colour literals outside
   the token layer, and this file IS the token layer.

   The roles keep their meaning on paper: --accent stays the one accent (it is ink here, because a violet on
   white at small sizes is a contrast risk), and the alert role stays the risk colour in position, not hue. */
@media print {
  /* DOUBLE :root IS DELIBERATE. The theme's own block is :root[data-theme="zpe"], and this one has to beat it
     whatever a later sheet imports or re-states: measured on zpe.vc/answers, an equal-specificity print block
     in this same file went inert, and the sheet printed dark. One extra pseudo-class settles it without an
     !important, which would outrank a page that legitimately wants its own print rule. */
  :root:root[data-theme="zpe"] {
    color-scheme: light;
    --bg: #ffffff;
    --sunken: #ffffff;
    --raised: #ffffff;
    --ink: #111111;
    --ink2: #333333;
    --muted: #5a5a5a;
    --line: #d4d4d4;
    --line2: #9a9a9a;
    --accent: #111111;
    --accent-hover: #000000;
    --accent-ink: #111111;
    /* paper ink, not the gradient's white: a driver drops background graphics by default, so the mark's
       ground does not print while its glyph does. Read as white, the glyph vanishes on the paper. */
    --accent-grad-ink: #111111;
    --accent-soft: #f2f2f2;
    --alert: #8a2b2b;
    --warn: #6b4b12;
    --ok: #1d4d2b;
    --ring: #111111;
    --shadow: none;
    --shadow-lg: none;
  }
}
