/* U Mobile Intelligence Console - design tokens.
   Dark surface, U Mobile orange chrome. Accent sampled from u.com.my (#FF7300). */
:root {
  /* Surfaces */
  --bg: #0A0A0A;
  --bg-sunk: #070707;
  --bg-card: #131314;
  --bg-elevated: #1A1A1C;
  --bg-hover: #202023;

  /* Borders */
  --border: #262629;
  --border-light: #34343a;
  --border-strong: #45454d;

  /* Text */
  --text: #FAFAFA;
  --text-secondary: #A6A6AE;
  --text-tertiary: #6E6E78;
  --text-dim: #4A4A52;

  /* Brand accent - U Mobile orange, from their own stylesheet.
     Contrast on --bg-card is 6.90:1, so unlike the Senheng red this is safe
     for body-size text as well as chrome.
     BUT white-on-accent is only 2.73:1 - never put white text on an orange
     fill. Solid orange buttons use --on-accent (near-black, 7.70:1). */
  --accent: #FF7300;
  --accent-hover: #FF8C2E;
  --accent-press: #E56600;
  --accent-dim: rgba(255, 115, 0, 0.15);
  --accent-line: rgba(255, 115, 0, 0.45);
  --accent-tint: #FFD4B3;
  --on-accent: #0A0A0A;

  /* Status - reserved. Never reused as a series colour, and always shipped
     with a text label so meaning is never carried by colour alone. */
  --success: #22C55E;
  --success-dim: rgba(34, 197, 94, 0.14);
  --warning: #F59E0B;
  --warning-dim: rgba(245, 158, 11, 0.14);
  --danger: #FF5A5A;
  --danger-dim: rgba(255, 90, 90, 0.14);
  --info: #38BDF8;
  --info-dim: rgba(56, 189, 248, 0.14);

  /* Provenance badges - every module declares where its numbers come from.
     Observed = we measured it. Official = published by MCMC/DOSM.
     Simulated = fabricated for the demonstration. */
  --prov-observed: #22C55E;
  --prov-official: #38BDF8;
  --prov-simulated: #A78BFA;

  /* Categorical data-viz palette - FIXED ORDER, NEVER CYCLED.
     Validated with the dataviz validator against this dark surface (#131314),
     all-pairs mode. Results:
       3 slots (c-self, c1, c2)        -> ALL CHECKS PASS
       4 slots (+ c3)                  -> PASS with deutan dE 6.8 on c3/c2,
                                          which is legal ONLY with secondary
                                          encoding, so 4-series charts MUST
                                          carry direct labels.
     Five telco brands cannot be separated by hue alone: under deuteranopia the
     hue axis collapses toward blue-yellow and every candidate 5-set failed. So
     any chart with 5+ series uses the highlight-one pattern instead - U Mobile
     in --c-self at full weight, everyone else in --c-context with a direct end
     label. There, identity is carried by the label, not the colour, which is
     why --c-context is deliberately near-grey and is NOT a categorical slot. */
  --c-self: #E56600;  /* U Mobile on charts - a step darker than the brand
                         orange so it sits inside the lightness band */
  --c1: #3987e5;      /* blue  */
  --c2: #199e70;      /* aqua  */
  --c3: #B0679E;      /* mauve - 4th slot, direct label required */
  --c-context: #7C8794; /* non-identity context series (highlight-one charts) */
  --c-other: #6E6E78;   /* the "Other" bucket */

  /* ---- Operator brand colours ----
     Used where a mark is directly labelled and spatially separated: ranked
     bars, table swatches, map pins, and the three-player merged share view.
     NOT used for overlapping lines in the ten-year series - that stays on the
     highlight-one pattern, because five brand hues cannot be told apart under
     deuteranopia at any lightness.

     Validated all-pairs on this surface: normal-vision separation is strong
     (worst pair dE 25.8), and CVD lands at dE 7.9 deutan for green-vs-orange,
     which is inside the 6-8 floor band and therefore legal only because every
     mark carries a direct label.

     One deliberate exception: Digi yellow sits at L 0.875, well above the
     0.48-0.67 band, so it draws more attention than a balanced series should.
     Brand fidelity was the explicit requirement and darkening it far enough to
     enter the band turns it olive and collides it with the U Mobile orange
     (dE 13.1). Kept true, and kept off large fills. */
  --op-umobile:    #FF7300;  /* U Mobile orange, from u.com.my */
  --op-maxis:      #00A551;  /* Maxis green */
  --op-celcomdigi: #FFD100;  /* Digi yellow - the stronger of the two CelcomDigi colours */
  --op-celcom:     #2B6CB0;  /* Celcom blue, for the pre-merger legacy series */
  --op-digi:       #FFD100;  /* Digi yellow, legacy series */
  --op-unifi:      #00A3A1;  /* teal - not brand-derived, a validated slot */
  --op-yes:        #9085e9;  /* violet - not brand-derived, a validated slot */
  --op-independent:#6E6E78;

  /* Chart chrome */
  --grid: #2c2c2a;
  --axis: #383835;
  --ink-muted: #898781;

  /* Typography */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Spacing scale */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 24px;
  --sp-xl: 32px; --sp-2xl: 48px; --sp-3xl: 64px;

  /* Radius */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.55);

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --content-max: 1440px;
}
