@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap");

/* ============================================================ TOKENS */
:root {
  --bg: #f4f1ea;
  --bg-glow-1: rgba(139, 124, 255, .20);
  --bg-glow-2: rgba(196, 240, 40, .32);
  --grid: rgba(13, 15, 20, .045);
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --surface-2: rgba(13, 15, 20, .035);
  --field: rgba(255, 255, 255, .9);
  --ink: #0d0f14;
  --ink-2: #4a4f5c;
  --ink-3: #8b8f9a;
  --line: rgba(13, 15, 20, .08);
  --line-2: rgba(13, 15, 20, .14);

  --volt: #d4ff3a;
  --volt-ink: #0d0f14;
  --accent-text: #5a7d00;
  --accent-soft: rgba(160, 205, 0, .16);
  --btn-bg: #0d0f14;
  --btn-ink: #d4ff3a;
  --glow: rgba(13, 15, 20, .35);
  --violet: #7c6cff;
  --coral: #ff5a36;
  --coral-soft: rgba(255, 90, 54, .12);

  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, .11);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, .09);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, .12);

  --radius: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(13, 15, 20, .04), 0 18px 50px -20px rgba(13, 15, 20, .18);
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08090d;
    --bg-glow-1: rgba(124, 108, 255, .22);
    --bg-glow-2: rgba(212, 255, 58, .10);
    --grid: rgba(255, 255, 255, .035);
    --surface: rgba(20, 22, 30, .66);
    --surface-solid: #12141b;
    --surface-2: rgba(255, 255, 255, .04);
    --field: rgba(255, 255, 255, .04);
    --ink: #f4f2ec;
    --ink-2: #a8adbb;
    --ink-3: #686e80;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .15);
    --accent-text: #d4ff3a;
    --accent-soft: rgba(212, 255, 58, .1);
    --btn-bg: #d4ff3a;
    --btn-ink: #0b0c10;
    --glow: rgba(212, 255, 58, .35);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, .11);
    --bad: #ff6b6b;
    --bad-soft: rgba(255, 107, 107, .11);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .11);
    --coral-soft: rgba(255, 90, 54, .14);
    --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08090d;
  --bg-glow-1: rgba(124, 108, 255, .22);
  --bg-glow-2: rgba(212, 255, 58, .10);
  --grid: rgba(255, 255, 255, .035);
  --surface: rgba(20, 22, 30, .66);
  --surface-solid: #12141b;
  --surface-2: rgba(255, 255, 255, .04);
  --field: rgba(255, 255, 255, .04);
  --ink: #f4f2ec;
  --ink-2: #a8adbb;
  --ink-3: #686e80;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --accent-text: #d4ff3a;
  --accent-soft: rgba(212, 255, 58, .1);
  --btn-bg: #d4ff3a;
  --btn-ink: #0b0c10;
  --glow: rgba(212, 255, 58, .35);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .11);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .11);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .11);
  --coral-soft: rgba(255, 90, 54, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ============================================================ BASE */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
/* aurora */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 12% 8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(34vmax 28vmax at 92% 18%, var(--bg-glow-2), transparent 62%),
    radial-gradient(40vmax 30vmax at 70% 110%, var(--bg-glow-1), transparent 60%);
  filter: blur(10px);
  animation: drift 26s ease-in-out infinite alternate;
}
/* grid */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift { to { transform: translate3d(3vmax, 2vmax, 0) rotate(6deg); } }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.12; font-family: var(--display); letter-spacing: -.025em; }
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: .92em; }
::selection { background: var(--volt); color: #0b0c10; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 80px; }
.narrow { max-width: 460px; }
.mid { max-width: 820px; }

/* ============================================================ TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, calc((100vw - 1120px) / 2 + 16px));
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.03em; color: var(--ink); text-decoration: none !important; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--volt); color: #0b0c10;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset, 0 8px 24px -8px rgba(160, 205, 0, .8);
  position: relative;
}
.logo-mark::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--bg); }

.theme-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .2s, background .2s;
}
.theme-btn:hover { transform: rotate(-12deg); background: var(--surface-2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}

/* ============================================================ SURFACES */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.card + .card { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }
.stack > .card + .card { margin-top: 16px; }
.stack > :nth-child(2) { animation-delay: .05s; }
.stack > :nth-child(3) { animation-delay: .1s; }
.stack > :nth-child(4) { animation-delay: .15s; }
.stack > :nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ============================================================ FORMS */
label { display: block; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 7px; color: var(--ink-3); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 13px 15px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
select option { background: var(--surface-solid); color: var(--ink); }
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.code-input { letter-spacing: .6em; text-align: center; font: 700 28px var(--mono); padding: 16px; text-indent: .6em; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px var(--body); border: 1px solid transparent; border-radius: 14px;
  padding: 12px 20px; cursor: pointer; background: var(--btn-bg); color: var(--btn-ink);
  text-decoration: none !important; box-shadow: 0 10px 30px -12px var(--glow);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--glow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--coral); color: #fff; box-shadow: 0 10px 30px -12px rgba(255, 90, 54, .6); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.big { padding: 17px 30px; font-size: 16px; font-family: var(--display); letter-spacing: -.01em; border-radius: 16px; }
.linkbtn { background: none; border: 0; color: var(--accent-text); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

.alert { border-radius: 14px; padding: 13px 16px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.alert.err { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.hidden { display: none !important; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.brand { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ============================================================ TABLES */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; }
tr.click { cursor: pointer; transition: background .15s; }
tr.click:hover td { background: var(--surface-2); }

/* ============================================================ AUTH */
.auth-grid {
  max-width: 1120px; margin: 0 auto; padding: 48px 16px 80px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; min-height: calc(100vh - 70px);
}
@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; min-height: 0; } }
.auth-hero { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
@media (max-width: 900px) {
  .auth-hero .ladder, .auth-hero .hero-stats { display: none; }
  .auth-hero .display { font-size: 52px; margin: 12px 0 14px; }
  .auth-hero .lead { font-size: 15px; margin: 0; }
}
.display {
  font-family: var(--display); font-weight: 800; font-size: clamp(48px, 8vw, 104px); line-height: .9;
  letter-spacing: -.055em; margin: 18px 0 22px;
}
.display em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.display .hl {
  display: inline-block; white-space: nowrap; background: var(--volt); color: #0b0c10;
  padding: .02em .14em .08em; margin-left: -.06em; border-radius: .14em; transform: rotate(-2deg);
  box-shadow: 0 20px 50px -18px rgba(160, 205, 0, .9);
}
.lead { font-size: 17px; color: var(--ink-2); max-width: 520px; line-height: 1.65; }
.ladder { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin: 30px 0 26px; max-width: 460px; }
.ladder div {
  flex: 1; border-radius: 12px 12px 4px 4px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font: 700 13px var(--mono); color: var(--ink-3);
  transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both;
}
.ladder div:nth-child(1) { height: 22%; animation-delay: .15s; }
.ladder div:nth-child(2) { height: 38%; animation-delay: .25s; }
.ladder div:nth-child(3) { height: 56%; animation-delay: .35s; }
.ladder div:nth-child(4) { height: 76%; animation-delay: .45s; background: var(--accent-soft); color: var(--accent-text); }
.ladder div:nth-child(5) { height: 100%; animation-delay: .55s; background: var(--volt); color: #0b0c10; border-color: transparent; box-shadow: 0 18px 40px -14px rgba(160, 205, 0, .9); }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats b { display: block; font: 800 30px var(--display); letter-spacing: -.04em; }
.hero-stats span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.auth-side .card { padding: 30px; }
.step-dots { display: flex; gap: 6px; }
.step-dots i { width: 22px; height: 5px; border-radius: 3px; background: var(--line-2); }
.step-dots i.on { background: var(--ink); }

/* group picker */
.pick-list { display: grid; gap: 10px; }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  width: 100%; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--ink); font: inherit; cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s;
}
.pick:hover, .pick.sel { border-color: var(--ink); transform: translateX(4px); background: var(--accent-soft); }
.pick b { font: 700 17px var(--display); letter-spacing: -.02em; }
.pick > span:last-child { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-ink); font-weight: 800; }

.cred { display: grid; gap: 10px; }
.cred div { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.cred span { color: var(--ink-3); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cred b { font-family: var(--mono); font-size: 18px; }

/* ============================================================ DASHBOARD */
.hero {
  position: relative; overflow: hidden; padding: 34px;
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
}
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; padding: 24px; } }
.hero::before {
  content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, var(--bg-glow-2), transparent 70%); pointer-events: none;
}
.hero-num {
  font: 800 clamp(88px, 14vw, 168px)/.82 var(--display); letter-spacing: -.07em; margin: 14px 0 8px;
  background: linear-gradient(180deg, var(--ink) 30%, var(--ink-3)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-num small { font-size: .32em; letter-spacing: -.03em; margin-left: .1em; -webkit-text-fill-color: var(--ink-3); }
.hero h1 { margin: 0 0 4px; }
.hero-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-side { position: relative; display: grid; place-items: center; }
.pring { width: 190px; height: 190px; position: relative; }
.pring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pring .trk { fill: none; stroke: var(--line-2); stroke-width: 10; }
.pring .prg { fill: none; stroke: var(--volt); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 10px rgba(190, 240, 30, .5)); }
.pring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.pring b { display: block; font: 800 44px/1 var(--display); letter-spacing: -.05em; }
.pring span { font-size: 12px; color: var(--ink-3); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 18px 20px; }
.stat span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat b { display: block; font: 800 30px/1.2 var(--display); letter-spacing: -.04em; margin-top: 6px; }
.stat b small { font-size: 14px; color: var(--ink-3); font-weight: 700; letter-spacing: 0; }

.hero-task { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-task .k, .k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-text); }

/* roadmap */
.road { display: grid; gap: 18px; }
.block-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.block-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 600px) { .block-row { grid-template-columns: repeat(3, 1fr); } }
.node {
  position: relative; border-radius: 16px; padding: 12px 8px; text-align: center; border: 1px solid var(--line);
  background: var(--surface-2); min-height: 74px; display: flex; flex-direction: column; justify-content: center;
  transition: transform .2s;
}
.node:hover { transform: translateY(-2px); }
.node .t { font: 800 16px var(--display); letter-spacing: -.02em; }
.node .s { font-size: 11px; color: var(--ink-3); font-weight: 700; margin-top: 2px; }
.node.done { background: var(--ok-soft); border-color: transparent; }
.node.done .t { color: var(--ok); }
.node.done::after { content: "✓"; position: absolute; top: 6px; right: 9px; font-size: 11px; font-weight: 800; color: var(--ok); }
.node.current { background: var(--volt); border-color: transparent; color: #0b0c10; box-shadow: 0 14px 34px -12px rgba(160, 205, 0, .9); }
.node.current::before { content: ""; position: absolute; inset: -5px; border-radius: 20px; border: 2px solid var(--volt); opacity: .6; animation: ping 1.8s ease-out infinite; }
.node.current .s { color: #0b0c10; opacity: .7; }
@keyframes ping { 0% { transform: scale(.96); opacity: .7; } 100% { transform: scale(1.12); opacity: 0; } }
.node.locked { border-style: dashed; background: transparent; }
.node.locked .t { color: var(--ink-3); }
.node.review { background: var(--warn-soft); border-color: transparent; }
.node.review .t { color: var(--warn); }
.node.failed { background: var(--bad-soft); border-color: transparent; }
.node.failed .t { color: var(--bad); }
.node.hw:not(.current):not(.done):not(.failed) {
  background-image: repeating-linear-gradient(-45deg, transparent 0 7px, var(--surface-2) 7px 14px);
}
.node.clickable { cursor: pointer; }
.node.clickable:hover { border-color: var(--ink); }
.node.done.clickable:hover .s { color: var(--ink); }
.mock-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background-image: linear-gradient(120deg, var(--accent-soft), transparent 60%); }
.modal { position: fixed; z-index: 22; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); background: var(--surface-solid); animation: none; }
.switch { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(22px); }
.node.final { grid-column: 1 / -1; min-height: 70px; flex-direction: row; gap: 14px; align-items: center; }
.node.final .t { font-size: 18px; }
.node.passed { background: linear-gradient(110deg, var(--volt), #6ee7a0); color: #0b0c10; border-color: transparent; }
.node.passed .s { color: #0b0c10; }

/* ============================================================ TEST RUNNER */
.runner { max-width: 860px; margin: 0 auto; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); transition: background .3s; }
.progress-dots i.on { background: var(--ink); }
.progress-dots i.cur { background: var(--volt); box-shadow: 0 0 12px rgba(190, 240, 30, .6); }
.part-tag { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.question { font: 700 clamp(22px, 3vw, 30px)/1.22 var(--display); letter-spacing: -.03em; }
.points { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.points li { padding: 11px 14px 11px 40px; border-radius: 12px; background: var(--surface-2); position: relative; font-weight: 600; counter-increment: pt; }
.points { counter-reset: pt; }
.points li::before { content: counter(pt); position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink); font: 800 11px/20px var(--mono); text-align: center; }
.forag { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .forag { grid-template-columns: 1fr; } }
.forag > div { border-radius: 16px; padding: 16px 18px; border: 1px solid transparent; }
.forag .for { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.forag .ag { background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 20%, transparent); }
.forag h4 { margin: 0 0 8px; font: 800 12px var(--body); text-transform: uppercase; letter-spacing: .12em; }
.forag .for h4 { color: var(--ok); }
.forag .ag h4 { color: var(--coral); }
.forag ul { margin: 0; padding-left: 18px; }
.forag li { margin: 4px 0; }
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pics img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.pics .cap { border-radius: 16px; border: 1px dashed var(--line-2); background: var(--surface-2); padding: 18px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink-2); font-weight: 700; }

.timer-box {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 18px 22px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
@media (max-width: 620px) { .timer-box { grid-template-columns: auto 1fr; } .timer-box .btn { grid-column: 1 / -1; } }
.tring { position: relative; width: 108px; height: 108px; }
.tring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tring .trk { fill: none; stroke: var(--line-2); stroke-width: 7; }
.tring .prg { fill: none; stroke: var(--volt); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.timer { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.timer-box.rec { background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 30%, transparent); }
.timer-box.rec .prg { stroke: var(--coral); }
.timer-box.rec .timer { color: var(--coral); }
.phase { font: 700 16px var(--display); letter-spacing: -.01em; margin-bottom: 10px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); display: inline-block; animation: pulse 1s infinite; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 4px var(--coral-soft); }
@keyframes pulse { 50% { opacity: .3; } }
.wave { display: flex; align-items: center; gap: 3px; height: 46px; }
.wave i { flex: 1; min-width: 2px; height: 8%; border-radius: 3px; background: var(--ink-3); opacity: .55; transition: height .08s; }
.timer-box.rec .wave i { background: var(--coral); opacity: 1; }
.meter { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; flex: 1; }
.meter i { display: block; height: 100%; width: 0; background: var(--coral); transition: width .08s; }
.bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--volt)); border-radius: 3px; }

/* ============================================================ RESULT */
.score-hero { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
@media (max-width: 620px) { .score-hero { grid-template-columns: 1fr; justify-items: start; } }
.ring {
  width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c, var(--volt)) calc(var(--p) * 1%), var(--line-2) 0);
  box-shadow: 0 20px 60px -20px var(--c, var(--volt));
}
.ring > div { width: 138px; height: 138px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; text-align: center; }
.ring b { font: 800 50px/1 var(--display); letter-spacing: -.05em; display: block; }
.ring span { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.part-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.band { font: 800 40px/1 var(--display); letter-spacing: -.05em; }
.band small { font-size: 18px; color: var(--ink-3); }
.crit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
@media (max-width: 620px) { .crit { grid-template-columns: 1fr; } }
.crit .top { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.crit .top span:last-child { font-family: var(--mono); }
.crit p { font-size: 13px; color: var(--ink-2); margin: 7px 0 0; }
.mistake { display: grid; gap: 3px; padding: 13px 16px; border-radius: 14px; background: var(--surface-2); border-left: 3px solid var(--coral); }
.mistake .o { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .85; }
.mistake .c { color: var(--ok); font-weight: 800; }
.mistake .e { color: var(--ink-2); font-size: 13px; }
.learn {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-text) 25%, transparent);
  border-radius: 16px; padding: 18px 20px; white-space: pre-wrap; font-size: 15.5px; line-height: 1.7;
}
.plain { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; white-space: pre-wrap; }
details summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.qa { padding: 12px 0; border-top: 1px solid var(--line); }
.qa:first-child { border-top: 0; }
audio { width: 100%; height: 38px; margin-top: 8px; }
ul.clean { margin: 0; padding-left: 20px; }
ul.clean li { margin: 6px 0; }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line-2); border-top-color: var(--volt); animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ DRAWER / TOAST */
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); backdrop-filter: blur(4px); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--bg); z-index: 21; overflow-y: auto; padding: 22px 18px; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0, 0, 0, .25); animation: slide .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; }
.kv span { color: var(--ink-3); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 14px; font-weight: 700; z-index: 50; box-shadow: var(--shadow); animation: rise .3s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- admin / super admin: tabs, kunlar, savollar, limitlar ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; font: 700 14px var(--body); color: var(--ink-3); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.drawer.wide { width: min(960px, 100%); }
.daygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.daycard { text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: var(--ink); font: inherit; transition: border-color .15s, transform .15s; }
.daycard:hover { border-color: var(--ink); transform: translateY(-2px); }
.daycard.sel { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.daycard .t { font: 800 16px var(--display); letter-spacing: -.02em; display: flex; justify-content: space-between; align-items: center; }
.daycard .s { font-size: 12px; color: var(--ink-3); font-weight: 700; margin-top: 6px; }
.daycard .bar { margin-top: 10px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mini-stats > div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.mini-stats span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mini-stats b { display: block; font: 800 22px/1.3 var(--display); letter-spacing: -.03em; }
.hbar { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; }
.hbar + .hbar { margin-top: 8px; }
.hbar .v { font-family: var(--mono); text-align: right; }
.qday { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 4px 14px; }
.qday + .qday { margin-top: 8px; }
.qday > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; padding: 10px 0; }
.qday > summary::-webkit-details-marker { display: none; }
.qday .qbody { padding: 6px 0 14px; }
.qday h4 { margin: 14px 0 6px; font: 800 12px var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); }
.qday ol, .qday ul { margin: 0; padding-left: 20px; }
.qform textarea { min-height: 64px; }
.qform label { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.limit { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.bar i.low { background: var(--coral); }
.bar i.mid { background: var(--warn); }
.lrow + .lrow { margin-top: 10px; }
.lrow .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.lrow .top span:last-child { font-family: var(--mono); }
@media (max-width: 640px) { .hbar { grid-template-columns: 90px 1fr 50px; } }

/* ============================================================ TEZKOR (LITE) REJIM
   theme.js kuchsiz qurilmada <html class="lite"> qo'yadi. Ko'rinish deyarli bir xil qoladi,
   faqat GPU ni eng ko'p yeydigan narsalar o'chadi: blur, doimiy animatsiya, katta soyalar. */
body::before { will-change: transform; }           /* to'liq rejimda ham fon alohida qatlamda */
:root.lite { --shadow: 0 1px 2px rgba(13, 15, 20, .06), 0 6px 16px -10px rgba(13, 15, 20, .18); }
.lite body { transition: none; }
.lite body::before { animation: none; filter: none; will-change: auto; inset: 0; }
.lite body::after { display: none; }
.lite .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
.lite .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface-solid); animation: none; }
.lite .drawer-bg { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 0, 0, .55); }
.lite .drawer, .lite .toast, .lite .auth-hero, .lite .ladder div { animation: none; }
.lite .node.current::before { animation: none; display: none; }
.lite .pring .prg { filter: none; }
.lite .btn:hover, .lite .daycard:hover, .lite .node:hover, .lite .pick:hover { transform: none; }
.lite .btn:hover { box-shadow: none; }
.lite .logo-mark { box-shadow: none; }
.perf-btn svg { width: 17px; height: 17px; }
.lite .perf-btn { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* ============================================================ TELEFON */
@media (max-width: 640px) {
  .wrap { padding: 18px 16px 64px; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
  .top-right { gap: 6px; }
  .theme-btn { width: 36px; height: 36px; border-radius: 10px; }
  .card { padding: 18px; border-radius: 18px; }
  .btn.big { padding: 15px 22px; }
  h1 { font-size: 24px; }
  /* iOS inputga fokusda sahifani kattalashtirmasin */
  input, select, textarea { font-size: 16px; }
  .kv { grid-template-columns: 100px 1fr; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; padding: 10px 12px; }
  .daygrid { grid-template-columns: repeat(2, 1fr); }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .drawer { padding: 16px; }
  table { font-size: 13px; }
  th, td { padding-left: 8px; padding-right: 8px; }
  .toast { left: 16px; right: 16px; transform: none; text-align: center; bottom: 16px; }
  .modal { top: auto; bottom: 16px; transform: translateX(-50%); }
}
@media (max-width: 380px) {
  .logo { font-size: 0; }   /* juda tor ekranda faqat belgi qoladi */
  .logo .logo-mark { font-size: 15px; }
}
/* Tugmalar va bosiladigan joylar barmoq uchun yetarli kattalikda */
@media (pointer: coarse) {
  .btn.sm { min-height: 38px; }
  .tabs button { min-height: 44px; }
}

/* Telefonda jadval → kartochkalar (common.js labelTables) */
@media (max-width: 640px) {
  table.rtable thead { display: none; }
  table.rtable, table.rtable tbody, table.rtable tr, table.rtable td { display: block; width: 100%; }
  table.rtable tr { padding: 10px 6px; border-bottom: 1px solid var(--line); }
  table.rtable tbody tr:last-child { border-bottom: 0; }
  table.rtable td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 6px; border: 0; text-align: right; min-height: 0; }
  table.rtable td::before { content: attr(data-label); flex: none; text-align: left; font-family: var(--body); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  table.rtable td[data-label=""]::before, table.rtable td.full::before { display: none; }
  table.rtable td.full, table.rtable td[data-label=""] { justify-content: flex-start; text-align: left; }
  table.rtable td:first-child { font-size: 15px; justify-content: flex-start; text-align: left; }
  table.rtable td:first-child::before { display: none; }
  table.rtable td.row { justify-content: flex-end; }
  .tbl-wrap { overflow-x: visible; }
}

/* Telefonda yuqori panel bitta qatorda */
@media (max-width: 640px) {
  .topbar { flex-wrap: nowrap; }
  .logo { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logo-mark { flex: none; }
  .top-right { flex: none; flex-wrap: nowrap; }
  .top-right .row { flex-wrap: nowrap; gap: 6px; }
  .top-right .badge { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #who { display: none; }           /* ism dashboard sarlavhasida baribir bor */
  #search { max-width: none !important; width: 100%; }
}

/* Natijalar: kurs kunlari / sana bo'yicha almashtirgich va sana "chip"lari */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); max-width: 100%; }
.seg button { border: 0; background: none; padding: 9px 14px; border-radius: 10px; font: 700 13px var(--body); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-solid); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 168px; overflow-y: auto; }
.chip { border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 700 13px var(--body); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.sel { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
.chip.sel .muted { color: inherit; opacity: .75; }
@media (max-width: 640px) {
  .seg { display: flex; }
  .seg button { flex: 1; padding: 9px 8px; white-space: normal; }
  .chips { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .chip { flex: none; }
}
