/* ============================================================================
   ONE PALETTE, TWO APPS.

   The customer app was re-skinned onto a warm ground and the operator console
   was not. They had been drifting ever since: the customer's ground was
   #0A0908 warm, the operator's was #080B14 blue-navy, and the operator's
   light variant was #FFFFFF against a customer app that has no white anywhere.
   The readiness plan recorded U4 ("both apps share one design system") as
   closed the whole time, because nothing checked it.

   So the tokens live here, once, and both stylesheets consume them. Two files
   defining the same palette is the mechanism that produced the drift; deleting
   the second copy is the only fix that stays fixed.

   The operator's OWN names (--bg, --ok, --warn, --bad, --gold-2) are mapped
   here rather than renamed across 60 downstream rules. A rename would be a
   large diff that changes nothing a user can see, and this file is meant to
   change what they see.

   Every text/surface pair below is measured against WCAG AA by
   tests/test_surfaces.py, which resolves the cascade rather than reading the
   first block it finds -- the defect that let a loss colour ship at 3.71:1
   while the plan recorded it as fixed.
   ========================================================================= */

:root {
  /* The fixed top nav's height. Anything that sticks below it reads this
     rather than repeating 56px, so the two cannot drift apart -- which they
     did once, and the sticky bar spent a release hidden behind the nav. */
  --topnav-h: 56px;

  /* --- Type ------------------------------------------------------------- */
  --font-display: "Playfair Display", "IBM Plex Sans Arabic", Georgia, serif;
  --font-body: "Inter Tight", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-numeric: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- The warm ground, four steps -------------------------------------- */
  --s0: #0A0908;
  --s1: #121110;
  --s2: #1A1817;
  --s3: #242120;
  /* The operator stylesheet's name for the page ground. */
  --bg: #0A0908;

  --line: rgba(232, 224, 208, 0.10);
  --line-strong: rgba(232, 224, 208, 0.18);

  /* --- Ink -------------------------------------------------------------- */
  --ink-1: #F2EDE4;
  --ink-2: #A39C90;
  /* Raised twice: #6E675D read 2.86:1 on --s3, and #8C857A still read 4.38.
     This is the smallest step that clears AA on all four surfaces (4.54 worst).
     G6 in the readiness plan is closed by this line. */
  --ink-3: #8E887D;

  /* --- The one accent, with one job ------------------------------------- */
  --gold: #C9A227;
  --gold-2: #E3C77A;
  --gold-text: #E3C77A;
  --gold-ink: #0A0908;
  --focus: #C9A227;

  /* --- Semantic --------------------------------------------------------- */
  --up: #5E9E7A;
  --down: #BD756D;
  --flag: #C9A227;
  /* Operator names for the same three. A status light and a trade direction
     are the same colour on purpose: green means fine, red means look at it. */
  --ok: #5E9E7A;
  --bad: #BD756D;
  --warn: #D4A93F;
  --money: #E3C77A;

  /* --- Scales ----------------------------------------------------------- */
  --text-2xs: 0.694rem; --text-xs: 0.833rem; --text-sm: 0.9rem;
  --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --radius: 12px;
  --control-h: 40px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.36);
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}
