:root {
  --bg: #0e1726;
  --panel: #16213a;
  --panel2: #1c2a4a;
  --line: #2b3d63;
  --text: #e8edf7;
  --muted: #8fa1c4;
  --accent: #ffb84d;
  --accent2: #4da3ff;
  --good: #3ecf8e;
  --bad: #ff6b6b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 5px; }

nav {
  display: flex; align-items: center; gap: 22px;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
nav .brand { font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: .3px; }
nav .brand span { color: var(--accent); }
nav a.navlink { color: var(--muted); font-weight: 600; font-size: 14px; }
nav a.navlink:hover { color: var(--text); text-decoration: none; }
nav .spacer { flex: 1; }
nav .user { color: var(--muted); font-size: 14px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 28px 20px 60px; }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card h2 { margin: 0 0 10px; font-size: 16px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; }
.big { font-size: 40px; font-weight: 800; line-height: 1.1; }
.sub { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-block; cursor: pointer;
  background: var(--accent); color: #1a1205;
  border: 0; border-radius: 10px;
  font-size: 16px; font-weight: 800;
  padding: 12px 26px;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn.big-btn { font-size: 19px; padding: 16px 38px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=password], input[type=number] {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 17px; width: 100%;
}
input:focus { outline: 2px solid var(--accent2); border-color: transparent; }

.progressbar { background: var(--panel2); border-radius: 99px; height: 10px; overflow: hidden; }
.progressbar > div { background: var(--accent2); height: 100%; border-radius: 99px; transition: width .4s; }
.progressbar.gold > div { background: var(--accent); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px;
  font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.badge.lesson { background: #274b8a; color: #bcd6ff; }
.badge.review { background: #594520; color: #ffd9a0; }
.badge.quiz { background: #294d3f; color: #a8f0cf; }
.badge.consolidate { background: #4a2d63; color: #e3c8ff; }

.q-card { font-size: 22px; margin: 18px 0 14px; }
.feedback { font-weight: 700; margin-top: 10px; min-height: 24px; }
.feedback.ok { color: var(--good); }
.feedback.no { color: var(--bad); }

.lesson-body { font-size: 17px; }
.lesson-body p { margin: 10px 0; }

.ring { position: relative; width: 130px; height: 130px; margin: 6px auto; }
.ring svg { transform: rotate(-90deg); }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.ring .mid b { font-size: 26px; }

table.simple { width: 100%; border-collapse: collapse; font-size: 15px; }
table.simple td { padding: 7px 4px; border-bottom: 1px solid var(--line); }

.hero { text-align: center; padding: 70px 20px 40px; }
.hero h1 { font-size: 46px; margin: 0 0 14px; line-height: 1.15; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto 30px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 99px; margin-right: 5px; }
