/* The shared look's named values (KAN-107). Every colour, type size, spacing step and corner size is
   defined here, once, and nowhere else: Tailwind's theme (components/ui/look.css) names them for its
   classes, and the pages' own sheets read them with var().
   The colours, typefaces and easing are the visual reference's (designs/AIMate-demo/aimate-aim.html);
   scripts/walks/shared-look.mjs computes the contrast of the pairs the shared pieces draw and fails
   if this is no longer the only sheet that defines a value. Usage: components/ui/README.md. */
:root{
  /* Colours, as the reference names them. Do not rename: the pages' sheets read these. */
  --bg:#EEF1F8;
  --card:#FFFFFF;
  --ink:#0B1020;
  --ink-2:#4A5270;
  --line:#D9DEEB;
  --blue:#2A3FD6;
  --blue-deep:#1C2DA8;
  --blue-soft:#E3E8FF;
  --sun:#FFD23F;
  --green:#0F7A4B;
  --green-soft:#DDF5E8;
  --red:#B42318;
  --red-soft:#FDE7E4;


  /* Colours named by their job. */
  --on-blue:#FFFFFF;            /* text on the blue fill */
  --on-ink:#FFFFFF;             /* text on the ink fill */
  --sun-hover:#FFC61A;          /* the sun button, pointed at */
  --sun-pale:#FFF4CC;           /* a pale sun wash behind a notice */
  --edge:var(--ink-2);          /* the edge of a control: 7.69:1 on a card (the reference's --line is 1.35:1) */
  --focus:var(--blue-deep);     /* the focus ring on light backgrounds (the reference's sun ring is 1.28:1 there) */
  --focus-on-blue:var(--sun);   /* the focus ring inside a blue panel */
  /* The picture panel's board (KAN-78, from Teacher home's blackboard): ink board, sun frame, chalk. */
  --chalk:#FFFFFF;              /* the chalk heading: 19.6:1 on the board */
  --chalk-soft:#D3D4D7;         /* the chalk drawing: Teacher home's white at .82 on the ink */
  --board-glow:rgba(255,255,255,.07);
  --board-glow-2:rgba(255,255,255,.05);
  /* The site footer on the ink (moved from demo.css and public.css, KAN-167). */
  --foot-text:#C9CDE0;          /* its running text: 11.98:1 on the ink */
  --foot-strong:#E4E7F5;        /* its links and support line: 15.37:1 on the ink */
  --foot-muted:#A9AECB;         /* its headings, helpline and legal name: 8.66:1 on the ink */
  --foot-rule:rgba(255,255,255,.1);
  --foot-word:rgba(255,255,255,.14);       /* the outlined wordmark */
  --foot-word-sun:rgba(255,210,63,.55);
  --grid-line:rgba(42,63,214,.05);  /* the grid paper behind the page (the visual reference's look) */

  /* Type. */
  --display:"Bricolage Grotesque",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --body:"Figtree",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --text-1:13px;
  --text-2:14px;
  --text-3:15px;
  --text-4:16px;
  --text-5:17px;
  --text-6:18px;
  --text-7:22px;
  --text-8:28px;
  --h1:clamp(38px,5.2vw,64px);
  --h2:clamp(26px,2.8vw,32px);
  --h3:var(--text-7);
  --cut-big:clamp(44px,7.4vw,104px);   /* cut-paper letters on the closing board, as the visual reference draws them (KAN-172) */
  --h2-big:clamp(30px,3.6vw,46px);   /* a landing section's heading, as the visual reference draws it (KAN-172) */
  /* The hand-written face: the picture panel's chalk only (KAN-78, from Teacher home's board). */
  --hand:"Gochi Hand",var(--display);
  --mono:"JetBrains Mono",ui-monospace,monospace;   /* case numbers and the countdown (KAN-230) */
  --text-chalk:clamp(34px,3.4vw,46px);   /* the chalk heading on the board */

  /* Line heights and letter spacing, as the look already draws them (KAN-167: named so a Tailwind class
     can draw them, leading-label, tracking-kicker; the headings' go with their sizes, text-h1 to h3). */
  --h1-leading:1.0;
  --h2-leading:1.1;
  --leading-heading:1.2;        /* h3, a card's or a tile's title, a chip toggle */
  --leading-label:1.3;          /* a kicker, a section label, a menu row, a small second line */
  --leading-pill:1.4;           /* a state pill */
  --leading-line:1.45;          /* a tile's one plain line */
  --leading-body:1.55;          /* running text */
  --leading-chalk:1.05;         /* the chalk heading on the board */
  --tracking-h1:-.03em;
  --tracking-h2:-.02em;         /* also the logo's name */
  --tracking-h3:-.01em;         /* also a tile's title */
  --tracking-kicker:.08em;
  --tracking-label:.12em;       /* a section label */
  --tracking-chalk:.01em;

  /* Spacing. */
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-7:32px;

  /* Corners. */
  --radius-mark:3px;            /* the small tilted mark of a section label */
  --radius-xs:8px;
  --radius-s:12px;
  --radius-m:14px;
  --radius-ml:18px;             /* a tile and a menu card, as Teacher home draws them */
  --radius-l:22px;
  --radius-pill:999px;
  --radius-board:26px;          /* the picture panel's board, as Teacher home draws it */
  --board-frame:10px;           /* the board's sun frame */

  /* Sizes of controls: all above WCAG 2.2's 24 px target (SC 2.5.8). */
  --control:50px;
  --control-s:44px;
  --field:52px;
  --choice-box:24px;            /* a radio's or a tick box's own box (KAN-78) */

  /* Shadows, as Teacher home draws them. */
  --shadow-lift:0 18px 34px -22px rgba(42,63,214,.55);   /* a tile, pointed at */
  --shadow-pop:0 24px 50px -22px rgba(5,10,40,.45);      /* a menu card over the page */
  --shadow-mark:0 2px 0 rgba(11,16,32,.22);              /* under a section label's mark */
  --shadow-board:inset 0 0 0 2px rgba(11,16,32,.35),0 24px 40px -28px rgba(11,16,32,.6);  /* the picture panel's board */
  --shadow-ledge:inset 0 3px 0 rgba(11,16,32,.22);       /* the board's ledge */

  --max:1480px;
  /* Column widths the screens use by name (KAN-167): the sign-in form's column, the first run's
     column, Student home's page cap (its 880 px main column + 24 px gap + 360 px side). */
  --width-form:400px;
  --width-steps:680px;
  --width-home:1264px;
  --width-side:360px;           /* Student home's side column, beside the main one from 1101 px */
  --width-hero:880px;           /* the greeting and Aim's box, as Teacher home's first window is (KAN-77) */
  --greeting:clamp(34px,4.4vw,56px);  /* the greeting line, as Teacher home draws it */
  --greeting-leading:1.02;
  --width-rail:84px;            /* the side rail, as Teacher home draws it (KAN-77); its folded width, icons only */
  --width-rail-folded:62px;
  --ease:cubic-bezier(.22,1,.36,1);
}

