/* SolutionTee Edu Academy — design tokens
   =========================================================================
   Two complete themes, one set of names.

   LIGHT is the default and the face of the brand: a cool off-white
   canvas, white panels lifted on navy-tinted shadows, navy ink, gold for
   the one thing that matters on each screen.

   DARK is a complete sibling reached by the toggle — not an inversion.
   There the canvas becomes a night sky and brand navy #0B1F44 stops
   being ink and becomes a *lifted surface*, the colour a panel takes
   when it rises off a deeper void. Elevation stops being a shadow
   (invisible on black) and becomes three things stacked: a lighter
   surface, a highlight on its top edge, and sometimes a coloured glow.

   Neither theme is a filter applied to the other. Every token is
   declared twice and every pair was measured against the grounds it can
   actually land on.

   Two layers, in order:

     1. RAMPS      raw colour, named by hue and step. Never used directly
                   by a component.
     2. SEMANTIC   what a thing IS — canvas, ink, glass, edge, glow. This
                   is the layer components read.

   There was a third: a block of legacy --color-* aliases pointing the
   pre-rebuild names at the new palette, so an untouched page inherited
   the new look and the site was never half-broken while it was rebuilt
   page by page. components.css and pages.css have both gone now, every
   consumer reads the semantic names directly, and the alias block went
   with them. If a --color-* name turns up again, it is a mistake rather
   than a compatibility measure.

   The theme is chosen by the toggle and remembered, never inferred from
   prefers-color-scheme. A visitor who has expressed no preference gets
   light, which is the brand's default, rather than whatever their
   operating system happens to be set to that week.
   ====================================================================== */


/* ==========================================================================
   FONTS

   ONE FAMILY, EVERY WEIGHT. Plus Jakarta Sans carries display and text
   alike: open apertures and a large x-height keep it legible in a dense
   admin table at 13px, and it has enough geometry in the caps to hold a
   hero headline at 90px.

   WHY ONE VARIABLE FILE AND NOT SIX STATIC ONES. The previous pairing
   shipped two weights per family — Inter 400/600, Space Grotesk 500/700 —
   while the stylesheets asked for four (400/500/600/700) in over three
   hundred places. CSS font matching does not fail loudly when a weight is
   missing; it silently substitutes the nearest one. Measured in the
   browser, Inter 500 rendered identically to 400 and Inter 700 rendered
   identically to 600, so every one of the 177 `--weight-bold` rules was
   drawing semibold. The hierarchy the CSS described did not exist on the
   screen, and nothing in the build could have told us.

   A variable font has no gaps to fall into. 200–800 is a continuous axis,
   so each token now resolves to the weight it names.

   IT IS ALSO SMALLER: 47KB for both subsets against 67KB for the four
   static files it replaces, which matters more here than it would
   elsewhere — a candidate in Lagos is on a metered mobile connection.

   TWO SUBSETS, SPLIT BY unicode-range. The latin file is 26KB and covers
   everything most pages set. The 21KB latin-ext file is fetched ONLY if a
   page actually uses a character from it — but it is not optional here,
   because the naira sign (₦, U+20A6) lives in that range and this site
   quotes prices on nearly every page.

   Self-hosted woff2. The CSP allows font-src 'self' only, a font CDN is a
   third party watching every visitor, and the licence (SIL OFL, see
   OFL-PlusJakartaSans.txt) permits it.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable.woff2") format("woff2-variations"),
       url("../fonts/PlusJakartaSans-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                 U+FFFD;
}

/* Latin Extended. Carries ₦ (U+20A6) — without this the naira sign falls
   back to a system font mid-word and the price changes shape. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable-ext.woff2") format("woff2-variations"),
       url("../fonts/PlusJakartaSans-Variable-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   1 — RAMPS
   ========================================================================== */

