/* Calculate — the theme layer over Track's tokens (handoff calc.css).
 *
 * The handoff's calc.css names its colours as a standalone app would
 * (--bg, --line, --brand…). Inside Track those already exist under Track's
 * own names, so wherever Track has the value it is REFERENCED here, not
 * copied, and Calculate follows the theme for free. Only what Track has no
 * name for — the AI tint, the stale hatch, the pass/fail inks, the calc
 * yellow — carries a literal, in both themes.
 *
 * Every name is prefixed --cx- so nothing here can shadow a Track token.
 */
:root, [data-theme="light"] {
  --cx-soft: #F5F5F5;
  --cx-line: var(--hair);
  --cx-line2: #ECECEA;
  --cx-muted: #6C6D67;           /* the handoff's accessible small-text grey */
  --cx-brand: var(--link);
  --cx-brand-deep: var(--anchor);
  --cx-brand-tint: #EDF1FB;
  --cx-brand-tint2: #DCE4F8;
  --cx-attn: var(--brand-orange);
  --cx-attn-ink: #C23C00;
  --cx-attn-tint: #FFF1EA;
  --cx-ok: #1F7A4D;
  --cx-ok-tint: #E7F2EC;
  --cx-bad: #C0290A;
  --cx-bad-tint: #FBEBE7;
  --cx-calc: #FFC629;            /* load areas on the plan — a drawing colour, not brand */
  --cx-calc-ink: #7A5A00;
  --cx-calc-tint: #FFF6DB;
  --cx-ai-tint: #F3F4F8;
  --cx-ai-line: #8F93AD;
  --cx-stale: #8A8B85;
  --cx-member: var(--brand-blue);
  --cx-underlay: #9C9D97;
  --cx-shadow: 0 8px 32px rgba(12, 17, 57, 0.12);

  /* Site levels: the cut/fill depth ramp (LevelsEarthworks — diverging, cut
     orange → 0 → fill blue) and the survey level ramp (LevelsSurvey). */
  --cx-cut5: #FF5001; --cx-cut4: #FF7A3D; --cx-cut3: #FFA27A; --cx-cut2: #FFC7AE; --cx-cut1: #FBE3D8;
  --cx-fill0: #F2EFEA;
  --cx-fill1: #DCE3F4; --cx-fill2: #B7C6EC; --cx-fill3: #8EA6E2; --cx-fill4: #5F81D6; --cx-fill5: #2E5BCC;
  --cx-z0: #DCE6F7; --cx-z1: #B3C8EE; --cx-z2: #86A6E2; --cx-z3: #5A82D3; --cx-z4: #3460C0; --cx-z5: #10328B;
  --cx-pipe: #1F44B8;

  /* Calculate App design (15/10/2026) status rules: 0.90–1.00 and WARN are
     AMBER, not the attention orange — the README names them apart. */
  --cx-warn: #8A5B00;
  --cx-warn-bar: #B57700;
  --cx-warn-tint: #F5EEDB;

  --cx-title: 34px;              /* package title */
  --cx-question: 26px;           /* one design-basis question */
  --cx-figure: 40px;             /* stat tiles */
}

[data-theme="dark"] {
  --cx-soft: rgba(255, 255, 255, 0.045);
  --cx-line2: rgba(255, 255, 255, 0.08);
  --cx-muted: #9195AD;
  --cx-brand-tint: #17204F;
  --cx-brand-tint2: #22306A;
  --cx-attn: #FF7A3D;
  --cx-attn-ink: #FF9A6B;
  --cx-attn-tint: #2D1B1A;
  --cx-ok: #4CC38A;
  --cx-ok-tint: #12302A;
  --cx-bad: #FF6B4A;
  --cx-bad-tint: #33161A;
  --cx-calc-ink: #FFD666;
  --cx-calc-tint: #2A2615;
  --cx-ai-tint: #151A42;
  --cx-ai-line: #5A5F87;
  --cx-stale: #7C809A;
  --cx-member: #7D9CF5;
  --cx-underlay: #5D6283;
  --cx-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --cx-cut5: #FF6A2B; --cx-cut4: #D9571F; --cx-cut3: #A84520; --cx-cut2: #74361F; --cx-cut1: #45281F;
  --cx-fill0: #2A2B31;
  --cx-fill1: #23305A; --cx-fill2: #2C4180; --cx-fill3: #3A57A8; --cx-fill4: #5577D0; --cx-fill5: #7D9CF5;
  --cx-z0: #22305E; --cx-z1: #2D4282; --cx-z2: #3B57A6; --cx-z3: #5677CC; --cx-z4: #7D9CF5; --cx-z5: #B3C8FF;
  --cx-pipe: #7D9CF5;
  --cx-warn: #E2B45A;
  --cx-warn-bar: #D9A03A;
  --cx-warn-tint: #332A14;
}
