/* Simulador de examen de Cálculo */
.exam-head .lead { margin-bottom: 0; }
.exam { display: block; }
.ex-loading, .ex-note, .ex-empty { color: var(--muted, #7f979f); font-size: .92rem; }
.ex-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ex-topic { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-align: left; border: 1px solid var(--line-strong); border-left: 4px solid var(--c, var(--blue)); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--text); font: inherit; cursor: pointer; transition: .15s; }
.ex-topic small { color: var(--muted); font-size: .78rem; }
.ex-topic:hover { border-color: var(--c, var(--blue)); }
.ex-topic.is-on { background: color-mix(in srgb, var(--c, #79d6ff) 14%, transparent); border-color: var(--c, var(--blue)); }
.ex-timer { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 18px; cursor: pointer; }
.ex-timer input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--emerald); }
.ex-timer small { display: block; color: var(--muted); font-size: .82rem; }
.ex-primary, .ex-ghost { padding: 12px 20px; border-radius: 12px; font: 700 .95rem 'Manrope', system-ui, sans-serif; cursor: pointer; min-height: 46px; transition: .15s; }
.ex-primary { background: rgba(94,232,166,.16); border: 1px solid rgba(94,232,166,.5); color: var(--emerald); }
.ex-primary:hover { background: rgba(94,232,166,.26); }
.ex-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--soft); }
.ex-ghost:hover:not(:disabled) { border-color: var(--blue); color: var(--text); }
.ex-ghost:disabled { opacity: .35; cursor: default; }
.ex-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.ex-link:hover { color: var(--text); }
.ex-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ex-actions > button { flex: 1 1 160px; }

.ex-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ex-count { color: var(--soft); font-size: .9rem; }
.ex-count b { color: var(--text); }
.ex-clock { font: 500 .95rem 'DM Mono', monospace; color: var(--xp); padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 99px; }
.ex-bar .ex-link { margin-left: auto; }
.ex-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.ex-dot { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: 600 .8rem 'DM Mono', monospace; cursor: pointer; }
.ex-dot.is-done { background: rgba(121,214,255,.14); border-color: rgba(121,214,255,.5); color: var(--blue); }
.ex-dot.is-cur { border-color: var(--emerald); color: var(--emerald); box-shadow: 0 0 0 2px rgba(94,232,166,.25); }
.ex-prompt { font-size: 1.08rem; line-height: 1.65; margin: 0 0 14px; overflow-x: auto; }
.ex-multi { color: var(--xp); font-size: .85rem; margin: -6px 0 12px; }
.ex-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 14px; text-align: left; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--text); font: inherit; cursor: pointer; transition: .15s; }
.ex-option:hover { border-color: var(--blue); }
.ex-option.is-on { background: rgba(121,214,255,.12); border-color: var(--blue); }
.ex-key { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--blue); font: 700 .8rem 'DM Mono', monospace; }
.ex-option.is-multi .ex-key { border-radius: 7px; }
.ex-option.is-on .ex-key { background: var(--blue); color: #02101a; border-color: var(--blue); }
.ex-opt-text { min-width: 0; overflow-wrap: anywhere; }
.ex-confirm { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(246,215,106,.4); border-radius: 12px; background: rgba(246,215,106,.07); }
.ex-confirm p { margin: 0; color: var(--soft); }
.ex-confirm .ex-actions { margin-top: 12px; }

.ex-result { text-align: center; border-top: 4px solid var(--emerald); }
.ex-result.ex-mid { border-top-color: #f6d76a; }
.ex-result.ex-low { border-top-color: var(--bad); }
.ex-kicker { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ex-grade { margin: 0; font: 800 4rem/1.1 'Manrope', system-ui, sans-serif; color: var(--emerald); }
.ex-mid .ex-grade { color: #f6d76a; }
.ex-low .ex-grade { color: var(--bad); }
.ex-grade small { font-size: 1.3rem; color: var(--muted); font-weight: 600; }
.ex-sum { margin: 6px 0 2px; color: var(--soft); }
.ex-msg { margin: 0 0 4px; color: var(--text); font-weight: 600; }
.ex-result .ex-actions { justify-content: center; }

.ex-faillist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ex-fail { padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 12px; background: rgba(255,255,255,.02); }
.ex-fnum { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: rgba(255,138,138,.14); color: var(--bad); font: 700 .75rem 'DM Mono', monospace; }
.ex-ans { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0; font-size: .95rem; }
.ex-ans > span:first-child { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ex-ans-bad > span:first-child { color: var(--bad); }
.ex-ans-ok > span:first-child { color: var(--emerald); }
.ex-ans .ex-opt-text { padding: 2px 10px; border-radius: 8px; background: rgba(255,255,255,.05); }
.ex-expl { margin: 8px 0; color: var(--soft); font-size: .92rem; }
.ex-expl summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.ex-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: .9rem; font-weight: 600; }

.ex-stats { color: var(--soft); font-size: .9rem; margin: 0 0 10px; }
.ex-history { list-style: none; margin: 0 0 8px; padding: 0; }
.ex-hrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 80px 44px 44px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.ex-hdate { color: var(--muted); }
.ex-htopic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-htopic em { color: var(--xp); font-style: normal; font-size: .75rem; margin-left: 4px; }
.ex-hbar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ex-hbar b { display: block; height: 100%; background: var(--emerald); }
.ex-hscore { font: 600 .85rem 'DM Mono', monospace; text-align: right; }
.ex-htime { font: 400 .78rem 'DM Mono', monospace; color: var(--muted); text-align: right; }

@media (max-width: 560px) {
  .card { padding: 18px 16px; }
  .ex-hrow { grid-template-columns: 44px minmax(0, 1fr) 54px 40px; }
  .ex-htime { display: none; }
  .ex-grade { font-size: 3.2rem; }
  .ex-actions > button { flex-basis: 100%; }
  .ex-dot { width: 34px; height: 34px; }
}
