/*============================================================
  NeuralPath — AI/ML Learning Dashboard
   ============================================================ */

/* ── RESET & BASE ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #0A0F2C;
  color: #e4e8f0;
  font-family: 'DM Mono', monospace;
  display: flex;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 99px; }

/* ── SIDEBAR ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  height: 100vh;
  background: #0D1433;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.logo-area {
  padding: 28px 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #6effa3;
}

.logo-tag {
  font-size: 9px;
  color: #5a6478;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-top: 3px;
}

.nav-section { padding: 20px 14px 8px; }
.nav-section + .nav-section { padding-top: 12px; }

.nav-section-label {
  font-size: 9px;
  color: #5a6478;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 8px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  color: #8892a4;
  border: 1px solid transparent;
  margin-bottom: 1px;
  cursor: pointer;
  transition: all 0.18s;
}

.nav-item:hover { color: #e4e8f0; background: #161D45; }
.nav-item.active { color: #6effa3; background: rgba(110,255,163,0.07); border-color: rgba(110,255,163,0.14); }
.nav-icon { font-size: 14px; width: 20px; text-align: center; }

/* ── XP CARD ── */
.xp-card-wrap { margin-top: auto; padding: 16px 14px; }
.xp-card { background: #161D45; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 16px; }
.xp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.xp-label { font-size: 10px; color: #5a6478; text-transform: uppercase; letter-spacing: 1px; }
.xp-value { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #6effa3; }
.xp-bar-bg { background: rgba(255,255,255,0.05); border-radius: 99px; height: 5px; overflow: hidden; }
.xp-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6effa3, #5b8cff); width: 0%; transition: width 0.6s ease; }

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── TOPBAR ── */
.topbar {
  padding: 0 32px;
  height: 62px;
  flex-shrink: 0;
  background: rgba(10,15,44,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-wrap { position: relative; width: 220px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #161D45;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 11px;
  color: #8892a4;
  transition: border-color 0.18s;
}

.search-wrap:focus-within .search-box { border-color: rgba(110,255,163,0.3); }

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #e4e8f0;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  width: 100%;
}

.search-input::placeholder { color: #8892a4; }

.search-icon { color: #5a6478; font-size: 13px; flex-shrink: 0; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  display: none;
}

.search-dropdown.open { display: block; }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 11px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.focused { background: #161D45; }
.search-result-icon { font-size: 13px; flex-shrink: 0; width: 20px; text-align: center; }
.search-result-name { color: #e4e8f0; flex: 1; }
.search-result-type { font-size: 9px; color: #5a6478; text-transform: uppercase; letter-spacing: 1px; }
.search-no-result { padding: 14px; font-size: 11px; color: #5a6478; text-align: center; }

.streak-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,107,114,0.08);
  border: 1px solid rgba(255,107,114,0.2);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 11px;
  color: #ff6b72;
}

.topbar-btn {
  background: #6effa3;
  color: #0A0F2C;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.topbar-btn:hover { opacity: 0.85; }

/* ── CONTENT ── */
.content { flex: 1; overflow-y: auto; padding: 28px 32px; }

/* ── PANELS ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── TABS ── */
.tabs { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }

.tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  color: #8892a4;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Mono', monospace;
}

.tab:hover { color: #e4e8f0; }
.tab.active { background: #6effa3; color: #0A0F2C; border-color: #6effa3; font-weight: 500; }

/* ── ROADMAP ── */
.roadmap { display: flex; flex-direction: column; }
.rm-row { display: flex; align-items: stretch; }
.rm-spine { display: flex; flex-direction: column; align-items: center; width: 36px; flex-shrink: 0; }
.rm-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #6effa3; background: #0A0F2C; margin-top: 18px; flex-shrink: 0; }
.rm-dot.filled { background: #6effa3; }
.rm-dot.pulse { background: #6effa3; box-shadow: 0 0 0 4px rgba(110,255,163,0.15); }
.rm-line { flex: 1; width: 2px; background: rgba(255,255,255,0.07); }
.rm-line.filled { background: #6effa3; }

.rm-card {
  flex: 1;
  margin: 8px 0 8px 14px;
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.rm-card:hover { border-color: rgba(110,255,163,0.25); background: #161D45; }
.rm-card.active-card { border-color: rgba(255,255,255,0.07); }
.rm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rm-phase { font-size: 10px; color: #5a6478; }
.rm-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.rm-desc { font-size: 11px; color: #8892a4; line-height: 1.65; }
.rm-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* ── BADGES ── */
.badge { font-size: 9px; padding: 3px 8px; border-radius: 5px; text-transform: uppercase; letter-spacing: 1px; }
.badge-done { background: rgba(110,255,163,0.1); color: #6effa3; }
.badge-prog { background: rgba(91,140,255,0.1); color: #5b8cff; }
.badge-soon { background: rgba(255,255,255,0.05); color: #8892a4; }

/* ── TOPIC PILLS ── */
.topic-pill {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 99px;
  background: #161D45;
  border: 1px solid rgba(255,255,255,0.07);
  color: #8892a4;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}

.topic-pill:hover { color: #e4e8f0; border-color: rgba(255,255,255,0.15); }
.topic-pill.done { color: #6effa3; border-color: rgba(110,255,163,0.22); background: rgba(110,255,163,0.06); }

/* ── PAPERS ── */
.papers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.paper-card {
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.paper-card:hover { border-color: rgba(91,140,255,0.35); transform: translateY(-2px); }
.paper-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.paper-year { font-size: 10px; color: #5a6478; }
.paper-title { font-family: 'Instrument Serif', serif; font-size: 15px; line-height: 1.45; margin-bottom: 7px; }
.paper-author { font-size: 10px; color: #5a6478; margin-bottom: 11px; }
.paper-abstract { font-size: 11px; color: #8892a4; line-height: 1.7; }
.paper-actions { display: flex; gap: 8px; margin-top: 14px; }

.btn-read {
  font-size: 10px;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid rgba(91,140,255,0.28);
  background: rgba(91,140,255,0.09);
  color: #5b8cff;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  text-decoration: none;
  display: inline-block;
  transition: all 0.18s;
}

.btn-read:hover { background: rgba(91,140,255,0.18); }

.btn-action {
  font-size: 10px;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  color: #8892a4;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: all 0.18s;
}

.btn-action:hover { color: #e4e8f0; border-color: rgba(255,255,255,0.2); }

/* ── NOTEBOOKS ── */
.notebooks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

.nb-card {
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.nb-card:hover { border-color: rgba(255,209,102,0.3); transform: translateY(-2px); }
.nb-header { padding: 20px; font-size: 26px; background: linear-gradient(135deg, rgba(255,209,102,0.07), rgba(91,140,255,0.07)); border-bottom: 1px solid rgba(255,255,255,0.07); }
.nb-body { padding: 16px 18px; }
.nb-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.nb-meta { font-size: 10px; color: #5a6478; margin-bottom: 11px; }
.diff-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 3px 8px; border-radius: 5px; }

/* ── FLASHCARDS ── */
.quiz-wrap { max-width: 640px; margin: 0 auto; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.quiz-title { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; }
.quiz-subtitle { font-size: 11px; color: #5a6478; margin-top: 3px; }
.card-stack { position: relative; height: 250px; margin-bottom: 24px; }

.card-deco {
  position: absolute;
  left: 0; right: 0;
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
}

.card-deco-2 { top: 12px; height: calc(100% - 12px); transform: rotate(2deg); opacity: 0.4; }
.card-deco-1 { top: 6px; height: calc(100% - 6px); transform: rotate(1deg); opacity: 0.7; }

.card-main {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0D1433;
  border: 1px solid rgba(110,255,163,0.22);
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.card-main:hover { border-color: rgba(110,255,163,0.4); }
.card-main.revealed { background: rgba(110,255,163,0.04); border-color: rgba(110,255,163,0.4); }
.card-chip { font-size: 9px; color: #5a6478; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px; }
.card-text { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; line-height: 1.45; }
.card-hint { font-size: 10px; color: #5a6478; margin-top: 18px; }

.quiz-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }

.quiz-btn {
  padding: 10px 26px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.07);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.quiz-btn.hard { background: rgba(255,107,114,0.08); border-color: rgba(255,107,114,0.25); color: #ff6b72; }
.quiz-btn.hard:hover { background: rgba(255,107,114,0.16); }
.quiz-btn.nav { color: #8892a4; }
.quiz-btn.nav:hover { color: #e4e8f0; }
.quiz-btn.easy { background: rgba(110,255,163,0.08); border-color: rgba(110,255,163,0.25); color: #6effa3; }
.quiz-btn.easy:hover { background: rgba(110,255,163,0.16); }

.quiz-prog-row { display: flex; align-items: center; gap: 12px; }
.quiz-prog-bar { flex: 1; background: rgba(255,255,255,0.05); border-radius: 99px; height: 4px; overflow: hidden; }
.quiz-prog-fill { height: 100%; background: #6effa3; border-radius: 99px; width: 0%; transition: width 0.4s; }
.quiz-prog-label { font-size: 10px; color: #5a6478; }

/* ── TIMER ── */
.timer-wrap { max-width: 440px; margin: 0 auto; text-align: center; }
.mode-pills { display: flex; gap: 8px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }

.mode-pill {
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  color: #8892a4;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Mono', monospace;
}

.mode-pill:hover { color: #e4e8f0; }
.mode-pill.active { background: rgba(110,255,163,0.09); border-color: rgba(110,255,163,0.28); color: #6effa3; }
.ring-wrap { position: relative; width: 200px; height: 200px; margin: 0 auto 32px; }
.ring-wrap svg { width: 100%; height: 100%; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time { font-family: 'Syne', sans-serif; font-size: 44px; font-weight: 800; line-height: 1; }
.ring-label { font-size: 10px; color: #5a6478; margin-top: 6px; text-transform: uppercase; letter-spacing: 2px; }
.timer-btns { display: flex; gap: 12px; justify-content: center; margin-bottom: 32px; }

.timer-btn-start {
  background: #6effa3;
  color: #0A0F2C;
  border: none;
  padding: 12px 38px;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.timer-btn-start:hover { opacity: 0.85; }

.timer-btn-reset {
  background: transparent;
  color: #8892a4;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 12px 22px;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
}

.timer-btn-reset:hover { color: #e4e8f0; border-color: rgba(255,255,255,0.2); }
.sessions-wrap { margin-bottom: 24px; }
.sessions-label { font-size: 10px; color: #5a6478; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.session-dots { display: flex; gap: 8px; justify-content: center; }
.session-dot { width: 20px; height: 20px; border-radius: 50%; background: rgba(110,255,163,0.1); border: 1px solid rgba(110,255,163,0.2); }
.session-dot.done { background: #6effa3; border-color: #6effa3; }

.timer-task-input {
  width: 100%;
  background: #161D45;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 11px 16px;
  color: #e4e8f0;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.18s;
}

.timer-task-input:focus { border-color: rgba(110,255,163,0.35); }
.timer-task-input::placeholder { color: #5a6478; }

/* ── PROGRESS ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }

.stat-card {
  background: #0D1433;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px;
  padding: 20px;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: rgba(255,255,255,0.12); }
.stat-label { font-size: 9px; color: #5a6478; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; line-height: 1; }
.stat-sub { font-size: 10px; color: #5a6478; margin-top: 5px; }
.c-green { color: #6effa3; }
.c-blue { color: #5b8cff; }
.c-red { color: #ff6b72; }
.c-yellow { color: #ffd166; }

.phase-breakdown { background: #0D1433; border: 1px solid rgba(255,255,255,0.07); border-radius: 13px; padding: 24px; }
.phase-breakdown-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 20px; }
.phase-bar-item { margin-bottom: 18px; }
.phase-bar-item:last-child { margin-bottom: 0; }
.phase-bar-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; }
.phase-bar-count { color: #5a6478; }
.phase-bar-bg { background: rgba(255,255,255,0.05); border-radius: 99px; height: 6px; overflow: hidden; }
.phase-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6effa3, #5b8cff); }

/* ── BOOKMARKS ── */
.empty-state { background: #0D1433; border: 1px solid rgba(255,255,255,0.07); border-radius: 13px; padding: 60px 40px; text-align: center; }
.empty-icon { font-size: 44px; margin-bottom: 14px; }
.empty-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.empty-sub { font-size: 12px; color: #5a6478; line-height: 1.7; }

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  margin: 0 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.footer-logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6effa3;
  flex-shrink: 0;
}

.footer-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #6effa3;
  letter-spacing: 0.3px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 13px;
}

.footer-link {
  font-size: 10px;
  color: #5a6478;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.footer-link:hover { color: #8892a4; background: rgba(255,255,255,0.04); }

.footer-link-icon { width: 14px; text-align: center; font-size: 11px; }

.footer-divider { height: 1px; background: rgba(255,255,255,0.05); margin-bottom: 11px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 9px;
  color: #3d4a5e;
  line-height: 1.6;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  margin: 0 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
}

.footer-copy {
  font-size: 9px;
  color: #3d4a5e;
  line-height: 1.6;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #8892a4;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade { animation: fadeUp 0.4s ease both; }

/* ══════════════════════════════════════════════
  MOBILE RESPONSIVE — max-width: 768px
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

  html, body { overflow: hidden; }

  body { flex-direction: column; }

  /* Sidebar slides in from left */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }

  .sidebar.open { transform: translateX(0); }

  /* Main fills full width */
  .main { width: 100%; height: 100vh; }

  /* Topbar */
  .topbar { padding: 0 16px; height: 56px; }

  .hamburger { display: flex; }

  /* Hide search and streak on small screens, show only flashcard btn */
  .search-wrap { display: none; }
  .streak-badge { display: none; }

  .topbar-btn {
    padding: 7px 12px;
    font-size: 10px;
  }

  /* Content padding */
  .content { padding: 20px 16px; }

  /* Stats row — 2 columns on mobile */
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* Papers grid — 1 column */
  .papers-grid { grid-template-columns: 1fr; }

  /* Notebooks grid — 1 column */
  .notebooks-grid { grid-template-columns: 1fr; }

  /* Flashcard buttons wrap */
  .quiz-btns { flex-wrap: wrap; gap: 8px; }
  .quiz-btn { padding: 10px 18px; font-size: 11px; }

  /* Timer full width */
  .timer-wrap { max-width: 100%; }

  /* Mode pills wrap */
  .mode-pills { gap: 6px; }
  .mode-pill { padding: 7px 12px; font-size: 10px; }

  /* Ring slightly smaller */
  .ring-wrap { width: 170px; height: 170px; }
  .ring-time { font-size: 36px; }

  /* Roadmap spine still works, just smaller padding */
  .rm-card { padding: 16px; }
  .rm-title { font-size: 13px; }

  /* Phase breakdown text size */
  .phase-bar-top { font-size: 11px; }

  /* Empty state padding */
  .empty-state { padding: 40px 20px; }
}

/* ══════════════════════════════════════════════
  SMALL PHONES — max-width: 420px
   ══════════════════════════════════════════════ */
@media (max-width: 420px) {

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-num { font-size: 24px; }
  .stat-card { padding: 14px; }

  .quiz-wrap { max-width: 100%; }
  .card-text { font-size: 15px; }

  .rm-topics { gap: 5px; }
  .topic-pill { font-size: 9px; padding: 3px 8px; }
}
