/* ===== Tema y variables ===== */
:root {
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #eef0f8;
  --text: #1e2233;
  --text-soft: #5b6178;
  --text-faint: #8990a8;
  --border: #e2e5f0;
  --primary: #5b4cf0;
  --primary-dark: #4536d6;
  --primary-soft: #ece9fd;
  --accent: #00b8a9;
  --accent-soft: #defaf6;
  --success: #16a34a;
  --success-soft: #e8f8ed;
  --danger: #e23d5c;
  --danger-soft: #fde8ec;
  --warn: #d97706;
  --warn-soft: #fef3e2;
  --shadow: 0 1px 2px rgba(30,34,51,.04), 0 6px 20px -8px rgba(30,34,51,.10);
  --shadow-lg: 0 12px 40px -12px rgba(30,34,51,.22);
  --radius: 14px;
  --sidebar-w: 300px;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #11121c;
  --bg-elevated: #181a28;
  --bg-soft: #1f2233;
  --text: #eef0f8;
  --text-soft: #aab0c8;
  --text-faint: #6c7290;
  --border: #2a2d44;
  --primary: #8b7bff;
  --primary-dark: #a396ff;
  --primary-soft: #262454;
  --accent: #2ee0cc;
  --accent-soft: #143733;
  --success: #4ade80;
  --success-soft: #143322;
  --danger: #fb6f8d;
  --danger-soft: #3a1822;
  --warn: #fbbf6d;
  --warn-soft: #3a2c12;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 16px 50px -12px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font); margin: 0; }
p { margin: 0; }
button { font-family: var(--font); cursor: pointer; }
::selection { background: var(--primary-soft); }

/* ===== Layout ===== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 22px 16px 16px;
  gap: 18px;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
  max-width: 980px;
}

/* ===== Brand ===== */
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 4px; }
.brand-icon { width: 38px; height: 38px; color: var(--primary); flex-shrink: 0; }
.brand h1 { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: -.2px; }
.brand h1 span { color: var(--primary); margin: 0 1px; }
.brand p { font-size: .72rem; color: var(--text-faint); margin-top: 2px; }

/* ===== Progreso global ===== */
.global-progress { background: var(--bg-soft); border-radius: var(--radius); padding: 14px 16px; }
.gp-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--text-soft); margin-bottom: 8px; }
.gp-row strong { color: var(--primary); font-size: .95rem; }
.bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width .5s ease; width: 0%; }

/* ===== Navegación ===== */
.nav-section { display: flex; flex-direction: column; gap: 3px; }
.nav-heading { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); padding: 10px 10px 4px; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text-soft);
  padding: 10px 12px; border-radius: 10px; font-size: .88rem; font-weight: 600;
  text-align: left; width: 100%; transition: background .15s, color .15s;
  position: relative;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-dark); }
.badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: .68rem;
  padding: 1px 7px; border-radius: 99px; font-weight: 700;
}

.units-section { flex: 1; }
.unit-item { border-radius: 10px; overflow: hidden; }
.unit-head {
  display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none;
  color: var(--text-soft); padding: 9px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600;
  text-align: left; transition: background .15s, color .15s;
}
.unit-head:hover { background: var(--bg-soft); color: var(--text); }
.unit-item.open .unit-head { background: var(--bg-soft); color: var(--text); }
.unit-num {
  width: 22px; height: 22px; border-radius: 7px; background: var(--primary-soft); color: var(--primary-dark);
  font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.unit-item.studied .unit-num { background: var(--success-soft); color: var(--success); }
.unit-head .chev { margin-left: auto; width: 14px; height: 14px; color: var(--text-faint); transition: transform .2s; flex-shrink: 0; }
.unit-item.open .chev { transform: rotate(90deg); }
.unit-title-text { flex: 1; line-height: 1.25; }
.unit-sub { display: flex; flex-direction: column; max-height: 0; overflow: hidden; transition: max-height .2s ease; padding-left: 30px; }
.unit-item.open .unit-sub { max-height: 220px; }
.unit-sub button {
  background: none; border: none; color: var(--text-faint); text-align: left; padding: 7px 10px;
  font-size: .8rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.unit-sub button:hover { color: var(--primary-dark); background: var(--bg-soft); }
.unit-sub button.active { color: var(--primary-dark); }
.unit-sub .mini-score { margin-left: auto; font-size: .7rem; color: var(--text-faint); font-weight: 700; }

.theme-toggle {
  display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-soft); padding: 10px 14px; border-radius: 10px; font-size: .82rem; font-weight: 600;
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle:hover { color: var(--text); }

/* ===== Mobile toggle ===== */
.mobile-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 50; width: 42px; height: 42px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  color: var(--text); align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 20px; height: 20px; }

/* ===== Podcast ===== */
.podcast-card {
  display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 26px; color-scheme: light dark;
}
.podcast-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.podcast-icon svg { width: 22px; height: 22px; }
.podcast-body { flex: 1; min-width: 0; }
.podcast-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-dark); font-weight: 800; margin-bottom: 2px; }
.podcast-title { font-size: .98rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.podcast-card audio { width: 100%; accent-color: var(--primary); }
@media (max-width: 560px) { .podcast-card { flex-direction: column; align-items: stretch; } .podcast-icon { display: none; } }

/* ===== Infografía ===== */
.infographic-card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; margin-bottom: 26px;
  border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg-elevated); display: inline-block; width: 100%;
}
.infographic-card img { display: block; width: 100%; height: auto; }
.infographic-hint {
  position: absolute; bottom: 12px; right: 12px; background: rgba(15,17,28,.72); color: #fff;
  font-size: .74rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(2px);
}
.infographic-download {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15,17,28,.72); color: #fff; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px); cursor: pointer;
}
.infographic-download svg { width: 17px; height: 17px; }
.infographic-download:hover { background: var(--primary); }

