/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0b0b0c;
  --bg2: #0e0e10;
  --bg3: #0a0a0b;
  --border: #1c1c1f;
  --border2: #2a2a2f;
  --blue: #3b82f6;
  --blue-dim: #1e3a5f;
  --orange: #f97316;
  --orange-dim: #7c2d12;
  --green: #22c55e;
  --red: #ef4444;
  --text: #ececed;
  --text2: #9a9aa2;
  --text3: #8e8e96;
  --text4: #55555c;
  /* exact accents from the reference design */
  --lab-green: oklch(0.82 0.16 145);
  --lab-amber: oklch(0.82 0.16 70);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
/* Screens sit below the sticky global nav */
.screen { position: relative; }
code {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--lab-green);
  font-family: 'IBM Plex Mono', monospace;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%,100% { opacity: 1; } 50% { opacity: 0; }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
  50%      { box-shadow: 0 0 14px 2px rgba(59,130,246,0.18); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.fade-in { animation: fadeInUp 0.5s ease both; }
.fade-in-2 { animation: fadeInUp 0.5s ease 0.1s both; }
.fade-in-3 { animation: fadeInUp 0.5s ease 0.2s both; }
.fade-in-4 { animation: fadeInUp 0.5s ease 0.3s both; }

/* ══════════════════════════════════════════
   SCREEN ROUTER
══════════════════════════════════════════ */
.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }

/* ══════════════════════════════════════════
   NAV — contextual sticky navbar
══════════════════════════════════════════ */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  border-bottom: 1px solid #1c1c1f;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,11,12,0.96);
  backdrop-filter: blur(8px);
  font-family: 'IBM Plex Mono', monospace;
}
.logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f6f6f7;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.logo-img { height: 48px; width: auto; display: block; }
.logo:hover { opacity: 0.8; }
.logo span { color: var(--text3); }
.logo-context {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text4);
}

