/* ============================================================================
   Collabor8 Cadence — design tokens
   ----------------------------------------------------------------------------
   ART DIRECTION

   The console is an instrument. It is read, not admired.

   1. DEEP NAVY INK. Every dark carries a blue cast (hue ~220°). Neutral grey
      reads as absence; a blue dark reads as a screen that is switched on.
   2. SOLID COLOUR, NO LIGHT. Nothing glows. No drop-shadow, no text-shadow, no
      box-shadow bloom. Depth comes from surface steps and 1px hairlines; the
      loudest element on a dark page is paper-white, not neon. Glow is what you
      reach for when the palette isn't doing its job.
   3. TWO VOCABULARIES, NO OVERLAP.
        · Blue family — structure and measurement. Azure is the primary, cyan
          marks the thing worth looking at, and they never carry a verdict.
        · Severity ramp — verdicts, and only verdicts. Red, amber, emerald.
      A hue never means two things. Posture arcs are azure regardless of score,
      because an arc already encodes its value in its length.
   4. EMERALD IS RARE. It appears only where a target has been met: engine live,
      badge issued, the badge threshold line. Scarcity is what gives it meaning.

   Badges belong to applications, never to the organization. The org gauge shows
   company-wide posture and carries no badge threshold.

   Legacy aliases (--navy, --paper, …) are kept at the bottom so older inline
   styles keep resolving. The PDF report has its own stylesheet.
   ========================================================================== */

