*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

:root {
  /* Visual identity: docs/superpowers/specs/2026-11-17-visual-identity-design.md — one colour,
     one role (§4), light as a budget (§5). check:colours keeps every literal in this block. */
  /* Type: Nunito (vendored, SIL OFL — src/vendor/nunito/), the same rounded face everywhere. */
  --font-ui:      "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Surfaces, darkest page to lightest control. */
  --bg:           #0b0b1a;
  --surface-1:    #121230;   /* panels: top bar, unlock strip, missions block */
  --surface-2:    #15153a;   /* the card */
  --surface-3:    #1a1a40;   /* controls: toolbar buttons, Hint, Skip */
  --surface-tile: #1d1d4a;   /* answer tiles (QCM) */
  --surface-sunk: #0f0f28;   /* inputs, bar tracks */
  /* Hairlines. */
  --line:         #34346a;
  --line-soft:    #2c2c62;   /* quiet row separators (stats rows, missions), the missions block */
  /* Text. */
  --text:         #e2e0f5;
  --text-strong:  #ffffff;
  --text-soft:    #c9c6ea;   /* secondary text */
  --muted:        #8e8bbb;   /* information; ≥ 4.5:1 on every surface (check:colours R5) */
  /* Action: what the player acts on (the targeted answer, primary buttons, their own progress). */
  --action:       #7c3aed;
  --action-hi:    #8b5cf6;   /* top of the action gradient */
  --action-deep:  #6d28d9;   /* bottom of the action gradient, primary button hover */
  --action-lilac: #c4b5fd;   /* lit edge of an action, a met requirement */
  --action-line:  #4b3a8f;   /* violet-tinted border of a control at rest */
  --action-glow:  color-mix(in srgb, var(--action) 22%, transparent);
  --action-tint-1: #2c205f;   /* control tinted violet: combo level 2 */
  --action-tint-2: #302166;   /* the focus chip */
  --action-tint-3: #3b257b;   /* combo level 3 */
  --action-grad:  linear-gradient(135deg, var(--action-hi), var(--action-deep));
  /* Halos (box-shadow only: no blur filter — they stall software-rendered browsers). */
  --halo-action:  0 0 26px -4px var(--action-hi);
  --halo-card:    0 0 46px -14px var(--action);
  /* The source sentence (cloze colour code: the meaning to render) — information, cool. */
  --source:       #8fb4ff;
  --source-pale:  #d4e0ff;
  /* One shade per domain (§4.1): text, a small dot and the category's own bars only. */
  --domain-vocab: #93a1fb;   /* Vocabulaire, blue-violet */
  --domain-conj:  #b293fb;   /* Conjugaison, violet */
  --domain-gram:  #dc93fb;   /* Grammaire, orchid */
  --domain-ortho: #fb93f0;   /* Orthographe, magenta */
  --domain-expr:  #fb93c0;   /* Expression & registre, pink */
  /* Coins. */
  --coin:         #fbbf24;
  --coin-soft:    #ffdc82;   /* coin amount on the brain overlay's dark panel */
  /* Energy. */
  --energy:       #7cf2ff;
  --energy-deep:  #4fc3ff;   /* the brain lighting up: preview glow, influx number glow (via color-mix) */
  --energy-pale:  #eaf6ff;   /* the influx number */
  /* Verdicts. */
  --ok:           #10b981;
  --ok-soft:      #6ee7b7;
  --ok-sunk:      #091f16;   /* verdict background (answer box, QCM pick, feedback) */
  --ok-line:      #1a5030;
  --almost:       #fb923c;   /* orange, never coin gold */
  --almost-soft:  #fdba74;
  --almost-sunk:  #1f1206;
  --almost-line:  #5a3410;
  --ko:           #ef4444;
  --ko-soft:      #fca5a5;
  --ko-sunk:      #1f0808;
  --ko-line:      #5a1818;
  /* Brain link-type colours (focused region only, visual identity spec §8; brain/constants.js LINK_COLORS). */
  --link-conj:    #ffb86b;
  --link-gram:    #c4a3ff;
  --link-ortho:   #6ee7c8;
  /* Backdrop behind modals and the tour (through color-mix). */
  --scrim:        #040412;
  /* Shadows (use through color-mix). */
  --shadow:       #000000;
}

/* Nunito, variable weight (200–1000), latin + latin-ext — src/vendor/nunito/ (OFL.txt there). */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../vendor/nunito/nunito-latin-wght-normal.woff2") format("woff2-variations"),
       url("../vendor/nunito/nunito-latin-wght-normal.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: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../vendor/nunito/nunito-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../vendor/nunito/nunito-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hidden { display: none !important; }

/* Inline currency icons (modules/icons.js → the sprite in index.html): sized to the text. */
.ico { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.ico-ball { width: 1.25em; height: 1.25em; vertical-align: -0.26em; }
.ico-influx { width: 1.15em; height: 1.15em; }
/* Interface icons (modules/icons.js::icon → <symbol id="i-…"> in index.html): line + violet veil.
   At rest: lilac stroke, translucent violet fill. Inside a lit control: white stroke, white veil. */
.ico-line { width: 1.15em; height: 1.15em; vertical-align: -0.2em; color: var(--action-lilac); --ico-veil: var(--action-hi); --ico-veil-o: 0.3; }
symbol .f { fill: var(--ico-veil); fill-opacity: var(--ico-veil-o); stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
symbol .l { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.btn-primary .ico-line, .mcq-btn.selected .ico-line, .mb-btn.active .ico-line, .wb-primary .ico-line,
#combo-widget[data-level="4"] .ico-line, #combo-widget[data-level="5"] .ico-line,
.dir-badge.boss-badge .ico-line { color: var(--text-strong); --ico-veil: var(--text-strong); }
/* Information contexts (muted text): the icon follows the text's quiet colour. */
.ico-quiet { color: currentColor; --ico-veil: currentColor; --ico-veil-o: 0.18; }
