/* Learn2Write design tokens: ONE brand for the site, the portals and the staff app. design.md is the reference.
   Load order in every layout: l2w-tokens.css → (Bootstrap or the site build) → l2w-components.css → the layer's own CSS.
   Never write a raw hex value in product CSS: add or reuse a token here. Light only in v1.
   Contrast (WCAG 2.2 AA, checked): ink on paper 13.4, ink-soft on paper 7.0, white on action 4.9, white on coral-strong 5.4,
   muted on white 5.4, every status text on its tint ≥ 4.7, text-on-ink 13.4, text-on-ink-muted 9.7, coral-on-ink 8.1.
   Text and icons on ink are never blue (owner 2026-10-21): cream, warm muted, or (site only) coral-on-ink. Sky on ink is for
   non-text marks only: focus rings, the current-tab underline, a fill with ink text. */

/* Self-hosted fonts (SIL OFL, wwwroot/fonts/OFL-*.txt): no Google Fonts request. Variable axes: Fraunces opsz+wght, Manrope wght.
   ?v=N: bump it (here AND in the layouts' preload links) when a font URL must bypass browser caches. v=2: browsers had cached
   the 410 Gone these URLs answered before UAT fix R-4, and kept falling back to system fonts. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-latin-opsz-normal.woff2?v=2) format("woff2"); 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; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-latin-ext-opsz-normal.woff2?v=2) format("woff2"); 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; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-latin-opsz-italic.woff2?v=2) format("woff2"); 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; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-latin-ext-opsz-italic.woff2?v=2) format("woff2"); 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; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-wght-normal.woff2?v=2) format("woff2"); 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; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext-wght-normal.woff2?v=2) format("woff2"); 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; }

:root {
    /* ---- Brand ---- */
    --l2w-ink: #0a2d4b;            /* navy ink: text, chrome, the staff bar */
    --l2w-ink-soft: #40586f;       /* secondary text on warm paper */
    --l2w-action: #1374c3;         /* the logo's pen-nib blue: buttons, links, focus, selection */
    --l2w-action-strong: #005fac;  /* hover/pressed; link text on white (6.5:1) */
    --l2w-action-tint: #e4f1fb;
    --l2w-sky: #93d1f2;            /* highlights; focus ring on ink. Never TEXT or icons on ink (blue on blue) */
    --l2w-sky-soft: #d8effd;
    --l2w-sky-rule: #2f86c0;       /* sky rules on light surfaces (3.8:1 paper, 3.3:1 sky-soft: visible structure, ≥ 3:1) */
    --l2w-coral: #d36244;         /* MARKETING ONLY: decorative accents on the site */
    --l2w-coral-strong: #b3492c;   /* coral buttons with white text (5.4:1) — site CTAs only */
    --l2w-coral-stronger: #9c3e25; /* hover */
    --l2w-coral-on-ink: #f6b59b;   /* MARKETING ONLY: warm accent TEXT and icons on ink (8.1:1 on ink; 6.0:1 on the hero shade over white) */
    --l2w-on-action: #ffffff;      /* text/icons on action, coral, success fills */

    /* ---- Surfaces ---- */
    --l2w-paper: #fcf9f3;          /* warm reading surface: site, families, learners */
    --l2w-paper-deep: #f3efe5;
    --l2w-paper-cool: #f6f8fa;     /* staff tool surface */
    --l2w-surface: #ffffff;        /* cards, tables, fields */
    --l2w-surface-sunken: #eef1f4;
    --l2w-border: #d7dfe7;         /* structure: cards, tables, dividers */
    --l2w-border-strong: #aab6c3;  /* field outlines */
    --l2w-text: var(--l2w-ink);
    --l2w-text-muted: #5b6b7f;     /* 5.4:1 on white */
    --l2w-text-on-ink: #fcf9f3;
    --l2w-text-on-ink-muted: #ddd5c8; /* warm, not blue-grey: secondary text on ink (9.7:1) */

    /* ---- Feedback ---- */
    --l2w-success: #1e7a46; --l2w-success-tint: #e8f5ec;
    --l2w-warning: #8a4f00; --l2w-warning-tint: #fdf3e1;
    --l2w-danger: #b42318;  --l2w-danger-tint: #fdecea;
    --l2w-info: #1261a8;    --l2w-info-tint: #e4f1fb;

    /* ---- Paper journey (one colour per state, everywhere: families, teachers, staff) ---- */
    --l2w-status-sent: #4a5a6c;      --l2w-status-sent-tint: #eef1f4;
    --l2w-status-received: #1261a8;  --l2w-status-received-tint: #e4f1fb;
    --l2w-status-assigned: #6941c6;  --l2w-status-assigned-tint: #f1ecfb;
    --l2w-status-marking: #8a4f00;   --l2w-status-marking-tint: #fdf3e1;
    --l2w-status-ready: #1e7a46;     --l2w-status-ready-tint: #e8f5ec;
    --l2w-status-returned: #b42318;  --l2w-status-returned-tint: #fdecea;
    --l2w-status-checking: #0b6e6e;  --l2w-status-checking-tint: #e3f4f4;
    --l2w-status-updating: #9a3412;  --l2w-status-updating-tint: #fdf0e6;

    /* ---- File slots (UX 27 Oct, must-have 2): the previous site's file colours, one per file, in its order. The glyph is white
       on red / blue / green and INK on yellow (white on yellow fails contrast). ---- */
    --l2w-slot-assignment: #b42318;  --l2w-slot-guidance: #1261a8;
    --l2w-slot-example: #f2b53d;     --l2w-slot-example-glyph: var(--l2w-ink);
    --l2w-slot-feedback: #1e7a46;

    /* ---- Illustration: the public site's drawings only (the "How it works" journey animation, site-journey.css).
       Never text, never product UI. A range of skin tones so families see themselves; one warm star. ---- */
    --l2w-illo-skin-1: #f2c9a6;  --l2w-illo-skin-2: #c68b5e;  --l2w-illo-skin-3: #8e5b3c;
    --l2w-illo-hair-1: #3d2b21;  --l2w-illo-hair-2: #1f1b18;
    --l2w-illo-star: #f2b53d;
    --l2w-star: #f2b53d;   /* rating stars, public site and portals alike (public-site review 2 Nov, PS-17) */

    /* ---- Type ---- */
    --l2w-font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --l2w-font-display: "Fraunces", ui-serif, Georgia, serif;
    --l2w-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    /* Staff text editors whose metrics are pinned (the annotation editor chrome, the rich-text feedback boxes): the
       pre-redesign face, kept so line counts and box sizes never move. Not for new UI. */
    --l2w-font-editor: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Scale (px): 12 · 13 · 14 · 15 · 16 · 17 · 20 · 24 · 30 · 40. 12 is for captions only: nothing interactive below 13. */
    --l2w-text-12: .75rem;  --l2w-text-13: .8125rem; --l2w-text-14: .875rem; --l2w-text-15: .9375rem; --l2w-text-16: 1rem;
    --l2w-text-17: 1.0625rem; --l2w-text-20: 1.25rem; --l2w-text-24: 1.5rem; --l2w-text-30: 1.875rem; --l2w-text-40: 2.5rem;
    --l2w-leading-tight: 1.25; --l2w-leading-snug: 1.4; --l2w-leading-body: 1.55; --l2w-leading-reading: 1.65;
    --l2w-weight-regular: 400; --l2w-weight-medium: 500; --l2w-weight-semibold: 600; --l2w-weight-bold: 700;

    /* ---- Space: 4 px base; gaps 4 · 8 · 12 · 16 · 24 · 32 · 48 ---- */
    --l2w-space-1: 4px; --l2w-space-2: 8px; --l2w-space-3: 12px; --l2w-space-4: 16px;
    --l2w-space-6: 24px; --l2w-space-8: 32px; --l2w-space-12: 48px;
    --l2w-gutter: 16px;

    /* ---- Shape & elevation ---- */
    --l2w-radius-control: 6px;
    --l2w-radius-card: 10px;
    --l2w-radius-pill: 999px;      /* chips only */
    /* Elevation: THREE levels (staging review 29 Oct, XP-14; design.md §6). 1 border = resting (cards, tables: a border, no shadow);
       2 raised = chrome that stays on screen over scrolling content (the bottom tab bar, the header once scrolled);
       3 floating = menus, tooltips, sheets, dialogs, toasts, the action bar — with a scrim when it is modal. Nothing else. */
    --l2w-elev-border: 1px solid var(--l2w-border);
    --l2w-shadow-raised: 0 1px 2px rgb(10 45 75 / .06), 0 4px 12px -6px rgb(10 45 75 / .14);
    --l2w-shadow-raised-up: 0 -1px 2px rgb(10 45 75 / .05), 0 -4px 12px -6px rgb(10 45 75 / .14); /* the same, cast upwards (bottom bars) */
    --l2w-shadow-float: 0 12px 32px -12px rgb(10 45 75 / .28), 0 2px 6px rgb(10 45 75 / .08); /* menus, tooltips, sheets, dialogs, action bar */
    --l2w-scrim: rgb(10 45 75 / .45);   /* behind a modal: dialogs, drawers, the More sheet, the command palette */

    /* Pill colour roles (XP-07; design.md §3 "Pill roles"): one job per colour. Paper states keep their --l2w-status-* pair. */
    --l2w-pill-neutral-bg: var(--l2w-surface-sunken);  --l2w-pill-neutral-fg: var(--l2w-ink);        /* counts, facts: "8 left", "Year 5" */
    --l2w-pill-new-bg: var(--l2w-action);              --l2w-pill-new-fg: var(--l2w-on-action);      /* unread / new: "1 new" */
    --l2w-pill-info-bg: var(--l2w-info-tint);          --l2w-pill-info-fg: var(--l2w-info);          /* for your information */
    --l2w-pill-good-bg: var(--l2w-success-tint);       --l2w-pill-good-fg: var(--l2w-success);       /* free, active, done */
    --l2w-pill-attention-bg: var(--l2w-warning-tint);  --l2w-pill-attention-fg: var(--l2w-warning);  /* paused, AI override, test */
    --l2w-pill-problem-bg: var(--l2w-danger-tint);     --l2w-pill-problem-fg: var(--l2w-danger);     /* send again, overdue, failed */
    --l2w-focus-ring: 0 0 0 3px rgb(19 116 195 / .35);
    --l2w-focus-outline: 2px solid var(--l2w-action);

    /* ---- Motion: entrances only, ease-out, never on high-frequency tools ---- */
    --l2w-ease-out: cubic-bezier(0, 0, .2, 1);
    --l2w-duration-fast: 120ms;
    --l2w-duration: 200ms;
    --l2w-duration-slow: 240ms;

    /* ---- Layers ---- */
    --l2w-z-header: 1030; --l2w-z-sidebar: 1020; --l2w-z-actionbar: 1040; --l2w-z-menu: 1050; --l2w-z-dialog: 1070; --l2w-z-toast: 1080;
    --l2w-z-tip: 1090;      /* the tooltip when the browser has no popover top layer: above everything */

    /* ---- Chrome sizes (staging review 29 Oct) ---- */
    --l2w-tabbar-h: 0px;    /* the phone tab bar's height incl. the safe area, while it is on screen (l2w-chrome.css); else 0 */
    --l2w-measure: 70ch;    /* XP-11: the longest line of prose or a notice (.l2w-prose); tables and grids keep their width */

    /* ---- Density (Reading by default; see the blocks below) ---- */
    --l2w-body-size: var(--l2w-text-16);
    --l2w-body-leading: var(--l2w-leading-reading);
    --l2w-control-height: 44px;
    --l2w-control-pad-x: 16px;
    --l2w-control-size: var(--l2w-text-16);
    --l2w-row-height: 48px;
    --l2w-card-pad: 24px;
    --l2w-surface-page: var(--l2w-paper);
    /* smallest hit area of a control or stand-alone link (UAT retest R-16): 44 px for families, learners and schools;
       tool density keeps WCAG 2.2's 24 px floor so staff grids stay dense */
    --l2w-target-min: 44px;
}

