/* Study hub design tokens: the one colour set (the hub's), the three fonts and the one type scale. Every page loads
   this file before its own styles: the hub and tool pages, the sign-in pages (it is public), the notes, the quiz
   pages, the drill, the PDF viewer, and the standalone P1 and Sofia pages (the build injects it, assets/unify.css
   maps their own variables onto these). Light or dark follows assets/theme.js: data-theme="light" or "dark" on
   <html>, else the device setting.
   Fonts: Cormorant Garamond for page titles, Manrope for the interface, CMU Serif for reading text and maths.
   Sizes (phone first): reading text 17px, interface text 15px, meta text 13px (never smaller), tap targets 44px.
   Widths: one centred column (--col) for every page; the bar's content, the hub and the drill fill it, the tool and
   reading pages keep their text to --measure from the same left edge, so nothing jumps when switching tabs. */
:root{
  /* paper and ink */
  --hub-paper:#F3EEE2; --hub-paper-line:#E2D8C0;
  --hub-card:#FFFFFF; --hub-card-alt:#FBF9F4;
  --hub-ink:#141A36; --hub-text:#1F2547; --hub-muted:#565D7B; --hub-line:#E3DFD4; --hub-strong:#8B90A6;
  /* the navy family (the top bar and the one accent for actions) */
  --hub-navy950:#0B1130; --hub-navy900:#10173A; --hub-navy800:#182150; --hub-navy:#243065; --hub-navy100:#E6E9F3;
  --hub-on-dark:#EEF0F7; --hub-on-dark-muted:#B3B9D2;
  --hub-accent:#243065; --hub-accent-h:#10173A; --hub-accent-ink:#FFFFFF; --hub-accent-soft:#E6E9F3;
  --hub-link:#243065; --hub-focus:rgba(36,48,101,.18);
  /* states: green for right, amber for "partly", red only for warnings, errors and destructive actions */
  --hub-ok:#1E6B4A; --hub-ok-bg:#EEF6F1; --hub-warn:#8A5A00; --hub-warn-bg:#FBF3DF;
  --hub-danger:#B7151D; --hub-danger-h:#9E1118; --hub-danger-ink:#8A1017; --hub-danger-bg:#FBF0F0; --hub-info-bg:#EEF0F7;
  --hub-shadow:0 1px 2px rgba(16,23,58,.06),0 6px 20px rgba(16,23,58,.06);
  /* the three fonts (self-hosted: vendor/fonts/site-fonts.css and cmu-serif.css) */
  --font-title:"Cormorant Garamond","Iowan Old Style","Palatino Linotype",Georgia,serif;
  --font-ui:"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-read:"CMU Serif","Latin Modern Roman","Computer Modern Serif",Georgia,"Times New Roman",serif;
  /* the type scale */
  --fs-title:34px; --fs-title-phone:30px; --fs-h2:18px; --fs-h3:17px;
  --fs-read:17px; --fs-ui:15px; --fs-meta:13px;
  --lh-read:1.6; --lh-ui:1.45;
  --tap:44px;
  /* the top bar (the same on every page) and the slim line under it on focused screens (the way back to the course) */
  --bar-h:52px; --back-h:36px;
  /* the content column: the gutter is also the bar's side padding, so the bar's content and the page share one edge */
  --col:1080px; --measure:780px; --gutter:24px;
  color-scheme:light;
}
/* dark: the same set on a night-blue page. The bar is a lighter navy than the page (it stands apart, as in light mode);
   actions stay in the navy-blue family with white text; the light periwinkle (--hub-navy, --hub-link) is for text
   and lines only. */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --hub-paper:#0E142E; --hub-paper-line:#222B55;
  --hub-card:#151C3D; --hub-card-alt:#121935;
  --hub-ink:#EEF0F7; --hub-text:#DCE0EE; --hub-muted:#A9AFC9; --hub-line:#263063; --hub-strong:#56608E;
  --hub-navy950:#1A2252; --hub-navy900:#232D60; --hub-navy800:#3A4684; --hub-navy:#B9C3EC; --hub-navy100:#1B2450;
  --hub-accent:#4A5EC0; --hub-accent-h:#5A6ECC; --hub-accent-ink:#FFFFFF; --hub-accent-soft:#1B2450;
  --hub-link:#B9C3EC; --hub-focus:rgba(185,195,236,.22);
  --hub-ok:#7FD1A6; --hub-ok-bg:#12291F; --hub-warn:#E9B060; --hub-warn-bg:#2E2614;
  --hub-danger:#E0565C; --hub-danger-h:#EC7378; --hub-danger-ink:#FF9A93; --hub-danger-bg:#2E1418; --hub-info-bg:#18204A;
  --hub-shadow:0 1px 3px rgba(0,0,0,.5),0 6px 24px rgba(0,0,0,.3);
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --hub-paper:#0E142E; --hub-paper-line:#222B55;
  --hub-card:#151C3D; --hub-card-alt:#121935;
  --hub-ink:#EEF0F7; --hub-text:#DCE0EE; --hub-muted:#A9AFC9; --hub-line:#263063; --hub-strong:#56608E;
  --hub-navy950:#1A2252; --hub-navy900:#232D60; --hub-navy800:#3A4684; --hub-navy:#B9C3EC; --hub-navy100:#1B2450;
  --hub-accent:#4A5EC0; --hub-accent-h:#5A6ECC; --hub-accent-ink:#FFFFFF; --hub-accent-soft:#1B2450;
  --hub-link:#B9C3EC; --hub-focus:rgba(185,195,236,.22);
  --hub-ok:#7FD1A6; --hub-ok-bg:#12291F; --hub-warn:#E9B060; --hub-warn-bg:#2E2614;
  --hub-danger:#E0565C; --hub-danger-h:#EC7378; --hub-danger-ink:#FF9A93; --hub-danger-bg:#2E1418; --hub-info-bg:#18204A;
  --hub-shadow:0 1px 3px rgba(0,0,0,.5),0 6px 24px rgba(0,0,0,.3);
  color-scheme:dark;
}
@media (max-width:640px){:root{--fs-title:var(--fs-title-phone);--gutter:16px}}
