/* Shared by the landing page and the Mini App: colour, type scale, spacing, radii. */
:root {
  /* Colour */
  --bg: #F5F1E8; --card: #FFFFFF; --sunk: #ECE6D9; --ink: #1E1C19; --mute: #615C52; --line: #E2DBCC;
  --accent: #1F6B58; --accent-ink: #FFFFFF; --accent-text: #1F6B58; --soft: #DDECE5;
  --warn: #A3441C; --warn-soft: #F5E1D6; --gold: #7F610F; --gold-soft: #F3E8C8;
  --bubble-out: #DDECE5;
  --student: #1F74B8; --student-text: #1F6FB0; --student-soft: #E1EEF9; --student-ink: #FFFFFF;

  /* Type. Manrope carries no Thai glyphs, so Thai falls through to Noto by itself;
     an all-Thai interface puts Noto first so the metrics stay even. */
  --font-ui: Manrope, 'Noto Sans Thai Looped', system-ui, sans-serif;
  --font-thai: 'Noto Sans Thai Looped', Manrope, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* One scale, used everywhere instead of loose pixel values */
  --text-display: 40px; /* the one number a screen is about, which outranks its own title */
  --text-title: 22px;   /* what this screen is about */
  --text-lead: 18px;
  --text-body: 16px;
  --text-note: 13px;    /* secondary, next to the thing it describes */
  --text-label: 12px;   /* section labels, uppercase */

  --weight-normal: 500;
  --weight-bold: 700;
  --weight-heavy: 800;

  --gap-xs: 4px; --gap-sm: 8px; --gap-md: 12px; --gap-lg: 16px; --gap-xl: 24px; --gap-2xl: 32px;
  --radius-sm: 10px; --radius-md: 12px; --radius-lg: 16px; --radius-pill: 999px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191816; --card: #23211E; --sunk: #2E2B27; --ink: #F2EEE6; --mute: #A89F92; --line: #37342E;
    --accent: #63C2A5; --accent-ink: #0D1F19; --accent-text: #6FCBAE; --soft: #1E3A31;
    --warn: #E8946E; --warn-soft: #3B2820; --gold: #D8B45A; --gold-soft: #3A3120;
    --bubble-out: #1E3A31;
    /* Flipped the way --accent is: a light blue with near-black ink. White on the mid-tone blue this
       used to be measured 4.46:1, under AA, wherever the pair is used together — the student lane's
       icons and step numbers on the landing page, and every filled control of the student Mini App. */
    --student: #79B8F2; --student-text: #6DB2F0; --student-soft: #16304A; --student-ink: #0D1F2A;
  }
}
* { box-sizing: border-box; }
/* The browser's own [hidden] rule loses to any class that sets display, so anything the scripts
   hide would stay on screen. This makes the attribute mean what it says. */
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: var(--text-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
:lang(th) body, body:lang(th) { font-family: var(--font-thai); }
a { color: var(--accent-text); }
code {
  font-family: var(--font-mono); font-size: 0.9em;
  padding: 1px 6px; border-radius: 6px; background: var(--sunk); white-space: nowrap;
}