.lightbox {
  position: fixed; inset: 0; background: rgba(8,9,16,.92); z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: default; }
.lightbox-toolbar { position: absolute; top: 20px; right: 20px; display: flex; gap: 10px; }
.lightbox-btn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.12); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-btn svg { width: 20px; height: 20px; }
.lightbox-btn:hover { background: rgba(255,255,255,.22); }
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ===== Componentes comunes ===== */
.page-header { margin-bottom: 28px; }
.page-header h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.3px; }
.page-header p.sub { color: var(--text-soft); margin-top: 6px; font-size: .95rem; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 800; margin-bottom: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; font-weight: 700; font-size: .88rem; padding: 11px 20px;
  cursor: pointer; transition: transform .1s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-soft); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-block { width: 100%; }

.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }

/* ===== Dashboard ===== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-box .num { font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.stat-box .label { font-size: .78rem; color: var(--text-soft); margin-top: 4px; font-weight: 600; }

.quick-actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }

.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.unit-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.unit-card-top { display: flex; align-items: flex-start; gap: 12px; }
.unit-card-num { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.unit-card.studied .unit-card-num { background: var(--success-soft); color: var(--success); }
.unit-card-top h3 { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.unit-card-meta { display: flex; gap: 14px; font-size: .76rem; color: var(--text-soft); flex-wrap: wrap; }
.unit-card-meta b { color: var(--text); }
.unit-card-actions { display: flex; gap: 8px; margin-top: auto; }
.unit-card-actions .btn { flex: 1; }
.mini-bar { height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.mini-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; }

/* ===== Contenido de estudio ===== */
.intro-box { font-size: 1.02rem; line-height: 1.75; color: var(--text-soft); margin-bottom: 26px; }
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 34px; }
.highlight-card { background: var(--success-soft); border-left: 4px solid var(--success); border-radius: 0 10px 10px 0; padding: 14px 16px; }
.highlight-card h4 { font-size: .72rem; letter-spacing: .04em; color: var(--success); font-weight: 800; margin-bottom: 6px; }
.highlight-card p { font-size: .87rem; color: var(--text); line-height: 1.55; }

.study-section { margin-bottom: 30px; padding-bottom: 4px; }
.study-section h3 {
  font-size: 1.18rem; font-weight: 800; color: var(--text); margin-bottom: 14px;
  padding-left: 12px; border-left: 4px solid var(--primary);
}
.study-section p { font-size: .98rem; line-height: 1.75; color: var(--text-soft); margin-bottom: 13px; }
.study-section strong { color: var(--text); font-weight: 700; }
.study-section ul { margin: 0 0 13px; padding-left: 22px; color: var(--text-soft); line-height: 1.75; }
.study-section li { margin-bottom: 5px; font-size: .98rem; }

