/* ============================================================
   SeminaryU × APIIS — RAW TOKEN LAYER
   ============================================================
   `:root` custom properties and the three `[data-depth]` blocks, and
   NOTHING else. No element selectors, no components, no `body`, no
   `-webkit-font-smoothing`. Declarations only.

   Split out of tokens.css on 2026-08-10 (rebrand Lane A). tokens.css was
   never a token-only file — it also ships a BASE section (`body`, `h1..h4`,
   `p`, `a`, `:focus-visible`) and a COMPONENTS section (`.btn`, `.card`,
   `.tag`, `.input`, `.bar`, `.eyebrow`). style.css leaves many of those
   properties unclaimed, so linking tokens.css into base.html handed the
   reviewer screens a layout and type change: `.btn` 40px -> 48px, `h2`
   line-height 36px -> 27.36px, `.rq-card` 220.08px -> 192px, and
   `-webkit-font-smoothing` document-wide. This file is the part base.html
   can safely take.

   WHO LINKS WHAT
     base.html          tokens-raw.css               (+ base-companion.css)
     learner_base.html  tokens-raw.css + tokens.css
     admin_base.html    tokens-raw.css + tokens.css  (+ admin-companion.css)
   tokens-raw.css must come FIRST wherever both are linked — tokens.css's
   component rules read these values.

   THE DEPTH BLOCKS ARE INERT UNDER base.html. It sets no `data-depth`, so
   only `:root` resolves there. That is deliberate: the depth system is the
   learner/marketing voice, and reviewer screens are not in it.

   NAMESPACE NOTE. This file's spacing scale is `--space-1..10`; style.css
   ships a separate `--space-2xs..2xl`. Two intentional layers with zero
   name collisions — verified, do not merge them.
   ============================================================ */

:root{
  /* ---- SeminaryU raw ---- */
  --su-bronze:#8B5421;
  --su-bronze-2:#A66E36;
  --su-bronze-deep:#7C4A1C;
  --su-bronze-soft:#F0E4D3;
  --su-cream:#F4EFE6;       /* marketing ground */
  --su-paper:#F6F2EC;       /* canonical AUTHENTICATED ground */

  /* ---- APIIS raw (from brand guide) ---- */
  --ap-blue:#0082CB;        /* BRAND azure — graphic objects + display text
                               >=24px / >=18.66px bold ONLY. 3.72:1 on paper:
                               never body text, never a fill behind white. */
  --ap-blue-deep:#0568A2;   /* FUNCTIONAL azure — links, buttons, focus, active */
  --ap-green:#7FBC03;       /* brand green / learner motion accent — never text on light */
  --ap-green-deep:#47660A;  /* any green that must carry a glyph (6.02:1 on paper) */
  --ap-navy:#043B5C;        /* structural anchor — chrome, bands, footers */
  --ap-sky:#E6F5FC;         /* tonal info fill (never a page ground) */
  --ap-mint:#EAF7D5;        /* tonal formation fill (never a page ground) */
  --ap-gold:#FFD166;        /* warm emphasis on DARK grounds (8.15:1 on navy) */

  /* ---- APIIS co-brand lock — CONTRACTUAL, partner-owned ----
     Not palette tokens. Only .ap-wm may reference these, and nothing may
     derive a hue from them. They carry NO AA guarantee (3.13:1 and 2.32:1
     on paper): a text-set lock must be >=24px (or >=18.66px bold) or sit on
     a white plate. Never body-size, never on navy, never a link. */
  --apiis-lock-blue:#1B8FCE;
  --apiis-lock-green:#7AB845;

  /* ---- Shared neutrals (warm→cool bridge) ---- */
  --n-0:#FFFFFF;
  --n-50:#FBFAF8;
  --n-100:#F4F2EE;
  --n-150:#ECEAE4;
  --n-200:#E0DDD5;
  --n-300:#CDC8BD;
  --n-500:#6E6A62;
  --n-700:#3A3833;
  --ink:#1B1A17;
  --muted:#5A5650;

  /* ---- Semantic status ---- */
  --ok:#3E6B3A;            /* SeminaryU sage ~ APIIS green family */
  --ok-ap:#5E9300;
  --warn:#B5701C;
  --danger:#9A3B2E;

  /* ---- Typography ---- */
  --serif:"Source Serif 4","Charter","Georgia",serif;   /* warmth / pastoral voice */
  --sans:"Inter",system-ui,-apple-system,sans-serif;    /* shared UI workhorse */
  --mont:"Montserrat",var(--sans);                      /* APIIS institutional headings */
  --pop:"Poppins",var(--sans);                          /* APIIS body / reading */
  --mono:"JetBrains Mono",ui-monospace,monospace;

  /* ---- Radii ---- */
  --r-sm:6px; --r-md:10px; --r-lg:16px; --r-xl:22px; --r-pill:9999px;

  /* ---- Spacing scale (learner-v2 layer; distinct from classic
     style.css --space-{xs..2xl} — two intentional layers, don't merge) ---- */
  --space-1:4px;  --space-2:8px;   --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px;  --space-8:32px; --space-10:40px;

  /* ---- Touch targets (WCAG 2.5.5 / mobile) ---- */
  --touch-min:44px;
  --touch-gap:var(--space-3);

  /* ---- Elevation (navy-tinted: same 3-step scale, same opacities) ---- */
  --shadow-1:0 1px 2px rgba(4,59,92,.05),0 2px 10px rgba(4,59,92,.05);
  --shadow-2:0 4px 12px rgba(4,59,92,.08),0 26px 54px rgba(4,59,92,.12);
  --shadow-3:0 8px 20px rgba(4,59,92,.10),0 40px 80px rgba(4,59,92,.18);

  /* ---- :ROOT LEAD DEFAULTS — BRONZE-ERA LEGACY (BRAND_LEAD_V2 retires) ----
     These are NOT the account/threshold depth values — that block moved to
     azure in Lane A while this default kept painting the retired bronze lead
     (the stale label above is how it survived three merged blocks; RULING-
     2026-08-14 A2). Only base.html resolves these: it sets no data-depth, so
     the depth blocks are inert there. Under BRAND_LEAD_V2 the html.brand-
     lead-v2 override below wins. --accent is GOLD here by user ruling
     2026-08-14 — bronze is the accent at every DEPTH, not at the raw root. */
  --lead:var(--su-bronze);
  --lead-2:var(--su-bronze-2);
  --lead-soft:var(--su-bronze-soft);
  --lead-ink:#fff;
  --accent:var(--ap-gold);
  --bg:var(--n-100);
  --surface:var(--n-0);
  --surface-2:var(--n-50);
  --outline:var(--n-200);
  --outline-strong:var(--n-300);
  --display:var(--serif);     /* hero / page titles */
  --heading:var(--sans);      /* section + card headings */
  --body:var(--sans);
  --focus:var(--lead);
}

