/* Academias Edison — design tokens ("Taller moderno").
   Warm paper, ink, one electric accent; Sora for display, Manrope for text. Every stylesheet reads from here.
   Fonts are self-hosted variable woff2 subsets (latin + latin-ext), SIL Open Font License: static/fonts/. */

/* ---------- fonts ---------- */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/sora-latin.woff2") 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: "Sora"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/sora-latin-ext.woff2") 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/manrope-latin.woff2") 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: 400 800; font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ---------- colour: surfaces ---------- */
  --paper: #FAF7F2;          /* page */
  --paper-2: #F3EEE6;        /* sunken areas, chips, tracks */
  --paper-3: #EAE3D8;        /* deeper sunken, stage floor */
  --card: #FFFFFF;
  --line: #E7E1D6;
  --line-2: #D9D2C5;
  --line-3: #C9C0B0;         /* dashed borders, dividers on dark paper */
  --ink: #1C1A17;            /* 16.7:1 on paper */
  --ink-2: #4A463F;          /* body text 2: 8.5:1 on paper */
  --dim: #6E685E;            /* small labels: 4.9:1 on paper, 5.4:1 on white */
  --on-ink: #FFFFFF;
  --on-ink-2: #CFC9BE;       /* secondary text on ink: 9.6:1 */
  --on-ink-dim: #A39B8E;     /* labels on ink: 5.6:1 */

  /* ---------- colour: accent (electric orange) ---------- */
  --accent: #FF5A1F;         /* fills, display, decoration; white text on it is 3.3:1 (large text/icons only) */
  --accent-ink: #C2410C;     /* small text on paper/white: 4.9:1 */
  --accent-deep: #7C2D12;    /* text on accent-soft: 8.6:1 */
  --accent-soft: #FFEDE4;
  --accent-soft-2: #FFD6C2;  /* borders around accent-soft */
  --accent-glow: rgba(255, 90, 31, .28);
  --accent-tint: rgba(255, 90, 31, .10);

  /* ---------- colour: functional ---------- */
  --amber: #FFC53D;          /* decoration, diagnosis stations */
  --amber-ink: #8A5A0A;      /* 5.6:1 on amber-soft */
  --amber-soft: #FFF3D6;
  --amber-line: #F3DFB0;
  --ok: #1F7A4D;             /* 5.2:1 on white */
  --ok-ink: #14532D;
  --ok-soft: #E3F3EA;
  --ok-line: #A9DBBF;
  --danger: #B42318;         /* 6.4:1 on white */
  --danger-ink: #7A1A12;
  --danger-soft: #FDEBE8;
  --danger-line: #F2B8B0;
  --violet: #6D4ADB;         /* exams: 5.5:1 on white */
  --violet-ink: #4C2FA8;
  --violet-soft: #EFEAFF;
  --violet-line: #C9BDF5;
  --teal: #0F766E;           /* secondary data colour inside scenes (diagrams, 3D tags): 5.4:1 on white */
  --teal-ink: #115E59;
  --teal-soft: #E0F2F1;
  --info: #2B5FB8;           /* status "preparing": 5.6:1 on white */
  --info-soft: #E8F0FD;

  /* ---------- type ---------- */
  --font-display: "Sora", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
  --fs-xs: 12.5px; --fs-sm: 13.5px; --fs-base: 15.5px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 24px;
  --fs-h1: clamp(30px, 4.6vw, 44px);
  --fs-h2: clamp(24px, 3.4vw, 34px);
  --fs-hero: clamp(38px, 5.6vw, 68px);
  --lh: 1.6; --lh-tight: 1.1; --lh-snug: 1.3;
  --track-tight: -.025em; --track-caps: .07em;

  /* ---------- space ---------- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --max: 1200px;
  --gutter: max(clamp(20px, 5vw, 40px), var(--safe-l), var(--safe-r));   /* page edge to content; symmetric, never under 20 px */
  --container: min(100% - 2 * var(--gutter), var(--max));
  --topbar-h: 64px;
  --tap: 44px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  /* ---------- shape ---------- */
  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-xl: 24px; --r-pill: 999px;
  --radius: var(--r-lg); --radius-sm: var(--r-sm);   /* legacy names */

  /* ---------- elevation ---------- */
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, .05), 0 4px 12px -6px rgba(28, 26, 23, .10);
  --shadow: 0 1px 2px rgba(28, 26, 23, .05), 0 10px 30px -10px rgba(28, 26, 23, .14);
  --shadow-lg: 0 2px 4px rgba(28, 26, 23, .06), 0 30px 60px -20px rgba(28, 26, 23, .25);
  --shadow-up: 0 -4px 30px rgba(28, 26, 23, .16), 0 -1px 0 rgba(28, 26, 23, .06);
  --shadow-accent: 0 10px 30px -10px var(--accent-glow);
  --focus: 0 0 0 3px rgba(255, 90, 31, .40);

  /* ---------- motion ---------- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.3);
  --dur-fast: .15s; --dur: .25s; --dur-slow: .5s;

  /* ---------- legacy aliases (older rules and scene modules still read these) ---------- */
  --bg: var(--paper); --bg-2: var(--card); --panel: var(--card); --panel-2: var(--paper-2);
  --text: var(--ink); --muted: var(--ink-2);
  --accent-2: var(--teal); --accent-2-ink: var(--teal-ink);
  --warn: var(--amber-ink);
  --stage: var(--paper-3);
}

/* Grain + warm mesh, reusable as a background for hero areas (CSS only, no request). */
.mesh { position: relative; isolation: isolate; }
.mesh::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(255, 196, 160, .55), transparent 70%),
    radial-gradient(45% 40% at 85% 20%, rgba(255, 220, 120, .45), transparent 70%),
    radial-gradient(50% 45% at 70% 90%, rgba(255, 120, 70, .22), transparent 70%),
    radial-gradient(40% 40% at 10% 85%, rgba(240, 232, 220, .9), transparent 70%); }
.mesh::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
