/* AI Skills Lab: dark neon theme. Motion lives in fx.js (site-wide) and core.js (home 3D core). */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #050816;
  --panel: rgba(12, 17, 44, 0.8);
  --input: rgba(5, 8, 24, 0.85);
  --tint: rgba(139, 92, 246, 0.12);
  --line: rgba(148, 160, 255, 0.13);
  --line-strong: rgba(148, 160, 255, 0.27);
  --text: #eef0ff;
  --soft: #c4caee;
  --muted: #8f97c6;
  --a1: #a78bfa;
  --a2: #22d3ee;
  --ok: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --beginner: #34d399;
  --intermediate: #60a5fa;
  --advanced: #a78bfa;
  --pro: #fbbf24;
  --r: 18px;
  --grad: linear-gradient(135deg, #7c3aed 0%, #4f46e5 52%, #0e7490 100%);
  --grad-text: linear-gradient(92deg, #c4b5fd 0%, #67e8f9 50%, #f0abfc 100%);
  --grad-line: linear-gradient(90deg, transparent, #8b5cf6 20%, #22d3ee 50%, #f0abfc 80%, transparent);
  --card-bg: linear-gradient(180deg, rgba(20, 27, 66, 0.84), rgba(9, 13, 36, 0.88));
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 30px 60px -28px rgba(91, 33, 182, 0.85);
  --f-body: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Space Grotesk", Manrope, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --f-hud: Orbitron, "Space Grotesk", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); scrollbar-color: #45348f var(--bg); }
/* No body background: html owns it, so the fixed canvases (z-index below 0) stay visible */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 17px/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(139, 92, 246, 0.55); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(#5b3fc4, #0e7490); border-radius: 99px; border: 2px solid var(--bg); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 700; margin: 0.2em 0 0.35em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 1.6em 0 0.6em; }
h3 { font-size: 1.18rem; letter-spacing: -0.01em; }
a { color: var(--a1); text-decoration: none; font-weight: 600; transition: color 0.2s; }
a:hover { color: #ddd6fe; text-decoration: underline; text-underline-offset: 3px; }
strong { color: var(--text); }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 72px; overflow-x: clip; }
main.enter { animation: enter 0.6s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.lead { font-size: 1.14rem; color: var(--soft); max-width: 62ch; }
.center { text-align: center; justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shine { background-image: linear-gradient(90deg, #c4b5fd, #67e8f9, #f0abfc, #c4b5fd); background-size: 300% auto; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 300% center; } }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Cards with a cursor spotlight and glowing edge ---------- */
.card {
  position: relative;
  isolation: isolate;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card::before, .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
.card::before { z-index: -1; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 92, 246, 0.16), transparent 45%); }
.card::after {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.9), rgba(139, 92, 246, 0.5) 30%, transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.tilting { transition: transform 0.12s ease-out, box-shadow 0.3s, border-color 0.3s !important; will-change: transform; }

/* ---------- Background: nebula canvas, tech grid, film grain ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 10% -5%, rgba(124, 58, 237, 0.3), transparent 60%),
    radial-gradient(900px 600px at 95% 10%, rgba(14, 116, 144, 0.26), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(190, 70, 220, 0.14), transparent 60%),
    var(--bg);
}
.bg-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 160, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 160, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.core-gl { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; display: block; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.core-gl.on { opacity: 1; }

/* Page-change scan line */
.scan { position: fixed; left: 0; right: 0; top: 0; height: 140px; z-index: 85; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.07) 70%, rgba(34, 211, 238, 0.4) 99%); }
.scan::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad-line); box-shadow: 0 0 18px rgba(34, 211, 238, 0.9); }
.scan.go { animation: scan 0.8s var(--ease) both; }
@keyframes scan { 0% { opacity: 1; transform: translateY(-140px); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(100vh); } }

/* First-visit boot sequence */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; animation: boot-safety 0.01s 3.6s forwards; }
.no-boot .boot { display: none; }
.boot-half { position: absolute; left: 0; right: 0; height: 50.5%; background: #03050e; transition: transform 0.95s cubic-bezier(0.75, 0, 0.2, 1); }
.boot-half.t { top: 0; box-shadow: 0 1px 0 rgba(34, 211, 238, 0.5), 0 10px 40px -10px rgba(34, 211, 238, 0.4); }
.boot-half.b { bottom: 0; }
.boot.done .boot-half.t { transform: translateY(-102%); }
.boot.done .boot-half.b { transform: translateY(102%); }
.boot-core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; text-align: center; transition: opacity 0.35s, transform 0.7s var(--ease); }
.boot.done .boot-core { opacity: 0; transform: scale(1.2); }
.boot-dial { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.boot-dial::before, .boot-dial::after { content: ""; position: absolute; border-radius: 50%; }
.boot-dial::before {
  inset: 0;
  background: conic-gradient(#22d3ee calc(var(--bp, 0) * 360deg), rgba(148, 160, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.8));
}
.boot-dial::after { inset: -12px; border: 1px dashed rgba(167, 139, 250, 0.5); animation: spinr 6s linear infinite; }
.boot-pct { font: 700 1.6rem/1 var(--f-hud); color: #fff; text-shadow: 0 0 18px rgba(34, 211, 238, 0.8); }
.boot-title { margin: 8px 0 0; font: 800 1.05rem/1 var(--f-hud); letter-spacing: 0.32em; color: #fff; }
.boot-sub { margin: 0; font: 500 0.72rem/1 var(--f-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--a2); }
@keyframes boot-safety { to { visibility: hidden; opacity: 0; } }

/* Cursor follower (mouse only; the system cursor stays visible) */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 210; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor-on .cursor, .cursor-on .cursor-dot { opacity: 1; }
.cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; display: grid; place-items: center; }
.cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.45), inset 0 0 10px rgba(34, 211, 238, 0.2);
  transition: transform 0.35s var(--ease), background 0.3s, border-color 0.3s;
}
.cursor.hot::before { transform: scale(1.5); background: rgba(139, 92, 246, 0.12); border-color: rgba(34, 211, 238, 0.9); }
.cursor.lab::before { transform: scale(2.1); background: rgba(8, 12, 32, 0.78); border-color: rgba(34, 211, 238, 0.95); }
.cursor.down::before { transform: scale(0.8); }
.cursor-on .cursor.txt { opacity: 0; }
.cursor-label { position: relative; font: 700 0.6rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #e6fbff; opacity: 0; transform: scale(0.6); transition: opacity 0.25s, transform 0.35s var(--ease); }
.cursor.lab .cursor-label { opacity: 1; transform: none; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 10px var(--a2); }

/* ---------- Header + navigation ---------- */
.strip { position: relative; background: rgba(3, 5, 14, 0.92); color: var(--soft); font: 500 0.72rem/1.5 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; padding: 7px 16px; }
.strip::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); vertical-align: 1px; animation: pulse 2s ease-in-out infinite; }
.strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--grad-line); opacity: 0.5; }
.strip b { color: #fff; }
.top { position: sticky; top: 0; z-index: 30; background: rgba(5, 8, 22, 0.66); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad-line); background-size: 200% 100%; animation: linemove 7s linear infinite; opacity: 0.7; }
@keyframes linemove { to { background-position: -200% 0; } }
.bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font: 700 0.98rem/1 var(--f-hud); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.brand svg { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.65)); transition: transform 0.7s var(--ease); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand:hover svg { transform: rotate(90deg) scale(1.06); }
.nav { position: relative; justify-self: center; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(148, 160, 255, 0.05); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar, .subnav::-webkit-scrollbar { display: none; }
.nav a { position: relative; z-index: 1; color: var(--soft); padding: 7px 14px; border-radius: 10px; white-space: nowrap; font-size: 0.9rem; font-weight: 700; transition: color 0.25s; }
.nav a:hover, .nav a.active { color: #fff; text-decoration: none; }
.nav-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(14, 116, 144, 0.88)); box-shadow: 0 0 18px -2px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2); opacity: 0; transition: transform 0.55s var(--ease), width 0.55s var(--ease), opacity 0.3s; }
.cta { white-space: nowrap; }
.bar-end { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) {
  .bar { grid-template-columns: 1fr auto; height: auto; padding: 10px 16px; gap: 10px; }
  .nav { grid-column: 1 / -1; justify-self: stretch; }
  .cta, .bar-end { grid-row: 1; grid-column: 2; justify-self: end; }
  .nav a { flex: none; padding: 7px 12px; font-size: 0.88rem; }
}

