/* Hetu design tokens: the single source for colour, type, space, radius and shadow.
   Palette (30 October, owner): "Neel", indigo on sandstone (docs/THEME_RESEARCH.md). Warm sandstone page, near-white paper, indigo on every key action, brass only for small signals and the wordmark dot. The 17 October navy scheme stays in palettes.json as "Chambers" (navy-brass).
   Type (17 October): Newsreader for every serif use, Inter for the interface; one size per role (the --fs-* roles below). Scale 12/14/16/18/20/24/36/48.
   Schemes (assets/palettes.json, Account > Appearance) override the colour tokens only. 11 October. */
:root{
  /* surfaces, light to dark */
  --paper:#fffdf9;        /* reading surface, inputs, cards */
  --surface:#faf6ef;      /* quiet fill on paper (hover, code, rows) */
  --canvas:#f4efe6;       /* page background */
  --fill:#ece5d8;         /* hover/pressed on canvas */
  /* lines */
  --line-soft:#ece6db;
  --line:#e2d9ca;
  --line-strong:#cdbfa8;
  /* text */
  --ink:#1d1b2e;          /* primary text, solid buttons */
  --muted:#4f4a5e;        /* secondary text, metadata */
  --subtle:#6b6577;       /* placeholders and hints; 4.9:1 on canvas */
  /* accent: one colour, used sparingly */
  --accent:#2e2f7a;       /* Hetu indigo (neel): links, selected state, primary action */
  --accent-hover:#3b3d94;
  --accent-soft:#dfe0f3;  /* selection, selected row */
  --accent-tint:#ecebf6;  /* faint selected background */
  --accent-line:#4a4fae;   /* focus borders and quotation rules; schemes may set a lighter tone */
  --brand-dot:#c58a3d;    /* the wordmark's gold dot (thehetu.in's mark) */
  --brand-ink:#23244f;    /* the wordmark's letters (thehetu.in's mark) */
  --heading:#1f2a4d;      /* every page title and heading (DESIGN.md, 6 Nov) */
  --danger:#b42318;
  /* semantic colours (27 Oct): one green for followed or verified, one amber for caution, one red for overruled or an
     error, and the reading highlight; each with a soft fill and a line */
  --danger-soft:#fbe8e6; --danger-line:#f1cfca;
  --ok:#2a6e56;    /* 6 Nov: 5.3:1 on ok-soft (was 4.3) */ --ok-soft:#e4f1e8; --ok-line:#b9d9c4;
  --warn:#8a5a14; --warn-soft:#fbf1dd; --warn-line:#ecdcc4;
  --mark:#fff1bf; --mark-strong:#f2c14e;
  /* roles the schemes may colour (defaults keep the house look) */
  --deep:#2e2f7a;                 /* display headings and prices */
  --pop:#b07a2c;                  /* the one small signal colour; schemes may set it */
  --pop-label:#8a5f22;          /* eyebrows and plan labels */
  --pop-soft:#f5ead6;     /* its tint */
  --stage:#e9e1d2;   /* landing canvases */
  --btn:#2e2f7a; --btn-hover:#3b3d94; --btn-text:#ffffff;
  --memo-mark:color-mix(in srgb,var(--accent-line) 72%,var(--ink)); --memo-deep:color-mix(in srgb,var(--accent-line) 58%,var(--ink));   /* memorandum heads, panel bars */

  /* legacy aliases kept so older rules resolve to the system */
  --lavender:var(--accent-soft); --pale:var(--accent-soft); --purple:var(--accent); --wash:var(--accent-tint);

  /* type: two families (17 October). Newsreader is THE serif; Inter is the interface sans. */
  --serif:Newsreader,Georgia,serif;                  /* headings, case and provision names, quotations, statute text */
  --display:var(--serif);                            /* page headings and titles: the same serif */
  --reading-serif:var(--serif);
  --sans:Inter,-apple-system,'Segoe UI',Arial,sans-serif;
  --t-12:12px; --t-14:14px; --t-16:16px; --t-18:18px; --t-20:20px; --t-24:24px; --t-36:36px; --t-48:48px;
  --text-small:12px; --text-ui:14px; --text-body:16px;
  /* type roles: one size per role, used by every page (memorandum, Find, Source desk, Law Lookup, home).
     The same element is the same family, size and weight wherever it appears. */
  --fs-display:36px;  --lh-display:44px;   /* desk question: "What's your question, Counsel?", "Which law, Counsel?" (serif 400) */
  --fs-title:32px;    --lh-title:40px;     /* page title: memorandum, Find, Act / Rules / document page (serif 400) */
  --fs-title-phone:26px; --lh-title-phone:34px;
  --fs-chapter:24px;  --lh-chapter:30px;   /* chapter heading inside a page: Law Lookup chapter cards (serif 400) */
  --fs-heading:18px;  --lh-heading:26px;   /* proposition and sub-heading (serif, --fw-head) */
  --fs-section:12px;  --lh-section:20px;   /* section heading: HEADNOTE, DISCUSSION (serif caps, --fw-head, .18em) */
  --fs-bar:12px;      --lh-bar:18px;       /* panel bar: INDEX, SOURCE DESK, HETU'S INSIGHT (serif caps, --fw-head, .16em) */
  --fs-name:17px;     --lh-name:24px;      /* case or provision name: Source desk, Find, insight, statute box, Law Lookup rows (serif, --fw-name) */
  --fs-quote:17px;    --lh-quote:28px;     /* quotation and statute text (serif 400) */
  --fs-body:16px;     --lh-body:28px;      /* body reading: memorandum and insight text (Inter 400) */
  --fs-card:14px;     --lh-card:22px;      /* card text: "Used for", notes, extracts (Inter 400) */
  --fs-index:14px;    --lh-index:20px;     /* index labels: memorandum and Find alike (Inter 400) */
  --fs-meta:12px;     --lh-meta:18px;      /* meta and sub-lines: court · date, citations (Inter 400) */
  --fs-label:12px;    --lh-label:16px;     /* caps group labels: CITED JUDGMENTS (Inter 600, .08em) */
  --fs-marker:16px;                        /* margin numbers and letters: 1.  (a)  ii (serif) */
  --fw-head:600; --fw-name:500;

  /* space: 4-point scale */
  --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;
  /* radius: controls 4, menus and dialogs 8, cards 12 */
  --r-control:4px; --r-menu:8px; --r-card:12px;
  /* elevation */
  --shadow-card:0 1px 2px rgba(20,27,46,.05),0 1px 1px rgba(20,27,46,.03);
  --shadow-pop:0 10px 24px rgba(31,42,77,.10),0 2px 6px rgba(20,27,46,.05);
  --shadow-dialog:0 24px 48px rgba(31,42,77,.16),0 6px 14px rgba(20,27,46,.06);
  --ring:0 0 0 3px #dfe0f3;
  /* motion */
  /* one motion scale (27 Oct): hover and press 120; a fill sweeping across a row or button 320; menus and state
     changes 200; something arriving 320; the sidebar 320. One easing curve for all of it. */
  --dur-1:120ms; --dur-2:200ms; --dur-3:320ms; --ease:cubic-bezier(.22,.61,.36,1);
  --m-hover:var(--dur-1); --m-fill-dur:320ms; --m-menu:var(--dur-2); --m-enter:var(--dur-3); --m-shell:320ms;
  /* layout */
  --sidebar:192px; --sidebar-collapsed:72px; --page-list:1120px; --page-read:820px; --page-form:880px; --page-gutter:48px;
  /* touch (25 Nov 2026). Decided by the kind of pointer, never by the width: a touch screen of any size (the owner's iPad
     held sideways is 1366 wide) gets finger sizes, a mouse keeps today's look. The blocks below this one set the values.
     --hit          the smallest area a control answers to. 24px for a mouse (WCAG 2.5.8), 44px for a finger. It is
                    an invisible area round the control that touch.js sizes to the room its neighbours leave
                    (system.css "tap areas"): the drawn size does not change.
     --row-touch    the height of one row in a pop-up menu or a list: 36px for a mouse, 40px for a finger (one value for
                    every such row; the left navigation rail keeps 44, system.css "rows").
     --hover-reveal 0 or 1: the opacity of a control that a mouse sees only on hover (a row's bin, a card's "..."). It is 1
                    (always shown) unless the device can hover with a fine pointer and has no touch screen at all.
                    Use: .x{opacity:var(--hover-reveal)} .row:hover .x,.x:focus-visible{opacity:1} */
  --hit:24px; --row-touch:36px; --hover-reveal:1;
  /* control heights (25 Nov 2026). One drawn height per family, the same for a mouse and a finger (a finger's 44 is the
     invisible --hit area, not a bigger button):
     --field-h      a field, and every button in the same row as one (an inline form, a years row): 40; a phone sets 44
                    (phone.css, PHONE_DESIGN field). system.css "inputs" and "inline form".
     --composer-h   every control in a composer's toolbar (mode, Courts, Years, Attach, Enhance, Send): 40. system.css
                    "composer toolbars"; a phone builds its own toolbar. */
  --field-h:40px; --composer-h:40px;
}
@media (hover:hover) and (pointer:fine){:root{--hover-reveal:0}}
@media (any-pointer:coarse){:root{--hit:44px;--row-touch:40px;--hover-reveal:1}}

/* Neel: the component rules of the default scheme (focus ring, headings, status pairs, selection). The navy scheme's own
   rules travel with it in palettes.json ("Chambers"). */
.question-sheet:focus-within{border-color:var(--accent-line);box-shadow:0 0 0 4px var(--accent-tint)}
#research-form .approach-trigger.needs-choice{box-shadow:0 0 0 2px var(--paper),0 0 0 4px #9db2de}
body.is-reading #reader-main .reader-follow-box:focus-within{border-color:var(--accent-line);box-shadow:0 0 0 4px var(--accent-tint)}
:where(main,dialog) :is(h1,h2,h3){color:#1f2a4d}
body.is-reading #reader-main h1.memo-title,body.is-reading :is(#reader-main,#modal) h2.authority-title,.collection-header h1,.mw-header h1{color:#1f2a4d}
.lk-badge.is-green{background:#e5f3ec;color:#2a6e56}
.lk-badge.is-amber{background:#fbf1dd;color:#8a5a14}   /* 6 Nov: DESIGN.md status pairs, 4.5:1 */
.lk-badge.is-red{background:#fbe8e6;color:#b42318}
mark{background:#fff1bf}
::selection{background:color-mix(in srgb,var(--accent) 16%,transparent)}
