/* tokens.css — registry ① of four (SPEC-ui-framework.md §1).
 *
 * 🔴 EVERY colour, spacing step, radius and font in this application lives
 * here. NO HEX CODE EXISTS ANYWHERE ELSE (ARCHITECTURE.md §8, D-079). A colour
 * literal in a component is invisible until you try to restyle and find it in
 * ninety places.
 *
 * Changing the header colour is one line. That is the standard every other
 * registry is held to.
 *
 * Light and dark are validated INDEPENDENTLY against their own surface. Dark is
 * never an automatic inversion of light — an inverted palette produces text
 * nobody can read on the surfaces that matter.
 *
 * Palette copied verbatim from docs/_reference/ops-mockup.html, which Mason has
 * seen and approved. Do not re-derive it.
 */

:root{
  /* — brand: taken from the actual logo SVG, not from a doc — */
  --brand-orange:#F64409;   /* the mark */
  --brand-ink:#0A0E1A;      /* the wordmark */
  --brand-grey:#6D6E72; --brand-grey-light:#B3B3B5;

  /* — surfaces & ink (light) — */
  --surface:#FCFCFB; --surface-raised:#FFFFFF; --surface-sunken:#F5F7FA;
  --border:#E4E8EE;
  --ink:#111A28; --ink-secondary:#4A5568; --ink-muted:#8B95A7;

  /* — the header. ONE LINE. — */
  --header-bg:var(--brand-ink); --header-ink:#FFFFFF; --header-ink-muted:#9AA0AC;

  /* — chart series. VALIDATED: passes lightness, chroma, CVD, contrast — */
  --series-1:#F64409; --series-2:#1864AB; --series-3:#087F5B; --series-4:#7048E8;

  /* — status. Reserved. Never reused as a series colour. — */
  --good:#087F5B; --warning:#F59F00; --serious:#E8590C; --critical:#C92A2A;

  /* — shape & type — */
  --radius:10px; --radius-sm:6px; --gap:20px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,sans-serif;
  --font-num:ui-monospace,SFMono-Regular,Menlo,monospace;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 4px 12px rgba(16,24,40,.05);

  /* — CLIENT PORTAL surface (3.14) ————————————————————————————————
   *
   * A SECOND palette, not a reskin of the first. The operator's console is
   * dense and cool because an operator is scanning; a client is reading, so
   * their surface is warmer, higher-contrast and calmer. Deriving one from the
   * other would mean every future ops tweak silently restyles a client-facing
   * page (D-019 keeps the two surfaces apart in routes, layouts and components
   * — sharing a palette would reunite them at the one layer nobody diffs).
   *
   * They live HERE rather than in portal.css because D-079 admits no
   * exceptions: every hex code in this application is in this file. */
  --portal-ink:#0f1519; --portal-muted:#5c6b76; --portal-line:#e0d8c8;
  --portal-paper:#faf7f0; --portal-card:#ffffff;
  --portal-band:#1f3550; --portal-band-2:#2a4a6b;
  --portal-good:#207a3c; --portal-good-bg:#e6f2e9;
  --portal-bad:#a02b1c;  --portal-bad-bg:#fbe8e4;
  --portal-warn:#9a6b00; --portal-warn-bg:#fcf1d3;
  --portal-accent:#2a4a6b; --portal-accent-2:#4a7ba6;
  --portal-accent-bg:#e7edf5;
  --portal-admin:#8a4a9c; --portal-admin-bg:#f3e6f8;
  --portal-dow-bg:#f2ede2; --portal-today-bg:#fff8db; --portal-legend-bg:#f7f3e8;
  --portal-body:#333333; --portal-outside:#b6b0a3;

}

[data-theme="dark"]{
  --surface:#0A0E1A; --surface-raised:#141924; --surface-sunken:#0d1220;
  --border:#252C3A;
  --ink:#EDEFF3; --ink-secondary:#AEB4C0; --ink-muted:#6D6E72;
  --header-bg:#05080F; --header-ink:#FFFFFF; --header-ink-muted:#8A8F9A;
  --series-1:#F64409; --series-2:#4C8DFF; --series-3:#0CA678; --series-4:#9775FA;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 12px rgba(0,0,0,.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE CLIENT REPORT DOCUMENT — a second palette, and a deliberate one.

   These are NOT the ops UI's colours and they must never be used there. This
   block exists because `ops:report:generate` produces a SELF-CONTAINED HTML
   document in AgencyAnalytics' visual format — a thing a client opens on its
   own, with no stylesheet of ours attached. It is a different design system
   that happens to be generated by the same codebase.

   🔴 They live here anyway, because the rule is "no hex outside tokens.css"
   and a second file of colours would be exactly the drift that rule exists to
   prevent. `App\Support\Reports\ReportPalette` parses them out at render
   time, so PHP never holds a hex literal either.

   Sampled from AA's own PDFs before the subscription was cancelled — that is
   why several are Google's product palette rather than ours. Changing one
   changes the client's report and nothing else.
   ═══════════════════════════════════════════════════════════════════════════ */
[data-surface="report"] {
  /* direction and text */
  --report-up:#1e8e3e;
  --report-down:#d93025;
  --report-ink:#3c4043;
  --report-muted:#5f6368;
  --report-line:#e0e0e0;
  --report-blue:#1a73e8;
  --report-dim:#a8adb3;
  /* rank buckets — dark green (best) to red (worst), AA's legend order */
  --report-rank-1-3:#2e7d32;
  --report-rank-4-10:#66bb6a;
  --report-rank-11-20:#c5e1a5;
  --report-rank-21-50:#ffca28;
  --report-rank-51-plus:#ef5350;
  /* page furniture */
  --report-page-bg:#eceff1;
  --report-rule-dotted:#c4c7ca;
  --report-row-line:#f2f4f5;
  --report-star:#fbbc04;
  --report-star-dim:#dcdfe2;
  /* tags and pills */
  --report-tag-bg:#e8f0fe;
  --report-tag-ink:#1967d2;
  --report-tag-map-bg:#e6f4ea;
  --report-tag-map-ink:#137333;
  --report-pill-yes:#7cb342;
  --report-pill-no:#e53935;
  /* chart lines */
  --report-prev-line:#c6dafc;
  --report-compare-line:#a2c037;
  --report-calls-a:#9ccc65;
  --report-calls-b:#4fc3f7;
  /* categorical series */
  --report-series-1:#4285f4;
  --report-series-2:#93c47d;
  --report-series-3:#f6b26b;
  --report-series-4:#76d7ea;
  --report-series-5:#b4a7d6;
  --report-series-6:#ffd966;
  --report-series-7:#a4c2f4;
  --report-series-8:#d5a6bd;
  /* donut continuation */
  --report-donut-3:#ffb74d;
  --report-donut-4:#81d4fa;
  --report-donut-5:#ce93d8;
  --report-donut-6:#ffd54f;
  --report-donut-7:#90a4ae;
  --report-donut-8:#bcaaa4;
}