/* Tabs inside the Practice area */
.subnav { display: flex; gap: 2px; width: fit-content; max-width: 100%; margin: 26px 0 0; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.subnav a { flex: none; padding: 8px 14px; border-radius: 10px; color: var(--soft); font-size: 0.88rem; font-weight: 700; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.subnav a:hover { color: #fff; text-decoration: none; background: rgba(148, 160, 255, 0.08); }
.subnav a.on { background: var(--grad); color: #fff; box-shadow: 0 0 18px -4px rgba(139, 92, 246, 0.85); }
.subnav + .page-head { padding-top: 20px; }

/* ---------- Buttons, pills, badges, labels ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 22, 58, 0.72);
  color: var(--text);
  font: 700 0.98rem/1.2 var(--f-body);
  cursor: pointer;
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.3s, background 0.25s, color 0.2s;
}
.btn:hover { text-decoration: none; color: #fff; border-color: rgba(167, 139, 250, 0.65); background: rgba(24, 30, 76, 0.85); box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2), 0 12px 30px -12px rgba(139, 92, 246, 0.75); transform: translateY(-1px); }
.btn.primary { background: var(--grad); border-color: rgba(196, 181, 253, 0.4); color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform 0.9s var(--ease); }
.btn.primary:hover { background: var(--grad); box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.45), 0 14px 40px -10px rgba(124, 58, 237, 1), 0 0 34px -6px rgba(34, 211, 238, 0.65); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.big { padding: 14px 26px; font-size: 1.04rem; border-radius: 16px; }
.btn.small { padding: 8px 14px; font-size: 0.88rem; border-radius: 12px; }
.btn.ghost { background: rgba(5, 8, 22, 0.35); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.arr { display: inline-block; transition: transform 0.35s var(--ease); }
a:hover .arr, .btn:hover .arr { transform: translateX(4px); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line-strong); font-size: 0.84rem; font-weight: 700; color: var(--soft); }
.badge { font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(148, 160, 255, 0.1); border: 1px solid var(--line); white-space: nowrap; color: var(--soft); }
.badge.ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.38); }
.badge.dim { color: var(--muted); }
.lvl { --c: var(--a1); }
.lvl.beginner { --c: var(--beginner); }
.lvl.intermediate { --c: var(--intermediate); }
.lvl.advanced { --c: var(--advanced); }
.lvl.pro { --c: var(--pro); }
.tag { display: inline-block; font: 700 0.64rem/1.6 var(--f-hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 48%, transparent); padding: 2px 10px; border-radius: 99px; box-shadow: 0 0 14px -4px var(--c); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 600 0.74rem/1.5 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--a2); }
.eyebrow::before { content: ""; flex: none; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--a2)); box-shadow: 0 0 8px var(--a2); }
.live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2), 0 0 12px var(--ok); animation: pulse 1.8s ease-in-out infinite; }

/* ---------- Split headings and scroll reveal ---------- */
.split-ready .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.05em 0.16em; margin: 0 -0.05em -0.16em; }
.split-ready .wi { display: inline-block; transform: translate3d(0, 110%, 0) rotate(6deg); transform-origin: 0 100%; opacity: 0; transition: transform 1s var(--ease), opacity 0.7s ease; transition-delay: calc(var(--i, 0) * 45ms); }
.split-ready.in .wi { transform: none; opacity: 1; }
.split-ready .gw { opacity: 0; filter: blur(14px); transition: opacity 1.2s ease, filter 1.2s ease; transition-delay: calc(var(--i, 0) * 45ms + 120ms); }
.split-ready.in .gw { opacity: 1; filter: blur(0); }
.reveal { opacity: 0; transform: translateY(34px) scale(0.975); filter: blur(6px); transition: opacity 0.8s var(--ease), transform 0.95s var(--ease), filter 0.8s var(--ease) !important; }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal:not(.in) .vcol i, .reveal:not(.in) .track i, .reveal:not(.in) .xp-bar i, .reveal:not(.in) .art .grow, .reveal:not(.in) .art .pop, .reveal:not(.in) .art .draw { animation-play-state: paused; }

/* ---------- Hero with the 3D core ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 28px; align-items: center; min-height: calc(100vh - 112px); min-height: calc(100svh - 112px); padding: 36px 0 84px; }
.hero-copy { position: relative; z-index: 2; transform: translate3d(0, calc(var(--hp, 0) * -80px), 0); opacity: calc(1 - var(--hp, 0) * 1.4); }
.hero .eyebrow { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(6, 10, 30, 0.65); color: var(--soft); letter-spacing: 0.12em; }
.hero .eyebrow::before { display: none; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.7rem); line-height: 1.02; letter-spacing: -0.035em; margin: 22px 0 18px; }
.hero .lead { font-size: 1.16rem; max-width: 52ch; }
.hero .row { margin-top: 30px; gap: 14px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 30px; margin: 38px 0 12px; }
.hero-stats div { display: flex; flex-direction: column-reverse; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.hero-stats dd { margin: 0; font: 700 clamp(1.5rem, 2.6vw, 2.05rem)/1.1 var(--f-hud); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats dt { font: 600 0.68rem/1.5 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.hero-visual { position: relative; width: min(100%, 560px); aspect-ratio: 1; justify-self: center; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.hero-visual .orb {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.9), rgba(167, 139, 250, 0.8) 12%, rgba(91, 63, 196, 0.6) 34%, rgba(14, 116, 144, 0.35) 58%, transparent 72%);
  box-shadow: 0 0 90px 10px rgba(124, 58, 237, 0.4), 0 0 170px 40px rgba(34, 211, 238, 0.14);
  animation: orb 6s ease-in-out infinite;
  transition: opacity 1.2s;
}
.core-on .hero-visual .orb { opacity: 0; }
.hero-visual.pulse::after { animation: shock 1s var(--ease); }
@keyframes shock { from { opacity: 1; transform: scale(0.6); } to { opacity: 0; transform: scale(2.3); } }
@keyframes orb { 50% { transform: scale(1.07); opacity: 0.85; } }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; will-change: rotate; animation: ringin 1.5s var(--ease) both, spinr 40s linear infinite; }
.ring circle, .ring path { vector-effect: non-scaling-stroke; }
.r1 { stroke: rgba(167, 139, 250, 0.5); stroke-width: 1; animation-duration: 1.5s, 90s; }
.r2 { stroke: rgba(34, 211, 238, 0.7); stroke-width: 2; animation-duration: 1.5s, 38s; animation-direction: normal, reverse; animation-delay: 0.12s, 0s; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7)); }
.r3 { stroke: rgba(148, 160, 255, 0.4); stroke-width: 1.2; animation-duration: 1.5s, 60s; animation-delay: 0.24s, 0s; }
.r4 { stroke: rgba(139, 92, 246, 0.6); stroke-width: 3; animation-duration: 1.5s, 26s; animation-delay: 0.36s, 0s; }
.r4 path { stroke: rgba(34, 211, 238, 0.85); stroke-width: 2; }
@keyframes ringin { from { scale: 0.45; opacity: 0; } }
@keyframes spinr { to { rotate: 360deg; } }
.radar { position: absolute; inset: 9%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(34, 211, 238, 0.24), rgba(34, 211, 238, 0) 24%, transparent); -webkit-mask: radial-gradient(circle, transparent 48%, #000 49%); mask: radial-gradient(circle, transparent 48%, #000 49%); animation: spinr 5s linear infinite; opacity: 0.75; }
.hud-label { position: absolute; z-index: 4; font: 600 0.64rem/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(5, 8, 24, 0.75); white-space: nowrap; animation: hudin 0.9s var(--ease) both; animation-delay: var(--d, 0s); }
.hud-label b { color: var(--a2); font-weight: 700; text-shadow: 0 0 10px rgba(34, 211, 238, 0.7); }
.hl1 { top: 3%; right: 14%; --d: 0.7s; }
.hl2 { top: 20%; right: -5%; --d: 0.9s; }
.hl3 { bottom: 9%; right: 2%; --d: 1.1s; }
@keyframes hudin { from { opacity: 0; transform: translateY(8px); } }
.orbit { position: absolute; inset: 0; pointer-events: none; }
.ochip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: rgba(7, 11, 30, 0.85); border: 1px solid var(--line-strong); font: 700 0.78rem/1 var(--f-body); color: var(--text); white-space: nowrap; box-shadow: 0 0 22px -6px rgba(139, 92, 246, 0.7); transform: translate(-50%, -50%); will-change: transform, opacity; }
.ochip b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); font: 800 0.7rem/1 var(--f-hud); color: #fff; box-shadow: 0 0 12px rgba(139, 92, 246, 0.85); }
.ochip:nth-child(1) { left: 50%; top: 3%; }
.ochip:nth-child(2) { left: 94%; top: 34%; }
.ochip:nth-child(3) { left: 80%; top: 90%; }
.ochip:nth-child(4) { left: 20%; top: 90%; }
.ochip:nth-child(5) { left: 6%; top: 34%; }
.hud-hint { position: absolute; left: 50%; bottom: -1%; translate: -50% 0; font: 600 0.64rem/1 var(--f-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); animation: breathe 2.6s ease-in-out infinite; white-space: nowrap; }
@keyframes breathe { 50% { opacity: 0.35; } }
.booting .ring, .booting .hud-label, .booting .radar { animation-play-state: paused; }

/* Kai (guide.js): a canvas over a fallback picture. Shared by the hero, the AI Tutor and the corner buddy */
.kai-stage { position: absolute; inset: 0; }
.guide-img { position: absolute; height: auto; }
.guide-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.4s; }
.kai.gl-on .guide-gl { opacity: 1; }
.kai.gl-on .guide-img { visibility: hidden; }
.guide-say { width: max-content; max-width: 240px; margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: rgba(8, 12, 34, 0.94); border: 1px solid rgba(34, 211, 238, 0.5); color: var(--text); font: 700 0.86rem/1.4 var(--f-body); box-shadow: 0 0 26px -6px rgba(34, 211, 238, 0.65); transition: opacity 0.3s, transform 0.45s var(--ease); }
.guide-say::after { content: ""; position: absolute; left: -1px; bottom: -9px; width: 14px; height: 10px; background: rgba(8, 12, 34, 0.94); border-left: 1px solid rgba(34, 211, 238, 0.5); clip-path: polygon(0 0, 100% 0, 0 100%); }
/* in the hero: full body, standing on a holo pad in front of the core */
.guide { position: absolute; z-index: 5; left: -13%; bottom: -13%; height: 106%; aspect-ratio: 587 / 1260; cursor: pointer; animation: guide-in 1.1s var(--ease) 0.3s both; }
.guide .guide-img { left: 10.22%; top: 7.14%; width: 79.56%; animation: float 5s ease-in-out infinite; }
.guide::before { content: ""; position: absolute; left: 24%; right: 20%; bottom: 2.2%; height: 3.6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent); transform: scale(calc(1 - var(--hop, 0) * 0.35)); opacity: calc(1 - var(--hop, 0) * 0.45); }
.guide::after { content: ""; position: absolute; z-index: -1; left: 14%; right: 10%; bottom: 0.6%; height: 7%; border-radius: 50%; border: 1px solid rgba(34, 211, 238, 0.55); background: radial-gradient(closest-side, rgba(34, 211, 238, 0.16), transparent); box-shadow: 0 0 26px rgba(34, 211, 238, 0.35), inset 0 0 18px rgba(139, 92, 246, 0.4); animation: breathe 3s ease-in-out infinite; }
.guide .guide-say { position: absolute; z-index: 2; left: 38%; top: 5.5%; transform: translateY(-100%); min-height: 2.6em; animation: say-in 0.6s var(--ease) 1.2s both; }
@keyframes guide-in { from { opacity: 0; transform: translateY(40px) scale(0.92); } }
@keyframes say-in { from { opacity: 0; transform: translateY(-80%) scale(0.85); } }
/* head-and-shoulders framing (VIEWS.bust in guide.js) */
.buddy .guide-img, .tutor-face .guide-img { left: 7.31%; top: 8.86%; width: 85.37%; }
.buddy .kai-stage, .tutor-face .kai-stage { overflow: hidden; }

/* Kai as the corner buddy (buddy.js) */
.buddy { position: fixed; left: 14px; bottom: 0; z-index: 175; width: 168px; pointer-events: none; transform: translateY(105%); transition: transform 0.65s var(--ease); }
.buddy.on { transform: none; }
.buddy .kai { position: relative; width: 100%; aspect-ratio: 547 / 790; pointer-events: auto; cursor: pointer; }
.buddy .kai::before { content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; bottom: 0; height: 52%; border-radius: 50% 50% 0 0; background: radial-gradient(60% 70% at 50% 100%, rgba(124, 58, 237, 0.6), rgba(34, 211, 238, 0.18) 62%, transparent 76%); }
.buddy .guide-say { position: absolute; left: 80%; top: 6%; pointer-events: auto; }
.buddy .guide-say.quiet, .tutor-face .guide-say.quiet { opacity: 0; transform: translateY(8px) scale(0.9); pointer-events: none; }
.buddy-x { position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: rgba(8, 12, 34, 0.92); border: 1px solid var(--line-strong); color: var(--soft); cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity 0.2s; }
.buddy:hover .buddy-x { opacity: 1; }
@media (max-width: 640px) {
  .buddy { width: 116px; left: 4px; }
  .buddy .guide-say { max-width: 180px; font-size: 0.78rem; padding: 8px 11px; }
}
.booting .guide, .booting .guide-say { animation-play-state: paused; }
.hero-floor { position: absolute; left: 50%; bottom: 0; width: 100vw; height: 42%; translate: -50% 0; z-index: -1; pointer-events: none; perspective: 380px; overflow: hidden; opacity: 0.6; -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%); mask-image: linear-gradient(to top, #000 0%, transparent 85%); }
.hero-floor::before { content: ""; position: absolute; left: -60%; right: -60%; top: 0; height: 260%; background-image: linear-gradient(rgba(139, 92, 246, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, 0.38) 1px, transparent 1px); background-size: 64px 64px; transform-origin: 50% 0; animation: floor 2.6s linear infinite; }
@keyframes floor { from { transform: rotateX(70deg) translateY(-64px); } to { transform: rotateX(70deg) translateY(0); } }
.scroll-cue { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer; padding: 0; }
.scroll-cue i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--a2); box-shadow: 0 0 8px var(--a2); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 22px 0 40px; gap: 8px; }
  .hero-visual { width: min(100%, 440px); margin-top: 18px; }
  .hero-stats { grid-template-columns: repeat(2, auto); }
  .scroll-cue { display: none; }
  .hud-label { font-size: 0.56rem; padding: 5px 8px; }
  .hl2 { right: -2%; }
  .guide { left: -9%; bottom: -10%; height: 100%; }
  .guide .guide-say { left: 34%; max-width: 190px; font-size: 0.78rem; padding: 8px 11px; }
}

