:root {
  /* Superp Tosca Challenge design tokens */
  --cyan: #51C2D9;
  --cyan-2: #7BD6E8;
  --cyan-deep: #2C8CA3;
  --gold: #F4C657;
  --gold-deep: #D9A436;
  --green: #54D6A0;
  --red: #F2766E;
  --violet: #9B8CFF;

  --bg: #0B0E11;
  --bg-2: #0F1318;
  --panel: #14191F;
  --panel-2: #1A2027;
  --panel-3: #202832;
  --line: rgba(123, 214, 232, .14);
  --line-strong: rgba(123, 214, 232, .28);
  --text: #EAF4F7;
  --muted: #92A3AC;
  --faint: #5E6E78;

  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(81, 194, 217, .25), 0 14px 50px -12px rgba(81, 194, 217, .35);
  --stage-grad: radial-gradient(1200px 700px at 78% -8%, rgba(81, 194, 217, .16), transparent 60%),
                radial-gradient(900px 600px at 6% 108%, rgba(155, 140, 255, .10), transparent 55%);

  --radius: 18px;

  /* Aliases that keep the previously-styled pages working. */
  --bg-soft: var(--panel-2);
  --card: var(--panel);
  --card-border: var(--line);
  --primary: var(--cyan);
  --primary-dark: var(--cyan-deep);
  --accent: var(--cyan-2);
  --danger: var(--red);
  --warn: var(--gold);
  --good: var(--green);
}

/* Light theme — applied via the `theme-light` class on <html>. */
html.theme-light {
  --bg: #F4F8FA;
  --bg-2: #FFFFFF;
  --panel: #FFFFFF;
  --panel-2: #F1F6F9;
  --panel-3: #E7F0F4;
  --line: rgba(44, 140, 163, .16);
  --line-strong: rgba(44, 140, 163, .30);
  --text: #0E1A20;
  --muted: #5A6E78;
  --faint: #93A6AE;
  --shadow: 0 22px 50px -30px rgba(20, 60, 75, .40);
  --glow: 0 0 0 1px rgba(44, 140, 163, .18), 0 16px 44px -16px rgba(44, 140, 163, .30);
  --stage-grad: radial-gradient(1100px 650px at 80% -10%, rgba(81, 194, 217, .22), transparent 60%),
                radial-gradient(800px 520px at 4% 110%, rgba(155, 140, 255, .12), transparent 55%);
}
html.theme-light .toast {
  background: #ffffffee;
  color: var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--stage-grad), var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.mono { font-family: 'JetBrains Mono', monospace; }
