
:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #142033;
  --muted: #607086;
  --primary: #185abc;
  --primary-dark: #113f86;
  --border: #d9e2ef;
  --ok: #15803d;
  --bad: #b42318;
  --warn: #a16207;
  --shadow: 0 18px 45px rgba(17, 24, 39, .10);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif; color: var(--text); background: radial-gradient(circle at top left, #dceafe 0, var(--bg) 38%, #f8fafc 100%); }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px clamp(18px, 4vw, 46px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.versionBadge { display: inline-flex; margin-top: 8px; padding: 4px 8px; border-radius: 999px; background: #edf3ff; color: var(--primary-dark); font-size: 12px; font-weight: 900; letter-spacing: 0; }
.container { max-width: 1180px; margin: 30px auto; padding: 0 18px 60px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); }
.hero { padding: clamp(24px, 5vw, 48px); }
.hero h2 { font-size: clamp(28px, 4vw, 46px); margin: 0 0 12px; }
.hero p { max-width: 820px; color: var(--muted); line-height: 1.65; }
.hidden { display: none !important; }
button { border: 0; border-radius: 14px; padding: 12px 18px; cursor: pointer; font-weight: 700; transition: .18s ease; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--primary); color: white; }
.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.ghost { background: #f3f6fb; color: var(--text); border: 1px solid var(--border); }
.ghost:hover { background: #e8eef8; }
.danger { color: var(--bad); }
.full { width: 100%; margin-top: 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.quotaGrid { display: grid; grid-template-columns: repeat(8, minmax(72px, 1fr)); gap: 10px; margin: 24px 0; }
.quotaGrid span, .bankInfo span { padding: 10px 12px; border-radius: 999px; background: #eef4ff; color: #16458f; font-weight: 800; text-align: center; }
.bankInfo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted { color: var(--muted); }
.examLayout { display: grid; grid-template-columns: 290px 1fr; gap: 22px; }
.sidePanel { padding: 20px; align-self: start; position: sticky; top: 118px; }
.progressText { font-weight: 800; }
.progress { height: 12px; background: #e5ebf5; border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--primary); transition: .25s ease; }
.questionNav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0; }
.navDot { padding: 9px 0; border-radius: 12px; background: #f8fafc; color: var(--muted); border: 1px solid var(--border); }
.navDot.answered { background: #dcfce7; color: var(--ok); border-color: #86efac; }
.navDot.current { outline: 3px solid #bfdbfe; }
.questionCard { padding: clamp(22px, 4vw, 38px); }
.questionMeta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.questionMeta span { background: #edf3ff; color: #1e3a8a; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.source, .sourceLine { color: var(--muted); font-size: 13px; }
.questionCard h2 { font-size: clamp(22px, 3vw, 31px); line-height: 1.25; margin: 18px 0 24px; }
.optionsBox { display: grid; gap: 12px; }
.option { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; border: 1px solid var(--border); border-radius: 18px; padding: 16px; cursor: pointer; background: #fff; }
.option:hover, .option.selected { border-color: #7aa7f7; background: #f1f6ff; }
.option input { display: none; }
.optionLetter { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 12px; background: #e8eef8; font-weight: 900; color: var(--primary); }
.questionActions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.results { padding: clamp(24px, 4vw, 42px); text-align: center; }
.gradeCircle { margin: 12px auto; width: 156px; height: 156px; border-radius: 50%; display: grid; place-items: center; background: #eef4ff; border: 10px solid #cfe0ff; }
.gradeCircle span { font-size: 44px; font-weight: 900; }
.gradeCircle small { display: block; color: var(--muted); margin-top: -28px; }
.gradeLabel { font-size: 22px; font-weight: 900; }
.scoreDetails { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 24px 0; }
.scoreDetails div { border: 1px solid var(--border); border-radius: 18px; padding: 16px; background: #f8fafc; }
.scoreDetails strong { display: block; font-size: 28px; }
.scoreDetails span { color: var(--muted); }
.tableWrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; }
.statsBox { text-align: left; background: #f8fafc; border: 1px solid var(--border); padding: 18px; border-radius: 18px; }
.reviewTop { padding: 24px; margin-bottom: 18px; }
.reviewFilters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.reviewFilters button.active { background: var(--primary); color: white; }
.reviewList { display: grid; gap: 16px; }
.reviewCard { padding: 22px; }
.reviewCard.correct { border-left: 8px solid var(--ok); }
.reviewCard.wrong { border-left: 8px solid var(--bad); }
.reviewCard.blank { border-left: 8px solid var(--warn); }
.reviewHeader { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.badge { color: white; background: #334155; border-radius: 999px; padding: 4px 9px; font-weight: 900; }
.reviewCard.correct .badge { background: var(--ok); }
.reviewCard.wrong .badge { background: var(--bad); }
.reviewCard.blank .badge { background: var(--warn); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 800; }
@media (max-width: 860px) { .examLayout { grid-template-columns: 1fr; } .sidePanel { position: static; } .quotaGrid, .scoreDetails { grid-template-columns: repeat(2, 1fr); } .topbar { align-items: flex-start; } }
.modeBox { margin: 24px 0; display: grid; gap: 12px; max-width: 860px; }
.modeBox h3 { margin: 0 0 2px; }
.subjectBox { max-width: none; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbff; }
.subjectBox p { margin: 0; line-height: 1.55; }
.modeOption { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #f8fafc; cursor: pointer; }
.modeOption:hover { border-color: #7aa7f7; background: #f1f6ff; }
.modeOption input { margin-top: 5px; transform: scale(1.2); }
.modeOption strong { display: block; margin-bottom: 4px; }
.modeOption small { color: var(--muted); line-height: 1.45; }
.historyList { display: grid; gap: 14px; }
.historyItem { padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.historyItem h3 { margin: 0 0 6px; }
.historyItem p { margin: 4px 0; color: var(--muted); }
.small { padding: 10px 14px; white-space: nowrap; }
@media (max-width: 680px) { .historyItem { align-items: stretch; flex-direction: column; } .small { width: 100%; } }

/* Mejoras v3 */
.topActions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.setupGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.selectLine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-weight: 700; }
.selectLine select, .selectLine input, .bankFilters input, .bankFilters select { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: white; color: var(--text); font: inherit; }
.selectLine input { width: 92px; }
.buttonLike { display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; padding: 12px 18px; cursor: pointer; font-weight: 700; transition: .18s ease; }
.centerActions { justify-content: center; }
.modeText { color: var(--muted); font-weight: 800; line-height: 1.35; }
.timerBox { font-size: 34px; font-weight: 950; text-align: center; border: 1px solid var(--border); background: #f8fafc; border-radius: 18px; padding: 12px; margin: 12px 0; color: var(--primary-dark); }
.timerDanger { color: var(--bad); background: #fff1f2; border-color: #fecdd3; animation: pulseTimer 1s infinite; }
@keyframes pulseTimer { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.gradeMessage { display: inline-block; margin: 10px auto 4px; padding: 16px 24px; border-radius: 22px; font-size: clamp(24px, 4vw, 42px); font-weight: 950; line-height: 1.1; background: linear-gradient(135deg, #fff7ed, #dbeafe); border: 2px solid #bfdbfe; box-shadow: 0 18px 40px rgba(24, 90, 188, .18); color: #0f172a; }
.trainingFeedback { margin-top: 18px; border-radius: 18px; padding: 18px; border: 1px solid var(--border); line-height: 1.6; }
.trainingFeedback.correct { background: #f0fdf4; border-color: #86efac; }
.trainingFeedback.wrong { background: #fff1f2; border-color: #fecdd3; }
.trainingFeedback h3 { margin-top: 0; }
.bankFilters { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.bankList { display: grid; gap: 14px; }
.bankSummary, .emptyCard { padding: 18px; }
.bankCard { padding: 20px; }
.bankCard h3 { margin: 12px 0; }
.bankCardHead { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; align-items: center; }
.badge.neutral { background: #334155; color: white; }
.historyActions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.statsGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.statCard { padding: 22px; text-align: center; }
.statCard strong { display: block; font-size: 36px; }
.statCard span { color: var(--muted); }
.statsPanel { padding: 22px; margin-bottom: 18px; }
.trendChart { min-height: 190px; display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--border); border-radius: 18px; padding: 16px 12px 30px; background: #f8fafc; overflow-x: auto; }
.trendBar { min-width: 28px; height: 150px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.trendBar span { width: 100%; display: block; border-radius: 10px 10px 0 0; background: var(--primary); }
.trendBar small { position: absolute; bottom: -24px; font-size: 11px; color: var(--muted); }
.fullStatsBox ol li { margin-bottom: 8px; }
@media (max-width: 980px) { .setupGrid, .statsGrid { grid-template-columns: 1fr; } .bankFilters { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .topActions { width: 100%; justify-content: flex-start; } .gradeMessage { font-size: 24px; } }


/* Mejoras v4: instrucciones, temporizador visible y zona de repaso */
.usageBox { margin: 22px 0; padding: 20px 22px; border-radius: 20px; background: #f8fafc; border: 1px solid var(--border); }
.usageBox h3 { margin: 0 0 10px; }
.usageBox ol { margin: 0; padding-left: 22px; color: var(--text); line-height: 1.7; }
.timerBox { display: grid; gap: 8px; }
.timerLabel { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timerBox strong { display: block; font-size: 38px; line-height: 1; }
.timerProgress { height: 8px; background: #e5ebf5; border-radius: 999px; overflow: hidden; }
.timerProgress div { height: 100%; width: 100%; background: var(--primary); transition: width .5s linear; }
.timerDanger .timerProgress div { background: var(--bad); }
.studyContent { display: grid; gap: 18px; }
.studyCard { padding: 26px; }
.studyCard h3 { margin-top: 0; font-size: clamp(24px, 3vw, 34px); }
.keyChips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.keyChips span { background: #eef4ff; color: #16458f; padding: 8px 12px; border-radius: 999px; font-weight: 800; }
.studyBlock { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.studyBlock h4 { margin: 0 0 12px; font-size: 20px; }
.themeText, .simpleText { border-radius: 18px; padding: 16px 18px; margin: 10px 0; line-height: 1.65; }
.themeText { background: #fff; border: 1px solid #cbd5e1; }
.simpleText { background: #ecfdf5; border: 1px solid #86efac; }
.blockLabel { display: inline-block; font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.studyBlock ul { line-height: 1.7; }
@media (max-width: 680px) { .usageBox { padding: 16px; } .timerBox strong { font-size: 32px; } }

/* Mejoras v5: sin repetidas, tiempos y eje 0-10 en gráfica */
.scoreDetails { grid-template-columns: repeat(6, 1fr); }
.scoreDetails div strong { font-size: clamp(18px, 2.2vw, 28px); }
.statsGrid { grid-template-columns: repeat(6, 1fr); }
.trendChartWithAxis { display: grid; grid-template-columns: 42px 1fr; align-items: stretch; gap: 8px; }
.trendAxis { height: 190px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; color: var(--muted); font-weight: 900; padding: 18px 4px 30px 0; box-sizing: border-box; }
.trendChart { position: relative; background-image: linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px), #dbe3ee calc(50% - 1px), #dbe3ee calc(50% + 1px), transparent calc(50% + 1px)); }
.trendBar span { box-shadow: 0 -1px 0 rgba(15, 23, 42, .08) inset; }
@media (max-width: 980px) { .statsGrid { grid-template-columns: repeat(2, 1fr); } .scoreDetails { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .statsGrid, .scoreDetails { grid-template-columns: 1fr; } }

/* Identidad, inicio profesional y menú compacto */
.topbar { min-height: 86px; }
.brandBlock { display: grid; gap: 3px; }
.brandEyebrow { color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 950; }
.brandBlock h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.06em; line-height: .95; }
.brandBlock p { max-width: 720px; }
.menuWrap { position: relative; display: flex; justify-content: flex-end; }
.menuToggle { width: 50px; height: 50px; border-radius: 16px; background: #0f172a; display: grid; place-content: center; gap: 5px; box-shadow: 0 14px 30px rgba(15,23,42,.22); }
.menuToggle:hover { transform: translateY(-1px); background: #1e293b; }
.menuToggle span { display: block; width: 22px; height: 3px; border-radius: 999px; background: white; }
.menuDropdown { position: absolute; top: 60px; right: 0; width: 230px; padding: 10px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.98); box-shadow: 0 22px 60px rgba(15, 23, 42, .22); display: grid; gap: 8px; z-index: 40; }
.menuDropdown button { width: 100%; justify-content: flex-start; text-align: left; background: #f8fafc; }
.menuDropdown button:hover { background: #eaf2ff; }
.homePro { overflow: hidden; position: relative; }
.homePro::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 9px; background: linear-gradient(90deg, #185abc, #14b8a6, #f59e0b); }
.heroHeader { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: center; margin-bottom: 22px; }
.appTag { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: #e0f2fe; color: #075985; font-weight: 950; margin-bottom: 12px; }
.heroHeader h2 { max-width: 830px; letter-spacing: -0.04em; }
.heroScoreCard { border: 1px solid #bfdbfe; border-radius: 28px; background: linear-gradient(180deg, #eff6ff, #fff); padding: 24px; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.heroScoreCard strong { display: block; font-size: 64px; line-height: .9; color: var(--primary); }
.heroScoreCard span { display: block; font-weight: 900; margin-top: 8px; }
.heroScoreCard small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.35; }
.homeCards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.homeCards div { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.homeCards strong { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #0f172a; color: white; }
.homeCards span { font-weight: 800; line-height: 1.25; }
.proInstructions { background: linear-gradient(180deg, #f8fafc, #fff); }
.cleanBankInfo { display: block; background: #f8fafc; border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; line-height: 1.55; }
.linkButton { padding: 0; border: 0; background: transparent; color: var(--primary); font: inherit; font-weight: 900; text-decoration: underline; }
.linkButton:hover { background: transparent; color: var(--primary-dark); }
.legendStudy { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.legendStudy span { border-radius: 999px; padding: 8px 12px; font-weight: 900; font-size: 13px; }
.legendTheme { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.legendSimple { background: #ecfdf5; border: 1px solid #86efac; color: #166534; }
.studyCard { background: linear-gradient(180deg, #fff, #fbfdff); }
.studyBlock h4 { display: flex; align-items: center; gap: 8px; }
.studyBlock h4::before { content: ''; width: 9px; height: 22px; border-radius: 999px; background: var(--primary); display: inline-block; }
.themeText p, .simpleText p { margin: 0; white-space: pre-line; }
@media (max-width: 860px) {
  .heroHeader { grid-template-columns: 1fr; }
  .homeCards { grid-template-columns: repeat(2, 1fr); }
  .menuWrap { align-self: flex-start; }
}
@media (max-width: 560px) {
  .homeCards { grid-template-columns: 1fr; }
  .heroScoreCard strong { font-size: 48px; }
  .menuDropdown { right: -4px; width: min(86vw, 260px); }
}


/* UniversityTestPro, menú compacto, color y cuenta atrás tipo alarma */
:root {
  --utp-blue: #155eef;
  --utp-cyan: #06b6d4;
  --utp-green: #10b981;
  --utp-orange: #f59e0b;
  --utp-red: #ef4444;
  --utp-dark: #07111f;
}
body {
  background:
    radial-gradient(circle at 8% 10%, rgba(21,94,239,.16), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(245,158,11,.14), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 42%, #f8fafc 100%);
}
.brandBlock h1 {
  background: linear-gradient(90deg, #07111f, #155eef 55%, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brandBlock p { font-weight: 800; color: #334155; letter-spacing: .01em; }
.appTag { background: linear-gradient(90deg, #dbeafe, #ccfbf1); color: #075985; }
.heroHeader h2 {
  background: linear-gradient(90deg, #0f172a, #155eef 45%, #0f766e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.homePro::before { height: 11px; background: linear-gradient(90deg, #155eef, #06b6d4, #10b981, #f59e0b, #ef4444); }
.menuDropdown {
  width: max-content;
  min-width: 148px;
  max-width: 220px;
  padding: 8px;
  gap: 7px;
  border-radius: 18px;
}
.menuDropdown button {
  width: auto;
  min-width: 132px;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
  transform-origin: center;
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.menuDropdown button:hover {
  transform: scale(1.07);
  background: linear-gradient(90deg, #155eef, #06b6d4);
  color: white;
  box-shadow: 0 12px 24px rgba(21, 94, 239, .22);
}
.menuDropdown button:active { transform: scale(1.02); }
.menuToggle {
  background: linear-gradient(135deg, #07111f, #155eef);
  border: 1px solid rgba(255,255,255,.2);
}
.menuToggle:hover { background: linear-gradient(135deg, #0f172a, #06b6d4); transform: translateY(-2px) scale(1.03); }
.nuclearCountdown {
  position: relative;
  margin: 22px 0 24px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(239,68,68,.42);
  background:
    linear-gradient(135deg, rgba(7,17,31,.97), rgba(30,41,59,.96)),
    repeating-linear-gradient(45deg, rgba(245,158,11,.22) 0 14px, rgba(15,23,42,.12) 14px 28px);
  color: white;
  box-shadow: 0 24px 60px rgba(239,68,68,.20), inset 0 0 0 1px rgba(255,255,255,.08);
}
.nuclearCountdown::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(245,158,11,.12) 0 10px, transparent 10px 24px);
  pointer-events: none;
  mix-blend-mode: screen;
}
.nukeHeader {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #b91c1c, #f59e0b, #b91c1c);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 950;
  color: #fff7ed;
}
.sirenLight {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18), 0 0 22px #fff, 0 0 40px #ef4444;
  animation: sirenPulse .85s infinite alternate;
}
.sirenLight.right { animation-delay: .35s; }
@keyframes sirenPulse { from { opacity: .35; transform: scale(.78); } to { opacity: 1; transform: scale(1.18); } }
.nukeBody {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
}
.nukeBody h3 { margin: 0; font-size: clamp(24px, 3vw, 40px); letter-spacing: -.03em; }
.nukeBody p { margin: 6px 0 0; color: #cbd5e1; font-weight: 800; }
.countdownGrid { display: grid; grid-template-columns: repeat(4, minmax(74px, 1fr)); gap: 10px; }
.countdownGrid div {
  min-width: 74px;
  text-align: center;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 20px rgba(255,255,255,.04);
}
.countdownGrid strong {
  display: block;
  font-size: clamp(30px, 4vw, 54px);
  line-height: .9;
  color: #fef3c7;
  text-shadow: 0 0 24px rgba(245,158,11,.55);
  font-variant-numeric: tabular-nums;
}
.countdownGrid span {
  display: block;
  margin-top: 7px;
  color: #e2e8f0;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 950;
}
.countdownStatus {
  position: relative;
  z-index: 1;
  padding: 9px 18px;
  border-top: 1px solid rgba(255,255,255,.16);
  background: rgba(239,68,68,.16);
  color: #fee2e2;
  font-weight: 900;
  text-align: center;
}
.primary { background: linear-gradient(135deg, #155eef, #06b6d4); box-shadow: 0 12px 24px rgba(21,94,239,.18); }
.primary:hover { filter: saturate(1.15); transform: translateY(-1px); }
.modeOption:hover, .homeCards div:hover, .heroScoreCard:hover { border-color: rgba(21,94,239,.35); box-shadow: 0 14px 30px rgba(21,94,239,.10); }
@media (max-width: 760px) {
  .nukeBody { grid-template-columns: 1fr; }
  .countdownGrid { grid-template-columns: repeat(2, 1fr); }
  .menuDropdown { right: 0; width: max-content; }
}


/* Repaso ampliado, preguntas originales y gestión de pruebas */
.legendQuestion { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.studyQuestions { display: grid; gap: 12px; margin-top: 14px; }
.studyQuestion { border: 1px solid var(--border); border-radius: 18px; background: #fff; overflow: hidden; }
.studyQuestion summary { cursor: pointer; padding: 14px 16px; display: grid; gap: 6px; }
.studyQuestion summary span { color: var(--primary); font-weight: 950; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.studyQuestion summary strong { line-height: 1.35; }
.studyQuestion[open] summary { background: linear-gradient(90deg, #eff6ff, #f0fdfa); border-bottom: 1px solid var(--border); }
.studyQuestionBody { padding: 16px 18px 18px; display: grid; gap: 12px; }
.studyQuestionBody ol { margin: 0; padding-left: 22px; line-height: 1.55; }
.studyCorrectOption { font-weight: 900; color: #166534; background: #ecfdf5; border-radius: 10px; padding: 4px 8px; }
.visualScheme { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.schemeNode { min-width: 138px; flex: 1 1 138px; border-radius: 18px; padding: 14px; background: linear-gradient(180deg, #eff6ff, #ffffff); border: 1px solid #bfdbfe; box-shadow: 0 10px 20px rgba(21,94,239,.08); }
.schemeNode span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, #155eef, #06b6d4); color: white; font-weight: 950; margin-bottom: 8px; }
.schemeNode strong { display: block; line-height: 1.25; }
.schemeArrow { display: grid; place-items: center; font-size: 28px; font-weight: 950; color: var(--primary); }
.savedExamTable { overflow-x: auto; }
.savedExamTable table { min-width: 720px; }
.danger.small { padding: 8px 10px; }

/* Ajustes finales de navegación e inicio */
.brandHomeLink {
  cursor: pointer;
  border-radius: 18px;
  transition: transform .16s ease, filter .16s ease;
}
.brandHomeLink:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}
.brandHomeLink:focus-visible {
  outline: 3px solid rgba(21, 94, 239, .35);
  outline-offset: 6px;
}
.primaryActionOnly {
  justify-content: flex-start;
  align-items: center;
}
.primaryActionOnly .primary {
  min-width: 190px;
  font-size: 15px;
}
.menuDropdown button,
.menuDropdown .menuFileButton {
  width: auto;
  min-width: 148px;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
  transform-origin: center;
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.menuDropdown .menuFileButton {
  display: inline-flex;
  margin: 0;
  font-size: 14px;
  line-height: 1;
}
.menuDropdown button:hover,
.menuDropdown .menuFileButton:hover {
  transform: scale(1.07);
  background: linear-gradient(90deg, #155eef, #06b6d4);
  color: white;
  box-shadow: 0 12px 24px rgba(21, 94, 239, .22);
}
.menuDropdown .danger:hover {
  background: linear-gradient(90deg, #dc2626, #f97316);
  color: white;
}

/* Login Supabase basico */
.appShell.hidden {
  display: none !important;
}
.authGate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
}
.authGateCard {
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 42px);
  border-radius: 18px;
}
.authGateCard h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: 0;
}
.authGateCard p {
  color: var(--muted);
  line-height: 1.6;
}
.authLoadingScreen .authGateCard {
  text-align: center;
}
.authLoadingScreen .authGateCard::after {
  content: '';
  display: block;
  width: 46px;
  height: 46px;
  margin: 22px auto 0;
  border-radius: 50%;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  animation: authSpin .8s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.authModeSwitch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0;
  padding: 6px;
  border-radius: 16px;
  background: #f3f6fb;
  border: 1px solid var(--border);
}
.authModeSwitch button {
  border-radius: 12px;
  background: transparent;
}
.authModeSwitch button.active {
  background: linear-gradient(135deg, #155eef, #06b6d4);
  color: #fff;
  box-shadow: 0 10px 22px rgba(21,94,239,.18);
}
.authWidget {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.authStatusText {
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.authModal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.authModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(6px);
}
.authDialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 18px;
}
.authCloseBtn {
  position: absolute;
  top: 14px;
  right: 14px;
}
.authDialog h2 {
  margin: 0 96px 8px 0;
}
.authForm {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.authForm label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}
.authForm input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  background: white;
  color: var(--text);
  font: inherit;
}
.authMessage {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.authMessage[data-type="error"] { color: var(--bad); }
.authMessage[data-type="success"] { color: var(--ok); }
@media (max-width: 860px) {
  .authWidget {
    width: 100%;
    justify-content: flex-start;
    order: 3;
  }
  .authStatusText {
    max-width: 100%;
  }
}

/* Repaso final: esquema, explicaciones y corrección reforzada */
.quickReview {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-radius: 22px;
  border: 1px solid #d7e6fb;
  padding: 18px;
}
.quickReviewGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.quickReviewGrid div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.quickReviewGrid span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, #155eef, #06b6d4);
}
.quickReviewGrid p {
  margin: 0;
  line-height: 1.55;
  font-weight: 750;
}
.explanation {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid #d7e6fb;
  border-left: 6px solid #155eef;
  border-radius: 18px;
  padding: 16px 18px;
  line-height: 1.72;
  box-shadow: 0 10px 28px rgba(21,94,239,.06);
}
.explanation p { margin: 8px 0; }
.explanation strong { color: #0f172a; }
.schemeTree {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}
.schemeRoot {
  justify-self: center;
  max-width: 460px;
  text-align: center;
  padding: 16px 22px;
  border-radius: 18px;
  color: #fff;
  font-weight: 950;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: .01em;
  background: linear-gradient(90deg, #155eef, #06b6d4);
  box-shadow: 0 16px 34px rgba(21,94,239,.2);
}
.schemeBranches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: start;
}
.schemeBranch {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 14px 30px rgba(15,23,42,.06);
}
.schemeBranchTitle {
  padding: 14px 16px;
  text-align: center;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
}
.schemeBranchBody {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.schemeItems,
.schemeConceptList,
.schemeExamples ul,
.schemeExampleBox ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}
.schemeItems li::marker,
.schemeConceptList li::marker,
.schemeExamples ul li::marker,
.schemeExampleBox ul li::marker {
  color: #155eef;
}
.schemeExamples,
.schemeExampleBox {
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 14px;
}
.schemeExamplesTitle,
.schemeExampleTitle {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a3412;
}
.studyQuestionBody details ul,
.reviewCard details ul {
  line-height: 1.65;
}
@media (max-width: 640px) {
  .schemeRoot { width: 100%; }
}

/* Toasts no bloqueantes (sustitutos de alert) */
.appToastStack {
  position: fixed;
  z-index: 9999;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: min(92vw, 380px);
  pointer-events: none;
}
.appToast {
  pointer-events: auto;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  font-weight: 700;
  line-height: 1.45;
  animation: appToastIn .25s ease;
}
.appToast.info    { border-left-color: var(--primary); }
.appToast.warn    { border-left-color: var(--warn); background: linear-gradient(180deg, #fffbeb, #fff); }
.appToast.error   { border-left-color: var(--bad);  background: linear-gradient(180deg, #fff1f2, #fff); }
.appToast.success { border-left-color: var(--ok);   background: linear-gradient(180deg, #f0fdf4, #fff); }
.appToast.leaving { animation: appToastOut .22s ease forwards; }
@keyframes appToastIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes appToastOut { to   { opacity: 0; transform: translateY(8px); } }
@media (max-width: 560px) { .appToastStack { right: 8px; left: 8px; bottom: 8px; max-width: none; } }

/* Edición manual de respuestas desde el banco */
.bankEditDetails { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.bankEditDetails > summary { color: var(--primary); font-weight: 900; }
.bankEditForm { display: grid; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #f8fbff; }
.bankEditForm fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0; }
.bankEditForm legend { font-weight: 900; padding: 0 6px; color: var(--text); }
.bankEditOption { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 6px 0; cursor: pointer; line-height: 1.45; }
.bankEditOption input { margin-top: 4px; transform: scale(1.1); }
.bankEditOption span { font-weight: 600; }
.bankEditActions { display: flex; gap: 10px; flex-wrap: wrap; }
.userOverrideBadge { background: linear-gradient(135deg, #155eef, #06b6d4); color: white; }
.bankSummary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