/* Topic ticker */
.ticker { position: relative; width: 100vw; margin-left: calc(50% - 50vw); padding: 15px 0; overflow: hidden; border-block: 1px solid var(--line); background: rgba(5, 8, 24, 0.72); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; align-items: center; width: max-content; animation: marquee 40s linear infinite; }
.ticker-track > * { margin-right: 30px; }
.ticker span { font: 700 clamp(1rem, 2vw, 1.35rem)/1.2 var(--f-display); letter-spacing: 0.02em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px rgba(196, 181, 253, 0.75); white-space: nowrap; }
.ticker span:nth-child(4n + 1) { color: var(--text); -webkit-text-stroke: 0; }
.ticker i { flex: none; width: 9px; height: 9px; rotate: 45deg; background: var(--grad); box-shadow: 0 0 10px rgba(139, 92, 246, 0.95); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Home sections ---------- */
.sec { position: relative; padding: 68px 0 6px; scroll-margin-top: 70px; }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 20px; margin-bottom: 26px; }
.sec-head .eyebrow { grid-column: 1 / -1; }
.sec-head h2 { margin: 0; }
.more { justify-self: end; font-size: 0.94rem; white-space: nowrap; }
.meet { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; padding-top: 88px; }
.meet-copy .sec-head { margin-bottom: 14px; }
.meet-copy .lead { margin: 0 0 4px; }
.meet-copy .btn { margin-top: 18px; }
@media (max-width: 880px) { .meet { grid-template-columns: 1fr; gap: 30px; padding-top: 64px; } }
.holo { position: relative; padding-top: 34px; }
.holo-bit { position: absolute; z-index: 2; top: -36px; right: 6%; width: 116px; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.55)) drop-shadow(0 0 40px rgba(139, 92, 246, 0.45)); }
.holo-bit::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -16px; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(34, 211, 238, 0.55), transparent); animation: breathe 2.6s ease-in-out infinite; }
.hud-frame::before {
  content: "";
  position: absolute;
  inset: 22px -10px -10px;
  pointer-events: none;
  background:
    linear-gradient(var(--a2), var(--a2)) top left / 20px 2px no-repeat,
    linear-gradient(var(--a2), var(--a2)) top left / 2px 20px no-repeat,
    linear-gradient(var(--a2), var(--a2)) top right / 20px 2px no-repeat,
    linear-gradient(var(--a2), var(--a2)) top right / 2px 20px no-repeat,
    linear-gradient(var(--a2), var(--a2)) bottom left / 20px 2px no-repeat,
    linear-gradient(var(--a2), var(--a2)) bottom left / 2px 20px no-repeat,
    linear-gradient(var(--a2), var(--a2)) bottom right / 20px 2px no-repeat,
    linear-gradient(var(--a2), var(--a2)) bottom right / 2px 20px no-repeat;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
  opacity: 0.85;
}

/* Pinned scroll story: the 3D core locks onto the stage and changes shape per step */
.story { height: 340vh; padding-top: 40px; }
.story-pin { position: sticky; top: 76px; height: calc(100vh - 92px); min-height: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.story-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; }
.story-steps > li { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(36px); filter: blur(10px); pointer-events: none; transition: opacity 0.6s ease, transform 0.9s var(--ease), filter 0.6s ease; }
.story-steps > li.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.story-n { display: block; font: 800 clamp(3rem, 6vw, 4.6rem)/1 var(--f-hud); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.9; }
.story-steps .ic { display: inline-grid; place-items: center; width: 46px; height: 46px; margin: 18px 0 0; border-radius: 14px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.32), rgba(14, 116, 144, 0.26)); border: 1px solid rgba(167, 139, 250, 0.38); color: #c4b5fd; box-shadow: 0 0 22px -6px rgba(139, 92, 246, 0.8); }
.story-steps h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 14px 0 8px; }
.story-steps p { margin: 0 0 20px; color: var(--soft); font-size: 1.12rem; max-width: 44ch; }
.story-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 34px; }
.story-nav span { font: 600 0.7rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.3s, text-shadow 0.3s; }
.story-nav span.on { color: var(--a2); text-shadow: 0 0 12px rgba(34, 211, 238, 0.7); }
.story-progress { max-width: 380px; height: 2px; margin-top: 14px; border-radius: 2px; background: rgba(148, 160, 255, 0.15); overflow: hidden; }
.story-progress i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #22d3ee); box-shadow: 0 0 12px rgba(34, 211, 238, 0.9); transform: scaleX(0); transform-origin: left; }
.story-stage { position: relative; width: min(100%, 540px); aspect-ratio: 1; justify-self: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stage-ring { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, 0.32); animation: spinr 50s linear infinite; }
.stage-ring::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px solid rgba(139, 92, 246, 0.22); box-shadow: 0 0 60px -10px rgba(124, 58, 237, 0.45) inset; }
.stage-label { top: 4%; left: 0; }
.story-stage::after, .hero-visual::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; border: 2px solid rgba(34, 211, 238, 0.85); opacity: 0; pointer-events: none; }
.story-stage.pulse::after { animation: shock 1s var(--ease); }
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .story { height: auto; }
  .story-pin { position: static; height: auto; min-height: 0; grid-template-columns: 1fr; }
  .story-steps { gap: 14px; }
  .story-steps > li { grid-area: auto; opacity: 1; transform: none; filter: none; pointer-events: auto; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card-bg); box-shadow: var(--shadow); }
  .story-n { font-size: 2rem; }
  .story-stage, .story-nav, .story-progress { display: none; }
}

