/* Direction: playful brain gym — lavender paper, electric violet, rounded Nunito, one colour per skill */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f6f4ff;
  --surface: #ffffff;
  --surface-2: #eae8f4;
  --border: #d6d3e0;
  --border-strong: #b1aebd;
  --ink: #1f1b3d;
  --muted: #636176;
  --accent: #6d4aff;
  --accent-hover: #5d3fd9;
  --accent-ink: #ffffff;
  --accent-text: #5a36e6;
  --accent-strong: #5c3fd8;
  --accent-soft: #e3dcff;
  --accent-border: #b8a8ff;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dbe6e8;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #eee1e1;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #efdae4;
  --danger-strong: #b91c1c;
  --chart-1: #6d4aff;
  --chart-2: #ee30b5;
  --chart-3: #9b3c02;
  --chart-4: #988c12;
  --chart-5: #026c4b;
  --chart-6: #1f94b6;

  --font-display: "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --display-weight: 800;
  --radius-card: 22px;
  --radius-btn: 16px;
  --radius-input: 14px;
  --x-memory: #8b5cf6;
  --x-focus: #3b82f6;
  --x-speed: #f97316;
  --x-logic: #22c55e;
  --x-math: #ec4899;
  --x-red: #ef4444;
  --x-yellow: #eab308;
  --x-ok: #15803d;
  --x-bad: #dc2626;
  --x-panel: #1f1b3d;
  --x-on-photo: #ffffff;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Nunito", system-ui, sans-serif;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #090716;
  --surface: #22202d;
  --surface-2: #151322;
  --border: #2b2a37;
  --border-strong: #53515c;
  --ink: #f6f4ff;
  --muted: #9795a2;
  --accent: #6d4aff;
  --accent-hover: #8365ff;
  --accent-ink: #ffffff;
  --accent-text: #8e71ff;
  --accent-strong: #8e71ff;
  --accent-soft: #1f1649;
  --accent-border: #36257f;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #0c221f;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2f1813;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #300c17;
  --danger-strong: #d16969;
  --chart-1: #6d4aff;
  --chart-2: #ee30b5;
  --chart-3: #cd5717;
  --chart-4: #988c12;
  --chart-5: #22966c;
  --chart-6: #0a9bc1;
}

/* MindSpark — skill colour helpers (set --sk on an ancestor) and game bits */
.sk-bg { background: var(--sk); }
.sk-soft { background: color-mix(in srgb, var(--sk) 18%, var(--surface)); }
.sk-text { color: var(--sk); }
.sk-border { border-color: var(--sk); }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:active:not(:disabled) { transform: scale(.97); }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.flame { animation: flick 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flick { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.14) rotate(3deg); } }

.target { animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }

.fc { perspective: 700px; position: relative; aspect-ratio: 1; }
.fc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s; }
.fc.on .fc-in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 1rem; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 2px solid var(--border); }
.face-back { transform: rotateY(180deg); background: var(--surface); }
.face-front { background: color-mix(in srgb, var(--sk) 22%, var(--surface)); color: var(--sk); }
.fc.done .face-back { border-color: var(--x-ok); border-width: 3px; }

.heat { aspect-ratio: 1; border-radius: 5px; background: var(--surface-2); }
.heat.h1 { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.heat.h2 { background: color-mix(in srgb, var(--accent) 65%, var(--surface-2)); }
.heat.h3 { background: var(--accent); }

.dot-move { transition: left .2s ease, top .2s ease; }
.switch { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border-strong); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 999px; background: var(--ink); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--x-on-photo); }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

html.reduced-motion .flame, html.reduced-motion .target { animation: none; }
html.reduced-motion .fc-in, html.reduced-motion .dot-move, html.reduced-motion .switch::after { transition: none; }