/* ── Landing nav right: login / sign up ── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.nav-auth-link {
  color: var(--text4);
  cursor: pointer;
  transition: color 0.2s;
  padding: 3px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.nav-auth-link:hover { color: var(--lab-green); }
.nav-auth-sep { color: var(--text4); opacity: 0.35; }
.nav-auth-link.signup {
  color: #6c6c74;
  border: 1px solid #2a2a2f;
  border-radius: 4px;
  padding: 3px 10px;
}
.nav-auth-link.signup:hover { color: var(--lab-green); border-color: oklch(0.82 0.16 145 / 0.4); }

/* ── Module readiness HUD (MCQ/SSH index + active session) ── */
.nav-hud {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
}
.nav-hud-sep {
  color: #2a2a2f;
  margin: 0 10px;
  font-size: 12px;
  flex-shrink: 0;
}
.nav-hud-item { display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; }
.nav-hud-label { color: #55555c; }
.nav-hud-val-green { color: var(--lab-green); }
.nav-hud-val-white { color: #d0d0d8; }
.nav-hud-val-grey { color: var(--text3); }
.nav-hud-calibrating { color: #55555c; font-style: normal; }

/* Kernel state colors */
.kernel-cold     { color: #55555c; }
.kernel-active   { color: #7dd3fc; }
.kernel-hot      { color: var(--lab-green); }
.kernel-locked   { color: var(--lab-amber); }

/* Responsive: tablet */
@media (max-width: 900px) {
  .top-nav { padding: 14px 20px; gap: 16px; }
  .nav-hud { font-size: 10.5px; gap: 0; }
  .nav-hud-sep { margin: 0 7px; }
  .nav-hud-target { display: none; }
}
/* Responsive: mobile */
@media (max-width: 600px) {
  .top-nav { padding: 12px 16px; gap: 10px; }
  .nav-hud { font-size: 10px; }
  .nav-hud-target, .nav-hud-next { display: none; }
  .logo-context { display: none; }
}

/* Legacy — kept for compat */
.nav-status { display: none; }
.nav-clock  { display: none; }

/* ══════════════════════════════════════════
   LANDING — HERO
══════════════════════════════════════════ */
#page-home {
  background: var(--bg);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 88px);
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 32px 40px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lab-green);
  margin-bottom: 20px;
  margin-top: 0 !important;
}

.hero-title {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 6.2vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: #fbfbfc;
  margin-bottom: 20px;
  max-width: 820px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .hero-title { font-size: clamp(38px, 10vw, 60px); white-space: normal; }
}
.hero-title .muted { color: #6c6c74; }

.hero-tagline {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: #9a9aa2;
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-sub { display: none; } /* removed */

/* ══════════════════════════════════════════
   MODULE GRID — hairline-divided, direct access
   No CTA, no repeated links — this IS the action.
══════════════════════════════════════════ */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1c1c1f;
  border: 1px solid #1c1c1f;
  width: 100%;
  max-width: 1000px;
}
.choice-card {
  background: #0e0e10;
  padding: 34px 32px 30px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 268px;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.choice-card.mcq:hover { background: #111311; box-shadow: inset 0 0 0 1px oklch(0.82 0.16 145 / 0.4); }
.choice-card.ssh:hover { background: #131110; box-shadow: inset 0 0 0 1px oklch(0.82 0.16 70 / 0.45); }

.choice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.choice-index {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #55555c;
}
.choice-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #6f6f77;
  border: 1px solid #2a2a2f;
  border-radius: 4px;
  padding: 3px 8px;
}

.choice-title-row {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.choice-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.choice-card.mcq .choice-title { color: var(--lab-green); }
.choice-card.ssh .choice-title { color: var(--lab-amber); }
.choice-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: #55555c;
}

.choice-desc {
  margin-top: 14px;
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #8e8e96;
  max-width: 420px;
}

.choice-action {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
}
.choice-card.mcq .choice-action { color: #d8ffd0; }
.choice-card.mcq .choice-action .arrow { color: var(--lab-green); }
.choice-card.ssh .choice-action { color: #ffe4c2; }
.choice-card.ssh .choice-action .prompt { color: #4a4a50; }
.choice-card.ssh .choice-action .path { color: #ffe4c2; }
.choice-blink {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--lab-amber);
  animation: blink 1.1s step-start infinite;
}

/* ── FOOTER ── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  font-size: 11.5px;
  color: #4c4c52;
  font-family: 'IBM Plex Mono', monospace;
  border-top: 1px solid #1c1c1f;
  letter-spacing: 0.06em;
}
.footer-status { color: #4c4c52; transition: color 0.2s; }
.footer-status.active { color: #4c4c52; }

/* ══════════════════════════════════════════
   AUTH — Login / Sign Up
══════════════════════════════════════════ */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #0e0e10;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px 30px 30px;
}
.auth-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text4);
  margin-bottom: 8px;
}
.auth-heading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 22px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 26px;
}
.auth-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--bg2);
  border: none;
  padding: 11px 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { color: var(--lab-green); background: #052e16; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text4);
}
.auth-input {
  width: 100%;
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.auth-input::placeholder { color: var(--text4); }
.auth-input:focus { border-color: var(--lab-green); }
.auth-submit {
  margin-top: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #052e16;
  background: var(--lab-green);
  border: none;
  border-radius: 4px;
  padding: 12px 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
.auth-submit:hover { opacity: 0.88; }
.auth-switch {
  margin-top: 20px;
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}
.auth-switch button {
  font-family: inherit;
  font-size: inherit;
  color: var(--lab-green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.auth-switch button:hover { text-decoration: underline; }
.auth-note {
  margin-top: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
  text-align: center;
}
@media (max-width: 600px) {
  .auth-wrap { padding: 28px 16px 44px; }
  .auth-card { padding: 26px 20px 24px; }
}

/* ══════════════════════════════════════════
   INNER SCREENS — SHARED NAV
══════════════════════════════════════════ */
.screen-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.back-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text3);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.back-btn:hover { color: var(--text); border-color: var(--border2); background: #111827; }
.breadcrumb {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text4);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb span { color: #f1f5f9; }

/* ══════════════════════════════════════════
   THEME GRID
══════════════════════════════════════════ */
.grid-wrap {
  padding: 36px 28px;
  max-width: 940px;
  margin: 0 auto;
  width: 100%;
}
.grid-heading {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 5px;
  font-family: 'IBM Plex Mono', monospace;
}
.grid-sub {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 28px;
  font-family: 'IBM Plex Mono', monospace;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.theme-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  text-align: left;
}
.theme-card:hover { border-color: var(--blue); background: #0d1a30; transform: translateY(-1px); }
.theme-card.terminal-theme:hover { border-color: var(--orange); background: #160a02; }
.theme-card.locked { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.tc-icon { margin-bottom: 10px; }
.tc-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.tc-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
}

/* ══════════════════════════════════════════
   MCQ SET SELECTION
══════════════════════════════════════════ */
.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.set-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  text-align: left;
}
.set-card:hover { border-color: var(--blue); background: #0d1a30; transform: translateY(-1px); }
.set-card.locked { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.set-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.set-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 3px;
}
.set-q {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
}

/* ══════════════════════════════════════════
   MCQ ENGINE
══════════════════════════════════════════ */
.mcq-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  width: 100%;
}
.prog-label {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 10px;
  font-family: 'IBM Plex Mono', monospace;
}
.prog-bar-wrap {
  background: #1e2535;
  border-radius: 4px;
  height: 5px;
  margin-bottom: 28px;
  overflow: hidden;
}
.prog-bar {
  height: 5px;
  background: var(--lab-green);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.q-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s, opacity 0.3s, filter 0.3s;
}
.q-card.locked {
  opacity: 0.3;
  filter: blur(2px) grayscale(0.6);
  pointer-events: none;
  user-select: none;
}
.q-num {
  font-size: 10px;
  color: var(--text4);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 8px;
}
.q-text {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.65;
}
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
}
.opt:hover:not(.disabled) { border-color: var(--lab-green); background: #0e150f; color: #f1f5f9; }
.opt.correct { background: #052e16; border-color: var(--green); color: #bbf7d0; }
.opt.wrong   { background: #2d0a0a; border-color: var(--red); color: #fca5a5; }
.opt.missed  { background: #052e16; border-color: var(--green); color: #86efac; opacity: 0.8; }
.opt.disabled { cursor: default; }
.opt-letter { font-weight: 700; font-size: 12px; min-width: 18px; font-family: 'IBM Plex Mono', monospace; margin-top: 1px; }
.expl {
  display: none;
  margin-top: 12px;
  padding: 11px 13px;
  background: var(--bg3);
  border-left: 3px solid var(--lab-green);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
.expl.show { display: block; }
.expl strong { color: var(--lab-green); }

/* ══════════════════════════════════════════
   BOOT CAMP — SSH CARD
══════════════════════════════════════════ */
.bc-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  width: 100%;
}
.ssh-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 24px;
  transition: border-color 0.2s;
}
.ssh-card:hover { border-color: var(--orange); }
.ssh-theme-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ssh-block {
  background: var(--bg3);
  border-radius: 4px;
  padding: 18px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 2.2;
  margin-bottom: 16px;
}
.ssh-block .field { color: var(--text4); display: inline-block; width: 70px; }
.ssh-block .val   { color: #7dd3fc; }
.ssh-block .val.pass { color: var(--orange); letter-spacing: 0.04em; }
.copy-ssh-btn { display: none; } /* legacy — unused */

/* SSH command row */
.ssh-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--orange);
  overflow: hidden;
}
.ssh-cmd-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* shared inline copy button */
.inline-copy-btn {
  flex-shrink: 0;
  background: #1a2040;
  border: 1px solid var(--border2);
  color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.inline-copy-btn:hover { border-color: var(--orange); color: var(--orange); background: #160a02; }
.inline-copy-btn.copied { border-color: var(--green); color: var(--green); background: #052e16; }

/* password row */
.pass-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.pass-label {
  color: var(--text4);
  min-width: 72px;
  letter-spacing: 0.04em;
}
.pass-hidden {
  flex: 1;
  cursor: default;
  user-select: none;
}
.pass-dots { color: var(--text3); letter-spacing: 0.12em; }
.pass-text { color: var(--orange); letter-spacing: 0.04em; }
.pass-copy-hint { display: none; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 600px) {
  .top-nav { padding: 14px 16px; }
  .logo-context { display: none; }
  .nav-clock { display: none; }
  .hero { padding: 48px 16px 44px; }
  .choice-grid { grid-template-columns: 1fr; gap: 16px; max-width: 400px; }
  .screen-nav { padding: 12px 14px; }
  .grid-wrap, .mcq-wrap, .bc-wrap { padding: 20px 14px 40px; }
  .theme-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .set-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .bc-grid { grid-template-columns: 1fr; }
  .q-card { padding: 16px 14px; }
  .q-text { font-size: 14px; }
}
@media (max-width: 400px) {
  .theme-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   THEME CARD — weight badge (Level 1)
══════════════════════════════════════════ */
.theme-card { position: relative; padding-top: 20px; }
.tc-weight {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-dim);
  border: 1px solid #2a4a7a;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.tc-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text4);
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   TOPIC GRID (Level 2)
══════════════════════════════════════════ */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.topic-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  text-align: left;
}
.topic-card:hover { border-color: var(--lab-green); background: #0e150f; transform: translateY(-1px); }
.topic-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.topic-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 34px;
}
.topic-progress-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.topic-mcq-link {
  color: var(--text4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  transition: color 0.15s;
}
.topic-mcq-link.active { color: var(--lab-green); }
.topic-card:hover .topic-mcq-link { color: var(--lab-green); }
.topic-ready-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
}
.topic-ready-dot.pending { background: var(--text4); }

/* ══════════════════════════════════════════
   MCQ — SET NAV (path of 10 dots/tabs, gated)
══════════════════════════════════════════ */
.mcq-tabs-sticky { display: none; }
.mcq-tabs { display: none; }
.mcq-tab {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.12s;
}
.mcq-tab:hover:not(.locked) { border-color: var(--border2); color: var(--text); transform: translateY(-1px); }
.mcq-tab.active { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-tab.passed { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-tab.passed.active { background: var(--lab-green); color: #052e16; }
.mcq-tab.locked {
  color: var(--text4);
  background: transparent;
  border-color: var(--border);
  border-style: dashed;
  cursor: not-allowed;
}
.mcq-tab.pending-content { opacity: 0.55; }

/* ══════════════════════════════════════════
   MCQ — ACTIVE SET PANEL (one set shown at a time)
══════════════════════════════════════════ */
.mcq-active-set {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}
.mcq-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.mcq-section-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--lab-green);
  letter-spacing: 0.1em;
}
.mcq-section-diff {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.mcq-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 4px 0 18px;
  font-family: 'Archivo', sans-serif;
}
.mcq-empty-card {
  background: var(--bg2);
  border: 1px dashed var(--border2);
  border-radius: 4px;
  padding: 26px 20px;
  text-align: center;
  color: var(--text4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.mcq-empty-card .lock-icon { display: block; margin: 0 auto 10px; color: var(--text4); }

/* ══════════════════════════════════════════
   MCQ — RESULT / GATE CARD (shown after last question)
══════════════════════════════════════════ */
.mcq-result-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 26px 24px;
  margin: 22px 0 40px;
  text-align: center;
}
.mcq-result-card.passed { border-color: var(--green); }
.mcq-result-card.failed { border-color: var(--red); }
.mcq-result-score {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 34px;
  margin-bottom: 4px;
}
.mcq-result-card.passed .mcq-result-score { color: var(--green); }
.mcq-result-card.failed .mcq-result-score { color: var(--red); }
.mcq-result-detail {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 18px;
}
.mcq-result-detail .req { color: var(--text4); }
.mcq-result-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 4px;
  border: 1px solid var(--green);
  background: #052e16;
  color: #bbf7d0;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.15s;
}
.mcq-result-btn:hover { transform: translateY(-1px); }
.mcq-result-btn.retry { border-color: var(--red); background: #2d0a0a; color: #fca5a5; }
.mcq-result-btn.finish { border-color: var(--lab-green); background: #052e16; color: var(--lab-green); }

/* ══════════════════════════════════════════
   MCQ — SEARCH + ACCORDION INDEX
══════════════════════════════════════════ */
.mcq-search {
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 11px 14px;
  margin-bottom: 22px;
  outline: none;
  transition: border-color 0.15s;
}
.mcq-search::placeholder { color: var(--text4); }
.mcq-search:focus { border-color: var(--lab-green); }
.mcq-search-empty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text4);
  padding: 24px 0;
  text-align: center;
}
.mcq-accordion-item {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg2);
}
.mcq-accordion-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.mcq-accordion-head:hover { background: #0e150f; }
.mcq-accordion-icon { flex-shrink: 0; display: flex; }
.mcq-accordion-title {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}
.mcq-accordion-weight {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--lab-green);
  background: #052e16;
  border: 1px solid oklch(0.82 0.16 145 / 0.35);
  padding: 2px 8px;
  border-radius: 4px;
}
.mcq-accordion-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
}
.mcq-accordion-chevron {
  font-size: 11px;
  color: var(--text4);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.mcq-accordion-item.open .mcq-accordion-chevron { transform: rotate(90deg); }
.mcq-accordion-body {
  display: none;
  padding: 4px 14px 16px;
}
.mcq-accordion-item.open .mcq-accordion-body { display: block; }
.mcq-accordion-body .topic-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }


/* ══════════════════════════════════════════

/* ══════════════════════════════════════════
   MCQ SET PROGRESS BAR (replaces dot nav)
══════════════════════════════════════════ */
.mcq-set-progress-wrap {
  margin-bottom: 10px;
}
.mcq-set-progress-meta {
  gap: 12px;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.mcq-set-progress-label { color: var(--text3); flex-shrink: 0; }
.mcq-set-progress-diff  { color: var(--text4); flex-shrink: 0; }
.mcq-set-bar-wrap {
  background: #1e2535;
  border-radius: 4px;
  height: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.mcq-set-bar {
  height: 3px;
  background: var(--lab-green);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Pills — compact, desktop only */
.mcq-pills {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.mcq-pills::-webkit-scrollbar { display: none; }
.mcq-pill {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text4);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.mcq-pill:hover:not(.locked) { border-color: var(--border2); color: var(--text); }
.mcq-pill.active  { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-pill.passed  { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-pill.passed.active { background: var(--lab-green); color: #052e16; }
.mcq-pill.locked  { border-style: dashed; cursor: not-allowed; opacity: 0.4; }

@media (max-width: 600px) {
  .mcq-pills { display: none; }
}

/* ══════════════════════════════════════════
   MCQ QUESTION PROGRESS BAR (within a set)
══════════════════════════════════════════ */
.mcq-progress-wrap { margin-bottom: 20px; }
.mcq-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.mcq-progress-label  { color: var(--text3); }
.mcq-progress-correct { color: var(--text4); transition: color 0.3s; }

/* ══════════════════════════════════════════
   INLINE CODE in questions / options / expl
══════════════════════════════════════════ */
.q-text code,
.opt code,
.expl code,
.mcq-recap-q code,
.mcq-recap-expl code,
.mcq-recap-val code {
  background: #0e1a0e;
  border: 1px solid oklch(0.82 0.16 145 / 0.28);
  color: var(--lab-green);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: baseline;
}

/* ══════════════════════════════════════════
   MANUAL NEXT BUTTON
══════════════════════════════════════════ */
.mcq-next-btn {
  margin-top: 16px;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: center;
}
.mcq-next-btn:hover {
  border-color: var(--lab-green);
  background: #0e150f;
  color: var(--lab-green);
}

/* ══════════════════════════════════════════
   REVISION MODE — card states
══════════════════════════════════════════ */
.q-card.revision-mode {
  border-color: #7f1d1d;
  background: #1a0a0a;
}
.q-card.revision-corrected {
  border-color: var(--green);
  background: #061a0a;
}
.mcq-revision-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #fca5a5;
  background: #2d0a0a;
  border: 1px solid #7f1d1d;
  border-radius: 3px;
  padding: 6px 10px;
  margin-bottom: 14px;
}
.mcq-revision-banner-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #bbf7d0;
  background: #052e16;
  border: 1px solid #14532d;
  border-radius: 3px;
  padding: 6px 10px;
  margin-bottom: 14px;
}
.mcq-revision-icon { font-size: 13px; }

/* ══════════════════════════════════════════
   COMPACT MISSED RECAP
══════════════════════════════════════════ */
.mcq-recap {
  margin: 12px 0 40px;
}
.mcq-recap-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text4);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mcq-recap-count {
  background: #2d0a0a;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
}
.mcq-recap-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.mcq-recap-q {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
}
.mcq-recap-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.mcq-recap-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.mcq-recap-tag.wrong   { background: #2d0a0a; color: #fca5a5; border: 1px solid #7f1d1d; }
.mcq-recap-tag.correct { background: #052e16; color: #bbf7d0; border: 1px solid #14532d; }
.mcq-recap-val {
  font-size: 13px;
  line-height: 1.4;
}
.mcq-recap-val.wrong-val   { color: #fca5a5; }
.mcq-recap-val.correct-val { color: #bbf7d0; }
.mcq-recap-details {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.mcq-recap-details summary {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
  cursor: pointer;
  letter-spacing: 0.04em;
  list-style: none;
  user-select: none;
}
.mcq-recap-details summary::-webkit-details-marker { display: none; }
.mcq-recap-details summary::before { content: '▶ '; font-size: 9px; }
.mcq-recap-details[open] summary::before { content: '▼ '; }
.mcq-recap-details summary:hover { color: var(--text3); }
.mcq-recap-expl {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.6;
  margin-top: 8px;
}
.mcq-recap-retry {
  width: 100%;
  margin-top: 12px;
  display: block;
}

/* ══════════════════════════════════════════
   SSH DISCLAIMER
══════════════════════════════════════════ */
.ssh-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #0d1117;
  border: 1px solid #2a2a2f;
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.6;
}
.ssh-disclaimer-icon { color: var(--orange); font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.ssh-disclaimer strong { color: var(--text2); }

/* ══════════════════════════════════════════
   ACCORDION WEIGHT LABEL
══════════════════════════════════════════ */
.mcq-accordion-weight-label {
  font-size: 9px;
  color: oklch(0.82 0.16 145 / 0.6);
  text-transform: lowercase;
  letter-spacing: 0;
  font-weight: 400;
}

/* ══════════════════════════════════════════
   MOBILE FIXES
══════════════════════════════════════════ */
@media (max-width: 600px) {
  .mcq-recap-item { padding: 12px 12px; }
  .mcq-recap-row  { flex-direction: column; gap: 4px; }
  .mcq-next-btn   { font-size: 12px; padding: 12px 16px; }
  /* Fix MCQ nav arrow on mobile */
  .mcq-tabs-sticky { padding: 10px 14px; }
  .mcq-accordion-chevron { min-width: 14px; text-align: center; }
}

/* ══════════════════════════════════════════
   NAV — SINGLE BAR BREADCRUMB
   Replaces screen-nav + double bar system
══════════════════════════════════════════ */
.nav-breadcrumb {
  display: none;
  align-items: center;
  gap: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.nav-crumb-link {
  color: var(--text4);
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  padding: 2px 0;
}
.nav-crumb-link:hover { color: var(--lab-green); }
.nav-crumb-sep {
  color: #2a2a2f;
  margin: 0 8px;
  flex-shrink: 0;
}
.nav-crumb-current {
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Remove old screen-nav — no longer used */
.screen-nav { display: none !important; }

/* MCQ tabs sticky top — adjust since nav is now smaller */
.mcq-tabs-sticky { top: 53px; }

@media (max-width: 600px) {
  .top-nav { padding: 12px 16px; gap: 12px; }
  .nav-crumb-current { max-width: 140px; }
  .nav-crumb-link { display: none; }
  .nav-crumb-sep { display: none; }
  /* On mobile show only current page name */
  .nav-breadcrumb .nav-crumb-current:last-child { display: block; }
}

/* ══════════════════════════════════════════
   MCQ INLINE NAV — back btn + pills, in page
   No sticky bar, no double nav, scrolls with content
══════════════════════════════════════════ */
.mcq-inline-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.mcq-back-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text4);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mcq-back-btn:hover { color: var(--lab-green); border-color: oklch(0.82 0.16 145 / 0.4); }

/* Pills — inline in page */
.mcq-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.mcq-pill {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text4);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.mcq-pill:hover:not(.locked) { border-color: var(--border2); color: var(--text); }
.mcq-pill.active  { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-pill.passed  { border-color: var(--lab-green); color: var(--lab-green); background: #052e16; }
.mcq-pill.passed.active { background: var(--lab-green); color: #052e16; }
.mcq-pill.locked  { border-style: dashed; cursor: not-allowed; opacity: 0.35; }

/* Fix mcq-tabs-sticky top — now unused but keep offset correct */
.mcq-tabs-sticky { top: 53px; }

@media (max-width: 600px) {
  .mcq-inline-nav { gap: 10px; margin-bottom: 20px; }
  .mcq-pills { gap: 4px; }
  .mcq-pill { width: 24px; height: 24px; font-size: 9px; }
}

/* ══════════════════════════════════════════
   MCQ INDEX — back btn + search spacing
══════════════════════════════════════════ */
.mcq-index-back {
  margin-bottom: 8px;
}
.grid-heading {
  margin-bottom: 8px !important;
}
.mcq-search {
  margin-top: 16px;
}

/* ══════════════════════════════════════════
   SSH copy buttons — orange theme
══════════════════════════════════════════ */
.inline-copy-btn {
  background: #160a02;
  border: 1px solid var(--orange-dim);
  color: var(--orange);
}
.inline-copy-btn:hover {
  background: #2a1000;
  border-color: var(--orange);
  color: #fff;
}
.inline-copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
  background: #052e16;
}

/* ══════════════════════════════════════════
   SSH pages — back button orange theme
══════════════════════════════════════════ */
#page-bc-themes .mcq-back-btn,
#page-bc .mcq-back-btn,
#page-bc-level .mcq-back-btn {
  color: var(--text4);
  border-color: var(--border);
}
#page-bc-themes .mcq-back-btn:hover,
#page-bc .mcq-back-btn:hover,
#page-bc-level .mcq-back-btn:hover {
  color: var(--orange);
  border-color: var(--orange);
  background: #160a02;
}

/* ══════════════════════════════════════════
   NAV — PROFILE BUTTON
══════════════════════════════════════════ */
.nav-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text3);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: 8px;
}
.nav-profile-btn:hover {
  border-color: var(--lab-green);
  color: var(--lab-green);
  background: #0e150f;
}

/* ══════════════════════════════════════════
   PROFILE PANEL — OVERLAY
══════════════════════════════════════════ */
.profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.profile-overlay.open { display: block; }

/* ══════════════════════════════════════════
   PROFILE PANEL — DESKTOP (slide from right)
══════════════════════════════════════════ */
.profile-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: #0d0d0f;
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.profile-panel.open { right: 0; }

.profile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.profile-panel-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text4);
}
.profile-panel-close {
  background: none;
  border: none;
  color: var(--text4);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.profile-panel-close:hover { color: var(--text); }

/* ── Readiness score ── */
.pp-readiness {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.pp-readiness-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text4);
  margin-bottom: 8px;
}
.pp-readiness-score {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 42px;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.pp-readiness-score.green  { color: var(--green); }
.pp-readiness-score.orange { color: var(--orange); }
.pp-readiness-score.red    { color: var(--red); }
.pp-readiness-score.cal    { color: var(--text4); font-size: 16px; padding-top: 10px; }
.pp-readiness-bar-wrap {
  height: 4px;
  background: #1e2535;
  border-radius: 4px;
  overflow: hidden;
}
.pp-readiness-bar {
  height: 4px;
  background: var(--lab-green);
  border-radius: 4px;
  transition: width 0.6s ease;
}
/* Readiness bar color by score */
.pp-readiness-bar.orange { background: var(--orange); }
.pp-readiness-bar.red    { background: var(--red); }

/* ── Theory vs Practice ── */
.pp-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.pp-module {
  background: #0d0d0f;
  padding: 18px 20px;
}
.pp-module-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text4);
  margin-bottom: 6px;
}
.pp-module-score {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 8px;
  line-height: 1;
}
.pp-module-score.green  { color: var(--green); }
.pp-module-score.orange { color: var(--orange); }
.pp-module-score.red    { color: var(--red); }
.pp-module-score.neutral { color: var(--text4); }
.pp-module-bar-wrap {
  height: 3px;
  background: #1e2535;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.pp-module-bar {
  height: 3px;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.pp-module-bar.green  { background: var(--green); }
.pp-module-bar.orange { background: var(--orange); }
.pp-module-bar.red    { background: var(--red); }
.pp-module-bar.neutral { background: var(--border2); }
.pp-module-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text4);
}

/* ── By domain ── */
.pp-domains-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text4);
  padding: 16px 24px 8px;
}
.pp-domains { padding: 0 24px 16px; display: flex; flex-direction: column; gap: 10px; }
.pp-domain-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  align-items: center;
  gap: 10px;
}
.pp-domain-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-domain-bar-wrap {
  height: 6px;
  background: #1e2535;
  border-radius: 6px;
  overflow: hidden;
}
.pp-domain-bar {
  height: 6px;
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 2px;
}
.pp-domain-bar.green  { background: var(--green); }
.pp-domain-bar.orange { background: var(--orange); }
.pp-domain-bar.red    { background: var(--red); }
.pp-domain-bar.neutral { background: transparent; width: 0 !important; }
.pp-domain-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-align: right;
}
.pp-domain-pct.green  { color: var(--green); }
.pp-domain-pct.orange { color: var(--orange); }
.pp-domain-pct.red    { color: var(--red); }
.pp-domain-pct.neutral { color: var(--text4); }

/* ── CTA ── */
.pp-cta { padding: 0 24px 16px; }
.pp-cta-btn {
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--orange);
  background: #160a02;
  color: var(--orange);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-align: center;
}
.pp-cta-btn:hover { background: #2a1000; }

/* ── Notice ── */
.pp-notice {
  padding: 12px 24px 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text4);
  border-top: 1px solid var(--border);
  line-height: 1.6;
}
.pp-notice button {
  background: none;
  border: none;
  color: var(--lab-green);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ══════════════════════════════════════════
   PROFILE PANEL — MOBILE (bottom sheet)
══════════════════════════════════════════ */
@media (max-width: 700px) {
  .profile-panel {
    top: auto;
    bottom: -100%;
    right: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  .profile-panel.open { bottom: 0; right: 0; }

  /* Swipe handle */
  .profile-panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border2);
    border-radius: 4px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  .pp-domain-row { grid-template-columns: 80px 1fr 32px; }
}

/* ══════════════════════════════════════════
   PROFILE PANEL — COLOR FIXES
   MCQ = green brand / SSH = orange brand
   Readiness = dynamic green/orange/red
══════════════════════════════════════════ */

/* MCQ module — always green */
.mcq-module .pp-module-score { color: var(--lab-green) !important; }
.mcq-module .pp-module-bar   { background: var(--lab-green) !important; }

/* SSH module — always orange */
.ssh-module .pp-module-score { color: var(--orange) !important; }
.ssh-module .pp-module-bar   { background: var(--orange) !important; }

/* When no data — neutral grey */
.mcq-module .pp-module-score.neutral { color: var(--text4) !important; }
.mcq-module .pp-module-bar.neutral   { background: var(--border2) !important; }
.ssh-module .pp-module-score.neutral { color: var(--text4) !important; }
.ssh-module .pp-module-bar.neutral   { background: var(--border2) !important; }

/* Readiness bar — matches score color */
.pp-readiness-bar { background: var(--lab-green); }

/* Domain bars — empty tracks should be dark, not colored */
.pp-domain-bar-wrap { background: #1a1a1f; }
.pp-domain-bar.neutral { background: transparent !important; }

/* CTA button — only shown for weakest, keep orange */
/* Domain % — color already set by colorClass() */

/* Profile btn always visible — outside nav-right-home */
.nav-profile-btn {
  display: flex !important;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PROFILE PANEL — FINAL COLOR SYSTEM
   Readiness = white (neutral, motivating)
   MCQ bars/scores = green (brand)
   SSH bars/scores = orange (brand)
   Domain bars = green/orange/red semantic
══════════════════════════════════════════ */

/* Readiness — white, not green/orange/red */
.pp-readiness-score { color: #f1f5f9 !important; }
.pp-readiness-bar   { background: #f1f5f9 !important; }

/* MCQ = green */
.mcq-module .pp-module-score:not(.neutral) { color: var(--lab-green) !important; }
.mcq-module .pp-module-bar:not(.neutral)   { background: var(--lab-green) !important; }

/* SSH = orange */
.ssh-module .pp-module-score:not(.neutral) { color: var(--orange) !important; }
.ssh-module .pp-module-bar:not(.neutral)   { background: var(--orange) !important; }

/* Neutral states */
.pp-module-score.neutral { color: var(--text4) !important; }
.pp-module-bar.neutral   { background: transparent !important; }

/* Domain bars keep semantic colors (green/orange/red) */
/* Already handled by colorClass() */

/* ══════════════════════════════════════════
   TOPIC CARD — REAL PROGRESS BAR
   Replaces "10 / 10 sets ready" text
══════════════════════════════════════════ */
.topic-progress-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.topic-progress-track {
  width: 100%;
  height: 3px;
  background: #1e2535;
  border-radius: 4px;
  overflow: hidden;
}
.topic-progress-fill {
  height: 4px;
  background: var(--lab-green);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 0;
}
.topic-progress-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--lab-green);
  min-width: 28px;
  text-align: right;
}
.topic-coming {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text4);
}
/* Hide the old dot when progress bar is shown */
.topic-ready-info {
  width: 100%;
  margin-top: 10px;
}

/* ══════════════════════════════════════════
   PROFILE PANEL — DOMAIN + CTA WHITE
   Domain bars stay semantic (green/orange/red)
   Domain % text = white
   CTA button = white border/text
══════════════════════════════════════════ */

/* Domain % — always white */
.pp-domain-pct { color: #f1f5f9 !important; }
.pp-domain-pct.neutral { color: var(--text4) !important; }

/* Domain name — slightly brighter */
.pp-domain-name { color: var(--text2); }

/* CTA — white instead of orange */
.pp-cta-btn {
  border-color: #f1f5f9 !important;
  background: rgba(255,255,255,0.04) !important;
  color: #f1f5f9 !important;
}
.pp-cta-btn:hover {
  background: rgba(255,255,255,0.08) !important;
}

/* Tagline — tighter spacing, no wrap gap */
.hero-tagline { margin-bottom: 20px; }

/* ══════════════════════════════════════════
   LANDING — WELCOME BACK BANNER
══════════════════════════════════════════ */
.hero-resume {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0a150a;
  border: 1px solid oklch(0.82 0.16 145 / 0.3);
  border-radius: 6px;
  padding: 9px 14px;
  margin-bottom: 28px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text3);
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
.hero-resume-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lab-green);
  flex-shrink: 0;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 oklch(0.82 0.16 145 / 0.4); }
  50%      { opacity: 0.8; box-shadow: 0 0 0 5px oklch(0.82 0.16 145 / 0); }
}
.hero-resume-btn {
  background: none;
  border: none;
  color: var(--lab-green);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.hero-resume-btn:hover { opacity: 0.8; }

/* ══════════════════════════════════════════
   LANDING — PROOF STRIP
══════════════════════════════════════════ */
.hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text3);
  flex-wrap: wrap;
}
.hero-proof-item { color: var(--text3); }
.hero-proof-sep  { color: #3a3a3f; }

/* proof strip numbers — green */
.hero-proof-item { color: var(--lab-green) !important; }
.hero-proof-sep  { color: #2a2a2f; }

/* domain bars empty track — dark transparent, not orange */
.pp-domain-bar-wrap { background: #1a1a20 !important; }
.pp-domain-bar.neutral { background: transparent !important; width: 0 !important; }

/* CTA drill button — dark grey, not white */
.pp-cta-btn {
  border-color: var(--border2) !important;
  background: var(--bg2) !important;
  color: var(--text2) !important;
  font-weight: 600;
}
.pp-cta-btn:hover {
  border-color: var(--text3) !important;
  background: #1a1a1f !important;
  color: var(--text) !important;
}

/* Domain bar — started but no semantic color = dark neutral */
.pp-domain-bar.green  { background: var(--lab-green) !important; }
.pp-domain-bar.orange { background: var(--lab-green) !important; }
.pp-domain-bar.red    { background: var(--red) !important; }

/* Proof strip — only numbers green, words grey */
.hero-proof-item { color: var(--text4) !important; }
.hero-proof-item .hero-proof-num { color: var(--lab-green) !important; }

/* Proof strip separators — more visible */
.hero-proof-sep {
  color: var(--text4) !important;
  padding: 0 4px;
}
