/* ============================================================
   Examen — post-sesión teórica Feynman
   ============================================================ */

.ex-stage {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  overflow: hidden;
}

/* Progress line */
.ex-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--acento, var(--red));
  box-shadow: 0 0 8px var(--acento-glow, var(--red-glow));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

/* Topbar */
.ex-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 10;
}

.ex-topbar-topic {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.ex-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--acento, var(--red));
  letter-spacing: 0.22em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Body: centers all content */
.ex-body {
  position: absolute;
  top: 44px; bottom: 0;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
}

/* Loading */
.ex-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Question */
.ex-question-wrap {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: ex-enter 0.32s ease both;
}

@keyframes ex-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ex-question-text {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
  margin: 0;
}

/* Options */
.ex-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ex-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
  user-select: none;
}

.ex-option:hover {
  border-color: var(--ink-2);
  background: var(--surface-2);
}

.ex-option.selected {
  border-color: var(--acento, var(--red));
  background: rgba(var(--acento-rgb, 255,42,42), 0.06);
}

.ex-option-letter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-2);
  flex-shrink: 0;
  letter-spacing: 0.10em;
  padding-top: 2px;
  transition: color 0.13s;
  min-width: 14px;
}

.ex-option.selected .ex-option-letter {
  color: var(--acento, var(--red));
}

.ex-option-text {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  transition: color 0.13s;
}

.ex-option.selected .ex-option-text {
  color: var(--ink);
}

/* Footer + confirm button */
.ex-footer {
  display: flex;
  justify-content: flex-end;
}

.ex-confirm-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 28px;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.13s, color 0.13s;
}

.ex-confirm-btn:not(:disabled):hover {
  border-color: var(--acento, var(--red));
  color: var(--acento, var(--red));
}

.ex-confirm-btn:disabled {
  opacity: 0.30;
  cursor: not-allowed;
}

/* Circle — small, dormant, in corner */
.ex-circle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 68px;
  height: 68px;
  opacity: 0.25;
  pointer-events: none;
  display: block;
}

/* Error state */
.ex-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
  .ex-body { padding: 24px 16px; }
  .ex-question-text { font-size: 14px; }
  .ex-circle { width: 52px; height: 52px; bottom: 14px; right: 14px; }
}