/* WCAG 2.2 AA Dark Mode tokens (D43, D330: applied via server-read validated cookie on <html data-theme>
   or system prefers-color-scheme when Auto, with zero inline scripts). */
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0D111A;
  --card:#151B28;
  --ink:#F1F4FC;
  --ink-2:#B8C0D9;
  --line:#2B344A;
  --blue:#6F86FF;
  --blue-deep:#A5B4FC;
  --blue-soft:#1D2745;
  --sun:#FFD23F;
  --green:#3CD08B;
  --green-soft:#123326;
  --red:#F87171;
  --red-soft:#3B181A;
  --on-blue:#0B1020;
  --on-ink:#0B1020;
  --sun-hover:#FFE066;
  --sun-pale:#332A12;
  --edge:#7B86A6;
  --focus:#A5B4FC;
  --grid-line:rgba(165,180,252,.07);
}
@media (prefers-color-scheme:dark){
  :root[data-theme="auto"],:root:not([data-theme]){
    color-scheme:dark;
    --bg:#0D111A;
    --card:#151B28;
    --ink:#F1F4FC;
    --ink-2:#B8C0D9;
    --line:#2B344A;
    --blue:#6F86FF;
    --blue-deep:#A5B4FC;
    --blue-soft:#1D2745;
    --sun:#FFD23F;
    --green:#3CD08B;
    --green-soft:#123326;
    --red:#F87171;
    --red-soft:#3B181A;
    --on-blue:#0B1020;
    --on-ink:#0B1020;
    --sun-hover:#FFE066;
    --sun-pale:#332A12;
    --edge:#7B86A6;
    --focus:#A5B4FC;
    --grid-line:rgba(165,180,252,.07);
  }
}