::selection { background: rgba(81, 194, 217, .3); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.topbar .topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.brand .wordmark {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--cyan);
  letter-spacing: -.02em;
}
.brand .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--muted);
  margin-top: 6px;
  padding-left: 2px;
}
nav.menu { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 18px; }
nav.menu a {
  padding: 8px 15px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
}
nav.menu a:hover { color: var(--text); }
nav.menu a.active { background: var(--panel-2); color: var(--text); }
.topbar-cta { margin-left: auto; }
.lang-toggle {
  display: flex;
  padding: 3px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.lang-btn {
  padding: 4px 11px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.lang-btn.active { background: var(--cyan); color: #06181D; }
.user-pill { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px;
  height: 32px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }

.container { max-width: 920px; margin: 0 auto; padding: 28px 20px 80px; }
.container.wide { max-width: 1100px; }

h1 { font-size: 1.8rem; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; margin: 0 0 10px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card.clickable { cursor: pointer; transition: transform .08s ease, border-color .08s ease; }
.card.clickable:hover { transform: translateY(-2px); border-color: var(--primary); }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 0.92rem; }
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.98rem;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}
textarea { min-height: 90px; resize: vertical; }

button, .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #06281f;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background .1s ease, opacity .1s ease;
}
button:hover, .btn:hover { background: var(--primary-dark); text-decoration: none; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--card-border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: #2a0a0a; }
.btn-danger:hover { background: #ef4444; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.easy { background: #14532d; color: #86efac; }
.badge.medium { background: #78350f; color: #fcd34d; }
.badge.hard { background: #7f1d1d; color: #fca5a5; }
.badge.mc { background: #0c4a6e; color: #7dd3fc; }
.badge.open { background: #4c1d95; color: #c4b5fd; }
.badge.muted { background: var(--bg-soft); color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}
.notice.error { background: #7f1d1d44; border: 1px solid #f8717155; color: #fca5a5; }
.notice.success { background: #14532d44; border: 1px solid #4ade8055; color: #86efac; }
.notice.info { background: #0c4a6e44; border: 1px solid #38bdf855; color: #7dd3fc; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--card-border); }
th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: #ffffff06; }
.rank { font-weight: 800; width: 48px; }
.rank.gold { color: #fbbf24; }
.rank.silver { color: #cbd5e1; }
.rank.bronze { color: #d97706; }

.option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .08s ease, background .08s ease;
}
.option:hover { border-color: var(--primary); }
.option input { width: auto; }
.option.correct { border-color: var(--good); background: #14532d33; }
.option.wrong { border-color: var(--danger); background: #7f1d1d33; }

.result-q { border-left: 4px solid var(--card-border); padding-left: 14px; margin-bottom: 18px; }
.result-q.correct { border-color: var(--good); }
.result-q.partial { border-color: var(--warn); }
.result-q.wrong { border-color: var(--danger); }

.score-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; border-radius: 50%;
  font-size: 1.8rem; font-weight: 800;
  background: conic-gradient(var(--primary) var(--pct, 0%), var(--bg-soft) 0);
}
.score-ring span { background: var(--card); width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #ffffff44; border-top-color: #06281f;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note { color: var(--muted); font-size: 0.82rem; text-align: center; margin-top: 40px; }

/* Integrity mode: discourage selection/copy of question content. */
.no-select #content,
.no-select #content * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
/* …but allow typing in answer fields. */
.no-select textarea,
.no-select input {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827ee;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.flag { color: var(--danger); font-weight: 700; }
.risk-bar { height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.risk-bar > div { height: 100%; background: var(--warn); }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

.kpi { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi .card { flex: 1; min-width: 130px; text-align: center; margin: 0; }
.kpi .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.kpi .lbl { color: var(--muted); font-size: 0.85rem; }

/* =====================================================================
   Landing page (Superp Tosca Challenge design)
   ===================================================================== */
@keyframes floatUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(81, 194, 217, .45); }
  50% { box-shadow: 0 0 0 14px rgba(81, 194, 217, 0); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

.landing-wrap { max-width: 1180px; margin: 0 auto; padding: 70px 28px 30px; }
.landing-section { max-width: 1180px; margin: 0 auto; padding: 56px 28px; }

/* Hero */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 54px;
  align-items: center;
}
.hero-left { animation: floatUp .6s both; }
.hero-right { animation: popIn .7s .1s both; }

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.live-chip .dot {
  width: 7px; height: 7px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.live-chip .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .12em;
}

.hero-h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.hero-h1 .accent { color: var(--cyan); }
.hero-p {
  font-size: 19px;
  color: var(--muted);
  max-width: 520px;
  margin-top: 20px;
  line-height: 1.55;
}
.hero-p b { color: var(--text); }
.hero-p b.gold { color: var(--gold); }

.hero-cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; }
.hero-stat .num {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--cyan);
}
.hero-stat .lbl { font-size: 13px; color: var(--muted); }

/* Buttons (Superp variants) */
.btn-superp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) * .7);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-superp:hover { transform: translateY(-2px); text-decoration: none; }
.btn-superp.sm { font-size: 13px; padding: 9px 16px; }
.btn-superp.md { font-size: 15px; padding: 13px 24px; }
.btn-superp.lg { font-size: 17px; padding: 17px 34px; }
.btn-superp.primary {
  background: var(--cyan);
  color: #06181D;
  box-shadow: 0 8px 22px -12px rgba(81, 194, 217, .6);
}
.btn-superp.primary:hover { box-shadow: 0 14px 34px -10px rgba(81, 194, 217, .7); }
.btn-superp.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-superp.ghost:hover { box-shadow: var(--glow); }
.btn-superp.pulse { animation: pulseGlow 2.4s infinite; }
.btn-superp .arrow { font-size: 18px; }

/* Cards (Superp variants) */
.card-superp {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s;
}
.card-superp.glow { box-shadow: var(--glow); }
.card-superp.hover { cursor: pointer; }
.card-superp.hover:hover { transform: translateY(-4px); border-color: var(--line-strong); }

/* Hero question card */
.hero-q-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.hero-q-head .qid { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--faint); }
.hero-q-head .pts { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--gold); }
.hero-q-prompt { font-size: 19px; line-height: 1.35; margin-bottom: 18px; font-family: 'Poppins', sans-serif; font-weight: 600; }
.hero-q-opts { display: flex; flex-direction: column; gap: 9px; }
.hero-q-opt {
  text-align: left;
  padding: 13px 15px;
  border-radius: 12px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 14.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .15s;
  cursor: pointer;
}
.hero-q-opt .letter {
  width: 24px; height: 24px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
}
.hero-q-opt.active {
  background: color-mix(in srgb, var(--cyan) 14%, transparent);
  border-color: var(--cyan);
}
.hero-q-opt.active .letter { background: var(--cyan); color: #06181D; }
.hero-q-foot {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 16px;
  text-align: center;
}

/* Eyebrow + section heads */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow.gold { color: var(--gold); }
.section-h2 { font-size: 34px; font-family: 'Poppins', sans-serif; font-weight: 700; }

/* How-it-works */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  color: var(--cyan);
  opacity: .5;
}
.step-h { font-size: 20px; margin-top: 14px; }
.step-p { color: var(--muted); font-size: 14.5px; margin-top: 10px; line-height: 1.55; }

/* Tier ladder */
.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  gap: 24px;
  flex-wrap: wrap;
}
.tier-head .lede { color: var(--muted); max-width: 340px; font-size: 14.5px; }
.tier-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tier-card { position: relative; overflow: hidden; padding: 20px !important; }
.tier-card .tier-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier-color) 12%, transparent), transparent 60%);
  pointer-events: none;
}
.tier-card .tier-inner { position: relative; }
.tier-card .tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tier-card .order { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--faint); }
.tier-card .mult {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--tier-color);
  font-weight: 700;
}
.tier-card .badge-sq {
  width: 34px; height: 34px;
  border-radius: 30%;
  margin: 14px 0 12px;
  background: color-mix(in srgb, var(--tier-color) 20%, transparent);
  border: 1px solid var(--tier-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--tier-color);
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}
.tier-card h3 {
  font-size: 15.5px;
  color: var(--tier-color);
  line-height: 1.15;
}
.tier-card .tier-p {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
  line-height: 1.45;
}

/* Tier pill (used on featured cards) */
.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  color: var(--cyan);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.tier-pill .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.tier-pill.easy { color: var(--cyan-2); background: color-mix(in srgb, var(--cyan-2) 16%, transparent); border-color: color-mix(in srgb, var(--cyan-2) 40%, transparent); }
.tier-pill.easy .dot { background: var(--cyan-2); box-shadow: 0 0 10px var(--cyan-2); }
.tier-pill.medium { color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.tier-pill.medium .dot { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.tier-pill.hard { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.tier-pill.hard .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* Featured challenges */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.featured-card { display: flex; gap: 18px; align-items: center; padding: 24px; }
.featured-card .icon-sq {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--panel-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 26px;
}
.featured-card .featured-body { flex: 1; min-width: 0; }
.featured-card .featured-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.featured-card h3 { font-size: 18px; }
.featured-card .featured-desc { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.featured-card .meta {
  display: flex; gap: 16px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
}
.featured-card .chev { color: var(--cyan); font-size: 22px; }

/* Footer */
.landing-footer { border-top: 1px solid var(--line); margin-top: 30px; }
.landing-footer .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.landing-footer .tag {
  color: var(--faint);
  font-size: 13px;
  margin-top: 14px;
  max-width: 300px;
}
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-row .chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
a.social-chip:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* Arena picker chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.arena-chip {
  padding: 7px 14px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Hanken Grotesk', sans-serif;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all .15s;
  cursor: pointer;
}
.arena-chip.active { background: var(--cyan); color: #06181D; border-color: var(--cyan); }
.arena-chip:hover { color: var(--text); }
.arena-chip.active:hover { color: #06181D; }

.quiz-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.quiz-pick {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.quiz-pick:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.quiz-pick-head { display: flex; align-items: center; gap: 12px; }
/* Inside the compact picker cards, let the difficulty pill wrap instead of
   spilling outside the card when the tier name is long. */
.quiz-pick .pill-row { row-gap: 8px; }
.quiz-pick .tier-pill { white-space: normal; max-width: 100%; }

/* Quiz runner */
.runner-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.runner-header-inner { max-width: 820px; margin: 0 auto; padding: 16px 24px; }
.runner-main { max-width: 820px; margin: 0 auto; padding: 40px 24px 120px; animation: floatUp .35s both; }
.runner-actions {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.runner-actions-inner { max-width: 820px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 14px; }
.runner-timer {
  font-size: 13px;
  color: var(--cyan);
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.progress { height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--cyan); border-radius: 99px; transition: width .1s linear; }
.btn-link { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.btn-link:hover { color: var(--text); }

/* MC options (in runner) */
.mc-option {
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .15s;
  cursor: pointer;
}
.mc-option:hover { border-color: var(--cyan); }
.mc-option.active {
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 12%, transparent);
}
.mc-letter {
  width: 28px; height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
}
.mc-option.active .mc-letter { background: var(--cyan); color: #06181D; }

.open-textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: calc(var(--radius) * .55);
  padding: 14px 16px;
  font-size: 16px;
  font-family: 'Hanken Grotesk', sans-serif;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  min-height: 160px;
  transition: border-color .15s, box-shadow .15s;
}
.open-textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(81,194,217,.15); }

/* Buttons: extra variants */
.btn-superp.gold {
  background: var(--gold);
  color: #241B05;
  box-shadow: 0 8px 22px -12px rgba(244,198,87,.5);
}
.btn-superp.gold:hover { box-shadow: 0 14px 34px -10px rgba(244,198,87,.6); }
.btn-superp.soft {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-superp.soft:hover { background: var(--panel-3); }
.btn-superp[disabled], .btn-superp:disabled { opacity: .45; pointer-events: none; }

/* Results: stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat-cell { padding: 20px 22px; }
.stat-cell + .stat-cell { border-left: 1px solid var(--line); }
@media (max-width: 720px) { .stat-strip { grid-template-columns: 1fr 1fr; } .stat-cell + .stat-cell:nth-child(3) { border-left: none; border-top: 1px solid var(--line); } }

.spinner {
  border-radius: 50%;
  border: 3px solid var(--panel-3);
  border-top-color: var(--cyan);
  animation: spin .8s linear infinite;
  display: inline-block;
}

.source-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.source-line .source-tag {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}
.source-line a { color: var(--cyan); word-break: break-all; }

.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #06281f;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.unverified-dot { color: var(--faint); font-weight: 800; }

.part-row {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  min-width: 720px;
}
.part-row:last-child { border-bottom: none; }
.part-row.part-head {
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.part-row a { color: var(--cyan); }

/* Leaderboard */
.lb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 16px;
  align-items: end;
  margin: 30px 0;
}
.podium-cell { text-align: center; }
.podium-column {
  border-radius: 14px 14px 0 0;
  position: relative;
  border: 1px solid var(--line);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.podium-column .crown {
  position: absolute;
  top: -30px;
  font-size: 28px;
}
.lb-grid {
  display: grid;
  grid-template-columns: 64px 1fr 200px 90px 100px;
  align-items: center;
  gap: 12px;
}
.lb-header-row {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
}
.lb-row {
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: none; }
.lb-row.you { background: color-mix(in srgb, var(--cyan) 9%, transparent); }
.rank-cell {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--faint);
}
.lb-row:nth-child(2) .rank-cell,
.lb-row:nth-child(3) .rank-cell,
.lb-row:nth-child(4) .rank-cell { color: var(--gold); }
.tester-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.you-chip {
  font-size: 10px;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 1px 6px;
}
@media (max-width: 720px) {
  .podium { grid-template-columns: 1fr; gap: 12px; }
  .lb-grid { grid-template-columns: 40px 1fr 90px; }
  .lb-grid > div:nth-child(3),
  .lb-grid > div:nth-child(4) { display: none; }
}

/* Admin */
.admin-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 26px 0 22px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  padding: 12px 18px;
  border: none;
  background: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--cyan); }

.admin-table {
  display: grid;
  grid-template-columns: 90px 1fr 150px 200px 70px 90px;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.admin-table.header {
  color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .08em;
}
.admin-table .qid {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}
.admin-table .qid.mc { color: var(--cyan); }
.admin-table .qid.open { color: var(--violet); }
.icon-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Hanken Grotesk', sans-serif;
  cursor: pointer;
}
.icon-btn.danger { color: var(--red); }

/* Slide-over editor */
@keyframes slideIn { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.slideover-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; justify-content: flex-end;
}
.slideover-backdrop .scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
}
.slideover {
  position: relative;
  width: 560px;
  max-width: 94vw;
  height: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--line-strong);
  overflow-y: auto;
  animation: slideIn .3s both;
  box-shadow: -20px 0 60px -20px rgba(0,0,0,.6);
}
.slideover-head {
  position: sticky; top: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  display: flex; align-items: center;
  z-index: 2;
}
.slideover-body {
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 20px;
}
.close-x {
  margin-left: auto;
  background: none; border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.type-toggle { display: flex; gap: 8px; }
.type-toggle button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}
.type-toggle button.active.mc { background: var(--cyan); color: #06181D; border-color: transparent; }
.type-toggle button.active.open { background: var(--violet); color: #06181D; border-color: transparent; }

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.option-row .radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.option-row.correct .radio { border-color: var(--green); background: var(--green); }
.option-row .letter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  width: 18px;
}
.option-row input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 14px; outline: none; }

.kp-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.kp-row input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.insight-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.insight-bar .bar {
  flex: 1;
  height: 8px;
  background: var(--panel-3);
  border-radius: 99px;
  overflow: hidden;
}
.insight-bar .bar > div {
  height: 100%;
  background: var(--cyan);
  border-radius: 99px;
}

/* Quiz card list (admin quizzes tab) */
.quiz-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.quiz-row:last-child { border-bottom: none; }
.quiz-row .meta { flex: 1; min-width: 0; }
.quiz-row .pub-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
}
.quiz-row .pub-toggle.pub { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); border-color: color-mix(in srgb, var(--green) 36%, transparent); }
.quiz-row .pub-toggle.draft { color: var(--muted); }

@media (max-width: 880px) {
  .admin-table { grid-template-columns: 1fr 90px; gap: 8px; }
  .admin-table > div:nth-child(1),
  .admin-table > div:nth-child(3),
  .admin-table > div:nth-child(4),
  .admin-table > div:nth-child(5) { display: none; }
}

/* Signup */
.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.signup-pitch { position: sticky; top: 90px; animation: floatUp .5s both; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tc-field { display: block; }
.tc-field-head {
  display: flex; justify-content: space-between;
  margin-bottom: 8px;
}
.tc-field-head span:first-child { font-weight: 600; font-size: 14px; }
.tc-field-head .hint { font-size: 12px; color: var(--faint); }
.tc-field-error { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.tc-input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: calc(var(--radius) * .55);
  padding: 12px 15px;
  font-size: 15px;
  font-family: 'Hanken Grotesk', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.tc-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(81,194,217,.15); }
select.tc-input { appearance: none; -webkit-appearance: none; }
.consent-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  cursor: pointer;
}

/* LinkedIn share banner */
.li-share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,0,0,.35) !important; }
.li-share-banner pre::-webkit-scrollbar { width: 5px; }
.li-share-banner pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }

/* Hamburger button — hidden on desktop */
.topbar-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .landing-wrap { padding: 40px 20px 20px; }
  .landing-section { padding: 36px 20px; }
  .signup-grid { grid-template-columns: 1fr; gap: 30px; }
  .signup-pitch { position: static; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Show hamburger, collapse nav */
  .topbar-burger { display: flex; }

  header.topbar .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 0;
  }
  header.topbar .topbar-inner .brand { margin-right: 0; }
  header.topbar .topbar-inner .brand .sub { display: none; }

  nav.menu,
  .topbar-cta {
    display: none;
    width: 100%;
    order: 10;
  }

  .topbar-open nav.menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 12px 0 0;
    padding: 12px 0 8px;
    border-top: 1px solid var(--line);
  }
  .topbar-open nav.menu a {
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  .topbar-open .topbar-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
    margin-left: 0;
  }

  /* Quiz arena chips scroll on mobile */
  .chip-row { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .arena-chip { flex-shrink: 0; }

  /* Runner */
  .runner-header-inner { padding: 10px 16px; }
  .runner-main { padding: 16px; }
  .runner-actions-inner { padding: 12px 16px; }

  /* LinkedIn share */
  .li-share-banner > div { flex-direction: column; }

  /* Landing hero */
  .hero-h1 { font-size: 32px !important; }
  .hero-p { font-size: 15px !important; }
  .hero-cta-row { flex-direction: column; gap: 10px; }
  .hero-cta-row .btn-superp { text-align: center; }

  /* General mobile padding & typography */
  h1 { font-size: clamp(26px, 6vw, 44px) !important; }
  .lb-head { gap: 14px; }
  .filter-card, .card-superp { overflow-x: auto; }
  .quiz-pick-grid { grid-template-columns: 1fr !important; }

  /* Admin */
  .admin-table { font-size: 13px; }
  .admin-wrap { padding: 20px 14px 60px; }
  .admin-head { flex-direction: column; gap: 12px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }
}