:root {

  /* ---- Space: the ground the whole site sits on --------------------------
     Cooled toward blue rather than neutral grey, so the canvas belongs to
     the same family as the brand navy sitting on top of it. A neutral
     #0A0A0A ground under a navy panel reads as two unrelated materials. */
  --space-950: #04070E;   /* deepest — behind glass, inside wells        */
  --space-900: #060B16;   /* canvas                                      */
  --space-850: #08101F;   /* alternating section band                    */
  --space-800: #0B1F44;   /* BRAND PRIMARY — a lifted surface here       */
  --space-700: #102A56;   /* raised panel on the navy band               */
  --space-600: #16386F;   /* hairline on navy, hover ground              */

  /* ---- Blue: interaction ------------------------------------------------
     #2563B3 is the brand secondary and it is too dark to be read as text
     on the canvas (2.6:1). On dark grounds interaction lifts to -400 and
     -300; -600 survives as a fill behind white text. */
  --blue-800: #12376B;
  --blue-700: #1A4A8C;
  --blue-600: #2563B3;    /* BRAND SECONDARY                             */
  --blue-500: #3B7FD4;
  --blue-400: #5E9BE8;    /* interactive ink on dark                     */
  --blue-300: #8FBDF5;    /* hover, focus, links                         */
  --blue-200: #C2DBFB;

  /* ---- Gold: energy -----------------------------------------------------
     The accent does the one job navy and blue cannot: it says *this one*.
     Reserved for the live state, the score, the next action, the node in
     the mark. A gold button everywhere is a gold button nowhere. */
  --gold-800: #6B4908;
  --gold-700: #8A5F0C;    /* gold as TEXT on light                       */
  --gold-600: #C8901F;
  --gold-500: #F2B233;    /* BRAND ACCENT                                */
  --gold-400: #F7C65F;
  --gold-300: #FBDC9C;

  /* ---- Status -----------------------------------------------------------
     Chosen to sit on the dark canvas first and the light sheet second,
     because dark is where they mostly appear. */
  --mint-500: #2FD39A;
  --mint-700: #0F7A55;
  --rose-500: #FF6B7A;
  --rose-700: #B02430;
  --sky-500:  #47C2F5;
  --sky-700:  #0B6C96;


  /* ========================================================================
     2 — SEMANTIC  (light is the default)
     ========================================================================
     Light is the face of the brand. Dark is a complete sibling reached by
     the toggle, and every token below is redefined for it further down.

     The canvas is NOT white. #F8FAFD is a cool off-white, about two
     percent down from paper, and that two percent is what lets a white
     panel sit on it and read as raised. On pure white a white card can
     only be found by its border, which is why sites that use #FFF as the
     page end up drawing boxes around everything.
     ======================================================================== */

  color-scheme: light;

  /* ---- Canvas and surfaces ---------------------------------------------- */
  --canvas: #F8FAFD;
  --canvas-alt: #FFFFFF;
  --canvas-deep: #EEF2F9;
  --band: var(--space-800);          /* full-bleed navy section            */

  /* Glass here is tinted NAVY, not white: a translucent white panel on a
     near-white page is invisible. Same idea as the dark theme — the panel
     picks up the ground it sits on — inverted. */
  --glass-1: rgba(11, 31, 68, 0.030);
  --glass-2: rgba(11, 31, 68, 0.055);
  --glass-3: rgba(11, 31, 68, 0.080);
  --glass-4: rgba(11, 31, 68, 0.12);

  --panel: #FFFFFF;
  --panel-raised: #FFFFFF;
  --panel-sunken: #EEF2F9;

  /* ---- Edges -------------------------------------------------------------
     Navy at low alpha rather than grey. A grey hairline beside navy type
     reads as a different material; a navy one reads as the same ink,
     quieter. */
  --edge: rgba(11, 31, 68, 0.13);
  --edge-strong: rgba(11, 31, 68, 0.22);
  --edge-bright: rgba(11, 31, 68, 0.34);
  --edge-gold: rgba(200, 144, 31, 0.42);

  /* On a light ground the highlight along a panel's top edge is white,
     and it is what gives a card its lift alongside the shadow. */
  --edge-highlight: rgba(255, 255, 255, 0.9);

  /* The one border token measured to clear 3:1, for anything that tells
     somebody where a control begins. See the dark block for why the
     decorative edges above are deliberately below that. */
  --edge-control: rgba(11, 31, 68, 0.49);

  /* ---- Ink ---------------------------------------------------------------
     Measured on --canvas, --panel, --panel-sunken and on glass over the
     canvas. Every value is the one that passed the audit. */
  --ink: #08142C;          /* worst light ground 15.9:1 */
  --ink-muted: #45577A;    /* worst light ground  6.3:1 */
  --ink-faint: #59698C;    /* worst light ground  4.8:1 — body floor     */
  --ink-ghost: #93A1BC;    /* 2.4:1 — decoration and rules ONLY          */

  --ink-brand: var(--blue-700);
  /* Gold as TEXT drops to the deep step: #F2B233 on white is 1.9:1. It is
     a fill colour here, never a glyph colour. */
  --ink-accent: var(--gold-700);
  --ink-on-accent: #1A1204;
  --ink-on-brand: #FFFFFF;

  /* ---- Interaction ------------------------------------------------------- */
  --action: var(--blue-600);
  --action-hover: var(--blue-700);
  --accent: var(--gold-500);
  --accent-hover: var(--gold-600);

  --focus: var(--blue-600);
  --focus-ring: 2px solid var(--focus);
  --focus-offset: 3px;
  --ring-soft: 0 0 0 4px rgba(37, 99, 179, 0.20);

  --selection-bg: rgba(242, 178, 51, 0.35);
  --selection-ink: #08142C;

  /* ---- Status ------------------------------------------------------------ */
  --success: var(--mint-700);
  --success-bg: rgba(15, 122, 85, 0.09);
  --success-edge: rgba(15, 122, 85, 0.26);
  --warning: var(--gold-700);
  --warning-bg: rgba(242, 178, 51, 0.15);
  --warning-edge: rgba(200, 144, 31, 0.34);
  --danger: var(--rose-700);
  --danger-bg: rgba(176, 36, 48, 0.08);
  --danger-edge: rgba(176, 36, 48, 0.26);
  --info: var(--sky-700);
  --info-bg: rgba(11, 108, 150, 0.08);
  --info-edge: rgba(11, 108, 150, 0.26);

  /* ---- The mark ----------------------------------------------------------
     The amber node is the one part that does not move between themes. */
  --mark-trace: var(--space-800);
  --mark-crossbar: var(--blue-600);
  --mark-node: var(--gold-500);
  --mark-pulse: var(--gold-600);

  /* ---- Grounds -----------------------------------------------------------
     Gradients are GROUNDS — the surface a section sits on — and never
     text. A gradient headline is unreadable at small sizes, breaks in
     forced-colours mode and cannot be selected cleanly.

     THE LIGHT AURORA IS BUILT FROM TINTS, NOT FROM TRANSLUCENT NAVY.
     That distinction is the whole difference between a clean light theme
     and a dirty one. A navy at 11% over an off-white canvas composites
     to a grey-lavender — the eye reads it as a smudge or an unfinished
     gradient, not as light. The first version of this did exactly that
     and the hero came out muddy.

     Solid pale tints (#DCE9FA, #FDF0D9) over a base that BRIGHTENS TO
     WHITE behind the content instead: the page gets lighter where the
     text is, which is where a light theme should be lightest, and the
     colour stays at the edges where it is doing atmosphere rather than
     fighting the type. */
  /* The three drifting lights behind the hero.
     PALE, and barely there. The same orbs that read as a soft glow on a
     night sky read as bruises on a white wash — a saturated #2563B3
     circle at 50% opacity over #FFFFFF is a stain, not atmosphere. The
     light theme takes the top of the ramp and a third of the strength. */
  --orb-blue: var(--blue-200);
  --orb-gold: var(--gold-300);
  --orb-deep: var(--blue-200);
  --orb-opacity: 0.32;

  --aurora:
    radial-gradient(105% 78% at 8% -10%, #DCE9FA 0%,
                                        rgba(248, 250, 253, 0) 58%),
    radial-gradient(70% 55% at 98% -4%, #FDF0D9 0%,
                                        rgba(248, 250, 253, 0) 56%),
    linear-gradient(180deg, #F4F7FC 0%, #FFFFFF 46%, #F8FAFD 100%);

  --aurora-calm:
    radial-gradient(80% 50% at 0% 0%,   #E6EFFB 0%,
                                        rgba(248, 250, 253, 0) 58%),
    radial-gradient(56% 42% at 100% 0%, #FDF4E4 0%,
                                        rgba(248, 250, 253, 0) 56%),
    linear-gradient(180deg, #FAFCFE 0%, #FFFFFF 100%);

  --grad-brand: linear-gradient(135deg, #2563B3 0%, #3B7FD4 52%, #5E9BE8 100%);
  --grad-accent: linear-gradient(135deg, #F2B233 0%, #F7C65F 100%);
  --grad-glass: linear-gradient(160deg,
                  rgba(255, 255, 255, 0.95) 0%,
                  rgba(255, 255, 255, 0.70) 100%);
  /* A rule that fades at both ends instead of stopping dead. */
  --grad-rule: linear-gradient(90deg, transparent, var(--edge-strong), transparent);
  /* The one-pixel light along a panel's top edge. */
  --grad-hairline: linear-gradient(90deg,
                     transparent 0%,
                     var(--edge-highlight) 22%,
                     var(--edge-highlight) 78%,
                     transparent 100%);

  /* ---- Depth -------------------------------------------------------------
     Shadows are tinted NAVY, never neutral black. A black shadow on a
     cool off-white page turns grey and dirty; the same shadow in the
     page's own hue reads as depth. Three steps, all soft and wide: a
     tight dark shadow is a 2010 drop-shadow, and the difference is
     almost entirely in the blur radius.

     Two glows carry meaning rather than decoration: --glow-gold marks
     live or urgent state, --glow-blue marks the thing the page wants you
     to press. */
  --shadow-1: 0 1px 2px rgba(11, 31, 68, 0.05),
              0 2px 6px rgba(11, 31, 68, 0.05);
  --shadow-2: 0 2px 6px rgba(11, 31, 68, 0.05),
              0 14px 32px rgba(11, 31, 68, 0.09);
  --shadow-3: 0 4px 12px rgba(11, 31, 68, 0.07),
              0 32px 64px rgba(11, 31, 68, 0.13);

  --glow-gold: 0 0 44px rgba(242, 178, 51, 0.30);
  --glow-blue: 0 0 52px rgba(37, 99, 179, 0.18);
  --glow-inset: inset 0 1px 0 var(--edge-highlight);

  --blur-glass: saturate(130%) blur(16px);
  --blur-heavy: saturate(140%) blur(28px);


  /* ========================================================================
     TYPOGRAPHY
     A fifth-based fluid scale between 360px and 1440px. Body sits at 17px
     on desktop, inside the 16–18px band that long-form reading wants.
     ======================================================================== */

  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system,
                  "Helvetica Neue", Arial, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", "Consolas",
               "Roboto Mono", monospace;

  --step--2: clamp(0.70rem, 0.68rem + 0.09vw, 0.76rem);   /* micro label  */
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.90rem);   /* small body   */
  --step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.0625rem); /* body — 17px  */
  --step-1:  clamp(1.13rem, 1.07rem + 0.30vw, 1.31rem);   /* lede         */
  --step-2:  clamp(1.35rem, 1.22rem + 0.58vw, 1.72rem);   /* h3           */
  --step-3:  clamp(1.62rem, 1.38rem + 1.05vw, 2.28rem);   /* h2           */
  --step-4:  clamp(1.95rem, 1.55rem + 1.80vw, 3.10rem);   /* h1           */
  --step-5:  clamp(2.35rem, 1.65rem + 3.10vw, 4.40rem);   /* display      */
  --step-6:  clamp(2.80rem, 1.60rem + 5.20vw, 6.20rem);   /* hero         */

  --lh-flat: 1.0;
  --lh-tight: 1.05;
  --lh-heading: 1.14;
  --lh-snug: 1.38;
  /* A lede sits between a heading and body copy and needs its own
     leading. --lh-snug is right for two or three lines; at the five a
     real introduction runs to, 1.38 at 21px closes the paragraph into a
     slab and the eye loses its place returning to the left margin. */
  --lh-lede: 1.5;
  --lh-body: 1.65;
  --lh-loose: 1.78;

  /* Plus Jakarta Sans is drawn on a generous rhythm: at text sizes it
     needs no tracking at all, and at display sizes it needs closing up
     or the headline reads as gappy. Labels open right up — spaced small
     caps is the one place tracking should be visible. */
  --tracking-hero: -0.035em;
  --tracking-display: -0.026em;
  --tracking-heading: -0.016em;
  --tracking-body: 0;
  --tracking-label: 0.14em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --measure: 66ch;
  --measure-narrow: 52ch;


  /* ========================================================================
     SPACE · RADII · LAYOUT · MOTION
     ======================================================================== */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 176px;

  --section-y: clamp(var(--space-8), 5.5vw + 1rem, var(--space-10));
  --section-y-tight: clamp(var(--space-7), 3vw + 1rem, var(--space-8));
  --section-y-loose: clamp(var(--space-9), 8vw + 1rem, var(--space-11));

  /* Glass needs real radius. A 2px corner on a translucent panel reads as
     a rendering mistake — the blur has nowhere to turn. */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 16px;
  --r-5: 24px;
  --r-6: 32px;
  --r-pill: 999px;

  --container-max: 1240px;
  --container-wide: 1440px;
  --container-text: 720px;
  --gutter: clamp(20px, 5vw, 56px);
  --grid-gap: clamp(16px, 2.2vw, 32px);

  --rail-w: 264px;          /* dashboard left rail, expanded            */
  --rail-w-collapsed: 76px;
  --topbar-h: 68px;
  --header-h: 72px;

  /* Motion. Anything over 400ms is a transition between two states of the
     page, not a state change inside one. */
  --ease-out: cubic-bezier(0.22, 0.68, 0.32, 1);
  --ease-in-out: cubic-bezier(0.65, 0.02, 0.28, 1);
  --ease-spring: cubic-bezier(0.34, 1.46, 0.48, 1);
  --dur-instant: 90ms;
  --dur-fast: 150ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;
  --dur-page: 680ms;

  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 100;
  --z-header: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-loader: 900;
}


/* ==========================================================================
   LIFTED CONTEXTS
   ==========================================================================
   Put either of these on a section and every descendant gets an ink scale
   measured for the lighter ground underneath it. Nothing inside needs to
   know — the cascade does it.

     .on-band       a full-bleed navy #0B1F44 section
     .section--dark the pre-rebuild name for the same navy band
     .band--closed  the "we are closed" site notice, same navy
     .on-aurora     the hero — DARK THEME ONLY, see below

   .on-band and .section--dark paint navy in BOTH themes, so they always
   take the lifted scale.

   .on-aurora does not, and getting that wrong was the single worst bug
   in this file. The aurora is a NIGHT SKY in the dark theme and a PALE
   BLUE-AND-WHITE WASH in the light one. While dark was the default the
   two were the same thing and the distinction never came up; the moment
   light became the default, every hero rendered #B9C5DC body text —
   near-white — on a near-white ground. The entire landing page read as
   washed out, and it was this rule, not the gradient.

   So .on-aurora is scoped to the dark theme. In light it inherits the
   ordinary ink scale, which is correct because in light it is an
   ordinary light ground.

   No other theme-scoped duplicates are needed: a custom property set on
   the SECTION wins for that section's subtree whatever :root says —
   specificity only decides between rules targeting the same element.

   .section--dark is in this list because leaving it out was a real bug
   and a quiet one. In the DARK theme it looked fine — --ink is already
   light, so navy-on-navy never arose. In the LIGHT theme --ink is
   #08142C, and every heading and paragraph inside that band rendered at
   1.13:1: black text on a navy ground, completely unreadable, on a
   section of the landing page. A ground that is dark in both themes must
   always declare its own ink, and the only reliable way to guarantee
   that is for every selector that paints one to appear here. */
   /* ====================================================================== */

.on-band,
.section--dark,
.band--closed,
:root[data-theme="dark"] .on-aurora {
  --ink: #F2F5FB;          /* worst lifted ground 12.4:1 */
  --ink-muted: #B9C5DC;    /* worst lifted ground  7.8:1 */
  --ink-faint: #95A5C4;    /* worst lifted ground  5.4:1 */
  --ink-ghost: #66759A;

  /* Interaction lifts with it: --blue-400 only just clears on the navy
     band, and on glass over the aurora it does not. -300 clears both. */
  --action: var(--blue-300);
  --action-hover: var(--blue-200);
  --ink-brand: var(--blue-300);

  /* Gold reverts to the BRIGHT step here, in both themes. The light
     theme points --ink-accent at --gold-700 because #F2B233 on white is
     1.9:1 — but this ground is navy, not white, and the deep gold on
     navy measures 2.88:1. On a dark band the bright gold is the legible
     one (7.2:1), and the reason the light theme darkens it does not
     apply. */
  --ink-accent: var(--gold-500);

  --edge: rgba(143, 189, 245, 0.14);
  --edge-strong: rgba(143, 189, 245, 0.26);
  --edge-control: rgba(143, 189, 245, 0.52);
  --edge-highlight: rgba(255, 255, 255, 0.10);

  --glass-1: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --glass-3: rgba(255, 255, 255, 0.11);

  --focus: var(--gold-500);
  --ring-soft: 0 0 0 4px rgba(242, 178, 51, 0.26);

}


/* ==========================================================================
   LIGHT — a complete sibling, not a fallback
   ==========================================================================
   Reached only by the toggle. Dark is deliberately the default regardless
   of the system setting: the art direction IS the dark canvas, and a
   student who wants light gets it in one press and keeps it.

   Everything that was translucent white over black becomes translucent
   navy over white, so panels still pick up the ground they sit on rather
   than punching through it. Gold drops to --gold-700 as text (#F2B233 on
   white is 1.9:1 — a fill colour, not a glyph colour) while fills keep
   the bright step.
   ========================================================================== */

/* ==========================================================================
   DARK — a complete sibling, not a fallback
   ==========================================================================
   Reached only by the toggle, and every token the light theme declares is
   redeclared here. Nothing falls through.

   The canvas is a night sky rather than an inverted sheet of paper, and
   brand navy #0B1F44 stops being ink and becomes a LIFTED SURFACE — the
   colour a panel takes when it rises off a deeper void behind it. That is
   the single move the whole dark theme rests on.

   Elevation here is not a shadow. A shadow on black is invisible. It is
   three things stacked: the surface gets lighter, its top edge catches a
   highlight, and it may cast a coloured glow.
   ========================================================================== */

:root[data-theme="dark"] {
  color-scheme: dark;

  /* ---- Canvas and surfaces ----------------------------------------------
     Elevation on a dark ground is NOT a shadow — a shadow on black is
     invisible. It is three things stacked: the surface gets lighter, its
     top edge catches a highlight, and it may cast a coloured glow. Those
     are the three tokens below, and every raised thing uses all three. */
  --canvas: var(--space-900);
  --canvas-alt: var(--space-850);
  --canvas-deep: var(--space-950);
  --band: var(--space-800);          /* full-bleed navy section            */

  /* Glass. Translucent white over whatever is behind it, so a panel picks
     up the aurora it sits on instead of punching a hole in it. */
  --glass-1: rgba(255, 255, 255, 0.028);
  --glass-2: rgba(255, 255, 255, 0.052);
  --glass-3: rgba(255, 255, 255, 0.085);
  --glass-4: rgba(255, 255, 255, 0.12);

  /* An opaque panel, for anywhere backdrop-filter is unavailable or where
     text density makes translucency a legibility problem (tables, CBT). */
  --panel: #0D1526;
  --panel-raised: #121C31;
  --panel-sunken: #070C17;

  /* ---- Edges ------------------------------------------------------------
     Borders are tinted blue, never grey. A grey hairline on a blue-black
     ground looks like a rendering artefact; a blue one looks like light
     catching an edge. */
  --edge: rgba(143, 189, 245, 0.11);
  --edge-strong: rgba(143, 189, 245, 0.22);
  --edge-bright: rgba(143, 189, 245, 0.38);
  --edge-gold: rgba(242, 178, 51, 0.32);

  /* The three above are DECORATIVE — they separate one surface from
     another and nothing is lost if they go unseen. --edge-control is
     different: it is the border that tells a student where an input
     begins, and WCAG 1.4.11 puts a 3:1 floor on it. Measured at 3.0:1 on
     the canvas, the panel, and on glass over the navy band. Use it on
     every field, checkbox, radio and outline button. */
  --edge-control: rgba(143, 189, 245, 0.52);

  /* The highlight along the top of a raised panel — one pixel of white at
     7%, which is the entire difference between "a box" and "a surface". */
  --edge-highlight: rgba(255, 255, 255, 0.07);

  /* ---- Ink --------------------------------------------------------------
     Ink is CONTEXT-SCOPED, and that is the one structural idea here worth
     explaining. A single --ink-faint that clears 4.5:1 both on the
     near-black canvas AND on glass sitting over the aurora has to climb
     so far it lands on top of --ink-muted, and a three-step scale stops
     being three steps. So the values below are measured against the base
     grounds only (canvas, panel, glass-on-canvas), and any section that
     puts a lighter ground under its text — .on-band, .on-aurora —
     re-declares the same three tokens at lifted values further down.
     Everything inside inherits them, so contrast is held by the cascade
     rather than by anyone remembering.

     Every value below is the value that passed the audit, not a value
     that looked right. Body clears 4.5:1; large text and UI borders
     clear 3:1. */
  --ink: #E9EEF8;          /* worst base ground 14.6:1 */
  --ink-muted: #9DAAC5;    /* worst base ground  7.3:1 */
  --ink-faint: #7B8AA6;    /* worst base ground  4.9:1 — body-text floor */
  --ink-ghost: #4E5A73;    /* 2.8:1 — decoration and rules ONLY          */

  --ink-brand: var(--blue-300);
  --ink-accent: var(--gold-500);
  --ink-on-accent: #1A1204;   /* near-black on a gold fill               */
  --ink-on-brand: #FFFFFF;    /* white on --blue-600                     */

  /* ---- Interaction ------------------------------------------------------- */
  --action: var(--blue-400);
  --action-hover: var(--blue-300);
  --accent: var(--gold-500);
  --accent-hover: var(--gold-400);

  --focus: var(--gold-500);
  --focus-ring: 2px solid var(--focus);
  --focus-offset: 3px;
  --ring-soft: 0 0 0 4px rgba(242, 178, 51, 0.22);

  --selection-bg: rgba(94, 155, 232, 0.32);
  --selection-ink: #FFFFFF;

  /* ---- Status ------------------------------------------------------------ */
  --success: var(--mint-500);
  --success-bg: rgba(47, 211, 154, 0.12);
  --success-edge: rgba(47, 211, 154, 0.30);
  --warning: var(--gold-500);
  --warning-bg: rgba(242, 178, 51, 0.12);
  --warning-edge: rgba(242, 178, 51, 0.30);
  --danger: var(--rose-500);
  --danger-bg: rgba(255, 107, 122, 0.12);
  --danger-edge: rgba(255, 107, 122, 0.30);
  --info: var(--sky-500);
  --info-bg: rgba(71, 194, 245, 0.12);
  --info-edge: rgba(71, 194, 245, 0.30);

  /* ---- The mark ----------------------------------------------------------
     The logo inverts with the theme. The amber node is the one thing that
     does not move: it reads on both. */
  --mark-trace: #E9EEF8;
  --mark-crossbar: var(--blue-400);
  --mark-node: var(--gold-500);
  --mark-pulse: var(--gold-400);

  /* ---- Grounds -----------------------------------------------------------
     Gradients are GROUNDS — the surface a section sits on — and never
     text. A gradient headline is unreadable at small sizes, breaks in
     forced-colours mode and cannot be selected cleanly.

     The aurora is three radial washes over the canvas: blue entering
     high-left where the eye starts, gold answering high-right, and a deep
     navy bloom low-centre that stops the fold from going flat. All three
     fade to fully transparent before the text, so no measured contrast
     pair is affected by them. */
     The blue peaks at 28%, not the 40% it started at. 40% looked better
     in isolation and cost the ink scale its third step — glass sitting on
     the hot spot became light enough that no --ink-faint could clear
     4.5:1 there without colliding with --ink-muted. 28% is the most
     aurora the type can afford. */
  /* Full brand strength: these are lights in a dark room, which is the
     case they were designed for. */
  --orb-blue: var(--blue-600);
  --orb-gold: var(--gold-500);
  --orb-deep: #102A56;
  --orb-opacity: 0.5;

  --aurora:
    radial-gradient(90% 62% at 8% -8%,  rgba(37, 99, 179, 0.28) 0%,
                                        rgba(6, 11, 22, 0) 62%),
    radial-gradient(64% 48% at 96% 2%,  rgba(242, 178, 51, 0.15) 0%,
                                        rgba(6, 11, 22, 0) 58%),
    radial-gradient(120% 70% at 50% 118%, rgba(16, 42, 86, 0.55) 0%,
                                        rgba(6, 11, 22, 0) 70%);

  /* A quieter aurora for interior pages, where the hero is not the point. */
  --aurora-calm:
    radial-gradient(80% 48% at 0% 0%,   rgba(37, 99, 179, 0.22) 0%,
                                        rgba(6, 11, 22, 0) 60%),
    radial-gradient(56% 40% at 100% 0%, rgba(242, 178, 51, 0.08) 0%,
                                        rgba(6, 11, 22, 0) 58%);

  --grad-brand: linear-gradient(135deg, #2563B3 0%, #3B7FD4 52%, #5E9BE8 100%);
  --grad-accent: linear-gradient(135deg, #F2B233 0%, #F7C65F 100%);
  --grad-glass: linear-gradient(160deg,
                  rgba(255, 255, 255, 0.075) 0%,
                  rgba(255, 255, 255, 0.022) 100%);
  /* A rule that fades at both ends instead of stopping dead. */
  --grad-rule: linear-gradient(90deg, transparent, var(--edge-strong), transparent);
  /* The one-pixel light along a panel's top edge. */
  --grad-hairline: linear-gradient(90deg,
                     transparent 0%,
                     var(--edge-highlight) 22%,
                     var(--edge-highlight) 78%,
                     transparent 100%);

  /* ---- Depth -------------------------------------------------------------
     Two shadows for lift and two glows for energy. Glows are never
     decorative: --glow-gold marks live or urgent state, --glow-blue marks
     the thing the page wants you to press. */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45),
              0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.40),
              0 18px 48px rgba(0, 0, 0, 0.50);
  --shadow-3: 0 4px 12px rgba(0, 0, 0, 0.45),
              0 40px 90px rgba(0, 0, 0, 0.60);

  --glow-gold: 0 0 60px rgba(242, 178, 51, 0.15);
  --glow-blue: 0 0 70px rgba(37, 99, 179, 0.28);
  --glow-inset: inset 0 1px 0 var(--edge-highlight);

  --blur-glass: saturate(140%) blur(16px);
  --blur-heavy: saturate(160%) blur(28px);
}



/* ==========================================================================
   FORCED COLOURS
   Windows high-contrast mode throws the palette away. Anything that
   carried meaning through colour alone has to carry it another way, and
   glass has to stop being glass.
   ========================================================================== */

@media (forced-colors: active) {
  :root {
    --glass-1: Canvas;
    --glass-2: Canvas;
    --glass-3: Canvas;
    --glass-4: Canvas;
    --edge: CanvasText;
    --edge-strong: CanvasText;
    --blur-glass: none;
    --blur-heavy: none;
    --shadow-1: none;
    --shadow-2: none;
    --shadow-3: none;
    --glow-gold: none;
    --glow-blue: none;
    --aurora: none;
    --aurora-calm: none;
  }
}
