:root {
  --bg: #0f1419; --panel: #171d25; --panel2: #1e2632; --line: #2a3545;
  --text: #eef3f8; --muted: #8b9aab; --mint: #3dd6c6; --mint2: #1fa89a;
  --violet: #8b7cf6; --warn: #f0b429; --bad: #f07178; --good: #3dd6c6;
  --host: practice;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: "SF Pro Text", ui-sans-serif, system-ui, sans-serif;
  background: radial-gradient(900px 500px at 80% -10%, #1a2a3a 0%, var(--bg) 55%);
  color: var(--text); min-height: 100vh;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
header.app {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(15,20,25,0.92);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.logo { font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--mint); }
.logo .pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(61,214,198,0.4); color: var(--mint); border-radius: 999px; padding: 3px 8px;
}
nav.main { display: flex; flex-wrap: wrap; gap: 4px; }
nav.main a {
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px;
}
nav.main a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
nav.main a.active { color: #042a24; background: var(--mint); }
main.wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 56px; }
.kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mint); margin-bottom: 8px;
}
h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 8px; }
.lede { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 40rem; margin-bottom: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .grid2 { grid-template-columns: 1.1fr 0.9fr; } }
.grid3 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 11px 16px; font-weight: 700; font-size: 13px;
  font-family: inherit; cursor: pointer; text-decoration: none !important;
}
.btn.primary { background: var(--mint); color: #042a24; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted);
}
.chip.mint { border-color: rgba(61,214,198,0.45); color: var(--mint); }
.chip.warn { border-color: rgba(240,180,41,0.45); color: var(--warn); }
.honest {
  margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.45;
  border-left: 3px solid var(--warn); padding-left: 10px;
}
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 14px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint2), var(--mint)); width: 0%; transition: width .25s; }
.list-item {
  display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; background: var(--panel2); color: var(--text); text-decoration: none !important;
}
.list-item:hover { border-color: rgba(61,214,198,0.45); }
.list-item b { display: block; margin-bottom: 3px; }
.list-item span { font-size: 12px; color: var(--muted); }
.list-item.done { border-color: rgba(61,214,198,0.35); }
.list-item .status { float: right; font-size: 11px; color: var(--mint); font-weight: 700; }
.video-wrap {
  position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #000;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.choice {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.choice:hover:not(:disabled) { border-color: rgba(61,214,198,0.45); }
.choice:disabled { cursor: default; }
.choice.correct { border-color: rgba(61,214,198,0.7); background: rgba(61,214,198,0.12); }
.choice.wrong { border-color: rgba(240,113,120,0.6); background: rgba(240,113,120,0.1); }
.explain {
  display: none; margin-top: 10px; padding: 12px; border-radius: 12px;
  background: rgba(139,124,246,0.1); border: 1px solid rgba(139,124,246,0.3);
  font-size: 13px; line-height: 1.45; color: #d4d0f0;
}
.explain.show { display: block; }
.chapter p { color: var(--muted); line-height: 1.6; margin-bottom: 12px; font-size: 15px; }
.chapter h2 { font-size: 1.15rem; margin: 18px 0 8px; }
.chapter ul { margin: 0 0 12px 1.1rem; color: var(--muted); line-height: 1.55; }
.chapter li { margin-bottom: 6px; }
.footer-note { margin-top: 28px; font-size: 12px; color: var(--muted); text-align: center; }
.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 8px; margin-bottom: 12px; }
.state-btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 12px; padding: 12px 10px; text-align: left; cursor: pointer; font-family: inherit;
}
.state-btn b { display: block; font-size: 15px; }
.state-btn span { font-size: 11px; color: var(--muted); }
.state-btn.active { border-color: rgba(61,214,198,0.55); background: rgba(61,214,198,0.1); }
.score-big { font-size: 2.4rem; font-weight: 800; color: var(--mint); margin: 8px 0; }
.score-big.fail { color: var(--bad); }
.hidden { display: none !important; }