/* ---------- Chat bubbles (demo, tutor, lesson comparisons) ---------- */
.chat { position: relative; background: linear-gradient(180deg, rgba(15, 21, 54, 0.94), rgba(7, 11, 30, 0.96)); border: 1px solid var(--line-strong); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95), 0 0 70px -24px rgba(139, 92, 246, 0.55); }
.chat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 0.92rem; background: rgba(5, 8, 24, 0.6); }
.chat-head > .art { width: 30px; height: 30px; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2), 0 0 10px var(--ok); margin-left: auto; animation: pulse 2s ease-in-out infinite; }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; }
.demo .msgs { height: 300px; overflow: hidden; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; font-size: 0.97rem; line-height: 1.55; animation: pop 0.3s var(--ease); }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 8px 22px -12px rgba(124, 58, 237, 0.95); }
.msg.ai { align-self: flex-start; background: rgba(148, 160, 255, 0.09); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.ai.warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.42); color: #fde68a; }
.msg-link { display: block; margin-top: 8px; font-size: 0.9rem; white-space: normal; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 8px var(--a2); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Tiles, rules, level path ---------- */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.tile .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.32), rgba(14, 116, 144, 0.26)); border: 1px solid rgba(167, 139, 250, 0.38); color: #c4b5fd; box-shadow: 0 0 22px -6px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12); transition: transform 0.6s var(--ease), color 0.3s; }
.tile:hover .ic { transform: rotate(-8deg) scale(1.08); color: var(--a2); }
.tile h3 { margin: 0 0 6px; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.tile.link, .lv, .post-card { color: var(--text); transition: transform 0.6s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.tile.link:hover, .post-card:hover { text-decoration: none; color: var(--text); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.tile.link:focus-visible, .lv:focus-visible, .post-card:focus-visible { transform: translateY(-3px); }
.tile .badge { display: inline-block; margin-top: 10px; }
.tipcard { display: flex; align-items: center; gap: 16px; margin-top: 22px; background: linear-gradient(90deg, rgba(124, 58, 237, 0.2), rgba(9, 13, 36, 0.88) 70%); }
.tipcard > .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 0 20px -4px rgba(139, 92, 246, 0.9); }
.tipcard > .art { width: 58px; flex: none; }
.tipcard b { font: 700 1.05rem var(--f-display); }
.tipcard p { margin: 2px 0 0; color: var(--soft); }
.rules { counter-reset: r; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.rules li { counter-increment: r; position: relative; overflow: hidden; margin: 0; padding: 66px 18px 18px; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); font-weight: 700; font-size: 1.02rem; transition: border-color 0.3s, transform 0.5s var(--ease); }
.rules li::before { content: "0" counter(r); position: absolute; left: 18px; top: 16px; font: 800 2rem/1 var(--f-hud); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rules li::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(34, 211, 238, 0.14) 50%, transparent 70%); transform: translateX(-110%); animation: sweep 7s var(--ease) infinite; }
.rules li:nth-child(2)::after { animation-delay: 0.5s; }
.rules li:nth-child(3)::after { animation-delay: 1s; }
.rules li:nth-child(4)::after { animation-delay: 1.5s; }
.rules li:nth-child(5)::after { animation-delay: 2s; }
.rules li:hover { border-color: rgba(34, 211, 238, 0.5); transform: translateY(-3px); }
.rules li span { display: block; margin-top: 4px; font-weight: 500; color: var(--muted); font-size: 0.92rem; }
@keyframes sweep { 0%, 55% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
.path { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 28px; }
.path::before, .path::after { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 7px; height: 2px; border-radius: 2px; }
.path::before { background: rgba(148, 160, 255, 0.15); }
.path::after { background: linear-gradient(90deg, var(--beginner), var(--intermediate), var(--advanced), var(--pro)); transform-origin: left; transform: scaleX(var(--p, 0)); box-shadow: 0 0 14px rgba(139, 92, 246, 0.85); }
.path + .vchart { margin-top: 18px; }
.lv { padding: 18px; }
.lv:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent), 0 30px 60px -30px color-mix(in srgb, var(--c) 75%, transparent); }
.lv .node { position: absolute; top: -28px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bg); border: 2px solid rgba(148, 160, 255, 0.35); transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.lv.lit .node { background: var(--c); border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 0 18px var(--c); }
.lv .art { height: 124px; padding: 8px; margin: 0 0 14px; border-radius: 14px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 24%, transparent), rgba(5, 8, 24, 0.6) 70%); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.lv h3 { margin: 10px 0 2px; }
.lv p { margin: 0 0 14px; color: var(--muted); font-size: 0.94rem; font-weight: 500; }
@media (max-width: 960px) { .path { grid-template-columns: 1fr 1fr; padding-top: 0; } .path::before, .path::after, .lv .node { display: none; } }
@media (max-width: 520px) { .path { grid-template-columns: 1fr; } }
.progress { display: flex; align-items: center; gap: 12px; max-width: 520px; }
.meter { flex: 1; height: 8px; border-radius: 99px; background: rgba(148, 160, 255, 0.12); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #22d3ee); box-shadow: 0 0 12px rgba(34, 211, 238, 0.75); transition: width 0.6s var(--ease); }

/* ---------- Illustrations ---------- */
.art { display: block; width: 100%; height: auto; overflow: visible; }
.art .float { animation: float 4s ease-in-out infinite; }
.art .float.d2 { animation-delay: -2s; }
.art .pulse, .cover .pulse { animation: pulse 2.4s ease-in-out infinite; }
.art .spin { transform-origin: 100px 70px; animation: spin 26s linear infinite; }
.art .grow { transform-box: fill-box; transform-origin: left; animation: growx 0.9s var(--ease) both; }
.art .pop { transform-box: fill-box; transform-origin: center; animation: popin 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.art .draw { stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.6s ease forwards; }
.art .blink { transform-box: fill-box; transform-origin: center; animation: eyes 4.5s infinite; }
.art .typing { animation: blink 1.2s infinite; }
.art .t2 { animation-delay: 0.2s; }
.art .t3 { animation-delay: 0.4s; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes growx { from { transform: scaleX(0); } }
@keyframes growy { from { transform: scaleY(0); } }
@keyframes popin { from { transform: scale(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes eyes { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@keyframes popfade { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.cover { display: block; width: 100%; }

/* Page heads with a picture */
.page-head { position: relative; padding: 46px 0 10px; }
.page-head.with-art { display: grid; grid-template-columns: 1fr 230px; gap: 28px; align-items: center; }
.head-art { position: relative; }
.head-art::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(124, 58, 237, 0.4), rgba(14, 116, 144, 0.12) 50%, transparent 70%); animation: orb 6s ease-in-out infinite; }
.head-art::after { content: ""; position: absolute; inset: -6%; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, 0.35); animation: spinr 30s linear infinite; }
.head-art .art { position: relative; filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.35)); }
@media (max-width: 700px) { .page-head.with-art { grid-template-columns: 1fr; } .head-art { max-width: 170px; } }

/* ---------- Course map + dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.stat b { display: block; font: 700 2.2rem/1.1 var(--f-hud); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat.word b { font: 700 1.5rem/1.3 var(--f-display); }
.stat b small { font: 600 1rem var(--f-body); color: var(--muted); }
.stat span { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.bdg { text-align: center; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform 0.6s var(--ease), border-color 0.3s; }
.bdg svg { filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.55)); animation: medal 3.2s ease-in-out infinite; }
.bdg b { font-size: 0.9rem; line-height: 1.3; }
.bdg span { font-size: 0.76rem; color: var(--muted); line-height: 1.3; }
.bdg.off { background: rgba(7, 10, 28, 0.6); box-shadow: none; }
.bdg.off svg { filter: none; animation: none; opacity: 0.75; }
.bdg.off b { color: var(--muted); }
@keyframes medal { 50% { transform: translateY(-3px) rotate(-5deg); } }
.vchart { margin: 0; }
.vchart figcaption { font: 600 1.05rem var(--f-display); margin-bottom: 4px; }
.vplot { position: relative; height: 170px; margin: 16px 0 34px 34px; }
.gl { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(148, 160, 255, 0.12); }
.gl.pass { border-top: 1px dashed rgba(34, 211, 238, 0.6); }
.gl em { position: absolute; left: -34px; top: -0.75em; font: 600 0.7rem var(--f-mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.gl.pass em { left: auto; right: 0; top: -1.6em; color: var(--a2); }
.vbars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.vcol { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; cursor: default; border-radius: 6px; }
.vcol:hover, .vcol:focus { background: rgba(139, 92, 246, 0.1); outline: none; }
.vcol i { width: min(26px, 62%); height: var(--h); background: linear-gradient(180deg, #c4b5fd, #6d28d9); border-radius: 4px 4px 0 0; box-shadow: 0 0 14px -2px rgba(139, 92, 246, 0.85); transform-origin: bottom; animation: growy 1s var(--ease) both; }
.vcol span { position: absolute; bottom: -26px; font: 600 0.74rem var(--f-mono); color: var(--muted); }
details summary { cursor: pointer; font-weight: 700; color: var(--a1); font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--soft); font: 600 0.74rem var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.level-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.level-head .art { width: 120px; flex: none; }
.level h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.lesson-card { display: flex; align-items: center; gap: 14px; color: var(--text); padding: 14px 16px; transition: transform 0.4s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.lesson-card:hover { text-decoration: none; color: var(--text); transform: translateX(4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 30px -14px var(--c); }
.lesson-card .num { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 700 0.86rem/1 var(--f-hud); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); box-shadow: 0 0 16px -6px var(--c); }
.lesson-card .t { flex: 1; font-weight: 700; }
@media (max-width: 560px) { .level-head .art { width: 84px; } }

/* ---------- Lesson + post ---------- */
.lesson, .post { max-width: 780px; margin: 0 auto; padding-top: 34px; }
.post { max-width: 720px; }
.lesson-head { display: grid; grid-template-columns: 1fr 190px; gap: 24px; align-items: center; }
.lesson-head .art { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.35)); }
@media (max-width: 640px) { .lesson-head { grid-template-columns: 1fr; } .lesson-head .art { display: none; } }
.crumb { color: var(--muted); font: 500 0.82rem var(--f-mono); margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lesson h1, .post h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.lesson h2 { position: relative; font-size: 1.45rem; padding-left: 16px; }
.lesson h2::before { content: ""; position: absolute; left: 0; top: 0.16em; bottom: 0.16em; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #a78bfa, #22d3ee); box-shadow: 0 0 10px rgba(139, 92, 246, 0.85); }
.lesson p, .lesson li, .post p, .post li { color: var(--soft); }
.post p, .post li { font-size: 1.08rem; }
.lesson ul, .post ul { padding-left: 1.2em; }
li { margin: 0.35em 0; }
li::marker { color: var(--a2); }
.kids { display: flex; gap: 16px; align-items: flex-start; margin: 24px 0; padding: 18px 20px; border-radius: var(--r); background: linear-gradient(135deg, rgba(251, 191, 36, 0.13), rgba(251, 191, 36, 0.03)); border: 1px solid rgba(251, 191, 36, 0.38); box-shadow: 0 0 34px -16px rgba(251, 191, 36, 0.7); }
.kids > .art { width: 58px; flex: none; }
.kids b { font: 700 1.08rem var(--f-display); color: #fcd34d; }
.kids p { margin: 4px 0 0; color: #fdebb6 !important; font-size: 1.05rem; }
.prompt-box { position: relative; margin: 1em 0; }
.prompt-box pre { margin: 0; padding: 16px 92px 16px 18px; background: rgba(3, 6, 18, 0.88); border: 1px solid var(--line-strong); border-radius: 14px; white-space: pre-wrap; font: 14.5px/1.65 var(--f-mono); color: #dbe2ff; box-shadow: inset 3px 0 0 #8b5cf6, 0 0 34px -20px rgba(34, 211, 238, 0.7); }
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 6px 11px; border-radius: 9px; border: 1px solid rgba(34, 211, 238, 0.42); background: rgba(12, 18, 48, 0.92); color: var(--a2); font: 700 0.7rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: box-shadow 0.25s, border-color 0.25s; }
.copy-btn:hover { border-color: var(--a2); box-shadow: 0 0 16px -4px rgba(34, 211, 238, 0.9); }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .sim-grid { grid-template-columns: 1fr; } }
.sim-col { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sim-col.bad { border-color: rgba(251, 113, 133, 0.38); background: linear-gradient(180deg, rgba(251, 113, 133, 0.11), rgba(9, 13, 36, 0.88) 45%); }
.sim-col.good { border-color: rgba(52, 211, 153, 0.38); background: linear-gradient(180deg, rgba(52, 211, 153, 0.11), rgba(9, 13, 36, 0.88) 45%); }
.sim-col .msg { max-width: 100%; }
.sim-label { font: 700 0.72rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.bad .sim-label { color: var(--bad); }
.good .sim-label { color: var(--ok); }
.sim-note { margin: 0; font-size: 0.92rem; color: var(--muted) !important; }
.callout { margin: 28px 0; padding: 18px 20px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.callout > strong { font: 700 1.1rem var(--f-display); color: var(--a1); }
.callout.try { background: linear-gradient(180deg, rgba(34, 211, 238, 0.11), rgba(9, 13, 36, 0.88) 70%); border-color: rgba(34, 211, 238, 0.32); }
.callout.try > strong { color: var(--a2); }
.callout p { margin: 0.4em 0 0.8em; }
.callout ul { margin: 0.5em 0 0; }
.byline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font: 700 0.72rem var(--f-hud); box-shadow: 0 0 16px -2px rgba(139, 92, 246, 0.85); }
.post .cover { height: 230px; border-radius: var(--r); margin: 6px 0 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- Lesson diagrams ---------- */
.fig { margin: 20px 0 8px; }
.fig figcaption { font: 600 0.74rem var(--f-mono); letter-spacing: 0.06em; color: var(--muted); text-align: center; margin-top: 12px; }
.fic { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(14, 116, 144, 0.24)); border: 1px solid rgba(167, 139, 250, 0.38); color: #c4b5fd; box-shadow: 0 0 18px -6px rgba(139, 92, 246, 0.85); }
.lesson .flow ol, .lesson .igrid ul, .lesson .craftfig ol { list-style: none; margin: 0; padding: 0; }
.flow ol { display: flex; gap: 30px; }
.flow li { flex: 1; position: relative; margin: 0; padding: 16px 12px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; animation: popfade 0.5s ease both; animation-delay: var(--d); }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -21px; top: 50%; width: 11px; height: 11px; border-top: 2px solid var(--a2); border-right: 2px solid var(--a2); transform: translateY(-50%) rotate(45deg); filter: drop-shadow(0 0 4px var(--a2)); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 4px 0; } }
@keyframes nudgey { 50% { translate: 0 4px; } }
.flow b { color: var(--text); font-size: 0.95rem; line-height: 1.25; margin-top: 4px; }
.flow small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.flow.danger li:not(:first-child) .fic, .igrid.no .fic { background: rgba(251, 113, 133, 0.15); color: var(--bad); border-color: rgba(251, 113, 133, 0.42); box-shadow: 0 0 18px -6px rgba(251, 113, 133, 0.85); }
.flow.danger li:last-child { border-color: rgba(251, 113, 133, 0.42); background: rgba(251, 113, 133, 0.07); }
@media (max-width: 640px) {
  .flow ol { flex-direction: column; gap: 24px; }
  .flow li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -18px; transform: translateX(-50%) rotate(135deg); animation-name: nudgey; }
}
.igrid ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.igrid li { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; font-weight: 700; font-size: 0.88rem; line-height: 1.3; color: var(--text) !important; animation: popfade 0.5s ease both; animation-delay: var(--d); }
.ban { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 50%; background: #e11d48; color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); }
.craftfig ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.craftfig li { margin: 0; padding: 16px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: popfade 0.5s ease both; animation-delay: var(--d); }
.craftfig .cl { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 800 1.3rem var(--f-hud); margin-bottom: 4px; box-shadow: 0 0 20px -4px rgba(139, 92, 246, 0.95); }
.craftfig b { color: var(--text); font-size: 0.92rem; }
.craftfig small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
@media (max-width: 640px) { .craftfig ol { grid-template-columns: 1fr 1fr; } }

/* ---------- Widgets + charts ---------- */
.widget { margin: 30px 0; padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.widget h2 { margin-top: 0; }
.sentence { font: 600 1.35rem var(--f-display); margin: 14px 0; }
.blank { display: inline-block; min-width: 70px; padding: 0 10px; border-radius: 10px; background: rgba(34, 211, 238, 0.14); color: #a5f3fc; border: 1px solid rgba(34, 211, 238, 0.45); text-align: center; box-shadow: 0 0 14px -4px rgba(34, 211, 238, 0.85); }
.hbars { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 16px; }
.hrow { display: grid; grid-template-columns: 130px 1fr 92px; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; }
.hbars.wide .hrow { grid-template-columns: 120px 1fr 150px; }
.hrow:hover, .hrow:focus { background: rgba(139, 92, 246, 0.1); outline: none; }
.hl { font-weight: 700; font-size: 0.95rem; text-align: right; }
.hv { font: 600 0.82rem var(--f-mono); color: var(--soft); }
.track { height: 14px; border-radius: 0 6px 6px 0; background: rgba(148, 160, 255, 0.06); }
.track i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #6d28d9, #a78bfa); border-radius: 0 4px 4px 0; box-shadow: 0 0 12px -2px rgba(139, 92, 246, 0.95); transform-origin: left; animation: growx 0.9s var(--ease) both; }
.hrow.picked .track i { background: linear-gradient(90deg, #0e7490, #22d3ee); box-shadow: 0 0 12px -2px rgba(34, 211, 238, 0.95); }
.hrow.other .track i { background: rgba(148, 160, 255, 0.35); box-shadow: none; }
@media (max-width: 520px) { .hrow, .hbars.wide .hrow { grid-template-columns: 90px 1fr 76px; } .hbars.wide .hv { font-size: 0.72rem; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.chips.flat { padding: 0; }
.chip { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(12, 17, 44, 0.8); color: var(--soft); font: 700 0.86rem var(--f-body); cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s; }
.chip:hover, .chip.on { border-color: rgba(34, 211, 238, 0.65); color: #fff; background: rgba(34, 211, 238, 0.12); box-shadow: 0 0 16px -6px rgba(34, 211, 238, 0.95); }
.parts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .parts-grid { grid-template-columns: 1fr; } }
.parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.part { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(251, 113, 133, 0.14); color: #fda4af; border: 1px solid rgba(251, 113, 133, 0.35); }
.part.ok { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.38); }
.part svg { vertical-align: -1px; margin-right: 2px; }
.rounds { margin: 18px 0; }
.cells { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.cell { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; cursor: default; }
.cell.ok { background: #059669; box-shadow: 0 0 12px -2px rgba(52, 211, 153, 0.9); }
.cell.no { background: #e11d48; box-shadow: 0 0 12px -2px rgba(251, 113, 133, 0.9); }
.tip { position: fixed; z-index: 160; max-width: 260px; padding: 7px 11px; border-radius: 10px; background: rgba(6, 9, 26, 0.96); border: 1px solid rgba(34, 211, 238, 0.42); color: #fff; font-size: 0.84rem; font-weight: 600; line-height: 1.4; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity 0.12s; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.85), 0 0 18px -6px rgba(34, 211, 238, 0.65); }
.tip.on { opacity: 1; }

/* ---------- Quiz ---------- */
.quiz fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 0 0 14px; background: var(--panel); box-shadow: var(--shadow); min-width: 0; transition: border-color 0.3s, background 0.3s; }
.quiz legend { float: left; width: 100%; font-weight: 800; padding: 0; margin-bottom: 8px; }
.quiz legend + * { clear: both; }
.from { display: block; font: 500 0.76rem var(--f-mono); color: var(--muted); margin-top: 2px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; color: var(--soft); transition: background 0.2s, border-color 0.2s; }
.opt:hover { background: rgba(139, 92, 246, 0.1); border-color: rgba(167, 139, 250, 0.25); }
.opt:has(input:checked) { background: rgba(139, 92, 246, 0.15); border-color: rgba(167, 139, 250, 0.5); color: var(--text); }
.opt input { margin-top: 6px; accent-color: #8b5cf6; width: 17px; height: 17px; }
fieldset.right { border-color: rgba(52, 211, 153, 0.5); background: linear-gradient(180deg, rgba(52, 211, 153, 0.09), rgba(9, 13, 36, 0.88)); }
fieldset.wrong { border-color: rgba(251, 113, 133, 0.5); background: linear-gradient(180deg, rgba(251, 113, 133, 0.09), rgba(9, 13, 36, 0.88)); }
fieldset.right .opt.correct, fieldset.wrong .opt.correct { border-color: rgba(52, 211, 153, 0.55); background: rgba(52, 211, 153, 0.13); color: #d1fae5; }
.why { margin: 8px 4px 0; font-size: 0.95rem; color: var(--soft); }
.qres { font-weight: 800; }
.qres.ok { color: var(--ok); text-shadow: 0 0 14px rgba(52, 211, 153, 0.6); }
.qres.bad { color: var(--bad); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

/* ---------- Builder ---------- */
.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 880px) { .builder { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 800; }
.field b { color: var(--a2); font: 800 1.08em var(--f-hud); text-shadow: 0 0 12px rgba(34, 211, 238, 0.65); }
.field small { font-weight: 600; color: var(--muted); margin-left: 6px; }
textarea, .input, .ask input { width: 100%; background: var(--input); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 1rem; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
textarea::placeholder, input::placeholder { color: #737bab; }
textarea:focus, .input:focus, .ask input:focus { outline: none; border-color: rgba(34, 211, 238, 0.75); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12), 0 0 24px -6px rgba(34, 211, 238, 0.65); }
.score { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; }
.score b { font-family: var(--f-hud); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 8px 0; margin: 0; color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); }
.checks li.ok { color: var(--text); }
.checks li.ok b { color: var(--ok); }
.checks span { display: block; font-size: 0.88rem; color: var(--muted); padding-left: 1.4em; }
.checks svg { vertical-align: -3px; margin-right: 4px; color: #4a5185; }
.checks li.ok svg { color: var(--ok); filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.75)); }
.warn { display: flex; gap: 8px; align-items: flex-start; color: #fde68a; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.42); padding: 10px 12px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; }
.warn svg { flex: none; margin-top: 3px; }

/* ---------- Tutor ---------- */
.tutor { max-width: 800px; margin: 0 auto; }
.tutor .msgs { height: min(54vh, 520px); }
.ask { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(5, 8, 24, 0.5); }
.note { margin: 0; padding: 0 16px 12px; }

/* Kai as the tutor's avatar */
.tutor-wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; max-width: 1100px; margin: 0 auto; align-items: start; }
.tutor-wrap .tutor { max-width: none; margin: 0; }
.tutor-kai { position: sticky; top: 90px; padding: 16px 18px 18px; text-align: center; overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, rgba(124, 58, 237, 0.32), transparent 62%), var(--card-bg); }
.tutor-face { position: relative; width: 100%; aspect-ratio: 547 / 790; cursor: pointer; }
.tutor-face::before { content: ""; position: absolute; left: 8%; right: 8%; top: 6%; bottom: 0; border-radius: 50% 50% 18px 18px; background: radial-gradient(55% 45% at 50% 40%, rgba(34, 211, 238, 0.18), transparent 70%); border: 1px solid rgba(148, 160, 255, 0.12); }
.tutor-face .guide-say { position: absolute; z-index: 2; left: 50%; bottom: 5%; transform: translateX(-50%); max-width: 92%; border-radius: 16px; text-align: center; }
.tutor-face .guide-say::after { display: none; }
.tutor-face .guide-say.quiet { transform: translate(-50%, 10px) scale(0.92); }
.tutor-id b { display: block; margin-top: 10px; font: 700 1.35rem/1.2 var(--f-display); }
.tutor-id span { font: 600 0.7rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.voice { margin-top: 14px; }
.voice[aria-pressed="true"] { background: var(--grad); border-color: rgba(196, 181, 253, 0.4); color: #fff; box-shadow: 0 0 22px -6px rgba(124, 58, 237, 0.9); }
.kai-face { flex: none; width: 30px; height: 30px; border-radius: 50%; background: url(assets/guide.webp) 22% 8% / 170% auto no-repeat, linear-gradient(135deg, #2a1f6b, #0b2a3a); border: 1px solid rgba(34, 211, 238, 0.5); box-shadow: 0 0 12px -2px rgba(34, 211, 238, 0.65); }
@media (max-width: 900px) {
  .tutor-wrap { grid-template-columns: 1fr; }
  .tutor-kai { position: relative; top: 0; display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 12px 16px; }
  .tutor-face { grid-row: 1 / span 2; width: 120px; }
  .tutor-face .guide-say { display: none; }
  .tutor-id b { margin-top: 0; }
  .voice { margin-top: 8px; justify-self: start; }
}

/* ---------- XP, streaks and levels (xp.js) ---------- */
.xp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(10, 14, 38, 0.72); color: var(--text); font: 800 0.86rem/1 var(--f-hud); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.xp-chip:hover { text-decoration: none; color: #fff; border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 0 18px -6px rgba(251, 191, 36, 0.85); }
.xp-chip.bump { animation: bump 0.65s var(--ease); }
@keyframes bump { 35% { transform: scale(1.2); box-shadow: 0 0 28px -2px rgba(34, 211, 238, 0.95); } }
.xp-flame { display: inline-flex; align-items: center; gap: 3px; }
.xp-flame svg { width: 18px; height: 18px; transform-origin: 50% 90%; filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.85)); animation: flicker 1.6s ease-in-out infinite; }
.xp-flame.out svg { filter: grayscale(1); opacity: 0.45; animation: none; }
@keyframes flicker { 50% { transform: scale(1.08, 0.93) rotate(-3deg); } }
.xp-lv { position: relative; display: grid; place-items: center; width: 30px; height: 30px; }
.xp-lv svg { position: absolute; inset: 0; }
.xp-lv b { position: relative; font-size: 0.72rem; }
.xp-ring .xp-arc { transition: stroke-dashoffset 1s var(--ease); }
@media (max-width: 560px) { .xp-chip:not([hidden]) + .cta { display: none; } }
@media (max-width: 900px) { .streak-toast { top: 132px; } }

.xpcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 26px; align-items: center; margin: 18px 0 6px; padding: 22px 24px; background: radial-gradient(120% 140% at 0% 0%, rgba(124, 58, 237, 0.3), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(251, 146, 60, 0.14), transparent 55%), var(--card-bg); }
.xp-badge { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.xp-badge svg { position: absolute; inset: 0; filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.65)); }
.xp-badge b { position: relative; margin-top: -10px; font: 800 2.4rem/1 var(--f-hud); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xp-badge small { position: absolute; bottom: 27px; font: 600 0.58rem var(--f-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.xp-main .eyebrow { margin: 0; }
.xp-main h2 { margin: 2px 0 10px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.xp-main p { margin: 0; }
.xp-bar { height: 12px; margin-bottom: 8px; border-radius: 99px; background: rgba(148, 160, 255, 0.12); overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #22d3ee); box-shadow: 0 0 14px rgba(34, 211, 238, 0.85); transform-origin: left; animation: growx 1.2s var(--ease) both; }
.xp-streak { display: grid; justify-items: center; gap: 4px; padding-left: 24px; border-left: 1px solid var(--line); }
.xp-flame.big svg { width: 40px; height: 40px; }
.xp-flame.big b { font: 800 1.9rem/1 var(--f-hud); color: #fde68a; text-shadow: 0 0 14px rgba(251, 146, 60, 0.85); }
.xp-flame.big.out b { color: var(--muted); text-shadow: none; }
.week { list-style: none; display: flex; gap: 6px; margin: 6px 0 0; padding: 0; }
.week li { display: grid; justify-items: center; gap: 3px; margin: 0; font: 600 0.6rem var(--f-mono); color: var(--muted); }
.week i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #3a4278; }
.week li.on i { background: linear-gradient(135deg, #f97316, #fbbf24); border-color: #fbbf24; box-shadow: 0 0 10px rgba(251, 146, 60, 0.85); }
.xp-how { grid-column: 1 / -1; padding-top: 4px; }
.xp-how ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--soft); font-size: 0.92rem; }
.xp-how b { color: #fde68a; }
@media (max-width: 760px) {
  .xpcard { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .xp-badge { width: 92px; height: 92px; }
  .xp-badge svg { width: 92px; height: 92px; }
  .xp-badge b { font-size: 2rem; }
  .xp-badge small { bottom: 20px; }
  .xp-streak { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

.xp-pop { position: fixed; z-index: 178; left: 0; top: 0; transform: translate(-50%, -50%); padding: 8px 16px; border-radius: 99px; pointer-events: none; text-align: center; white-space: nowrap; background: linear-gradient(135deg, #f59e0b, #f97316 60%, #ec4899); color: #fff; font: 800 1.1rem/1.1 var(--f-hud); box-shadow: 0 0 30px -4px rgba(251, 146, 60, 0.95), 0 10px 30px -10px rgba(0, 0, 0, 0.85); }
.xp-pop small { display: block; margin-top: 2px; font: 700 0.62rem var(--f-body); opacity: 0.92; }
.streak-toast { position: fixed; z-index: 176; left: 50%; top: 84px; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(10, 12, 32, 0.96); border: 1px solid rgba(251, 191, 36, 0.5); box-shadow: 0 0 34px -8px rgba(251, 146, 60, 0.85), 0 20px 40px -20px rgba(0, 0, 0, 0.9); transform: translate(-50%, -40px); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.4s; }
.streak-toast.on { transform: translate(-50%, 0); opacity: 1; }
.streak-toast b { display: block; font: 700 1rem/1.3 var(--f-display); color: #fde68a; }
.streak-toast span:not(.xp-flame) { font-size: 0.84rem; color: var(--soft); }
.levelup { position: fixed; inset: 0; z-index: 172; display: grid; place-items: center; padding: 16px; overflow: hidden; background: rgba(3, 5, 14, 0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.4s; }
.levelup.on { opacity: 1; }
.lu-rays { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(139, 92, 246, 0.2) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%); animation: spinr 26s linear infinite; }
.lu-card { position: relative; width: min(100%, 420px); padding: 30px 26px 26px; border-radius: 26px; text-align: center; background: radial-gradient(120% 90% at 50% 0%, rgba(124, 58, 237, 0.42), transparent 60%), #0b1030; border: 1px solid rgba(196, 181, 253, 0.42); box-shadow: 0 0 80px -20px rgba(139, 92, 246, 1), 0 30px 60px -30px rgba(0, 0, 0, 0.9); transform: scale(0.7) translateY(24px); opacity: 0; transition: transform 0.7s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.4s; }
.levelup.on .lu-card { transform: none; opacity: 1; }
.lu-badge { position: relative; width: 120px; height: 120px; margin: -84px auto 4px; display: grid; place-items: center; filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.95)); animation: lu-pop 1s cubic-bezier(0.3, 1.6, 0.5, 1) 0.15s both; }
.lu-badge svg { position: absolute; inset: 0; }
.lu-badge b { position: relative; font: 800 2.8rem/1 var(--f-hud); color: #fff; text-shadow: 0 0 18px rgba(34, 211, 238, 0.95); }
.lu-kicker { margin: 6px 0 0; font: 800 0.92rem var(--f-hud); letter-spacing: 0.4em; text-transform: uppercase; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; animation: lu-glow 1.6s ease-in-out infinite; }
.lu-card h2 { margin: 8px 0 6px; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.lu-text { margin: 0 0 20px; color: var(--soft); }
@keyframes lu-pop { from { transform: scale(0) rotate(-120deg); } }
@keyframes lu-glow { 50% { filter: brightness(1.6); } }

/* ---------- Blog cards ---------- */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-card .cover { height: 150px; transition: transform 0.9s var(--ease); }
.post-card:hover .cover { transform: scale(1.07); }
.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; }
.post-card h3 { margin: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.meta { color: var(--muted); font: 500 0.76rem var(--f-mono); letter-spacing: 0.04em; }

/* ---------- Practice: game, library, glossary ---------- */
.game { max-width: 700px; margin: 0 auto; padding: 26px; }
.game .meter { margin: 10px 0 0; }
.situation { font: 600 1.55rem/1.35 var(--f-display); margin: 26px 0; min-height: 2.8em; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { justify-content: center; padding: 18px; font-size: 1.12rem; }
.choice.safe:hover { border-color: rgba(52, 211, 153, 0.75); background: rgba(52, 211, 153, 0.13); box-shadow: 0 0 28px -8px rgba(52, 211, 153, 0.95); }
.choice.unsafe:hover { border-color: rgba(251, 113, 133, 0.75); background: rgba(251, 113, 133, 0.13); box-shadow: 0 0 28px -8px rgba(251, 113, 133, 0.95); }
.feedback { margin: 16px 0 12px; padding: 14px 16px; border-radius: 14px; font-size: 1.02rem; animation: pop 0.3s var(--ease); }
.feedback.ok { background: rgba(52, 211, 153, 0.12); color: #bbf7d0; border: 1px solid rgba(52, 211, 153, 0.42); }
.feedback.no { background: rgba(251, 113, 133, 0.12); color: #fecdd3; border: 1px solid rgba(251, 113, 133, 0.42); }
.stars { display: flex; justify-content: center; gap: 8px; }
.stars svg { animation: popin 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.stars svg:nth-child(2) { animation-delay: 0.15s; }
.stars svg:nth-child(3) { animation-delay: 0.3s; }
.stars .on { fill: #fbbf24; stroke: #fbbf24; filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.85)); }
.stars .off { stroke: #3a4278; }
.lib-card h3 { margin: 0 0 4px; font-size: 1.06rem; }
.lib-card .prompt-box { margin: 8px 0 0; }
.lib-card .prompt-box pre { padding: 42px 14px 14px; }
.search { max-width: 440px; width: 100%; margin: 0 0 18px; display: block; }
.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.gloss dt { font: 700 1.12rem var(--f-display); color: #c4b5fd; }
.gloss dd { margin: 4px 0 0; color: var(--soft); }

/* ---------- Lesson layout with a sticky course sidebar ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 36px; max-width: 1120px; margin: 0 auto; }
.lesson-layout .lesson { max-width: none; margin: 0; }
.toc { position: sticky; top: 90px; align-self: start; margin-top: 34px; max-height: calc(100vh - 114px); overflow-y: auto; padding: 16px; }
.toc::before, .toc::after { display: none; }
.toc > b { font: 700 0.76rem var(--f-hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--a2); }
.toc-lv { margin: 14px 0 4px; }
.toc a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; color: var(--soft); font-size: 0.86rem; line-height: 1.3; transition: background 0.2s, color 0.2s; }
.toc a:hover { background: rgba(139, 92, 246, 0.1); color: #fff; text-decoration: none; }
.toc a.cur { background: linear-gradient(90deg, rgba(139, 92, 246, 0.24), transparent); color: #fff; box-shadow: inset 2px 0 0 var(--a2); }
.st { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #3a4278; flex: none; display: grid; place-items: center; color: #fff; }
.st.ok { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.75); }
@media (max-width: 1020px) { .lesson-layout { grid-template-columns: 1fr; } .toc { display: none; } }

/* Reading progress bar */
.readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.readbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7c3aed, #22d3ee, #f0abfc); box-shadow: 0 0 12px rgba(34, 211, 238, 0.9), 0 0 4px rgba(139, 92, 246, 0.9); }

/* ---------- Certificate ---------- */
.input { max-width: 280px; }
.cert { position: relative; max-width: 840px; margin: 24px auto; padding: 3px; border-radius: 24px; background: conic-gradient(from var(--ang), #7c3aed, #22d3ee, #f0abfc, #fbbf24, #7c3aed); animation: spinang 6s linear infinite; box-shadow: 0 0 70px -20px rgba(139, 92, 246, 0.95); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-in { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, rgba(124, 58, 237, 0.28), transparent 60%), #070b1f; border-radius: 21px; padding: 46px 28px; text-align: center; }
.cert-in::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(148, 160, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 160, 255, 0.05) 1px, transparent 1px); background-size: 32px 32px; }
.cert-in > * { position: relative; }
.cert-in .art { width: 150px; margin: 0 auto 6px; }
.cert h2 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0.2em 0; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert h3 { margin: 0.2em 0 0.6em; }
.caps { letter-spacing: 0.3em; text-transform: uppercase; color: var(--a2); font: 700 0.78rem var(--f-hud); }
.cert-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
@keyframes spinang { to { --ang: 360deg; } }

/* ---------- Floating tutor button + footer ---------- */
.fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 99px;
  color: #fff;
  font-weight: 800;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, #1d1658, #0b1f40) padding-box, conic-gradient(from var(--ang), #7c3aed, #22d3ee, #f0abfc, #7c3aed) border-box;
  animation: spinang 4s linear infinite;
  box-shadow: 0 12px 30px -8px rgba(124, 58, 237, 0.85), 0 0 30px -6px rgba(34, 211, 238, 0.5);
  transition: transform 0.35s var(--ease), box-shadow 0.3s;
}
.fab::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 1px solid rgba(34, 211, 238, 0.6); animation: ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite; pointer-events: none; }
@keyframes ping { 75%, 100% { transform: scale(1.35); opacity: 0; } }
.fab:hover { color: #fff; text-decoration: none; box-shadow: 0 16px 36px -8px rgba(124, 58, 237, 1), 0 0 38px -4px rgba(34, 211, 238, 0.75); }
[data-sec="tutor"] .fab { display: none; }
@media (max-width: 640px) { .fab { padding: 14px; } .fab span { display: none; } }
.foot { position: relative; margin-top: 30px; padding-top: 34px; text-align: center; color: var(--soft); background: linear-gradient(180deg, rgba(5, 8, 22, 0.55), rgba(3, 5, 14, 0.94)); border-top: 1px solid var(--line); }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--grad-line); box-shadow: 0 0 14px rgba(139, 92, 246, 0.75); }
.foot p { margin: 4px 0; }
.foot-lessons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: left; max-width: 1000px; margin: 0 auto 24px; }
.foot-lessons b { display: block; font: 700 0.72rem var(--f-hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--a2); margin-bottom: 10px; }
.foot-lessons a { display: block; color: var(--muted); font-size: 0.84rem; font-weight: 600; padding: 3px 0; line-height: 1.35; }
.foot-lessons a:hover { color: #fff; }
@media (max-width: 760px) { .foot-lessons { grid-template-columns: 1fr 1fr; } }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.foot-links a { color: var(--soft); }
.foot-links a:hover { color: #fff; }
.credit { margin-top: 20px; padding: 14px 0 18px; border-top: 1px solid var(--line); font: 500 0.74rem var(--f-mono); letter-spacing: 0.02em; color: var(--muted); }
.credit a { color: var(--soft); font-weight: 700; border-bottom: 1px solid rgba(167, 139, 250, 0.45); }
.credit a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--a2); }
@media (max-width: 640px) { .credit { padding-bottom: 84px; } }

/* ---------- Page transitions (View Transitions API) ---------- */
#app { view-transition-name: page; }
::view-transition-old(page) { animation: vt-out 0.32s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(page) { animation: vt-in 0.65s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-16px) scale(0.985); filter: blur(8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(26px); filter: blur(10px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; filter: blur(0); clip-path: inset(0); } }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 13px; border-radius: 2px; box-shadow: 0 0 8px currentColor; animation: fall 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); } }

/* ---------- Daily challenge ---------- */
.badge.new { color: #a5f3fc; background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.45); }
.daily-strip { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; margin-top: 18px; padding: 10px 16px 10px 10px; border-radius: 16px; border: 1px solid rgba(34, 211, 238, 0.35); background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(124, 58, 237, 0.1)); color: var(--text); box-shadow: 0 0 26px -12px rgba(34, 211, 238, 0.8); transition: border-color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease); }
.daily-strip:hover { text-decoration: none; color: #fff; border-color: rgba(34, 211, 238, 0.7); box-shadow: 0 0 30px -8px rgba(34, 211, 238, 0.9); transform: translateY(-2px); }
.daily-strip .ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--grad); color: #fff; box-shadow: 0 0 16px -4px rgba(139, 92, 246, 0.9); animation: dailyPing 2.6s ease-in-out infinite; }
.daily-strip b { display: block; font: 700 0.98rem/1.25 var(--f-display); }
.daily-strip small { display: block; color: var(--soft); font-size: 0.84rem; line-height: 1.35; }
.daily-strip.done { border-color: rgba(52, 211, 153, 0.35); background: linear-gradient(90deg, rgba(52, 211, 153, 0.1), rgba(9, 13, 36, 0.4)); box-shadow: none; }
.daily-strip.done .ic { background: rgba(52, 211, 153, 0.18); color: var(--ok); box-shadow: none; animation: none; }
@keyframes dailyPing { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55), 0 0 16px -4px rgba(139, 92, 246, 0.9); } 50% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0), 0 0 16px -4px rgba(139, 92, 246, 0.9); } }
.daily { max-width: 760px; margin: 8px auto 0; padding: 24px; }
.daily-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.daily-top .tag { --c: var(--a2); }
.daily-date { font: 600 0.8rem var(--f-mono); color: var(--muted); }
.daily-xp { margin-left: auto; font: 800 0.86rem var(--f-hud); color: #fde68a; text-shadow: 0 0 12px rgba(251, 146, 60, 0.7); }
.daily-q { font: 600 clamp(1.3rem, 3vw, 1.6rem)/1.35 var(--f-display); margin: 18px 0 6px; }
.daily .from { margin: 0 0 4px; }
.daily-opts { display: grid; gap: 10px; margin-top: 18px; }
.daily-opts.safe { grid-template-columns: 1fr 1fr; }
.daily-opts.prompt { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .daily-opts.prompt { grid-template-columns: 1fr; } }
.daily-opt { justify-content: flex-start; align-items: flex-start; gap: 12px; padding: 14px 16px; text-align: left; font-weight: 600; line-height: 1.45; white-space: normal; }
.daily-opts.safe .daily-opt { justify-content: center; align-items: center; padding: 18px; font-size: 1.1rem; }
.daily-opt .key { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(167, 139, 250, 0.4); font: 800 0.8rem var(--f-hud); color: #ddd6fe; }
.daily-opt .dp { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 500; color: var(--soft); }
.daily-opt:disabled { opacity: 0.55; }
.daily-opt.right { opacity: 1; border-color: rgba(52, 211, 153, 0.75); background: rgba(52, 211, 153, 0.14); box-shadow: 0 0 24px -10px rgba(52, 211, 153, 0.95); }
.daily-opt.right .key { background: var(--ok); border-color: var(--ok); color: #052e1c; }
.daily-opt.wrong { opacity: 1; border-color: rgba(251, 113, 133, 0.7); background: rgba(251, 113, 133, 0.12); }
.daily-opt.wrong .key { background: var(--bad); border-color: var(--bad); color: #3b0613; }
.daily-next { margin-top: 4px; }
.daily-next svg { vertical-align: -3px; }
.daily-next b { font-family: var(--f-hud); color: var(--a2); letter-spacing: 0.06em; }
.daily-log { max-width: 760px; margin: 0 auto; }
.dweek { list-style: none; display: flex; gap: 10px; margin: 0 0 10px; padding: 0; }
.dweek li { display: grid; justify-items: center; gap: 4px; margin: 0; font: 600 0.68rem var(--f-mono); color: var(--muted); }
.dweek i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; border: 1.5px dashed #3a4278; color: #fff; }
.dweek li.today i { border-color: var(--a2); border-style: solid; box-shadow: 0 0 14px -4px rgba(34, 211, 238, 0.9); }
.dweek li.win i { border: 0; background: #059669; box-shadow: 0 0 12px -2px rgba(52, 211, 153, 0.9); }
.dweek li.miss i { border: 0; background: #be123c; box-shadow: 0 0 12px -2px rgba(251, 113, 133, 0.8); }

/* ---------- Kai's wardrobe ---------- */
.xp-ward { margin-top: 12px; }
.lu-unlock { display: grid; justify-items: center; gap: 6px; margin: -6px 0 20px; padding: 14px 14px 16px; border-radius: 18px; border: 1px solid rgba(34, 211, 238, 0.42); background: linear-gradient(180deg, rgba(34, 211, 238, 0.12), rgba(124, 58, 237, 0.08)); box-shadow: 0 0 28px -12px rgba(34, 211, 238, 0.9); }
.lu-new { font: 700 0.64rem var(--f-hud); letter-spacing: 0.26em; text-transform: uppercase; color: var(--a2); }
.lu-unlock b { font: 700 1.2rem/1.3 var(--f-display); color: #fff; }
.wardrobe { display: grid; grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 8px; }
.ward-stage { position: sticky; top: 90px; padding: 18px 18px 14px; text-align: center; background: radial-gradient(110% 70% at 50% 18%, rgba(124, 58, 237, 0.3), transparent 70%), var(--card-bg); }
.ward-kai { position: relative; width: min(100%, 290px); aspect-ratio: 587 / 1260; margin: 0 auto; cursor: pointer; }
.ward-kai .guide-img { left: 10.22%; top: 7.14%; width: 79.56%; }
.ward-kai.bust { width: min(76%, 250px); aspect-ratio: 547 / 790; }
.ward-kai.bust .guide-img { left: 7.31%; top: 8.86%; width: 85.37%; }
.ward-kai.bust .kai-stage { overflow: hidden; border-radius: 50% 50% 18px 18px; }
.ward-kai::before { content: ""; position: absolute; z-index: -1; left: 16%; right: 16%; bottom: 0.5%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(34, 211, 238, 0.55), transparent); filter: blur(4px); }
.ward-kai .guide-say { position: absolute; z-index: 2; left: 50%; top: 1%; transform: translateX(-50%); max-width: 92%; border-radius: 16px; text-align: center; }
.ward-kai .guide-say::after { display: none; }
.ward-kai .guide-say.quiet { opacity: 0; transform: translate(-50%, -6px) scale(0.92); }
.ward-lv { margin: 12px 0 2px; font: 600 0.8rem var(--f-mono); letter-spacing: 0.08em; color: var(--soft); text-transform: uppercase; }
.ward-lv b { margin-right: 6px; font: 800 0.95rem var(--f-hud); color: var(--a2); text-shadow: 0 0 12px rgba(34, 211, 238, 0.7); }
.ward-items h2 { margin: 6px 0 14px; font-size: 1.35rem; }
.ward-items h2 + .ward-grid { margin-bottom: 26px; }
.ward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.ward-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--card-bg); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.ward-tile:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.6); }
.ward-tile:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; }
.ward-tile.on { border-color: rgba(34, 211, 238, 0.85); background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(9, 13, 36, 0.9)); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.45), 0 0 26px -8px rgba(34, 211, 238, 0.95); }
.ward-tile.locked { cursor: help; opacity: 0.7; }
.ward-tile.locked .wt-art > :first-child { filter: grayscale(1); opacity: 0.45; }
.wt-art { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.25); color: #c4b5fd; }
.ward-tile.on .wt-art { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.5); }
.wt-art svg { width: 32px; height: 32px; }
.wt-art .sw { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 -7px 12px rgba(0, 0, 0, 0.38), inset 0 3px 6px rgba(255, 255, 255, 0.35), 0 0 16px -3px var(--sw); }
.wt-lock { position: absolute; right: -8px; top: -8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #1e1b4b; border: 1px solid var(--line-strong); color: var(--soft); }
.ward-tile b { font: 700 0.9rem/1.25 var(--f-display); text-align: center; }
.ward-tile small { font: 600 0.66rem var(--f-mono); letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.ward-tile.on small { color: var(--a2); }
@media (max-width: 760px) {
  .wardrobe { grid-template-columns: 1fr; gap: 18px; }
  .ward-stage { position: relative; top: 0; }
  .ward-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
}

/* ---------- Move progress between devices ---------- */
.sync-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; margin: 22px 0 6px; padding: 18px 20px; background: linear-gradient(100deg, rgba(34, 211, 238, 0.1), rgba(124, 58, 237, 0.08) 60%), var(--card-bg); }
.sync-ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: 0 0 20px -6px rgba(139, 92, 246, 0.9); }
.sync-txt h2 { margin: 0 0 2px; font-size: 1.2rem; }
.sync-txt p { margin: 0; color: var(--soft); font-size: 0.92rem; }
.sync-panel { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--line); }
.sync-out { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; padding-top: 12px; }
.qr-box { padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 0 30px -8px rgba(34, 211, 238, 0.8); }
.qr { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.sync-steps { margin: 0 0 8px; padding-left: 1.3em; color: var(--soft); }
.sync-steps li { margin: 3px 0; }
.sync-paste { padding-top: 12px; max-width: 560px; }
.sync-paste .input { max-width: none; width: 100%; }
.sync-in { max-width: 760px; margin: 8px auto 0; padding: 22px; }
.sync-in h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
.sync-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sync-table th, .sync-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); }
.sync-table thead th { font: 600 0.7rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sync-table tbody th { text-align: left; font-weight: 700; color: var(--soft); }
.sync-table td b { color: var(--a2); font-family: var(--f-hud); }
.note-toast .nt-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(52, 211, 153, 0.18); color: var(--ok); }
.note-toast b { color: #bbf7d0 !important; }
@media (max-width: 760px) {
  .sync-card { grid-template-columns: auto minmax(0, 1fr); }
  .sync-btns { grid-column: 1 / -1; }
  .sync-out { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .qr-box { width: min(240px, 80%); }
}

/* ---------- Install as an app ---------- */
.app-card { margin-top: 14px; background: linear-gradient(100deg, rgba(124, 58, 237, 0.12), rgba(34, 211, 238, 0.06) 60%), var(--card-bg); }
.app-ic { background: linear-gradient(135deg, #0e7490, #4f46e5); }
.app-steps { margin: 0; max-width: 36ch; color: var(--soft); }
.note-toast.info .nt-ic { background: rgba(34, 211, 238, 0.16); color: var(--a2); }
.note-toast.info b { color: #a5f3fc !important; }
.foot-install { color: var(--a2) !important; }

/* ---------- Teacher pack ---------- */
.teach-promo { display: flex; align-items: center; gap: 16px; margin: 8px 0 4px; padding: 16px 20px; color: var(--text); border-color: rgba(34, 211, 238, 0.4); background: linear-gradient(100deg, rgba(34, 211, 238, 0.12), rgba(124, 58, 237, 0.1) 60%), var(--card-bg); transition: border-color 0.3s, transform 0.4s var(--ease); }
.teach-promo:hover { text-decoration: none; color: #fff; border-color: rgba(34, 211, 238, 0.75); transform: translateY(-2px); }
.teach-promo b { display: block; font: 700 1.15rem var(--f-display); }
.teach-promo small { display: block; color: var(--soft); font-size: 0.92rem; }
.teach-promo .arr { margin-left: auto; font-size: 1.3rem; }
.teach-how { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 0; margin: 10px 0 6px; }
.teach-how li { margin: 0; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--soft); font-size: 0.94rem; }
.teach-how li span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px; border-radius: 12px; background: var(--grad); color: #fff; box-shadow: 0 0 18px -6px rgba(139, 92, 246, 0.9); }
.teach-how li b { display: block; margin-bottom: 4px; font: 700 1.1rem var(--f-display); color: var(--text); }
.teach-level h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.teach-list { display: grid; gap: 10px; }
.teach-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px 14px; padding: 12px 16px; }
.teach-row .num { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font: 700 0.9rem var(--f-hud); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.teach-row .t b { display: block; font-weight: 700; }
.teach-row .t small { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 640px) {
  .teach-row { grid-template-columns: auto 1fr 1fr; }
  .teach-row .t { grid-column: 2 / -1; }
  .teach-row .btn { grid-row: 2; justify-content: center; }
  .teach-row a:first-of-type { grid-column: 2; }
  .teach-row a:last-of-type { grid-column: 3; }
}
/* the worksheet: a sheet of paper on screen, clean pages in print */
.ws-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 18px; }
.sheet { max-width: 820px; margin: 0 auto 26px; padding: 38px 44px; border-radius: 6px; background: #fff; color: #1b1e2e; font-size: 15px; line-height: 1.55; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sheet h1 { margin: 8px 0 4px; font-size: 1.9rem; color: #1e1b4b; }
.sheet h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.08rem; color: #312e81; }
.sheet h2 b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #4f46e5; color: #fff; font: 700 0.8rem var(--f-hud); }
.sheet p, .sheet li { color: #2a2f45; }
.sheet p { margin: 0.3em 0; }
.sheet ul, .sheet ol { margin: 4px 0 0; padding-left: 1.25em; }
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid #e4e4f0; }
.ws-brand { display: flex; flex: none; align-items: center; gap: 8px; white-space: nowrap; font: 700 0.76rem var(--f-hud); letter-spacing: 0.12em; text-transform: uppercase; color: #4338ca; }
.ws-brand .art { width: 26px; }
.ws-meta { font: 600 0.74rem var(--f-mono); color: #5b5f7a; text-align: right; }
.ws-intro { margin: 0 0 14px !important; color: #4a4f68 !important; }
.ws-name { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin: 0 0 18px; }
.ws-name span { padding-top: 18px; border-bottom: 1.5px solid #9aa0bf; font: 600 0.7rem var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #5b5f7a; }
.ws-sec { margin: 0 0 14px; padding: 14px 16px; border: 1.5px solid #e4e4f0; border-radius: 12px; break-inside: avoid; }
.ws-simple { margin: 0 !important; padding: 10px 12px; border-radius: 10px; background: #fffbeb; color: #57400a !important; }
.ws-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-prompt { position: relative; padding: 12px 12px 12px 46px; border: 1.5px dashed #a5a9c8; border-radius: 10px; }
.ws-prompt b { position: absolute; left: 10px; top: 10px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #4f46e5; color: #4f46e5; font-weight: 800; }
.ws-prompt p { margin: 0; font-family: var(--f-mono); font-size: 0.86rem; }
.ws-ask { margin: 10px 0 0 !important; font-weight: 700; }
.ws-lines i { display: block; height: 30px; border-bottom: 1px solid #b9bdd6; }
.ws-quiz > li { margin: 0 0 10px; }
.ws-quiz > li > p:first-child { margin: 0 0 4px; font-weight: 700; color: #1e1b4b; }
.ws-quiz ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; padding: 0; }
.ws-quiz ul li b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; border: 1.5px solid #6b7095; font-size: 0.75rem; }
.ws-talk li { margin: 4px 0; }
.ws-note { color: #5b5f7a !important; font-size: 0.92em; }
.ws-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #e4e4f0; font: 500 0.7rem var(--f-mono); color: #6b7095; text-align: center; }
.ws-key .ws-head { border-bottom-color: #fbbf24; }
@media (max-width: 640px) {
  .sheet { padding: 24px 18px; font-size: 14px; }
  .ws-pair, .ws-quiz ul, .ws-name { grid-template-columns: 1fr; }
  .ws-head { flex-direction: column; align-items: flex-start; }
}
/* the slide deck: full screen, big type that shrinks to fit */
body.deck-on .fab, body.deck-on .buddy, body.deck-on .top, body.deck-on .strip, body.deck-on .foot, body.deck-on .readbar { display: none; }
.deck { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; background: radial-gradient(120% 90% at 18% 0%, rgba(124, 58, 237, 0.3), transparent 60%), radial-gradient(90% 80% at 100% 100%, rgba(8, 145, 178, 0.24), transparent 60%), #050816; }
.deck-stage { position: relative; overflow: hidden; touch-action: pan-y; }
.slide { position: absolute; inset: 0; display: grid; place-items: center; padding: clamp(18px, 4vw, 56px); overflow: hidden; }
.slide[hidden] { display: none; }
.slide-in { width: min(100%, 1180px); font-size: calc(var(--k, 1) * clamp(17px, 2.1vw, 30px)); line-height: 1.45; animation: slideIn 0.45s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateY(16px); } }
.slide h1 { margin: 0.2em 0; font-size: 2.5em; line-height: 1.05; }
.slide h2 { margin: 0 0 0.6em; font-size: 1.65em; }
.s-kicker { margin: 0 0 0.3em; font: 600 0.62em var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--a2); }
.s-lead { max-width: 42ch; font-size: 1.05em; color: var(--soft); }
.s-title .slide-in { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; column-gap: 5%; }
.s-title .slide-in > * { grid-column: 1; }
.s-title .s-art { grid-column: 2; grid-row: 1 / span 4; filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.45)); }
.s-brand { margin: 1em 0 0; font: 700 0.6em var(--f-hud); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.s-big { max-width: 46ch; font-size: 1.25em; line-height: 1.45; color: var(--text); }
.s-simple .s-big { color: #fdebb6; }
.s-bit { width: 3.2em; margin-bottom: 0.3em; }
.s-body, .s-body p, .s-body li { color: var(--soft); }
.s-body ul { padding-left: 1.1em; }
.s-body li { margin: 0.25em 0; }
.s-body .prompt-box pre { font-size: 0.78em; }
.s-body .copy-btn { display: none; }
.s-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; }
.s-prompt { position: relative; padding: 0.9em 1em 0.9em 2.7em; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel); transition: border-color 0.3s, background 0.3s, opacity 0.3s; }
.s-prompt b { position: absolute; left: 0.8em; top: 0.9em; width: 1.4em; height: 1.4em; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.8em; }
.s-prompt p { margin: 0; font-family: var(--f-mono); font-size: 0.8em; color: var(--text); }
.slide .s-why { display: none; margin-top: 0.7em; font-family: var(--f-body); font-size: 0.8em; color: var(--soft); }
.slide.shown .s-why { display: block; }
.slide.shown .s-prompt[data-good="true"] { border-color: rgba(52, 211, 153, 0.8); background: rgba(52, 211, 153, 0.12); box-shadow: 0 0 30px -10px rgba(52, 211, 153, 0.9); }
.slide.shown .s-prompt[data-good="false"] { opacity: 0.65; }
.s-hint { margin-top: 1em; font-size: 0.6em; color: var(--muted); }
.slide.shown .s-hint { visibility: hidden; }
.s-hint kbd { padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font: 600 0.9em var(--f-mono); }
.s-opts { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; margin: 0; padding: 0; }
.s-opts li { display: flex; align-items: center; gap: 0.6em; margin: 0; padding: 0.6em 0.8em; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 0.9em; transition: border-color 0.3s, background 0.3s, opacity 0.3s; }
.s-opts b { flex: none; width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 10px; background: rgba(139, 92, 246, 0.22); font: 800 0.75em var(--f-hud); }
.slide.shown .s-opts li[data-right="true"] { border-color: rgba(52, 211, 153, 0.85); background: rgba(52, 211, 153, 0.14); box-shadow: 0 0 26px -10px rgba(52, 211, 153, 0.95); }
.slide.shown .s-opts li[data-right="true"] b { background: var(--ok); color: #052e1c; }
.slide.shown .s-opts li[data-right="false"] { opacity: 0.5; }
.s-list { padding-left: 1.2em; }
.s-list li { margin: 0.45em 0; font-size: 1.05em; }
.s-end .slide-in { text-align: center; }
.s-end .s-lead { margin: 0 auto; }
.s-next { color: var(--a2); }
.deck-bar { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(5, 8, 22, 0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.deck-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 0.82rem var(--f-mono); color: var(--muted); }
.deck-n { min-width: 4.6em; text-align: center; font: 700 0.85rem var(--f-hud); color: var(--a2); }
.deck-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.deck-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #7c3aed, #22d3ee); box-shadow: 0 0 10px rgba(34, 211, 238, 0.8); transition: width 0.35s var(--ease); }
@media (max-width: 700px) {
  .d-wide { display: none; }
  .s-title .slide-in { grid-template-columns: 1fr; }
  .s-title .s-art { display: none; }
  .s-cols, .s-opts { grid-template-columns: 1fr; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --card-bg: #fff; --text: #111; --soft: #333; --muted: #555; --line: #ddd; --line-strong: #ccc; --a1: #5b21b6; --a2: #0e7490; color-scheme: light; }
  .strip, .top, .foot, .fab, .bg, .no-print, .readbar, .core-gl, .cursor, .cursor-dot, .scan, .boot, .buddy, .xp-pop, .streak-toast, .levelup { display: none !important; }
  body { background: #fff; color: #111; }
  body::after, .card::before, .card::after, .chat::after { display: none; }
  .card, .callout, .quiz fieldset, .widget, .sim-col, .chat, .flow li, .igrid li, .craftfig li { background: #fff !important; box-shadow: none !important; border-color: #ddd !important; }
  .grad, .cert h2, .stat b { background: none; color: #4c1d95; -webkit-text-fill-color: #4c1d95; }
  .kids { background: #fffbeb; border-color: #fde68a; box-shadow: none; }
  .kids b { color: #92400e; }
  .kids p { color: #57400a !important; }
  .prompt-box pre { background: #f6f6fb; color: #111; box-shadow: none; }
  .cert { background: #7c3aed; animation: none; box-shadow: none; }
  .cert-in { background: #fff; color: #111; }
  .cert-in::before { display: none; }
  .reveal, .split-ready .wi, .split-ready .gw { opacity: 1 !important; transform: none !important; filter: none !important; }
  .ws-bar, .deck-bar, .deck-progress, .teach-promo { display: none !important; }
  .sheet { max-width: none; margin: 0; padding: 0; border-radius: 0; box-shadow: none; font-size: 11pt; }
  .sheet + .sheet { break-before: page; page-break-before: always; }
  main { padding: 0; }
  .deck { position: static; display: block; background: #fff; }
  .deck-stage { overflow: visible; }
  .slide, .slide[hidden] { position: relative; inset: auto; display: grid !important; height: 180mm; padding: 10mm; break-after: page; page-break-after: always; }
  .slide-in { animation: none; font-size: 17pt; }
  .slide *, .sheet * { animation: none !important; }
  .slide .s-why { display: block; }
  .s-simple .s-big { color: #57400a; }
  .s-prompt, .s-opts li { background: #fff !important; box-shadow: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .art .draw { stroke-dashoffset: 0; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
