/* =====================================================================
   Simulacro SERUMS 2026 · Psicología — hoja de estilos
   ===================================================================== */
:root {
  --blue-900: #0a2f6e;
  --blue-800: #0b3b8c;
  --blue-700: #1552b8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-50:  #eff5ff;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --amber-500:#f59e0b;
  --green-600:#16a34a;
  --green-50: #ecfdf3;
  --red-600:  #dc2626;
  --red-50:   #fef2f2;

  --ink:      #0f1b2d;
  --ink-2:    #33445c;
  --muted:    #6b7a90;
  --line:     #e4e9f2;
  --line-2:   #eef2f8;
  --bg:       #f4f7fc;
  --card:     #ffffff;

  --radius:   18px;
  --radius-sm:12px;
  --shadow:   0 1px 2px rgba(16,32,64,.04), 0 8px 24px rgba(16,32,64,.06);
  --shadow-lg:0 12px 40px rgba(11,59,140,.14);
  --font:     'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-decor {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 88% -8%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(700px 460px at -8% 8%, rgba(13,148,136,.09), transparent 60%);
}

.container { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 18px 20px;
}
.header-nav { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 12px; box-shadow: var(--shadow); }
.nav-link { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .88rem; color: var(--ink-2); padding: 8px 16px; border-radius: 9px; cursor: pointer; transition: .16s; }
.nav-link.is-on { background: var(--blue-800); color: #fff; }
.nav-link:not(.is-on):hover { background: var(--line-2); }
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
  box-shadow: 0 6px 16px rgba(11,59,140,.30);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.header-meta { display: flex; gap: 10px; }
.pill { font-size: .76rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.pill-soft { background: var(--blue-50); color: var(--blue-700); }

/* ---------- Views ---------- */
.view { display: none; animation: fade .35s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; max-width: 780px; margin: 18px auto 34px; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--blue-700); background: var(--blue-50); padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.hero h1 .hl { color: var(--blue-700); position: relative; }
.hero .lead { margin-top: 16px; font-size: 1.06rem; color: var(--ink-2); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-title { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }

/* ---------- Start grid ---------- */
.grid-start { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.config-card, .side-card { padding: 26px; }

.field { margin-bottom: 22px; }
.field > label:not(.switch) { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 10px; color: var(--ink); }
.hint { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.hint.muted { color: var(--muted); }

.seg { display: inline-flex; background: var(--line-2); padding: 5px; border-radius: 12px; gap: 4px; }
.seg-btn {
  border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink-2);
  padding: 9px 22px; border-radius: 9px; cursor: pointer; transition: .18s;
}
.seg-btn.is-on { background: #fff; color: var(--blue-700); box-shadow: 0 2px 8px rgba(16,32,64,.10); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 12px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  flex: none; width: 42px; height: 24px; border-radius: 999px; background: #cdd6e5; position: relative; transition: .2s;
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s;
}
.switch input:checked + .switch-track { background: var(--blue-600); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.switch-label { font-size: .9rem; color: var(--ink-2); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 700; border-radius: 12px; border: 1px solid transparent;
  padding: 12px 20px; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 26px; font-size: 1rem; border-radius: 13px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-primary { background: linear-gradient(135deg, var(--blue-600), var(--blue-800)); color: #fff; box-shadow: 0 8px 20px rgba(21,82,184,.28); width: 100%; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(21,82,184,.36); }
.btn-success { background: linear-gradient(135deg, #17a34a, #0f7a37); color: #fff; box-shadow: 0 8px 20px rgba(22,163,74,.26); }
.btn-success:hover { box-shadow: 0 10px 26px rgba(22,163,74,.34); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d3e4; background: #fbfcfe; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Side / progress ---------- */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--blue-50); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--blue-800); line-height: 1; }
.stat-lbl { font-size: .74rem; color: var(--muted); font-weight: 600; }
.history { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .86rem;
}
.history-item .h-date { color: var(--muted); font-weight: 500; }
.history-item .h-score { font-weight: 800; }
.h-badge { font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.h-badge.ok { background: var(--green-50); color: var(--green-600); }
.h-badge.bad { background: var(--red-50); color: var(--red-600); }

/* ---------- Areas legend ---------- */
.areas-legend { margin-top: 30px; text-align: center; }
.legend-title { display: block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.legend-items { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.legend-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; }
.legend-chip i { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Exam ---------- */
.exam-topbar { display: flex; align-items: center; gap: 16px; margin: 8px 0 22px; }
.exam-progress { flex: 1; }
.exam-progress-head { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; font-weight: 700; margin-bottom: 8px; color: var(--ink-2); }
.progressbar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progressbar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal-500), var(--blue-600)); border-radius: 999px; transition: width .35s ease; }
.timer { font-variant-numeric: tabular-nums; background: var(--blue-50); color: var(--blue-800); padding: 4px 12px; border-radius: 999px; }
.timer.danger { background: var(--red-50); color: var(--red-600); }

.exam-body { display: grid; grid-template-columns: 1fr 268px; gap: 20px; align-items: start; }
.question-card { padding: 30px; }
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.q-index { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--blue-800); color: #fff; font-weight: 800; display: grid; place-items: center; }
.area-tag { font-size: .74rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; color: #fff; letter-spacing: .01em; }
.q-text { font-size: 1.14rem; font-weight: 600; line-height: 1.5; color: var(--ink); margin-bottom: 22px; }

.options { display: flex; flex-direction: column; gap: 11px; }
.option {
  display: flex; align-items: flex-start; gap: 13px; text-align: left; width: 100%;
  border: 1.5px solid var(--line); background: #fff; border-radius: 13px; padding: 15px 17px;
  font: inherit; font-size: 1rem; color: var(--ink-2); cursor: pointer; transition: .15s; line-height: 1.45;
}
.option:hover { border-color: var(--blue-500); background: var(--blue-50); }
.option .opt-key {
  flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--line-2); color: var(--ink-2);
  font-weight: 800; font-size: .9rem; display: grid; place-items: center; transition: .15s;
}
.option.selected { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.option.selected .opt-key { background: var(--blue-600); color: #fff; }
.option.correct { border-color: var(--green-600); background: var(--green-50); }
.option.correct .opt-key { background: var(--green-600); color: #fff; }
.option.wrong { border-color: var(--red-600); background: var(--red-50); }
.option.wrong .opt-key { background: var(--red-600); color: #fff; }
.option.locked { cursor: default; }
.option.locked:hover { background: #fff; border-color: var(--line); }
.option.locked.correct:hover { background: var(--green-50); border-color: var(--green-600); }
.option.locked.wrong:hover { background: var(--red-50); border-color: var(--red-600); }

.q-feedback { margin-top: 18px; padding: 13px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.q-feedback.ok { background: var(--green-50); color: #0f7a37; }
.q-feedback.bad { background: var(--red-50); color: var(--red-600); }
.hidden { display: none !important; }

/* Navigator */
.nav-card { padding: 20px; position: sticky; top: 16px; }
.nav-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.nav-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 14px 0 16px; }
.nav-cell {
  aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; font-size: .82rem; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: .12s;
}
.nav-cell:hover { border-color: var(--blue-500); }
.nav-cell.answered { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.nav-cell.current { outline: 2px solid var(--blue-800); outline-offset: 1px; border-color: var(--blue-800); }
.nav-legend { display: flex; flex-direction: column; gap: 7px; font-size: .8rem; color: var(--muted); }
.nav-legend span { display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line); flex: none; }
.dot-answered { background: var(--blue-600); border-color: var(--blue-600); }
.dot-current { background: #fff; outline: 2px solid var(--blue-800); outline-offset: -1px; }
.dot-empty { background: #fff; }

.exam-footer { display: flex; gap: 12px; margin-top: 22px; justify-content: flex-end; }

/* ---------- Results ---------- */
.result-hero { display: flex; align-items: center; gap: 34px; padding: 34px; margin-bottom: 20px; flex-wrap: wrap; }
.gauge-wrap { position: relative; width: 168px; height: 168px; flex: none; }
.gauge { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--line); stroke-width: 11; }
.gauge-fg { fill: none; stroke: var(--blue-600); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1), stroke 1s; }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-score { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--ink); }
.gauge-max { font-size: 1rem; color: var(--muted); font-weight: 700; }
.result-summary { flex: 1; min-width: 280px; }
.result-verdict { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 5px 13px; border-radius: 999px; margin-bottom: 10px; }
.result-verdict.lvl-high { background: var(--green-50); color: var(--green-600); }
.result-verdict.lvl-mid  { background: #fff7e6; color: #b8790a; }
.result-verdict.lvl-low  { background: var(--red-50); color: var(--red-600); }
.result-summary h2 { font-size: 1.6rem; letter-spacing: -.02em; }
.result-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.chip { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 12px 16px; border-radius: 13px; border: 1px solid var(--line); }
.chip strong { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.chip span { font-size: .76rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.chip-ok { background: var(--green-50); border-color: #cdeed6; } .chip-ok strong { color: var(--green-600); }
.chip-bad { background: var(--red-50); border-color: #f6d4d4; } .chip-bad strong { color: var(--red-600); }
.chip-skip { background: #f6f8fb; } .chip-skip strong { color: var(--ink-2); }
.chip-pct { background: var(--blue-50); border-color: #cfe0fb; } .chip-pct strong { color: var(--blue-700); }

.breakdown-card { padding: 26px; margin-bottom: 22px; }
.area-breakdown { display: flex; flex-direction: column; gap: 15px; }
.area-row { display: grid; grid-template-columns: 210px 1fr 58px; align-items: center; gap: 14px; }
.area-name { font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.area-name i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.area-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.area-bar-fill { height: 100%; border-radius: 999px; transition: width .8s ease; }
.area-frac { font-size: .86rem; font-weight: 800; text-align: right; color: var(--ink-2); }
@media (max-width: 560px) { .area-row { grid-template-columns: 1fr 46px; } .area-bar { grid-column: 1 / -1; order: 3; } }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- Review ---------- */
.review-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 20px; flex-wrap: wrap; }
.review-filters { display: flex; gap: 8px; }
.chip-btn, .chip-btn:visited { font: inherit; font-weight: 700; font-size: .84rem; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: .15s; }
.chip-btn.is-on { background: var(--blue-800); color: #fff; border-color: var(--blue-800); }
.review-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.review-item { padding: 22px 24px; }
.review-item .r-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.r-num { font-weight: 800; color: var(--muted); font-size: .86rem; }
.r-status { font-size: .74rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.r-status.ok { background: var(--green-50); color: var(--green-600); }
.r-status.bad { background: var(--red-50); color: var(--red-600); }
.r-status.blank { background: #f0f2f6; color: var(--muted); }
.review-item .r-q { font-weight: 600; font-size: 1.02rem; margin-bottom: 14px; line-height: 1.5; }
.r-opts { display: flex; flex-direction: column; gap: 8px; }
.r-opt { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); font-size: .95rem; color: var(--ink-2); }
.r-opt .r-key { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--line-2); font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
.r-opt.correct { border-color: var(--green-600); background: var(--green-50); color: #0f5c2b; font-weight: 600; }
.r-opt.correct .r-key { background: var(--green-600); color: #fff; }
.r-opt.chosen-wrong { border-color: var(--red-600); background: var(--red-50); color: var(--red-600); font-weight: 600; }
.r-opt.chosen-wrong .r-key { background: var(--red-600); color: #fff; }
.r-tag { margin-left: auto; font-size: .72rem; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 999px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; text-align: center; padding: 26px 20px 40px; color: var(--muted); font-size: .82rem; max-width: 800px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-start { grid-template-columns: 1fr; }
  .exam-body { grid-template-columns: 1fr; }
  .nav-card { position: static; order: 2; }
  .nav-grid { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 560px) {
  .container { padding: 0 14px 48px; }
  .config-card, .side-card, .question-card { padding: 20px; }
  .result-hero { padding: 24px; gap: 20px; justify-content: center; text-align: center; }
  .result-summary { text-align: center; }
  .result-chips { justify-content: center; }
  .exam-footer { justify-content: stretch; }
  .exam-footer .btn { flex: 1; }
  .nav-grid { grid-template-columns: repeat(8, 1fr); }
  .header-meta { display: none; }
}

/* ===================================================================
   Componentes adicionales (modos, panel, cronómetro, explicaciones)
   =================================================================== */

/* Hero badges */
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* Banner de reanudación */
.resume-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff, #f0f6ff); border: 1px solid #cfe0fb;
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.resume-info { display: flex; align-items: center; gap: 12px; color: var(--blue-800); }
.resume-info strong { display: block; font-size: .98rem; }
.resume-info span { font-size: .84rem; color: var(--muted); }
.resume-actions { display: flex; gap: 8px; }

/* Selección de modo */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.mode-card {
  position: relative; text-align: left; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 22px 22px; cursor: pointer; transition: .18s; font: inherit;
}
.mode-card:hover { border-color: var(--blue-500); transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-card.is-on { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(37,99,235,.10), var(--shadow); }
.mode-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.mode-ico-practice { background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); }
.mode-ico-real { background: linear-gradient(135deg, #f59e0b, #dc2626); }
.mode-card h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 6px; }
.mode-card p { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.mode-check { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: .18s; }
.mode-card.is-on .mode-check { border-color: var(--blue-600); background: var(--blue-600); }
.mode-card.is-on .mode-check::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }

/* Config row */
.config-card { padding: 26px; }
.config-row { display: grid; grid-template-columns: auto 1fr; gap: 30px; margin-bottom: 22px; }
.field-count { min-width: 220px; }
.btn-warn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 8px 20px rgba(217,119,6,.24); width: 100%; margin-top: 10px; }
.btn-warn:hover { box-shadow: 0 10px 26px rgba(217,119,6,.32); }

/* Panel */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.view-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.stats-row.big { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.panel-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.evo-card, .mastery-card, .weak-card, .history-card { padding: 24px; }
.weak-card.no-mb { margin-bottom: 0; }
.evo-chart { width: 100%; }
.evo-svg { width: 100%; height: auto; display: block; }
.evo-grid { stroke: var(--line); stroke-width: 1; }
.evo-axis { fill: #9aa7bd; font-size: 11px; font-family: 'Inter', sans-serif; }
.evo-pass { stroke: var(--amber-500); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .75; }
.evo-line { fill: none; stroke: var(--blue-600); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }

/* Listas de temas débiles */
.weak-list { display: flex; flex-direction: column; gap: 9px; }
.weak-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.weak-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.weak-name { font-weight: 600; font-size: .9rem; color: var(--ink); flex: 1; }
.weak-frac { font-size: .82rem; font-weight: 800; color: var(--red-600); white-space: nowrap; }

/* History (panel) */
.history-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.history-item .h-mode { font-weight: 800; font-size: .78rem; color: var(--blue-700); background: var(--blue-50); padding: 3px 10px; border-radius: 999px; }
.history-item .h-time { font-size: .8rem; color: var(--muted); margin-left: auto; }
.history-item .h-date { flex: 1; min-width: 120px; }

/* Etiqueta de modo en examen */
.mode-tag { font-size: .74rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: var(--teal-500); color: #fff; }
.mode-tag-real { background: linear-gradient(135deg, #f59e0b, #dc2626); }
.mode-tag-repaso { background: linear-gradient(135deg, #d97706, #b45309); }
.tema-tag { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--line-2); padding: 4px 11px; border-radius: 999px; }

/* Feedback instantáneo con explicación */
.q-feedback { display: flex; flex-direction: column; gap: 6px; }
.q-feedback .fb-exp { font-weight: 500; opacity: .95; }
.q-feedback .fb-src { font-size: .8rem; font-weight: 600; opacity: .75; }

/* Chip de tiempo en resultados */
.chip-time { background: #f3f0ff; border-color: #ddd3f7; } .chip-time strong { color: #6d28d9; }

/* Explicación y fuente en revisión */
.r-exp { margin-top: 14px; padding: 13px 16px; background: var(--blue-50); border-radius: 11px; font-size: .93rem; color: var(--ink-2); line-height: 1.5; }
.r-exp strong { color: var(--blue-800); }
.r-src { margin-top: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; }

/* Responsive de componentes nuevos */
@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; }
  .config-row { grid-template-columns: 1fr; gap: 22px; }
  .stats-row.big { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mode-grid { grid-template-columns: 1fr; }
  .header-nav { padding: 3px; }
  .nav-link { padding: 7px 12px; font-size: .82rem; }
  .evo-card, .mastery-card, .weak-card, .history-card { padding: 18px; }
  .history-item .h-time { margin-left: 0; }
}