/* Three densities, one brand. Set data-density on <body>. */
[data-density="reading"] {   /* site, families, learners, sign-in */
    --l2w-body-size: var(--l2w-text-16); --l2w-body-leading: var(--l2w-leading-reading);
    --l2w-control-height: 44px; --l2w-control-pad-x: 16px; --l2w-control-size: var(--l2w-text-16);
    --l2w-row-height: 48px; --l2w-card-pad: 24px; --l2w-surface-page: var(--l2w-paper);
}
[data-density="working"] {   /* teachers, client admins */
    --l2w-body-size: var(--l2w-text-15); --l2w-body-leading: var(--l2w-leading-body);
    --l2w-control-height: 40px; --l2w-control-pad-x: 14px; --l2w-control-size: var(--l2w-text-15);
    --l2w-row-height: 40px; --l2w-card-pad: 20px; --l2w-surface-page: var(--l2w-paper);
}
[data-density="tool"] {      /* staff: admins, supervisors, evaluators, reviewers */
    --l2w-body-size: var(--l2w-text-14); --l2w-body-leading: var(--l2w-leading-body);
    --l2w-control-height: 32px; --l2w-control-pad-x: 12px; --l2w-control-size: var(--l2w-text-14);
    --l2w-row-height: 36px; --l2w-card-pad: 16px; --l2w-surface-page: var(--l2w-paper-cool);
    --l2w-target-min: 24px;
}

@media (prefers-reduced-motion: reduce) {
    :root { --l2w-duration-fast: 0ms; --l2w-duration: 0ms; --l2w-duration-slow: 0ms; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
