:root {
  --student-bg: #f1f5f9;
  --student-surface: #ffffff;
  --student-navy: #0f1a2b;
  --student-text: #172033;
  --student-muted: #5f6b7c;
  --student-border: #dce3eb;
  --student-green: #15803d;
  --student-green-hover: #166534;
  --student-green-soft: #ecfdf3;
}

* { box-sizing: border-box; }
html { background: var(--student-bg); }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--student-bg);
  color: var(--student-text);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: "Space Grotesk", system-ui, sans-serif; letter-spacing: -.025em; }

.student-shell { width: min(100% - 40px, 1120px); margin-inline: auto; }
.student-header { border-bottom: 1px solid var(--student-border); background: rgba(255,255,255,.96); }
.student-nav { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; }
.student-brand { display: inline-flex; flex: 0 0 auto; border-radius: 10px; }
.student-brand img { display: block; width: 142px; height: auto; }
.student-nav-links { display: flex; align-items: center; gap: 6px; }
.student-nav-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 10px;
  padding: 8px 12px;
  color: #475569;
  font-size: .9rem;
  font-weight: 700;
}
.student-nav-links a:hover { background: #f1f5f9; color: var(--student-navy); }
.student-brand:focus-visible,
.student-nav-links a:focus-visible,
.student-btn:focus-visible,
.study-practical:focus-visible { outline: 3px solid rgba(21,128,61,.28); outline-offset: 2px; }

.student-main { padding-block: 34px 48px; }
.study-module + .study-module { margin-top: 38px; }
.study-module-heading { margin-bottom: 16px; }
.study-module-heading h1 { color: var(--student-navy); font-size: clamp(1.55rem, 3vw, 2rem); }
.study-card-list { display: grid; gap: 18px; }
.study-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--student-border);
  border-radius: 24px;
  background: var(--student-surface);
  box-shadow: 0 8px 24px rgba(15, 26, 43, .06);
}
.study-card-media {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: flex-end;
  overflow: hidden;
  background: #dbe3ec;
}
.study-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.study-card-tag {
  position: relative;
  margin: 16px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(15,26,43,.78);
  padding: 5px 11px;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.study-card-body { min-width: 0; padding: 22px 24px; }
.study-card-body h2 { overflow-wrap: anywhere; color: var(--student-navy); font-size: 1.75rem; }
.study-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.student-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--student-green-soft);
  padding: 5px 10px;
  color: #166534;
  font-size: .82rem;
  font-weight: 700;
}
.student-badge b { font-family: "Space Grotesk", system-ui, sans-serif; }
.study-card-description { margin-top: 12px; color: var(--student-muted); font-size: .93rem; line-height: 1.65; }
.study-card-description :is(p, li) { color: inherit; }
.study-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.study-card-secondary-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.student-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 17px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.student-btn-primary { background: var(--student-green); color: #fff; box-shadow: 0 4px 12px rgba(21,128,61,.18); }
.student-btn-primary:hover { background: var(--student-green-hover); transform: translateY(-1px); }
.student-btn-secondary { border-color: #cbd5e1; background: #fff; color: #334155; }
.student-btn-secondary:hover { border-color: #94a3b8; background: #f8fafc; color: var(--student-navy); }

/* Registro */
.register-page { display: flex; min-height: 100vh; flex-direction: column; }
.register-header-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 20px; }
.register-header-login {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 10px;
  padding: 8px 11px;
  color: #475569;
  font-size: .88rem;
  font-weight: 700;
}
.register-header-login:hover { background: #f1f5f9; color: var(--student-navy); }
.register-header-login:focus-visible,
.register-form input:focus-visible,
.register-alt a:focus-visible { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.register-main { display: grid; flex: 1; place-items: start center; padding-block: 16px 22px; }
.register-card {
  width: min(100%, 480px);
  border: 1px solid var(--student-border);
  border-radius: 22px;
  background: var(--student-surface);
  padding: 22px 26px;
  box-shadow: 0 8px 24px rgba(15,26,43,.06);
}
.register-heading { margin-bottom: 15px; text-align: center; }
.register-heading h1 { color: var(--student-navy); font-size: clamp(1.65rem,5vw,1.9rem); }
.register-heading p { margin-top: 4px; color: var(--student-muted); font-size: .87rem; }
.register-form { display: grid; gap: 14px; }
.register-selection { border: 1px solid #bbf7d0; border-radius: 11px; background: var(--student-green-soft); padding: 9px 11px; color: #166534; font-size: .8rem; }
.register-selection strong { color: #14532d; }
.register-honeypot { display: none; }
.register-fields { display: grid; gap: 9px; }
.register-fields label,
.register-code label { display: grid; gap: 4px; color: var(--student-navy); font-size: .8rem; font-weight: 700; }
.register-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  padding: 9px 12px;
  color: var(--student-text);
  font: 500 .94rem "Manrope", system-ui, sans-serif;
}
.register-form input:hover { border-color: #94a3b8; }
.register-form input:focus-visible { border-color: var(--student-green); }
.register-fields small { color: var(--student-muted); font-size: .72rem; font-weight: 500; }
.register-code { border: 1px solid var(--student-border); border-radius: 14px; background: #f8fafc; padding: 12px; }
.register-code h2 { margin-bottom: 8px; color: var(--student-navy); font-size: .96rem; }
.register-code input { text-transform: uppercase; }
.register-code p { margin-top: 5px; color: var(--student-muted); font-size: .73rem; }
.register-submit { width: 100%; min-height: 46px; cursor: pointer; }
.register-alt { margin-top: 12px; color: var(--student-muted); font-size: .81rem; text-align: center; }
.register-alt a { border-radius: 5px; color: var(--student-green); font-weight: 700; }
.register-alt a:hover { color: var(--student-green-hover); text-decoration: underline; }

@media (max-width: 640px) {
  .register-header-inner { min-height: 58px; }
  .register-header .student-brand img { width: 124px; }
  .register-main { padding-block: 10px 14px; }
  .register-card { border-radius: 18px; padding: 17px 18px; }
  .register-heading { margin-bottom: 11px; }
  .register-form { gap: 11px; }
  .register-code { padding: 10px 11px; }
  .register-alt { margin-top: 9px; }
}

@media (max-width: 420px) {
  .register-header-login { padding-inline: 7px; font-size: .82rem; }
  .register-card { padding: 14px; }
  .register-heading h1 { font-size: 1.55rem; }
  .register-heading p { font-size: .8rem; }
  .register-fields { gap: 7px; }
  .register-form input { min-height: 43px; padding-block: 8px; }
  .register-code h2 { margin-bottom: 6px; }
  .register-submit { min-height: 44px; }
}

.study-practical {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid var(--student-border);
  border-radius: 18px;
  background: #fff;
  padding: 15px 18px;
  box-shadow: 0 4px 16px rgba(15,26,43,.04);
}
.study-practical:hover { border-color: #86efac; box-shadow: 0 7px 20px rgba(15,26,43,.07); }
.study-practical-icon { display: inline-flex; width: 44px; height: 44px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 13px; background: var(--student-navy); color: #4ade80; font-size: .75rem; font-weight: 800; }
.study-practical-copy { display: grid; min-width: 0; flex: 1; }
.study-practical-copy small { color: var(--student-green); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.study-practical-copy strong { color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.05rem; }
.study-practical-copy > span { color: var(--student-muted); font-size: .82rem; }
.study-practical-arrow { color: var(--student-green); font-size: 1.2rem; font-weight: 800; }

@media (max-width: 760px) {
  .student-main { padding-block: 24px 36px; }
  .study-card { grid-template-columns: 1fr; }
  .study-card-media { min-height: 0; height: 150px; }
  .study-card-body { padding: 20px; }
  .study-card-body h2 { font-size: 1.55rem; }
  .study-card-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .study-card-actions { align-items: stretch; }
  .study-card-actions > .student-btn-primary { width: 100%; }
  .study-card-secondary-actions { width: 100%; }
  .study-card-secondary-actions .student-btn { flex: 1 1 0; padding-inline: 12px; }
}

@media (max-width: 640px) {
  .student-shell { width: min(100% - 32px, 1120px); }
  .student-nav { min-height: 0; flex-wrap: wrap; gap: 7px; padding-top: 10px; }
  .student-brand img { width: 128px; }
  .student-nav-links { width: 100%; border-top: 1px solid #e2e8f0; }
  .student-nav-links a { flex: 1; justify-content: center; padding-inline: 6px; font-size: .82rem; }
}

@media (max-width: 420px) {
  .student-shell { width: min(100% - 28px, 1120px); }
  .student-main { padding-top: 20px; }
  .study-module-heading { margin-bottom: 12px; }
  .study-card-media { height: 132px; }
  .study-card-tag { margin: 12px; }
  .study-card-body { padding: 17px; }
  .study-card-actions { gap: 8px; }
  .study-card-secondary-actions { gap: 7px; }
  .study-card-secondary-actions .student-btn { font-size: .86rem; }
  .study-practical { padding: 13px; }
  .study-practical-copy > span { display: none; }
}

/* Acceso del alumno no disponible */
.student-request-sent-page { display: grid; min-height: 100vh; place-items: center; padding: 16px; }
.student-request-sent-card { width: min(100%,576px); border: 1px solid var(--student-border); border-radius: 24px; background: #fff; padding: 38px; box-shadow: 0 5px 18px rgba(15,26,43,.045); }
.student-request-sent-card > img { display: block; width: 176px; max-width: 100%; height: auto; }
.student-request-sent-card h1 { margin-top: 26px; overflow-wrap: anywhere; color: var(--student-navy); font-size: clamp(1.65rem,5vw,2rem); }
.student-request-sent-copy { display: grid; gap: 7px; margin-top: 11px; color: #475569; font-size: .92rem; line-height: 1.55; }
.student-request-sent-copy strong { overflow-wrap: anywhere; color: var(--student-navy); }
.student-request-status:empty { display: none; }
.student-request-status { margin-top: 11px; color: #64748b; font-size: .8rem; }
.student-request-sent-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.student-request-sent-actions .student-btn { min-height: 43px; }
@media (max-width: 560px) {
  .student-request-sent-card { border-radius: 20px; padding: 24px; }
  .student-request-sent-card h1 { margin-top: 22px; }
  .student-request-sent-actions { display: grid; grid-template-columns: minmax(0,1fr); margin-top: 20px; }
  .student-request-sent-actions .student-btn { width: 100%; }
}

.student-validation-page { display: grid; min-height: 100vh; place-items: center; padding: 16px; }
.student-validation-card { width: min(100%,576px); border: 1px solid var(--student-border); border-radius: 24px; background: #fff; padding: 38px; box-shadow: 0 5px 18px rgba(15,26,43,.045); }
.student-validation-card > img { display: block; width: 176px; max-width: 100%; height: auto; }
.student-validation-card h1 { margin-top: 26px; overflow-wrap: anywhere; color: var(--student-navy); font-size: clamp(1.65rem,5vw,2rem); }
.student-validation-copy { display: grid; gap: 7px; margin-top: 11px; color: #475569; font-size: .92rem; line-height: 1.55; }
.student-validation-copy strong { overflow-wrap: anywhere; color: var(--student-navy); }
.student-validation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 24px; }
.student-validation-actions form { margin: 0; }
.student-validation-actions .student-btn { min-height: 43px; }
.student-validation-login { min-height: 40px; padding: 10px 7px; color: #64748b; font-size: .8rem; font-weight: 700; }
.student-validation-login:hover { color: var(--student-navy); }
.student-validation-error { margin-top: 11px; color: #b91c1c; font-size: .8rem; }
.student-validation-error[hidden] { display: none; }
.student-validation-actions button:disabled { cursor: wait; opacity: .65; transform: none; }
@media (max-width: 560px) {
  .student-validation-card { border-radius: 20px; padding: 24px; }
  .student-validation-card h1 { margin-top: 22px; }
  .student-validation-actions { display: grid; grid-template-columns: minmax(0,1fr); margin-top: 20px; }
  .student-validation-actions form,
  .student-validation-actions .student-btn { width: 100%; }
  .student-validation-login { justify-self: center; }
}

.student-access-unavailable-page { display: grid; min-height: 100vh; place-items: center; padding: 16px; }
.student-access-unavailable-card { width: min(100%,576px); border: 1px solid var(--student-border); border-radius: 24px; background: #fff; padding: 38px; box-shadow: 0 5px 18px rgba(15,26,43,.045); }
.student-access-unavailable-card img { display: block; width: 176px; max-width: 100%; height: auto; }
.student-access-unavailable-card h1 { margin-top: 27px; color: var(--student-navy); font-size: clamp(1.7rem,5vw,2rem); }
.student-access-unavailable-card p { max-width: 48ch; margin-top: 12px; color: #475569; line-height: 1.7; }
.student-access-unavailable-card .student-btn { margin-top: 27px; }
@media (max-width: 420px) {
  .student-access-unavailable-card { border-radius: 20px; padding: 24px; }
  .student-access-unavailable-card h1 { margin-top: 24px; }
  .student-access-unavailable-card .student-btn { width: 100%; margin-top: 24px; }
}

/* Cuenta del alumno */
.account-header-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; }
.account-back { border-radius: 9px; padding: 7px 9px; color: #475569; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.account-back:hover { background: #f1f5f9; color: var(--student-navy); }
.account-main { width: min(100% - 28px,620px); padding-block: 18px 28px; }
.account-card { border: 1px solid var(--student-border); border-radius: 19px; background: #fff; padding: 19px; box-shadow: 0 5px 18px rgba(15,26,43,.045); }
.account-card h1 { margin-bottom: 13px; color: var(--student-navy); font-size: clamp(1.55rem,4vw,1.9rem); }
.account-form { display: grid; gap: 12px; }
.account-fields { display: grid; gap: 10px; }
.account-fields label { display: grid; gap: 4px; color: #334155; font-size: .78rem; font-weight: 700; }
.account-fields input { width: 100%; height: 43px; min-width: 0; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; padding: 8px 11px; color: var(--student-navy); font: 500 .9rem "Manrope",system-ui,sans-serif; }
.account-fields input:focus { border-color: var(--student-green); outline: 3px solid rgba(22,163,74,.13); }
.account-access { border: 1px solid #dbe5df; border-radius: 12px; background: #f8fbf9; padding: 10px 12px; }
.account-access h2 { margin-bottom: 2px; color: #64748b; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.account-access p { display: flex; flex-wrap: wrap; gap: 5px; color: #475569; font-size: .82rem; }
.account-access p strong { color: #166534; }
.account-access small { display: block; margin-top: 1px; overflow-wrap: anywhere; color: #64748b; font-size: .72rem; }
.account-save { width: 100%; min-height: 43px; }
.account-logout { width: 100%; min-height: 40px; margin-top: 8px; color: #64748b; }
@media (max-width: 420px) {
  .account-header-inner { min-height: 60px; }
  .account-main { padding-block: 12px 18px; }
  .account-card { border-radius: 16px; padding: 14px; }
  .account-card h1 { margin-bottom: 9px; }
  .account-form { gap: 9px; }
  .account-fields { gap: 7px; }
  .account-access { padding-block: 8px; }
  .account-logout { margin-top: 6px; }
}

/* Panel principal del alumno */
.dashboard-header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; }
.dashboard-header-inner > span { color: #64748b; font-size: .82rem; font-weight: 700; }
.dashboard-main { max-width: 1120px; padding-block: 25px 50px; }
.dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.dashboard-welcome h1 { overflow-wrap: anywhere; color: var(--student-navy); font-size: clamp(1.65rem,3vw,2.15rem); }
.dashboard-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.8fr); align-items: start; gap: 16px; }
.dashboard-primary,
.dashboard-secondary { display: grid; min-width: 0; gap: 14px; }
.dashboard-card { min-width: 0; border: 1px solid var(--student-border); border-radius: 19px; background: #fff; padding: 19px; box-shadow: 0 5px 18px rgba(15,26,43,.045); }
.dashboard-card-heading { margin-bottom: 13px; }
.dashboard-card-heading h2 { overflow-wrap: anywhere; color: var(--student-navy); font-size: 1.13rem; }
.dashboard-continue { padding: 22px; }
.dashboard-main-cta { width: 100%; min-height: 48px; font-size: .9rem; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.dashboard-actions .student-btn { min-height: 40px; }
.dashboard-recommendation { border-top: 3px solid var(--student-green); }
.dashboard-recommendation h3 { margin-bottom: 5px; overflow-wrap: anywhere; color: var(--student-navy); font-size: 1rem; }
.dashboard-recommendation-copy { display: -webkit-box; max-width: 68ch; overflow: hidden; color: #475569; font-size: .87rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dashboard-recommendation-copy + .student-btn,
.dashboard-recommendation-copy + .dashboard-actions { margin-top: 13px; }
.dashboard-subscription { display: grid; gap: 8px; padding: 16px 18px; }
.dashboard-subscription p { overflow-wrap: anywhere; color: #64748b; font-size: .8rem; }
.dashboard-status { width: fit-content; border-radius: 999px; padding: 4px 9px; font: 700 .7rem "Space Grotesk",system-ui,sans-serif; }
.dashboard-status.is-active { background: #dcfce7; color: #166534; }
.dashboard-status.is-info { background: #e0f2fe; color: #075985; }
.dashboard-status.is-warning { background: #fef3c7; color: #92400e; }
.dashboard-status.is-danger { background: #fee2e2; color: #991b1b; }
.dashboard-status.is-neutral { background: #e2e8f0; color: #475569; }
.dashboard-renew { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e2e8f0; padding-top: 8px; color: #92400e; font-size: .76rem; }
.dashboard-renew a { font-weight: 800; }
.dashboard-notice { display: grid; gap: 2px; border: 1px solid; border-radius: 14px; padding: 11px 13px; font-size: .78rem; }
.dashboard-notice.is-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.dashboard-notice.is-error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.dashboard-code { padding: 0; }
.dashboard-code > summary { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.dashboard-code > summary::-webkit-details-marker { display: none; }
.dashboard-code > summary > span { display: grid; min-width: 0; }
.dashboard-code > summary strong { overflow-wrap: anywhere; color: var(--student-navy); font-size: .86rem; }
.dashboard-code > summary small { color: #64748b; font-size: .75rem; }
.dashboard-code > summary > b { color: var(--student-green); font-size: .73rem; }
.dashboard-code[open] > summary { border-bottom: 1px solid #e2e8f0; }
.dashboard-code form { padding: 14px 16px 16px; }
.dashboard-code label { display: block; margin-bottom: 5px; color: #334155; font-size: .76rem; font-weight: 700; }
.dashboard-code form > div { display: flex; gap: 7px; }
.dashboard-code input { width: 100%; min-width: 0; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; padding: 9px 11px; color: var(--student-navy); font: inherit; font-size: .84rem; text-transform: uppercase; }
.dashboard-code input:focus { border-color: var(--student-green); outline: 3px solid rgba(22,163,74,.13); }
.dashboard-weak { padding: 17px; }
.dashboard-weak-list { display: grid; gap: 11px; }
.dashboard-weak-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; border-bottom: 1px solid #edf1f5; padding-bottom: 10px; }
.dashboard-weak-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-weak-list article > div { display: flex; min-width: 0; justify-content: space-between; gap: 8px; grid-column: 1 / -1; }
.dashboard-weak-list strong { display: -webkit-box; min-width: 0; overflow: hidden; color: #334155; font-size: .79rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dashboard-weak-list span { flex: 0 0 auto; color: #b91c1c; font-size: .68rem; font-weight: 700; }
.dashboard-weak-list a { align-self: center; color: var(--student-green); font-size: .72rem; font-weight: 800; }
.dashboard-weak-bar { width: 100%; height: 6px; align-self: center; border: 0; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.dashboard-weak-bar::-webkit-progress-bar { border-radius: 999px; background: #e2e8f0; }
.dashboard-weak-bar::-webkit-progress-value { border-radius: 999px; background: #ef4444; }
.dashboard-weak-bar::-moz-progress-bar { border-radius: 999px; background: #ef4444; }
.dashboard-text-link { display: inline-flex; margin-top: 14px; color: #475569; font-size: .74rem; font-weight: 800; }
.dashboard-text-link:hover { color: var(--student-green); }
.dashboard-quick { padding: 16px 17px; }
.dashboard-quick nav { display: grid; }
.dashboard-quick nav a { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf1f5; color: #334155; font-size: .81rem; font-weight: 700; }
.dashboard-quick nav a:first-child { border-top: 0; }
.dashboard-quick nav a b { color: var(--student-green); }
.dashboard-quick nav a:hover { color: var(--student-green); }
.dashboard-quick nav .dashboard-logout { margin-top: 3px; border-top-color: #dbe2ea; color: #64748b; font-weight: 600; }
.dashboard-quick nav .dashboard-logout b { color: #94a3b8; }
.dashboard-quick nav .dashboard-logout:hover { color: #b91c1c; }
.dashboard-quick nav .dashboard-logout:hover b { color: #b91c1c; }

@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: minmax(0,1fr); }
  .dashboard-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-secondary > * { align-self: start; }
}
@media (max-width: 680px) {
  .dashboard-main { width: min(100% - 28px,1120px); padding-block: 19px 35px; }
  .dashboard-secondary { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 420px) {
  .dashboard-header-inner { min-height: 62px; }
  .dashboard-header-inner > span { font-size: .73rem; }
  .dashboard-welcome { margin-bottom: 13px; }
  .dashboard-welcome .student-btn { padding-inline: 10px; }
  .dashboard-card,
  .dashboard-continue { border-radius: 16px; padding: 15px; }
  .dashboard-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .dashboard-actions .student-btn { width: 100%; }
  .dashboard-code { padding: 0; }
  .dashboard-code form > div { align-items: stretch; flex-direction: column; }
}

/* Resultado del examen */
.result-header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; }
.result-back { border-radius: 9px; padding: 8px 10px; color: #475569; font-size: .86rem; font-weight: 700; }
.result-back:hover { background: #f1f5f9; color: var(--student-navy); }
.result-main { max-width: 980px; padding-block: 26px 50px; }
.eyebrow { color: var(--student-green); font: 700 .72rem "Space Grotesk", system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.card { border: 1px solid var(--student-border); border-radius: 22px; background: #fff; padding: 22px; box-shadow: 0 7px 22px rgba(15,26,43,.05); }
.result-summary { margin-top: 7px; }
.hero { display: flex; align-items: center; gap: 26px; }
.ring { --p: 0; position: relative; display: flex; width: 126px; height: 126px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--rc) calc(var(--p)*1%), #e2e8f0 0); }
.ring::before { position: absolute; inset: 10px; border-radius: 50%; background: #fff; content: ""; }
.ring .v { position: relative; text-align: center; }
.ring .v b { display: block; color: var(--student-navy); font: 700 1.9rem/1 "Space Grotesk", system-ui, sans-serif; }
.ring .v span { color: #64748b; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.result-summary-copy { min-width: 0; flex: 1; }
.hero h1 { color: var(--student-navy); font-size: clamp(1.65rem,4vw,2.2rem); }
.verdict { margin-top: 3px; font: 700 1.08rem "Space Grotesk", system-ui, sans-serif; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; padding: 8px 11px; color: #64748b; font-size: .84rem; }
.chip b { color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; }
.chip.ok b { color: #166534; }
.chip.no b { color: #b91c1c; }
.badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; border-radius: 999px; padding: 5px 11px; font: 700 .78rem "Space Grotesk", system-ui, sans-serif; }
.badge.ok { background: var(--student-green-soft); color: #166534; }
.badge.no { background: #fff1f2; color: #b91c1c; }
.badge.none { background: #f1f5f9; color: #475569; }
.result-official { margin-top: 11px; padding: 7px 14px; font-size: .92rem; }
.score-note { margin-top: 15px; border: 1px solid #e2e8f0; border-radius: 13px; background: #f8fafc; padding: 12px 14px; }
.score-note .big { color: var(--student-navy); font: 700 1.05rem "Space Grotesk", system-ui, sans-serif; }
.score-note p { margin-top: 3px; color: #64748b; font-size: .82rem; }
.cta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.btn { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 11px; padding: 9px 15px; font: 700 .88rem "Space Grotesk", system-ui, sans-serif; }
.btn-green { background: var(--student-green); color: #fff; }
.btn-green:hover { background: var(--student-green-hover); }
.btn-ghost { border-color: #cbd5e1; background: #fff; color: #334155; }
.btn-ghost:hover { border-color: #94a3b8; background: #f8fafc; }

.result-review { margin-top: 18px; border: 1px solid var(--student-border); border-radius: 18px; background: #fff; box-shadow: 0 4px 16px rgba(15,26,43,.04); }
.result-review > summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; color: var(--student-navy); font: 700 .96rem "Space Grotesk", system-ui, sans-serif; cursor: pointer; list-style: none; }
.result-review > summary::-webkit-details-marker { display: none; }
.result-review > summary small { color: var(--student-green); font-size: .76rem; }
.result-review[open] > summary { border-bottom: 1px solid #e2e8f0; }
.result-review[open] > summary small { font-size: 0; }
.result-review[open] > summary small::after { font-size: .76rem; content: "Ocultar revisión"; }
.result-review-body { padding: 16px; }
.tts-pref { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; border-radius: 11px; background: #f8fafc; padding: 10px 12px; color: #475569; font-size: .82rem; }
.tts-pref input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--student-green); }
.q { min-width: 0; margin-bottom: 13px; border: 1px solid var(--student-border); border-left-width: 4px; border-radius: 16px; background: #fff; padding: 19px; }
.q:last-child { margin-bottom: 0; }
.q.good { border-left-color: var(--student-green); }
.q.bad { border-left-color: #dc2626; }
.q.none { border-left-color: #94a3b8; }
.q .meta { margin-bottom: 7px; overflow-wrap: anywhere; color: #64748b; font-size: .76rem; }
.q h2 { margin-bottom: 12px; overflow-wrap: anywhere; color: var(--student-navy); font-size: 1.02rem; line-height: 1.5; }
.q img { display: block; width: auto; max-width: 100%; max-height: min(55vh,520px); margin: 0 auto 14px; border: 1px solid var(--student-border); border-radius: 12px; object-fit: contain; }
.opts { display: grid; gap: 8px; margin-top: 2px; }
.opt { display: flex; min-width: 0; align-items: flex-start; gap: 9px; border: 1px solid #dbe2ea; border-radius: 11px; background: #f8fafc; padding: 10px 12px; color: #475569; font-size: .9rem; line-height: 1.45; }
.opt .mk { display: inline-flex; width: 23px; height: 23px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #475569; font: 700 .75rem "Space Grotesk", system-ui, sans-serif; }
.opt .opt-txt { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.opt .tag { flex: 0 0 auto; align-self: center; border-radius: 999px; padding: 3px 7px; font: 700 .65rem "Space Grotesk", system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.opt.correct { border-color: #86efac; background: var(--student-green-soft); color: #14532d; }
.opt.correct .mk { border-color: var(--student-green); background: var(--student-green); color: #fff; }
.tag-ok { background: #dcfce7; color: #166534; }
.opt.wrong { border-color: #fca5a5; background: #fff1f2; color: #881337; }
.opt.wrong .mk { border-color: #dc2626; background: #dc2626; color: #fff; }
.tag-you { background: #ffe4e6; color: #be123c; }
.opt.dim { color: #64748b; }
.exp { margin-top: 12px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fbff; padding: 13px 14px; }
.exp h3 { margin-bottom: 6px; color: #1e3a5f; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.exp p { overflow-wrap: anywhere; color: #334155; font-size: .9rem; line-height: 1.65; }
.tts-btn { display: inline-flex; min-height: 37px; align-items: center; margin-bottom: 8px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; padding: 6px 10px; color: #334155; font: 700 .77rem "Space Grotesk", system-ui, sans-serif; cursor: pointer; }
.sec-title { margin: 28px 0 12px; color: var(--student-navy); font-size: 1.18rem; }
.result-breakdown { padding: 5px 18px; }
.result-breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e2e8f0; padding: 11px 0; }
.result-breakdown-row:last-child { border-bottom: 0; }
.result-breakdown-row > span { min-width: 0; overflow-wrap: anywhere; color: #334155; font-size: .87rem; }
.result-breakdown-row > strong { flex: 0 0 auto; border-radius: 999px; background: #fff1f2; padding: 4px 10px; color: #b91c1c; font: 700 .77rem "Space Grotesk", system-ui, sans-serif; white-space: nowrap; }
.result-footer-actions { margin-bottom: 0; }

@media (max-width: 640px) {
  .result-header-inner { min-height: 60px; }
  .result-header .student-brand img { width: 124px; }
  .result-main { width: min(100% - 24px,980px); padding-block: 17px 34px; }
  .hero { align-items: flex-start; gap: 17px; }
  .ring { width: 104px; height: 104px; }
  .ring .v b { font-size: 1.55rem; }
  .chips { gap: 6px; }
  .chip { padding: 7px 9px; font-size: .78rem; }
  .cta .btn { flex: 1 1 auto; }
  .result-review > summary { padding-inline: 14px; }
  .result-review-body { padding: 11px; }
  .q { padding: 14px; }
  .opt { flex-wrap: wrap; padding: 9px 10px; }
}

@media (max-width: 420px) {
  .result-back { max-width: 130px; text-align: right; }
  .card { border-radius: 17px; padding: 15px; }
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .chips { justify-content: center; }
  .score-note { text-align: left; }
  .result-summary .cta { display: grid; grid-template-columns: 1fr 1fr; }
  .result-summary .cta .btn:first-child { grid-column: 1 / -1; }
  .result-review > summary { min-height: 54px; }
  .result-review > summary small { display: none; }
  .opt .tag { margin-left: 32px; }
  .result-breakdown-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .result-footer-actions { display: grid; grid-template-columns: 1fr; }
}

/* Progreso del alumno */
.progress-header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; }
.progress-back { border-radius: 9px; padding: 8px 10px; color: #475569; font-size: .86rem; font-weight: 700; }
.progress-back:hover { background: #f1f5f9; color: var(--student-navy); }
.progress-main { max-width: 1060px; padding-block: 25px 50px; }
.progress-main .title { color: var(--student-navy); font-size: clamp(1.65rem,3vw,2.1rem); }
.progress-greeting { margin-top: 2px; color: #64748b; font-size: .88rem; }
.progress-main .lead { color: #64748b; }
.grid-kpi { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 18px 0 14px; }
.kpi { min-width: 0; padding: 17px; }
.kpi .n { overflow-wrap: anywhere; color: var(--student-navy); font: 700 clamp(1.35rem,3vw,1.75rem)/1.1 "Space Grotesk",system-ui,sans-serif; }
.kpi .n.green { color: var(--student-green); }
.kpi .l { margin-top: 5px; color: #64748b; font-size: .79rem; }
.progress-ready { margin-bottom: 14px; padding: 17px 20px; }
.ready { display: flex; align-items: center; gap: 20px; }
.ready-pct { display: flex; min-width: 112px; flex: 0 0 auto; flex-direction: column; font: 700 1.65rem/1.1 "Space Grotesk",system-ui,sans-serif; }
.ready-pct small { margin-top: 4px; color: #64748b; font: 600 .68rem "Manrope",system-ui,sans-serif; }
.ready > div { min-width: 0; }
.pill { display: inline-block; margin-bottom: 3px; font: 700 .68rem "Space Grotesk",system-ui,sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.ready .lbl { overflow-wrap: anywhere; color: var(--student-navy); font: 700 1.2rem "Space Grotesk",system-ui,sans-serif; }
.ready .desc { max-width: 68ch; margin-top: 2px; color: #64748b; font-size: .82rem; }
.progress-chart-card { margin-bottom: 0; padding: 18px 20px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.sec-title h2 { color: var(--student-navy); font-size: 1.13rem; }
.sec-title .hint { color: #64748b; font-size: .75rem; }
.progress-chart { position: relative; height: 250px; }
.progress-topics-title { margin: 25px 0 11px; }
.progress-topics { padding: 4px 18px; }
.topic { border-bottom: 1px solid #e2e8f0; padding: 12px 0; }
.topic .row { display: flex; min-width: 0; align-items: center; gap: 10px; margin-bottom: 7px; }
.topic .name { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #334155; font-size: .88rem; line-height: 1.4; }
.topic .pct { width: 46px; flex: 0 0 auto; text-align: right; font: 700 .88rem "Space Grotesk",system-ui,sans-serif; }
.bar { height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.bar > i { display: block; height: 100%; border-radius: inherit; }
.reinf { flex: 0 0 auto; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; padding: 5px 9px; color: #334155; font: 700 .7rem "Space Grotesk",system-ui,sans-serif; }
.reinf:hover { border-color: var(--student-green); color: #166534; }
.progress-all-topics > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; color: var(--student-navy); font: 700 .84rem "Space Grotesk",system-ui,sans-serif; cursor: pointer; list-style: none; }
.progress-all-topics > summary::-webkit-details-marker { display: none; }
.progress-all-topics > summary small { color: var(--student-green); font-size: .7rem; }
.progress-all-topics[open] > summary small { font-size: 0; }
.progress-all-topics[open] > summary small::after { font-size: .7rem; content: "Ocultar temas"; }
.progress-all-topics > div .topic:last-child { border-bottom: 0; }
.progress-actions { margin-top: 18px; }
.empty { margin-top: 18px; padding: 45px 20px; text-align: center; }
.empty .em { font-size: 2.3rem; }
.empty h2 { margin: 10px 0 5px; color: var(--student-navy); }
.empty .cta { justify-content: center; margin-top: 17px; }

@media (max-width: 760px) {
  .grid-kpi { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .progress-header-inner { min-height: 60px; }
  .progress-header .student-brand img { width: 124px; }
  .progress-main { width: min(100% - 24px,1060px); padding-block: 17px 34px; }
  .grid-kpi { gap: 8px; margin-top: 14px; }
  .kpi { padding: 13px; }
  .ready { align-items: flex-start; gap: 13px; }
  .ready-pct { min-width: 90px; font-size: 1.4rem; }
  .progress-chart { height: 220px; }
  .progress-topics { padding-inline: 13px; }
  .topic .name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}

@media (max-width: 420px) {
  .progress-back { max-width: 130px; text-align: right; }
  .progress-ready { padding: 14px; }
  .ready { flex-direction: column; gap: 8px; }
  .ready-pct { min-width: 0; }
  .progress-chart-card { padding: 14px 10px 12px; }
  .progress-chart { height: 205px; }
  .progress-actions { display: grid; grid-template-columns: 1fr; }
}

/* Historial y revisión histórica */
.history-header-inner,
.attempt-detail-header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; }
.history-back { border-radius: 9px; padding: 8px 10px; color: #475569; font-size: .86rem; font-weight: 700; }
.history-back:hover { background: #f1f5f9; color: var(--student-navy); }
.history-main { max-width: 980px; padding-block: 25px 50px; }
.history-main > h1 { color: var(--student-navy); font-size: clamp(1.65rem,3vw,2.1rem); }
.history-lead { margin-top: 3px; color: #64748b; font-size: .9rem; }
.history-days { display: grid; gap: 11px; margin-top: 18px; }
.history-day { border: 1px solid var(--student-border); border-radius: 17px; background: #fff; box-shadow: 0 4px 16px rgba(15,26,43,.04); }
.history-day > summary { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 17px; cursor: pointer; list-style: none; }
.history-day > summary::-webkit-details-marker { display: none; }
.history-day > summary > span { display: flex; min-width: 0; flex-direction: column; }
.history-day > summary strong { overflow-wrap: anywhere; color: var(--student-navy); font: 700 .98rem "Space Grotesk",system-ui,sans-serif; }
.history-day > summary small { margin-top: 3px; color: #64748b; font-size: .78rem; }
.history-day > summary > b { flex: 0 0 auto; color: var(--student-green); font-size: .76rem; }
.history-day[open] > summary { border-bottom: 1px solid #e2e8f0; }
.history-day[open] > summary > b { font-size: 0; }
.history-day[open] > summary > b::after { font-size: .76rem; content: "Ocultar sesión"; }
.history-attempts { display: grid; gap: 9px; padding: 12px; }
.history-attempt { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e2e8f0; border-radius: 13px; background: #f8fafc; padding: 13px 14px; }
.history-attempt-copy { min-width: 0; flex: 1; }
.history-attempt-title { display: flex; min-width: 0; align-items: center; gap: 8px; }
.history-attempt h2 { overflow-wrap: anywhere; color: var(--student-navy); font-size: .98rem; }
.history-attempt-copy > p { margin-top: 2px; overflow-wrap: anywhere; color: #64748b; font-size: .77rem; }
.history-attempt-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 8px; color: #64748b; font-size: .76rem; }
.history-attempt-meta strong { color: #334155; font-family: "Space Grotesk",system-ui,sans-serif; }
.history-attempt-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.history-attempt-actions .student-btn { min-height: 39px; padding: 7px 11px; font-size: .78rem; }
.history-state { display: inline-flex; flex: 0 0 auto; border-radius: 999px; padding: 4px 8px; font: 700 .67rem "Space Grotesk",system-ui,sans-serif; }
.history-state.is-pass { background: var(--student-green-soft); color: #166534; }
.history-state.is-fail { background: #fff1f2; color: #b91c1c; }
.history-empty { margin-top: 18px; border: 1px solid var(--student-border); border-radius: 17px; background: #fff; padding: 34px 20px; text-align: center; }
.history-empty p { margin-bottom: 15px; color: #64748b; }

.attempt-detail-main { max-width: 980px; padding-block: 24px 50px; }
.attempt-detail-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 14px; border: 1px solid var(--student-border); border-radius: 20px; background: #fff; padding: 20px; box-shadow: 0 7px 22px rgba(15,26,43,.05); }
.attempt-detail-summary h1 { margin-top: 2px; color: var(--student-navy); font-size: clamp(1.4rem,3vw,1.9rem); }
.attempt-detail-summary h1 + p { margin-top: 2px; color: #64748b; font-size: .86rem; }
.attempt-detail-summary > .history-state { margin-top: 2px; }
.attempt-detail-metrics { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.attempt-detail-metrics span { border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; padding: 9px; color: #64748b; font-size: .72rem; }
.attempt-detail-metrics strong { display: block; color: var(--student-navy); font: 700 1rem "Space Grotesk",system-ui,sans-serif; }
.attempt-detail-summary > .history-attempt-actions { grid-column: 1 / -1; }
.attempt-current-note { margin: 13px 2px 0; border-radius: 10px; background: #eef6ff; padding: 9px 11px; color: #475569; font-size: .77rem; }
.attempt-review { margin-top: 13px; }
.attempt-question-missing { background: #f8fafc; }
.attempt-question-missing > p:last-child { color: #64748b; font-size: .88rem; }

@media (max-width: 760px) {
  .attempt-detail-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .history-header-inner,
  .attempt-detail-header-inner { min-height: 60px; }
  .history-header .student-brand img,
  .attempt-detail-header .student-brand img { width: 124px; }
  .history-main,
  .attempt-detail-main { width: min(100% - 24px,980px); padding-block: 17px 34px; }
  .history-attempt { align-items: stretch; flex-direction: column; gap: 11px; }
  .history-attempt-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .history-attempt-actions .student-btn { width: 100%; }
}

@media (max-width: 420px) {
  .history-back { max-width: 135px; text-align: right; }
  .history-day > summary { min-height: 62px; padding: 10px 13px; }
  .history-attempts { padding: 9px; }
  .history-attempt { padding: 12px; }
  .attempt-detail-summary { grid-template-columns: minmax(0,1fr); padding: 15px; }
  .attempt-detail-summary > .history-state { justify-self: start; }
  .attempt-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Configuradores del alumno */
.setup-nav { min-height: 72px; }
.setup-back,
.setup-footer-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  color: #475569;
  font-size: .9rem;
  font-weight: 700;
}
.setup-back { padding: 8px 12px; }
.setup-back:hover { background: #f1f5f9; color: var(--student-navy); }
.setup-main { max-width: 1040px; padding-block: 30px 48px; }
.setup-heading { margin-bottom: 18px; }
.setup-kicker {
  color: var(--student-green);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.setup-heading h1 { color: var(--student-navy); font-size: clamp(1.65rem, 3vw, 2.2rem); }
.setup-section-name { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #334155; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1rem; }
.setup-heading > span { display: block; margin-top: 2px; color: var(--student-muted); font-size: .95rem; }
.setup-form { margin: 0; }
.setup-panel {
  min-width: 0;
  border: 1px solid var(--student-border);
  border-radius: 22px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(15,26,43,.05);
}
.setup-label { margin: 0 0 12px; color: var(--student-navy); font-size: 1rem; font-weight: 700; }
.setup-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.setup-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.setup-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.setup-option-content {
  display: flex;
  min-height: 88px;
  align-items: flex-start;
  gap: 11px;
  border: 2px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  padding: 13px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.setup-option:hover .setup-option-content { border-color: #aeb9c7; }
.setup-option input:focus-visible + .setup-option-content { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.setup-option input:checked + .setup-option-content { border-color: var(--student-green); background: var(--student-green-soft); box-shadow: 0 0 0 1px rgba(21,128,61,.08); }
.setup-radio { position: relative; width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; border: 2px solid #94a3b8; border-radius: 50%; background: #fff; }
.setup-option input:checked + .setup-option-content .setup-radio { border-color: var(--student-green); }
.setup-option input:checked + .setup-option-content .setup-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--student-green); }
.setup-option-content > span:last-child { min-width: 0; }
.setup-option-content strong { display: block; overflow-wrap: anywhere; color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-size: .92rem; line-height: 1.3; }
.setup-option-content small { display: block; margin-top: 4px; color: var(--student-muted); font-size: .78rem; line-height: 1.4; }
.setup-field { margin-top: 20px; }
.setup-native-select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.setup-picklist { max-height: 300px; overflow-y: auto; border: 1px solid var(--student-border); border-radius: 14px; background: #fff; }
.setup-group-heading { position: sticky; z-index: 1; top: 0; border-bottom: 1px solid var(--student-border); background: #f8fafc; padding: 9px 13px 7px; color: var(--student-green); font-family: "Space Grotesk", system-ui, sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.setup-pick { display: flex; min-height: 48px; align-items: center; gap: 12px; border-bottom: 1px solid #edf1f5; padding: 10px 13px; cursor: pointer; transition: background .12s ease; }
.setup-pick:last-child { border-bottom: 0; }
.setup-pick:hover { background: #f8fafc; }
.setup-pick.is-selected { background: var(--student-green-soft); box-shadow: inset 3px 0 0 var(--student-green); }
.setup-pick-main { min-width: 0; flex: 1; }
.setup-pick-short { display: block; overflow-wrap: anywhere; color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-size: .92rem; font-weight: 700; }
.setup-pick.is-selected .setup-pick-short { color: #166534; }
.setup-pick-full { display: block; margin-top: 1px; overflow-wrap: anywhere; color: var(--student-muted); font-size: .76rem; line-height: 1.3; }
.setup-count { flex: 0 0 auto; border: 1px solid #dbe2ea; border-radius: 999px; background: #f8fafc; padding: 3px 8px; color: #64748b; font-size: .72rem; font-weight: 700; }
.setup-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.setup-amount { min-height: 44px; border: 2px solid #dbe2ea; border-radius: 12px; background: #fff; color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-size: .95rem; font-weight: 700; cursor: pointer; }
.setup-amount:hover { border-color: #aeb9c7; }
.setup-amount:focus-visible { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.setup-amount.is-selected { border-color: var(--student-green); background: var(--student-green-soft); color: #166534; }
.setup-submit { width: 100%; margin-top: 16px; border: 0; min-height: 50px; font-size: 1rem; cursor: pointer; }
.setup-simulation { margin-top: 20px; border-color: #bbf7d0; }
.setup-simulation h2 { margin: 5px 0 5px; color: var(--student-navy); font-size: 1.18rem; }
.setup-simulation > p:last-of-type { color: var(--student-muted); font-size: .88rem; line-height: 1.6; }
.setup-simulation strong { color: var(--student-navy); }
.setup-simulation-submit { margin-top: 15px; }
.setup-videos { margin-top: 24px; border-top: 1px solid var(--student-border); padding-top: 20px; }
.setup-videos h2 { margin-bottom: 12px; color: var(--student-navy); font-size: 1.05rem; }
.setup-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.setup-video-card { min-width: 0; cursor: pointer; }
.setup-video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--student-navy); }
.setup-video-thumb-image { width: 100%; height: 100%; object-fit: cover; }
.setup-video-placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: #e2e8f0; color: #64748b; font-size: .75rem; }
.setup-video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,26,43,.34); opacity: 0; transition: opacity .15s ease; }
.setup-video-card:hover .setup-video-play { opacity: 1; }
.setup-video-play span { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--student-navy); }
.setup-video-card > p { margin-top: 7px; overflow-wrap: anywhere; color: var(--student-navy); font-size: .84rem; font-weight: 700; line-height: 1.35; }
.setup-video-empty { color: var(--student-muted); font-size: .85rem; }
.setup-footer-back { margin-top: 17px; }
.setup-footer-back:hover { color: var(--student-navy); }
.setup-video-modal { position: fixed; z-index: 50; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,10,18,.88); }
.setup-video-modal.is-hidden { display: none; }
.setup-video-dialog { width: min(100%, 768px); }
.setup-video-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: #fff; }
.setup-video-dialog-head p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 700; }
.setup-video-dialog-head button { width: 44px; height: 44px; flex: 0 0 auto; border: 0; background: transparent; color: #fff; font-size: 2rem; cursor: pointer; }
.setup-video-frame-wrap { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #000; }
.setup-video-frame-wrap iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 819px) {
  .setup-main { padding-block: 24px 40px; }
  .setup-mode-grid { grid-template-columns: 1fr; }
  .setup-option-content { min-height: 0; align-items: center; padding: 12px 13px; }
}

@media (max-width: 640px) {
  .setup-nav { min-height: 64px; flex-wrap: nowrap; padding-block: 8px; }
  .setup-back { white-space: nowrap; }
  .setup-panel { padding: 18px; border-radius: 19px; }
  .setup-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .setup-main { padding-top: 19px; }
  .setup-heading { margin-bottom: 14px; }
  .setup-panel { padding: 15px; }
  .setup-mode-grid { gap: 8px; }
  .setup-option-content { padding: 10px 11px; }
  .setup-field { margin-top: 17px; }
  .setup-amounts { gap: 7px; }
  .setup-amount { min-height: 42px; }
}

/* Examen en curso */
.hidden { display: none !important; }
.exam-page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.exam-header-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; }
.exam-section-name { max-width: min(55vw, 520px); overflow: hidden; color: #475569; font-family: "Space Grotesk", system-ui, sans-serif; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.exam-main { max-width: 1120px; padding-block: 20px 42px; }
.exam-status { margin-bottom: 14px; border: 1px solid var(--student-border); border-radius: 18px; background: #fff; padding: 15px 18px; box-shadow: 0 4px 16px rgba(15,26,43,.04); }
.exam-status > h1,
.exam-status > p { display: none; }
.exam-status > .flex { display: flex; align-items: center; gap: 18px; margin: 0; }
.exam-status > .flex p { margin: 0; }
.exam-status > .flex p:first-child { color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; }
.exam-status > .flex p:nth-last-child(-n+2) { color: #475569; font-size: .9rem; }
#timer { color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-progress { height: 7px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.exam-progress > div { height: 100%; border-radius: inherit; background: var(--student-green); transition: width .18s ease; }
#speedNotice.exam-speed-notice,
#speedNotice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; border: 1px solid #f3d28b; border-radius: 12px; background: #fff8e8 !important; padding: 9px 12px !important; color: #8a5a00 !important; }
#speedNotice p { margin: 0; font-size: .82rem; font-weight: 700; }
#closeSpeedNotice { border: 0 !important; background: transparent !important; color: inherit !important; cursor: pointer; }
.exam-question-nav { margin-top: 10px; border-top: 1px solid #edf1f5; padding-top: 9px; }
.exam-question-nav summary { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; color: var(--student-navy); font-size: .85rem; font-weight: 700; cursor: pointer; list-style: none; }
.exam-question-nav summary::-webkit-details-marker { display: none; }
.exam-question-nav summary small { color: var(--student-green); font-size: .78rem; }
.exam-question-nav-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.exam-view-toggle { min-height: 36px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; padding: 6px 11px; color: #475569; font: 700 .78rem "Space Grotesk", system-ui, sans-serif; cursor: pointer; }
.exam-view-toggle:hover { border-color: #94a3b8; color: var(--student-navy); }
.exam-mini-map { display: flex; flex-wrap: wrap; gap: 7px; }
.exam-mini-button { width: 38px; height: 38px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; cursor: pointer; }
.exam-mini-button.is-current { background: var(--student-green); color: #fff; }
.exam-mini-button.is-answered { border-color: #bbf7d0; background: var(--student-green-soft); color: #166534; }
.exam-mini-button.is-unanswered { background: #e2e8f0; color: #475569; }
.exam-mini-button.is-doubtful { box-shadow: 0 0 0 2px #f59e0b; }

.exam-question-card { min-width: 0; margin-bottom: 14px; border: 1px solid var(--student-border); border-radius: 22px; background: #fff; padding: 22px; box-shadow: 0 7px 22px rgba(15,26,43,.05); }
.exam-part { margin-bottom: 14px; border-radius: 10px; padding: 9px 12px; font: 700 .8rem "Space Grotesk", system-ui, sans-serif; }
.exam-part-specific { border: 1px solid #bbf7d0; background: var(--student-green-soft); color: #166534; }
.exam-part-common { border: 1px solid #f3d28b; background: #fff8e8; color: #8a5a00; }
.exam-question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.exam-question-meta { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #64748b; font-size: .78rem; line-height: 1.45; }
.exam-question-tools { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.exam-tool-btn { min-height: 38px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; padding: 7px 10px; color: #334155; font-size: .78rem; font-weight: 700; cursor: pointer; }
.exam-tool-btn:hover { border-color: #86efac; background: var(--student-green-soft); color: #166534; }
.exam-tool-doubt.is-active { border-color: #f59e0b; background: #f59e0b; color: #fff; }
.exam-question-title { margin: 0 0 16px; overflow-wrap: anywhere; color: var(--student-navy); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.5; }
.exam-question-image { display: block; width: auto; max-width: 100%; max-height: min(56vh, 560px); margin: 0 auto 16px; border-radius: 12px; object-fit: contain; }
.exam-answers { display: grid; gap: 10px; }
.exam-answer { display: flex; min-width: 0; min-height: 52px; align-items: center; gap: 11px; border: 2px solid #dbe2ea; border-radius: 13px; background: #fff; padding: 11px 13px; color: #334155; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.exam-answer > input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--student-green); }
.exam-answer:hover { border-color: #aeb9c7; background: #f8fafc; }
.exam-answer:has(input:focus-visible) { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.exam-answer:has(input:checked) { border-color: var(--student-green); background: var(--student-green-soft); color: #14532d; }
.exam-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--student-border); border-radius: 18px; background: #fff; padding: 13px; box-shadow: 0 4px 16px rgba(15,26,43,.04); }
.exam-navigation-pair { display: flex; gap: 8px; }

#reviewModal { position: fixed; z-index: 60; inset: 0; overflow-y: auto; background: rgba(15,23,42,.58); padding: 16px; }
#reviewModal > div { width: min(100%, 896px); max-height: 85vh; margin: 32px auto 0; overflow-y: auto; border-radius: 20px; background: #fff; padding: 22px; box-shadow: 0 24px 60px rgba(15,23,42,.24); }
#reviewModal > div > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
#reviewModal h2 { color: var(--student-navy); font-size: 1.5rem; }
#closeReviewModal { min-height: 42px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; padding: 8px 14px; cursor: pointer; }
#reviewModal .grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
#reviewModal .grid > div { border-radius: 12px; background: #f1f5f9; padding: 13px; }
#summaryQuestionList { grid-template-columns: repeat(5, minmax(0,1fr)) !important; }
.exam-summary-question { min-height: 44px; border: 1px solid transparent; border-radius: 10px; padding: 9px; font-size: .8rem; font-weight: 700; cursor: pointer; }
.exam-summary-question.is-answered { border-color: #bbf7d0; background: var(--student-green-soft); color: #166534; }
.exam-summary-question.is-unanswered { border-color: #fecaca; background: #fff1f2; color: #b91c1c; }
.exam-summary-question.is-doubtful { box-shadow: 0 0 0 2px #f59e0b; }
#submitExamBtn, #goBackExamBtn { min-height: 44px; border: 0; border-radius: 11px; padding: 10px 16px; color: #fff; font-weight: 700; cursor: pointer; }
#submitExamBtn { background: var(--student-green); }
#goBackExamBtn { background: #475569; }

#openChatBtn { position: fixed; z-index: 40; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--student-green); color: #fff; box-shadow: 0 10px 28px rgba(15,26,43,.24); cursor: pointer; }
#openChatBtn svg { width: 25px; height: 25px; }
#chatPanel { position: fixed; z-index: 70; inset: 0 0 0 auto; display: flex; width: min(100%, 384px); flex-direction: column; background: #fff; box-shadow: -14px 0 36px rgba(15,23,42,.18); transition: transform .3s ease; }
#chatPanel.translate-x-full { transform: translateX(100%); }
#chatPanel > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; padding: 14px 18px; }
#chatPanel > div:first-child > div { display: flex; align-items: center; gap: 10px; }
#chatPanel > div:first-child > div > div:first-child { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 11px; background: var(--student-green); color: #fff; font-weight: 800; }
#closeChatBtn { width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: #64748b; cursor: pointer; }
#closeChatBtn svg { width: 21px; }
#chatMessages { flex: 1; overflow-y: auto; padding: 16px; }
#chatMessages > div { display: flex; gap: 8px; margin-bottom: 10px; }
#chatMessages > div > div:last-child { max-width: 85%; border-radius: 15px; background: #f1f5f9; padding: 10px 13px; color: #334155; font-size: .86rem; line-height: 1.55; }
#chatPanel > div:last-child { border-top: 1px solid #e2e8f0; padding: 14px; }
#chatPanel > div:last-child > div { display: flex; gap: 8px; }
#chatInput { min-width: 0; min-height: 44px; flex: 1; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; padding: 9px 12px; color: var(--student-navy); }
#sendChatBtn { min-height: 44px; border: 0; border-radius: 11px; background: var(--student-green); padding: 9px 14px; color: #fff; font-weight: 700; cursor: pointer; }
#chatBackdrop { position: fixed; z-index: 65; inset: 0; background: rgba(15,23,42,.35); }

@media (max-width: 1279px) {
  .exam-page { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  #openChatBtn {
    position: static;
    margin: 0 max(12px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) auto;
  }
}

@media (min-width: 1200px) {
  .exam-question-nav > summary { display: none; }
  .exam-question-nav-tools { float: right; margin: 0 0 8px 12px; }
  .exam-mini-map { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .exam-mini-button { flex: 0 0 38px; }
}

@media (max-width: 819px) {
  .exam-header-inner { min-height: 60px; }
  .exam-main { padding-top: 14px; }
  .exam-status { padding: 12px 14px; }
  .exam-status > .flex { justify-content: space-between; gap: 10px; }
  .exam-status > .flex p:nth-last-child(-n+2) { font-size: .82rem; }
  .exam-question-card { padding: 18px; }
  .exam-question-head { flex-direction: column; gap: 9px; }
  .exam-question-tools { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .exam-header .student-brand img { width: 124px; }
  .exam-section-name { max-width: 46vw; font-size: .8rem; }
  .exam-status > .flex { flex-wrap: wrap; }
  .exam-status > .flex p:first-child { flex: 1; }
  .exam-status > .flex p:nth-last-child(2) { margin-left: auto; }
  .exam-status > .flex p:last-child { width: 100%; }
  .exam-navigation { align-items: stretch; flex-direction: column; }
  .exam-navigation-pair { display: grid; grid-template-columns: 1fr 1fr; }
  .exam-review-btn { width: 100%; }
  #reviewModal .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #summaryQuestionList { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

@media (max-width: 420px) {
  .exam-main { width: min(100% - 24px, 1120px); padding-top: 10px; }
  .exam-status { margin-bottom: 10px; border-radius: 15px; padding: 10px 12px; }
  .exam-progress { margin-top: 8px; }
  .exam-question-nav { margin-top: 7px; padding-top: 5px; }
  .exam-question-card { border-radius: 17px; padding: 15px; }
  .exam-question-title { margin-bottom: 13px; }
  .exam-question-tools { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .exam-tool-btn { padding-inline: 7px; }
  .exam-answer { min-height: 50px; padding: 10px; }
  #openChatBtn { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* Acceso y registro: patrón claro unificado */
.auth-page { display: flex; min-height: 100vh; flex-direction: column; }
.auth-header-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 20px; }
.auth-header-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 10px;
  padding: 8px 11px;
  color: #475569;
  font-size: .88rem;
  font-weight: 700;
}
.auth-header-link:hover { background: #f1f5f9; color: var(--student-navy); }
.auth-main { display: grid; flex: 1; place-items: center; padding-block: 22px 30px; }
.auth-card {
  width: min(100%, 440px);
  border: 1px solid var(--student-border);
  border-radius: 22px;
  background: var(--student-surface);
  padding: 26px 28px;
  box-shadow: 0 8px 24px rgba(15,26,43,.06);
}
.auth-heading { margin-bottom: 18px; text-align: center; }
.auth-heading h1 { color: var(--student-navy); font-size: clamp(1.7rem,5vw,1.95rem); }
.auth-heading p { margin-top: 5px; color: var(--student-muted); font-size: .88rem; }
.auth-alert { margin-bottom: 14px; border: 1px solid #fecaca; border-radius: 11px; background: #fff7f7; padding: 10px 12px; color: #9f2424; font-size: .82rem; line-height: 1.45; }
.auth-form { display: grid; gap: 11px; }
.auth-field { display: grid; gap: 5px; color: var(--student-navy); font-size: .81rem; font-weight: 700; }
.auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  padding: 9px 12px;
  color: var(--student-text);
  font: 500 .94rem "Manrope", system-ui, sans-serif;
}
.auth-form input:hover { border-color: #94a3b8; }
.auth-form input:focus-visible,
.auth-header-link:focus-visible,
.auth-forgot:focus-visible,
.auth-alt a:focus-visible { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.auth-form input:focus-visible { border-color: var(--student-green); }
.auth-forgot { justify-self: end; border-radius: 5px; color: var(--student-green); font-size: .79rem; font-weight: 700; }
.auth-forgot:hover { color: var(--student-green-hover); text-decoration: underline; }
.auth-submit { width: 100%; min-height: 46px; margin-top: 2px; cursor: pointer; }
.auth-alt { margin-top: 13px; color: var(--student-muted); font-size: .81rem; text-align: center; }
.auth-alt a { border-radius: 5px; color: var(--student-green); font-weight: 700; }
.auth-alt a:hover { color: var(--student-green-hover); text-decoration: underline; }

/* El código de centro no ocupa altura hasta que el alumno lo necesita. */
.register-code { overflow: hidden; border: 1px solid var(--student-border); border-radius: 13px; background: #f8fafc; }
.register-code summary {
  display: flex;
  min-height: 43px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  color: var(--student-navy);
  font-size: .84rem;
  font-weight: 800;
}
.register-code summary::-webkit-details-marker { display: none; }
.register-code summary::after { content: "+"; flex: 0 0 auto; color: var(--student-green); font-size: 1.15rem; line-height: 1; }
.register-code[open] summary::after { content: "−"; }
.register-code summary small { margin-left: auto; color: var(--student-muted); font-size: .7rem; font-weight: 600; }
.register-code-body { border-top: 1px solid var(--student-border); padding: 10px 12px 11px; }
.register-code-body label { display: grid; gap: 4px; color: var(--student-navy); font-size: .8rem; font-weight: 700; }
.register-code-body input { text-transform: uppercase; }
.register-code-body p { margin-top: 5px; color: var(--student-muted); font-size: .73rem; }

@media (max-width: 640px) {
  .auth-header-inner { min-height: 58px; }
  .auth-header .student-brand img { width: 124px; }
  .auth-main { place-items: start center; padding-block: 12px 18px; }
  .auth-card { border-radius: 18px; padding: 20px 18px; }
  .auth-heading { margin-bottom: 14px; }
}

@media (max-width: 420px) {
  .auth-header-link { padding-inline: 7px; font-size: .82rem; }
  .auth-card { padding: 16px 14px; }
  .auth-heading h1 { font-size: 1.55rem; }
  .auth-heading p { font-size: .8rem; }
  .auth-form input { min-height: 43px; padding-block: 8px; }
  .auth-submit { min-height: 44px; }
}

/* Estados de acceso y confirmaciones */
.student-status-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}
.student-status-card {
  width: min(100%, 500px);
  border: 1px solid var(--student-border);
  border-radius: 24px;
  background: #fff;
  padding: 34px;
  box-shadow: 0 12px 34px rgba(15, 26, 43, .07);
}
.student-status-brand { display: inline-flex; border-radius: 10px; }
.student-status-brand img { display: block; width: 156px; max-width: 100%; height: auto; }
.student-status-eyebrow {
  margin-top: 26px;
  color: var(--student-green);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.student-status-card h1 { margin-top: 5px; color: var(--student-navy); font-size: clamp(1.65rem, 5vw, 2rem); }
.student-status-intro { margin-top: 10px; color: var(--student-muted); font-size: .91rem; line-height: 1.65; }
.student-status-code {
  margin-top: 20px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: var(--student-green-soft);
  padding: 14px 16px;
}
.student-status-code span { display: block; color: #4b6655; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.student-status-code strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #14532d; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.15rem; }
.student-status-note { margin-top: 14px; color: var(--student-muted); font-size: .8rem; line-height: 1.55; }
.student-status-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 22px; }
.student-status-actions .student-btn { min-width: 0; }
.student-status-actions-stack { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.student-status-brand:focus-visible { outline: 3px solid rgba(21,128,61,.28); outline-offset: 2px; }

/* Elección inicial del apartado */
.section-choice-page { min-height: 100vh; }
.section-choice-nav { min-height: 68px; }
.section-choice-back {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 10px;
  padding: 8px 10px;
  color: #475569;
  font-size: .84rem;
  font-weight: 700;
}
.section-choice-back:hover { background: #f1f5f9; color: var(--student-navy); }
.section-choice-back:focus-visible,
.section-choice-option input:focus-visible + .section-choice-card { outline: 3px solid rgba(21,128,61,.24); outline-offset: 2px; }
.section-choice-main { padding-block: 28px 44px; }
.section-choice-heading { max-width: 700px; }
.section-choice-eyebrow { color: var(--student-green); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-choice-heading h1 { margin-top: 4px; color: var(--student-navy); font-size: clamp(1.7rem, 4vw, 2.2rem); }
.section-choice-heading > p:last-child { margin-top: 6px; color: var(--student-muted); font-size: .9rem; }
.section-choice-notice {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
  padding: 12px 14px;
  color: #854d0e;
  font-size: .82rem;
}
.section-choice-notice strong { color: #713f12; }
.section-choice-panel {
  margin-top: 18px;
  border: 1px solid var(--student-border);
  border-radius: 22px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 26, 43, .05);
}
.section-choice-panel-compact { max-width: 680px; }
.section-choice-error { margin-bottom: 14px; border: 1px solid #fecaca; border-radius: 11px; background: #fff7f7; padding: 10px 12px; color: #9f2424; font-size: .82rem; font-weight: 700; }
.section-choice-empty { border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; padding: 18px; color: var(--student-muted); font-size: .86rem; }
.section-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.section-choice-grid-single { grid-template-columns: minmax(0, 1fr); }
.section-choice-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.section-choice-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.section-choice-card {
  position: relative;
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 17px;
  background: #fff;
  padding: 18px 52px 18px 18px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.section-choice-option:hover .section-choice-card { border-color: #86efac; transform: translateY(-1px); }
.section-choice-option input:checked + .section-choice-card { border-color: var(--student-green); background: #fbfffc; box-shadow: 0 0 0 3px rgba(21,128,61,.1); }
.section-choice-option input:disabled + .section-choice-card { cursor: not-allowed; opacity: .48; transform: none; }
.section-choice-option input:checked:disabled + .section-choice-card { opacity: 1; cursor: default; }
.section-choice-check {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  color: transparent;
  font-size: .78rem;
  font-weight: 800;
}
.section-choice-option input:checked + .section-choice-card .section-choice-check { border-color: var(--student-green); background: var(--student-green); color: #fff; }
.section-choice-kicker { color: var(--student-green); font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.section-choice-card strong { margin-top: 5px; overflow-wrap: anywhere; color: var(--student-navy); font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.25rem; }
.section-choice-description { margin-top: 5px; color: var(--student-muted); font-size: .8rem; line-height: 1.5; }
.section-choice-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--student-border); }
.section-choice-actions button { cursor: pointer; }

@media (max-width: 680px) {
  .student-status-page { place-items: start center; padding: 14px; }
  .student-status-card { border-radius: 20px; padding: 24px 20px; }
  .student-status-eyebrow { margin-top: 22px; }
  .student-status-actions,
  .student-status-actions-stack { grid-template-columns: 1fr; }
  .section-choice-nav { min-height: 60px; }
  .section-choice-main { padding-block: 18px 28px; }
  .section-choice-panel { border-radius: 18px; padding: 14px; }
  .section-choice-grid { grid-template-columns: 1fr; }
  .section-choice-card { min-height: 124px; }
  .section-choice-actions { align-items: stretch; }
  .section-choice-actions .student-btn { width: 100%; }
}

@media (max-width: 390px) {
  .section-choice-back { padding-inline: 7px; font-size: .78rem; }
  .student-status-card { padding: 22px 16px; }
}