.table-wrap { overflow-x: auto; margin: 16px 0 18px; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th { background: var(--primary); color: #fff; text-align: left; padding: 10px 14px; font-weight: 700; white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--bg-soft); }
tbody td strong { color: var(--text); }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 18px; }
.flow-step {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  flex: 1 1 200px; min-width: 170px; display: flex; gap: 10px; align-items: flex-start;
}
.flow-step .flow-num {
  background: var(--primary); color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: .68rem;
  font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.flow-step p { font-size: .84rem; color: var(--text); line-height: 1.5; margin: 0; }
.flow-arrow { color: var(--text-faint); font-size: 1.1rem; flex-shrink: 0; }
@media (max-width: 700px) { .flow { flex-direction: column; align-items: stretch; } .flow-arrow { display: none; } }

.study-footer { display: flex; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ===== Flashcards ===== */
.flash-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 10px 0 30px; }
.flash-progress { font-size: .85rem; color: var(--text-soft); font-weight: 600; }
.flashcard {
  width: 100%; max-width: 560px; min-height: 260px; perspective: 1400px; cursor: pointer;
}
.flashcard-inner {
  position: relative; width: 100%; height: 100%; min-height: 260px; transition: transform .5s; transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; padding: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px;
  background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.flash-face.back { transform: rotateY(180deg); background: var(--primary-soft); }
.flash-face .tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-weight: 800; }
.flash-face .term { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.flash-face .def { font-size: 1rem; line-height: 1.6; color: var(--text); }
.flash-hint { font-size: .8rem; color: var(--text-faint); }
.flash-rate { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.flash-rate .btn { min-width: 130px; }
.flash-empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.flash-empty svg { width: 64px; height: 64px; color: var(--success); margin-bottom: 16px; }

/* ===== Quiz / Examen ===== */
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.quiz-progress-text { font-size: .85rem; color: var(--text-soft); font-weight: 700; }
.quiz-score-live { font-size: .85rem; color: var(--primary); font-weight: 800; }
.quiz-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.quiz-tag { font-size: .72rem; color: var(--text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.quiz-question { font-size: 1.18rem; font-weight: 700; line-height: 1.5; margin-bottom: 22px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 13px 16px; text-align: left; background: var(--bg-elevated); color: var(--text); font-size: .95rem; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option .letter {
  width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft); color: var(--text-soft); font-size: .78rem;
  font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.quiz-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option.correct { border-color: var(--success); background: var(--success-soft); }
.quiz-option.correct .letter { background: var(--success); color: #fff; }
.quiz-option.incorrect { border-color: var(--danger); background: var(--danger-soft); }
.quiz-option.incorrect .letter { background: var(--danger); color: #fff; }
.quiz-option:disabled { cursor: default; }
.quiz-explain {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-size: .9rem; line-height: 1.6;
}
.quiz-explain.ok { background: var(--success-soft); color: var(--text); border-left: 4px solid var(--success); }
.quiz-explain.bad { background: var(--danger-soft); color: var(--text); border-left: 4px solid var(--danger); }
.quiz-actions { display: flex; justify-content: flex-end; margin-top: 22px; gap: 10px; }
.quiz-timer { font-size: .85rem; font-weight: 800; color: var(--text-soft); padding: 6px 14px; background: var(--bg-soft); border-radius: 99px; }
.quiz-timer.low { color: var(--danger); background: var(--danger-soft); }

.results-hero { text-align: center; padding: 36px 20px; }
.results-ring { width: 150px; height: 150px; margin: 0 auto 18px; position: relative; }
.results-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.results-ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; font-weight: 800; }
.results-msg { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.results-sub { color: var(--text-soft); font-size: .9rem; }
.results-breakdown { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.bd-row { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.bd-row .bd-label { width: 220px; flex-shrink: 0; color: var(--text-soft); font-weight: 600; }
.bd-row .bar { flex: 1; }
.bd-row .bd-pct { width: 40px; text-align: right; font-weight: 800; color: var(--text); }
.missed-list { margin-top: 30px; }
.missed-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.missed-item:last-child { border-bottom: none; }
.missed-item .q { font-weight: 700; margin-bottom: 8px; }
.missed-item .your { color: var(--danger); font-size: .87rem; margin-bottom: 4px; }
.missed-item .right { color: var(--success); font-size: .87rem; margin-bottom: 8px; }
.missed-item .exp { font-size: .85rem; color: var(--text-soft); line-height: 1.6; }

.exam-config { display: flex; flex-direction: column; gap: 22px; max-width: 520px; }
.config-row label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 10px; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1.5px solid var(--border); background: var(--bg-elevated); color: var(--text-soft); padding: 9px 16px; border-radius: 99px; font-size: .85rem; font-weight: 700; }
.pill.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.switch-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg-soft); padding: 14px 16px; border-radius: 12px; }
.switch { position: relative; width: 44px; height: 26px; background: var(--border); border-radius: 99px; border: none; flex-shrink: 0; }
.switch.on { background: var(--primary); }
.switch .dot { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on .dot { left: 21px; }
.history-table { margin-top: 30px; }
.history-table table { font-size: .82rem; }

/* ===== Búsqueda ===== */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--bg-elevated); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 26px; }
.search-box svg { width: 20px; height: 20px; color: var(--text-faint); flex-shrink: 0; }
.search-box input { flex: 1; border: none; background: none; outline: none; font-size: 1rem; color: var(--text); }
.search-result { padding: 16px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.search-result:hover .sr-title { color: var(--primary); }
.search-result .sr-kind { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 800; margin-bottom: 4px; }
.search-result .sr-title { font-weight: 700; margin-bottom: 4px; transition: color .15s; }
.search-result .sr-snippet { font-size: .87rem; color: var(--text-soft); line-height: 1.55; }
.search-result mark { background: var(--warn-soft); color: var(--text); border-radius: 3px; padding: 0 2px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: flex; }
  .main { padding: 70px 18px 60px; max-width: 100%; }
  .bd-row .bd-label { width: 140px; font-size: .78rem; }
}
@media (max-width: 520px) {
  .quiz-card { padding: 18px; }
  .results-breakdown .bd-label { width: 110px; }
}

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