/* ══════════════════════════ DARK (default) ══════════════════════════════ */
:root{
  /* ---- surface ladder: one step, one job ---- */
  --bg:#080D17;            /* page canvas — deep navy ink                */
  --surface:#111A29;       /* card / panel                              */
  --surface-2:#0D1522;     /* sunken areas, table headers               */
  --raised:#182644;        /* hover background, ghost button            */
  --inset:#1B2A44;         /* wells, tracks, input hover, chips         */
  --active:#22334F;        /* pressed background                        */

  /* ---- lines: soft / default / strong ---- */
  --line:#22304A;          /* default hairline — must be visible        */
  --line-soft:#182338;     /* internal divider                          */
  --muted-line:#33456A;    /* hover border, dropzone dash               */

  /* ---- ink ---- */
  --text:#EFF3F9;          /* primary — offset from pure white          */
  --text-2:#BAC6D8;        /* body / secondary                          */
  --muted:#8393AD;         /* labels, captions                          */
  --faint:#5C6B85;         /* disabled, tertiary meta                   */

  /* ---- blue family: structure & measurement. never a verdict. ---- */
  --accent:#3B7DFF;        /* azure — primary                           */
  --accent-hover:#5C93FF;
  --accent-press:#2C6AE6;
  --accent-ink:#FFFFFF;
  --accent-soft:rgba(59,125,255,.14);
  --accent-line:rgba(59,125,255,.38);
  --focus:rgba(59,125,255,.60);
  --accent-2:#22C3E6;      /* cyan — "look here". latest run, live index */
  --accent-2-soft:rgba(34,195,230,.14);

  /* ---- primary action: paper. the brightest thing available on a dark
     screen is white, and it emits nothing. ---- */
  --btn-bg:#F2F6FC; --btn-ink:#080D17;
  --btn-hover:#FFFFFF; --btn-press:#DCE5F2;
  --btn-shadow:none;

  /* ---- severity ramp — verdicts only, solid and saturated ---- */
  --crit:#F04452; --crit-bg:rgba(240,68,82,.12);  --crit-line:rgba(240,68,82,.38);
  --high:#F08A3C; --high-bg:rgba(240,138,60,.11); --high-line:rgba(240,138,60,.34);
  --med:#E3B341;  --med-bg:rgba(227,179,65,.10);  --med-line:rgba(227,179,65,.32);
  --low:#64748B;  --low-bg:rgba(100,116,139,.12); --low-line:rgba(100,116,139,.30);
  --info:#64748B; --info-bg:rgba(100,116,139,.12);

  /* ---- assessment status ramp ---- */
  --pass:#2FBF8F;   --pass-bg:rgba(47,191,143,.12);   --pass-line:rgba(47,191,143,.36);
  --fail:#F04452;   --fail-bg:rgba(240,68,82,.12);    --fail-line:rgba(240,68,82,.38);
  --partial:#E3B341; --partial-bg:rgba(227,179,65,.10);
  --mitigated:#3B7DFF; --mitigated-bg:rgba(59,125,255,.12);
  --insufficient:#22C3E6; --insufficient-bg:rgba(34,195,230,.12);
  --na:#4A5A75; --na-bg:rgba(74,90,117,.16);
  --deferred:#46608C; --deferred-bg:rgba(70,96,140,.14);
  --running:#3B7DFF; --running-bg:rgba(59,125,255,.12); --running-line:rgba(59,125,255,.38);

  /* destructive action. deeper than --crit so white ink stays legible on it. */
  --danger:#C7303D; --danger-hover:#A82733;

  /* ---- data-viz ---- */
  --chart-line:#3B7DFF;
  --chart-line2:#22C3E6;   /* the most recent point/bar */
  --chart-grid:#1A2740;
  --chart-area-1:rgba(59,125,255,.26);
  --chart-area-2:rgba(59,125,255,0);
  --ring-track:#1A2740;
  --dial:#37476A;          /* gauge graticule ticks */

  /* ---- composed surfaces ---- */
  --side-bg:#050912;       /* the rail is the darkest plane on screen   */
  --topbar-bg:rgba(8,13,23,.85);
  --card-bg:#111A29;       /* flat. diagonal gradients lit one corner   */
  --card-highlight:inset 0 1px 0 rgba(255,255,255,.05);
  --field-bg:#0D1522;
  --nav-on-bg:rgba(59,125,255,.14);
  --overlay:0 24px 60px -28px rgba(0,0,0,.92), 0 2px 8px -4px rgba(0,0,0,.7);
  --shadow:0 1px 2px rgba(0,0,0,.5), 0 14px 30px -20px rgba(0,0,0,.8);
  --skeleton:linear-gradient(90deg,#1B2A44 0%,#22334F 50%,#1B2A44 100%);

  /* ---- backdrop: a masked grid, not a radial blob. blobs have edges. ---- */
  --grid-line:rgba(59,125,255,.045);
  --grid-size:40px;

  /* ---- auth radar ---- */
  --grid-major:rgba(59,125,255,.15);
  --grid-minor:rgba(59,125,255,.055);
  --seal-ring:rgba(59,125,255,.11);
  --seal-wash:rgba(59,125,255,.05);
  --sweep:rgba(59,125,255,.10);

  --arc-glow:none;         /* the arc does not emit. it is a length.    */
  --bracket:rgba(59,125,255,.55);   /* reticle corners                  */

  /* ---- radius: 6–12px band. buttons 8, cards 12. ---- */
  --r-xs:4px; --r-sm:6px; --r-md:8px; --r-lg:12px; --r-xl:16px; --r-full:999px;
  --radius:12px; --radius-sm:8px;

  /* ---- type ---- */
  --font:"Inter var","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  /* Numerals are the product. They get their own face. */
  --mono:"JetBrains Mono","Geist Mono","SF Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --t-2xs:10.5px; --t-xs:11.5px; --t-sm:12.5px; --t-base:13.5px;
  --t-md:15px; --t-lg:18px; --t-xl:22px; --t-2xl:27px; --t-3xl:34px; --t-4xl:42px;

  --w-normal:400; --w-medium:500; --w-semi:560; --w-strong:620;
  --track-display:-.028em; --track-heading:-.018em; --track-eyebrow:.14em;

  /* ---- spacing: 4px grid ---- */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px;
  --s-6:24px; --s-8:32px; --s-10:40px; --s-12:48px; --s-16:64px;

  /* ---- motion ---- */
  --ease:cubic-bezier(.16,1,.3,1);
  --ease-soft:cubic-bezier(.4,0,.2,1);
  --ease-inout:cubic-bezier(.65,0,.35,1);
  --dur-1:120ms; --dur-2:180ms; --dur-3:260ms; --dur-4:480ms;
  --theme-swap:200ms;
}

/* ══════════════════════════ LIGHT ═══════════════════════════════════════ */
[data-theme="light"]{
  --bg:#F7F9FC;
  --surface:#FFFFFF;
  --surface-2:#F3F6FA;
  --raised:#EEF3F9;
  --inset:#E8EEF6;
  --active:#DDE6F1;

  --line:#DCE4EE;
  --line-soft:#EAF0F6;
  --muted-line:#B9C6D6;

  --text:#111A28;
  --text-2:#3A4759;
  --muted:#66768C;
  --faint:#8A99AC;

  --accent:#2563EB;
  --accent-hover:#1D4FD8;
  --accent-press:#1A45BE;
  --accent-ink:#FFFFFF;
  --accent-soft:rgba(37,99,235,.09);
  --accent-line:rgba(37,99,235,.30);
  --focus:rgba(37,99,235,.45);
  --accent-2:#0E7C94;
  --accent-2-soft:rgba(14,124,148,.10);

  /* on a light page the ink is the paper's opposite */
  --btn-bg:#111A28; --btn-ink:#FFFFFF;
  --btn-hover:#20304A; --btn-press:#0A1220;
  --btn-shadow:0 1px 2px rgba(17,26,40,.10);

  --crit:#C42736; --crit-bg:#FCECEE; --crit-line:rgba(196,39,54,.28);
  --high:#9A4B10; --high-bg:#FDF1E6; --high-line:rgba(154,75,16,.26);
  --med:#87611A;  --med-bg:#FBF4E3;  --med-line:rgba(135,97,26,.26);
  --low:#5A6B80;  --low-bg:#EEF2F7;  --low-line:rgba(90,107,128,.26);
  --info:#5A6B80; --info-bg:#EEF2F7;

  --pass:#0B7C5C;   --pass-bg:#E6F5EF; --pass-line:rgba(11,124,92,.28);
  --fail:#C42736;   --fail-bg:#FCECEE; --fail-line:rgba(196,39,54,.28);
  --partial:#87611A; --partial-bg:#FBF4E3;
  --mitigated:#2563EB; --mitigated-bg:#E8F0FD;
  --insufficient:#0E7C94; --insufficient-bg:#E3F3F7;
  --na:#8A99AC; --na-bg:#EEF2F7;
  --deferred:#3E5A85; --deferred-bg:#E9EFF7;
  --running:#2563EB; --running-bg:#E8F0FD; --running-line:rgba(37,99,235,.28);

  --danger:#B3121F; --danger-hover:#8F0E19;

  --chart-line:#2563EB;
  --chart-line2:#0E7C94;
  --chart-grid:#E7EDF4;
  --chart-area-1:rgba(37,99,235,.16);
  --chart-area-2:rgba(37,99,235,0);
  --ring-track:#E7EDF4;
  --dial:#B9C6D6;

  --side-bg:#FFFFFF;
  --topbar-bg:rgba(255,255,255,.86);
  --card-bg:#FFFFFF;
  --card-highlight:none;
  --field-bg:#FFFFFF;
  --nav-on-bg:rgba(37,99,235,.09);
  --overlay:0 12px 32px -12px rgba(17,26,40,.18), 0 2px 6px -2px rgba(17,26,40,.08);
  --shadow:0 1px 2px rgba(17,26,40,.05), 0 1px 3px rgba(17,26,40,.04);
  --skeleton:linear-gradient(90deg,#E8EEF6 0%,#F3F6FA 50%,#E8EEF6 100%);

  --grid-line:rgba(37,99,235,.05);
  --grid-major:rgba(37,99,235,.13);
  --grid-minor:rgba(37,99,235,.05);
  --seal-ring:rgba(37,99,235,.09);
  --seal-wash:rgba(37,99,235,.04);
  --sweep:rgba(37,99,235,.07);

  --arc-glow:none;
  --bracket:rgba(37,99,235,.55);
}

/* ══════════════════════════ legacy aliases ══════════════════════════════ */
:root,[data-theme="light"]{
  --navy:var(--accent); --slate:var(--text); --grey:var(--muted);
  --paper:var(--surface); --canvas:var(--bg); --card:var(--surface);
  --green:var(--pass); --green-bg:var(--pass-bg);
  --amber:var(--med);   --amber-bg:var(--med-bg);
  --red:var(--crit);    --red-bg:var(--crit-bg);
  --brand-a:var(--accent); --brand-b:var(--accent-2);
  --btn-grad:var(--btn-bg);
  --glow-shadow:none; --glow-1:transparent; --glow-2:transparent;
  --card-top:transparent;
  --wash-1:transparent; --wash-2:transparent;   /* radial blobs, retired */
}
