/* =================================================================
   The token file. SESSION GB (11 Oct 2026): the Banknote direction
   (Session GA, chosen by the operator 11 Oct) replaces SESSION DA-1's
   values and ER's three palettes. Loaded BEFORE `styles.css`, the only
   file that consumes these; a rule in this file styles nothing.

   THE RULE THAT GOVERNS THIS FILE: every colour declared here has a
   named job, written beside it in a `JOB:` line, and is referenced by
   at least one selector in `styles.css`. A colour without a job is
   deleted — asserted by `session_al/run_checks.py` DA-5 and
   `session_bf/verify_fast.py` check 13.

   Cairo, self-hosted, two subset files of one variable font (200-1000):
   63.2 KiB of the 70 KiB font budget, any weight at no extra byte.
   Measured and sourced in `session_da/font_verdict.json` and
   `session_da/fonts.json`. `font-display: swap`: the numbers are the
   page and must be readable before the font arrives.
   ================================================================= */

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891,
    U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E,
    U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F,
    U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37,
    U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F,
    U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F,
    U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77,
    U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3,
    U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("cairo-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;
}

/* Banknote: the page is a printed note about money. The operator's
   green as a band carrying the name and the date; display type for a
   page's own title; the total the only bold coloured figure. The band,
   the brass and the thread are the three colour jobs the operator's
   choice of Banknote granted on 11 Oct (OUTCOME §2.4 amendment drafted
   in `session_gb/kit/KIT.md`). Every pair: `session_ga/evidence/contrast.json`. */

:root {
  /* JOB: the ground every page is printed on — warm paper, a hue and
     not a grey, the look of a regulator's table rather than a shop. */
  --paper: #faf9f5;

  /* JOB: text, and every rule that has to be seen. Green-black, so the
     band, the thread and the total read as one family. */
  --ink: #17261e;

  /* JOB: ONE job and no other — the total paid (7.74 on the paper,
     7.08 on the tint). `site_config.json` `accent_color` overrides it. */
  --accent: #1a5a3e;

  /* JOB: the site's own name, the wordmark; never a figure, a control
     or a row. Light on the band (redefined below). */
  --brand: #1a5a3e;

  /* JOB: secondary text — dates and counts (5.86 on the paper). */
  --muted: #55655b;

  /* JOB: the boundary of a block. Warm, not green. */
  --rule: #d9d5c8;

  /* JOB: the hairline between rows of one block. */
  --rule-soft: #ebe8de;

  /* JOB: the one tinted surface — the search field, an open detail
     panel, a hovered row. Flat: no shadow, no gradient. */
  --surface: #f2efe6;

  /* JOB: the image slot's ground and nothing else; the photos are
     composited on it (session_fs/treat_photos.py), so it is one value
     in both schemes: on a dark page the slot is a light tile. */
  --photo-ground: #eff2ea;

  /* JOB: the category glyph's ink on the photo ground; one value in
     both schemes, as the ground is. */
  --glyph-ink: #5b6a61;

  /* JOB: the ground of the band — the header and the date line under
     it, the site's own colour as a surface (11.11 with its light ink). */
  --band: #163a2b;

  /* JOB: the reader's own current choice and nothing else — a pressed
     chip, a ticked filter, the current category, the focus ring. Brass,
     6.04 on the paper and as a fill under paper text. */
  --choice: #7a5a14;

  /* JOB: the short bar that opens a section — structure, not a figure.
     The total's hue doing a second job. */
  --thread: #1a5a3e;

  /* JOB: a figure whose read date is older than the page's window. */
  --stale: #7a6a4a;

  /* JOB: a shop that prices a product and publishes no terms we can read. */
  --not-published: #55655b;

  /* JOB: out of stock on the day the price was read. */
  --out-of-stock: #8a5a00;

  /* JOB: the dark day — plans withheld, the ruled sentence in their place. */
  --dark-day: #8a5a00;

  /* JOB: the build-state banners (fixture, not signed off). */
  --notice: #8a5a00;

  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto,
          "Noto Sans", "Noto Sans Arabic", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* One scale, seven sizes on any one page: display at the top, a quiet body under it. */
  --size-display:    2.75rem;   /* a page's own title, 44 px, desktop */
  --size-page-title: 1.5rem;    /* the title under 600 px; h2; a cash price */
  --size-section:    1.25rem;   /* h2 under 600 px; a card's cash figure */
  --size-sub:        1.125rem;  /* h3, a card's name */
  --size-body:       16px;
  --size-small:      .875rem;   /* dates, counts, captions */
  --size-fine:       .8125rem;  /* flags, keys */

  --leading-latin:  1.6;
  --leading-arabic: 1.8;

  --weight-light: 300;          /* a cash price: large and light */
  --weight-body: 400;
  --weight-mid:  600;
  --weight-bold: 700;
  --weight-display: 800;

  --measure: 62ch;
  --radius: 4px;                /* near-square; not a card */

  /* The card's photo slot: one value per breakpoint (the operator's sizes
     under test, 12 Oct): 72 px beside the text under 600 px; 140 px on top
     from 600 px, set in the query after this block. */
  --photo-slot: 72px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
}

/* The band: the same tokens redefined on the two elements that sit on
   it (Session ER's candidate C mechanism), so no selector names a
   colour of its own. */
.site-header, .freshness {
  --paper: #163a2b;
  --ink: #f4f1e8;
  --muted: #b9cdbf;
  --rule: #3b5e4d;
  --rule-soft: #2c4d3d;
  --surface: #21483a;
  --brand: #f4f1e8;
  --choice: #d8c58f;
}

@media (min-width: 600px) { :root { --photo-slot: 140px; } }

/* The dark theme. SESSION GN (14 Oct 2026, the operator's ruling: light
   is the default on every device): the reader's own choice on this site
   decides, never the device. The header's toggle sets `data-theme="dark"`
   on <html> (assets/app.js; the inline script in <head> re-applies a stored
   choice before first paint). Same tokens, same values as the media query
   they replace. `screen` only: a page prints light whatever the choice. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #13140f;
    --ink: #ebe8de;
    --accent: #86c49d;
    --brand: #86c49d;
    --muted: #a7ab9f;
    --rule: #3a3a32;
    --rule-soft: #292922;
    --surface: #1e1f19;
    --band: #0f2a1f;
    --choice: #d8c58f;
    --thread: #86c49d;
    --stale: #cdb98e;
    --not-published: #a7ab9f;
    --out-of-stock: #e3aa52;
    --dark-day: #e3aa52;
    --notice: #e3aa52;
  }
  :root[data-theme="dark"] .site-header, :root[data-theme="dark"] .freshness {
    --paper: #0f2a1f;
    --ink: #eef0ea;
    --muted: #b5cabc;
    --surface: #1a3c2e;
  }
}