/* ===== DEPTH 01 · MARKETING — azure-led, cream, editorial =====
   Rebrand 2026-08-10: lead moves bronze -> azure-deep. Bronze survives as the
   ACCENT (eyebrow rule, warmth), not as the primary. --lead-soft moves to sky
   so tag-lead reads azure-on-sky 5.36:1 — on bronze-soft it was 4.1:1, a fail. */
[data-depth="marketing"]{
  --lead:var(--ap-blue-deep); --lead-2:var(--ap-navy); --lead-soft:var(--ap-sky);
  --accent:var(--su-bronze);
  --bg:var(--su-cream); --surface:#FBF8F3; --surface-2:#EFE9DD;
  --outline:#D7CFC0; --outline-strong:#C2B8A5;
  --display:var(--serif); --heading:var(--serif); --body:var(--sans);
  --focus:var(--ap-blue-deep);
}

/* ===== DEPTH 02 · ACCOUNT — azure-led threshold, warm neutral ===== */
[data-depth="account"]{
  --lead:var(--ap-blue-deep); --lead-2:var(--ap-navy); --lead-soft:var(--ap-sky);
  --accent:var(--su-bronze);
  --bg:var(--su-paper); --surface:#fff; --surface-2:#FBFAF8;
  --outline:#E3DED5; --outline-strong:#CFC8BC;
  --display:var(--serif); --heading:var(--sans); --body:var(--sans);
  --focus:var(--ap-blue-deep);
}

/* ===== DEPTH 03 · CLASSROOM — APIIS blue-led, white, institutional ===== */
[data-depth="classroom"]{
  --lead:var(--ap-blue-deep); --lead-2:var(--ap-navy); --lead-soft:var(--ap-sky);
  --accent:var(--su-bronze);     /* SeminaryU warmth survives as the accent */
  --bg:#F5F7F9; --surface:#fff; --surface-2:#F7FAFC;
  --outline:#E2E8ED; --outline-strong:#CBD5DC;
  --display:var(--mont); --heading:var(--mont); --body:var(--pop);
  --focus:var(--ap-blue-deep);
}

/* ===== BRAND_LEAD_V2 — the azure :root default (RULING-2026-08-14 A2) =====
   base.html sets class="brand-lead-v2" when the flag is on; specificity
   (0,1,1) beats :root regardless of source order, and no other template
   carries the class, so depth-scoped surfaces never meet this block.
   Measured before the flip (capture 2026-08-14): nothing in the base.html
   cascade consumed --lead/--focus, so this retires dead bronze rather than
   repainting live controls. R37 pins it. */
html.brand-lead-v2{
  --lead:var(--ap-blue-deep);
  --lead-2:var(--ap-navy);
  --lead-soft:var(--ap-sky);
  --focus:var(--ap-blue-deep);
}
