/* Academia Tío Colque · Estilos de la plataforma (mobile-first desde 360 px, profundidad 3D sutil, azul marino y dorado). */

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-body);
  color: var(--text); background: var(--navy-950);
  background-image:
    radial-gradient(1100px 520px at 85% -10%, rgba(212,175,55,.14), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(31,91,255,.16), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.is-signed { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-400); text-underline-offset: 3px; }
a:hover { color: var(--gold-200); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-3); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: 1.1rem; color: var(--gold-200); }
p { margin: 0 0 var(--space-3); }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--text-muted); }
.txt-gold { color: var(--gold-400); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--gold-500); color: var(--text-dark); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); outline: none; }

/* ───────────── Encabezado ───────────── */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--gutter); padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(6,19,42,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,55,.22); box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: var(--tap-min); min-width: 0; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--font-title); font-size: 1.02rem; color: var(--gold-400); white-space: nowrap; }
.brand-text small { font-size: .72rem; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.points-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 40px;
  border-radius: var(--radius-pill); background: var(--surface-2); box-shadow: var(--bevel), var(--glow-gold);
  color: var(--gold-400); font-size: var(--fs-sm); white-space: nowrap;
}
.points-chip strong { color: var(--text); }
.points-chip small { display: none; color: var(--text-muted); }
.guest-actions { margin-left: auto; }

/* ───────────── Navegación inferior ───────────── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(18,48,90,.97), rgba(6,19,42,.98));
  border-top: 1px solid rgba(212,175,55,.28); box-shadow: 0 -8px 24px rgba(0,0,0,.35);
}
@media (min-width: 800px) { .bottom-nav { padding-left: calc((100% - 760px) / 2); padding-right: calc((100% - 760px) / 2); } }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-muted); text-decoration: none; font-size: .75rem; font-weight: 600; min-height: var(--tap-min);
  transition: color var(--dur-fast);
}
.bottom-nav a[aria-current="page"] { color: var(--gold-400); }
.bottom-nav a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(212,175,55,.6)); }

/* ───────────── Tarjetas y superficies 3D ───────────── */
.card {
  background: var(--surface-1); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-4);
  box-shadow: var(--bevel), var(--shadow-1); border: var(--border-soft);
}
.card-3d { position: relative; overflow: hidden; box-shadow: var(--bevel), var(--shadow-2); }
.card-3d::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gold-metal); opacity: .9;
}
.card-3d::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.18), transparent 70%); pointer-events: none;
}
.card-gold { background: linear-gradient(160deg, #1B3A66 0%, #12305A 100%); border: 1px solid rgba(212,175,55,.45); }
.card-inset { background: rgba(6,19,42,.55); border-radius: var(--radius-md); padding: var(--space-4); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); border: var(--border-soft); }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--gold-400); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.h-title { font-family: var(--font-title); font-size: var(--fs-2xl); font-weight: 700; color: var(--text); text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.lead { font-size: var(--fs-lg); color: var(--text-muted); }
.section-title { font-family: var(--font-title); font-size: var(--fs-xl); margin: var(--space-3) 0 2px; }
.section-sub { margin-bottom: var(--space-3); }
.page-head { padding-top: var(--space-2); }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap-min); color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.crumbs a:hover { color: var(--gold-400); }

/* ───────────── Botones ───────────── */
.btn {
  --btn-shadow: 0 4px 0 rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.25);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap-min);
  padding: 10px 20px; border-radius: var(--radius-pill); border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 var(--fs-base)/1.2 var(--font-body); letter-spacing: .01em;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), filter var(--dur-fast);
  box-shadow: var(--btn-shadow);
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: var(--shadow-press); }
.btn:disabled { cursor: not-allowed; opacity: .7; }
.btn-gold { background: var(--gold-metal); color: var(--text-dark); --btn-shadow: 0 4px 0 var(--gold-700), 0 10px 22px rgba(212,175,55,.25); }
.btn-gold:hover { color: var(--text-dark); filter: brightness(1.06); }
.btn-royal { background: var(--royal-metal); color: #fff; --btn-shadow: 0 4px 0 #062C99, 0 10px 20px rgba(31,91,255,.3); }
.btn-royal:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border: 1px solid rgba(212,175,55,.5); --btn-shadow: 0 3px 0 rgba(0,0,0,.35); }
.btn-ghost:hover { color: var(--gold-200); background: rgba(212,175,55,.08); }
.btn-google { background: #fff; color: #1f1f1f; --btn-shadow: 0 4px 0 #9aa4b2, 0 10px 20px rgba(0,0,0,.25); }
.btn-google:hover { color: #1f1f1f; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.08rem; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: var(--fs-sm); }
.btn-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: var(--surface-2); color: var(--gold-400); border: 1px solid rgba(212,175,55,.35);
  box-shadow: var(--bevel), 0 3px 0 rgba(0,0,0,.35); font-size: 1.3rem; font-weight: 700;
}
.btn-icon:active:not(:disabled) { transform: translateY(2px); box-shadow: var(--shadow-press); }
.btn-icon:disabled { opacity: .35; cursor: not-allowed; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
.spinner-lg { width: 36px; height: 36px; color: var(--gold-500); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; gap: var(--space-3); padding: var(--space-7) 0; color: var(--text-muted); text-align: center; }

/* ───────────── Chips ───────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; text-transform: none; }
.chip-sm { padding: 2px 8px; font-size: .74rem; }
.chip-gold { background: var(--gold-metal); color: var(--text-dark); }
.chip-royal { background: var(--royal-500); color: #fff; }
.chip-muted { background: rgba(132,148,171,.18); color: var(--text-muted); }
.g-need { background: rgba(31,91,255,.22); color: var(--royal-300); }
.g-want { background: rgba(242,193,78,.16); color: var(--warning); }
.g-save { background: rgba(47,191,113,.16); color: var(--success); }
.g-give { background: rgba(176,140,255,.18); color: var(--give); }

/* ───────────── Formularios ───────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--space-4); border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: var(--fs-sm); color: var(--text); padding: 0; }
.req { color: var(--gold-400); }
input, select {
  width: 100%; min-height: var(--tap-min); padding: 10px 14px; border-radius: var(--radius-sm);
  font: 500 1rem var(--font-body); color: var(--text); background: rgba(6,19,42,.7);
  border: 1px solid rgba(184,196,214,.3); box-shadow: inset 0 2px 4px rgba(0,0,0,.35);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
input::placeholder { color: #7F8DA3; }
input:focus, select:focus { outline: none; border-color: var(--gold-500); box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 0 0 3px rgba(212,175,55,.3); }
input[readonly] { opacity: .75; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold-400) 50%), linear-gradient(135deg, var(--gold-400) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.hint { color: var(--text-muted); font-size: .85rem; }
.phone-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: var(--fs-sm); cursor: pointer; min-height: var(--tap-min); padding-top: 8px; }
.check input { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; accent-color: var(--gold-500); margin-top: 1px; padding: 0; }
.check-terms { margin-bottom: var(--space-4); padding: var(--space-3); border-radius: var(--radius-sm); background: rgba(212,175,55,.06); border: 1px solid rgba(212,175,55,.25); }
.form-error { color: var(--error); font-weight: 600; font-size: var(--fs-sm); background: rgba(255,107,107,.08); padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255,107,107,.35); }
.input-unit { display: flex; align-items: center; gap: 8px; background: rgba(6,19,42,.7); border: 1px solid rgba(184,196,214,.3); border-radius: var(--radius-sm); padding: 0 12px; box-shadow: inset 0 2px 4px rgba(0,0,0,.35); }
.input-unit:focus-within { border-color: var(--gold-500); box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 0 0 3px rgba(212,175,55,.3); }
.input-unit input { border: 0; background: transparent; box-shadow: none; padding: 10px 0; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 0; }
.input-unit input:focus { box-shadow: none; }
.input-unit span { color: var(--gold-400); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }

/* ───────────── Acceso ───────────── */
.auth-card { max-width: 460px; width: 100%; margin: var(--space-3) auto 0; text-align: left; }
.auth-card h1 { font-family: var(--font-title); font-size: 1.8rem; }
.auth-mark { width: 72px; height: 72px; margin: 0 0 var(--space-2); filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.divider { display: flex; align-items: center; gap: 12px; margin: var(--space-4) 0; color: var(--text-muted); font-size: var(--fs-sm); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(184,196,214,.2); }
.auth-links { text-align: center; margin: var(--space-3) 0 0; font-size: var(--fs-sm); }
.auth-links a { display: inline-block; padding: 10px 2px; }
.legal-inline { margin-top: var(--space-4); font-size: .82rem; color: var(--text-muted); text-align: center; }

/* ───────────── Portada ───────────── */
.landing { display: flex; flex-direction: column; gap: var(--space-5); }
.landing-hero { text-align: center; padding-top: var(--space-2); }
.landing-logo { width: min(300px, 78vw); margin: 0 auto var(--space-4); filter: drop-shadow(0 14px 28px rgba(0,0,0,.55)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.display { font-family: var(--font-title); font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.display span { display: block; font-size: .5em; font-weight: 600; color: var(--text); -webkit-text-fill-color: var(--text); margin-top: 4px; }
.landing .lead { max-width: 560px; margin: 0 auto var(--space-5); font-size: 1.08rem; }
.cta-row { display: flex; flex-direction: column; gap: var(--space-3); max-width: 380px; margin: 0 auto; }
.mini-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.mini-ladder li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; font-weight: 600; font-size: var(--fs-sm);
  margin-left: calc((var(--i) - 1) * 3.2%); background: var(--surface-2); box-shadow: var(--bevel), 0 4px 0 #071528;
}
.mini-step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--gold-metal); color: var(--text-dark); font-weight: 800; }
.feature-grid { display: grid; gap: var(--space-3); }
.feature h2 { font-size: 1.1rem; color: var(--gold-200); }
.feature p { color: var(--text-muted); margin: 0; }
.feature-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }

/* ───────────── Panel ───────────── */
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.level-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--gold-metal); color: var(--text-dark); font-weight: 700; font-size: var(--fs-sm); box-shadow: 0 3px 0 var(--gold-700); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: var(--space-3) 0; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: var(--radius-md); background: rgba(6,19,42,.55); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.stat-value { font-size: 1.35rem; font-weight: 800; color: var(--gold-400); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .78rem; color: var(--text-muted); }
.goal { margin-bottom: var(--space-4); }
.goal-label { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; flex-wrap: wrap; }
.progress { height: 14px; border-radius: var(--radius-pill); background: rgba(6,19,42,.8); box-shadow: inset 0 2px 4px rgba(0,0,0,.5); overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; border-radius: inherit; transition: width var(--dur-slow) var(--ease-out); }
.progress-gold span { background: var(--gold-metal); box-shadow: 0 0 12px rgba(212,175,55,.5); }
.progress-royal span { background: var(--royal-metal); }

/* ───────────── Escalera 3D ───────────── */
.ladder-wrap { perspective: 1100px; }
.summit {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 12px auto; width: fit-content; max-width: 100%;
  border-radius: var(--radius-md); background: linear-gradient(160deg, #1B3A66, #0E2547); border: 1px dashed rgba(212,175,55,.5);
  color: var(--text-muted);
}
.summit img { width: 48px; height: 48px; filter: grayscale(.6) brightness(.8); }
.summit strong { display: block; color: var(--gold-200); font-family: var(--font-title); }
.summit small { font-size: .8rem; }
.summit.is-reached { border-style: solid; box-shadow: var(--glow-gold); color: var(--text); }
.summit.is-reached img { filter: drop-shadow(0 0 10px rgba(212,175,55,.8)); }
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; transform: rotateX(8deg); transform-origin: bottom; }
.step { margin-left: calc((var(--i) - 1) * 2.6%); margin-right: calc((9 - var(--i)) * 2.6%); animation: stepIn var(--dur-slow) var(--ease-out) both; animation-delay: calc((9 - var(--i)) * 45ms); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.step-face {
  position: relative; display: grid; grid-template-columns: 36px 30px 1fr auto; align-items: center; gap: 10px;
  min-height: 64px; padding: 10px 14px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--surface-2); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 7px 0 #071528, 0 14px 24px rgba(0,0,0,.4);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med);
}
a.step-face:hover { transform: translateY(-3px); color: var(--text); }
a.step-face:active { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 #071528; }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 800; background: rgba(6,19,42,.6); color: var(--text-muted); box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
.step-icon { font-size: 1.3rem; text-align: center; }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.step-text strong { font-size: 1.02rem; }
.step-text small { color: var(--text-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; color: var(--text-muted); }
.step-pct { font-weight: 800; color: var(--royal-300); font-size: .95rem; }
.step-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: var(--royal-metal); }
.step.is-approved .step-face { background: linear-gradient(160deg, #23477D, #142F58); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 7px 0 var(--gold-700), 0 14px 26px rgba(0,0,0,.4), 0 0 0 1px rgba(212,175,55,.55); }
.step.is-approved .step-num { background: var(--gold-metal); color: var(--text-dark); }
.step-badge { color: var(--gold-400); filter: drop-shadow(0 0 6px rgba(212,175,55,.6)); }
.step.is-available .step-face, .step.is-progress .step-face { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 7px 0 #062C99, 0 14px 24px rgba(0,0,0,.4), var(--glow-royal); }
.step.is-available .step-num, .step.is-progress .step-num { background: var(--royal-500); color: #fff; }
.step.is-progress .step-face, .step.is-available .step-face { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 7px 0 #062C99, 0 14px 24px rgba(0,0,0,.4), 0 0 0 2px rgba(111,160,255,.8), 0 0 30px rgba(31,91,255,.55); } }
.step.is-locked .step-face { background: linear-gradient(160deg, #13284A, #0D2140); color: var(--locked); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 0 #050F22, 0 10px 18px rgba(0,0,0,.35); }
.step.is-locked .step-text strong { color: var(--locked); }

/* ───────────── Certificados (panel) ───────────── */
.cert-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cert-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: rgba(6,19,42,.45); min-height: 56px; }
.cert-n { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: rgba(132,148,171,.2); font-weight: 800; font-size: .9rem; }
.cert-purchased .cert-n, .cert-available .cert-n { background: var(--gold-metal); color: var(--text-dark); }
.cert-name { flex: 1; font-weight: 600; min-width: 0; }
.cert-general { display: flex; flex-direction: column; gap: 10px; padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid rgba(212,175,55,.4); background: linear-gradient(160deg, rgba(212,175,55,.1), transparent); }
.cert-general small { display: block; color: var(--text-muted); }
.cert-general > .chip { align-self: flex-start; }
.exam-card h2, .cert-cta h2 { display: flex; align-items: center; gap: 8px; }
.exam-card.is-open { border: 1px solid rgba(212,175,55,.6); box-shadow: var(--bevel), var(--shadow-1), var(--glow-gold); }
.exam-card.is-passed { background: linear-gradient(160deg, #2A4A7A, #12305A); border: 1px solid var(--gold-500); }

/* ───────────── Módulo y lecciones ───────────── */
.module-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: var(--space-3) 0; }
.module-metrics > div { padding: 10px 12px; border-radius: var(--radius-md); background: rgba(6,19,42,.55); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.metric-label { display: block; font-size: .78rem; color: var(--text-muted); }
.metric-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric-value.ok { color: var(--gold-400); }
.verse-ref { display: inline-flex; gap: 6px; align-items: center; color: var(--gold-400); font-weight: 600; font-size: var(--fs-sm); margin: 0; }
.lessons { display: flex; flex-direction: column; gap: var(--space-3); }
.lesson-card { padding: var(--space-3); }
.lesson-head { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-height: 56px; padding: 4px; }
.lesson-head small { display: block; color: var(--text-muted); font-size: .8rem; }
.lesson-head strong { font-size: 1.05rem; }
.lesson-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--royal-metal); color: #fff; font-weight: 800; box-shadow: 0 3px 0 #062C99; }
.lesson-card.is-done .lesson-n { background: var(--gold-metal); color: var(--text-dark); box-shadow: 0 3px 0 var(--gold-700); }
.ex-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-link { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: var(--radius-sm); background: rgba(6,19,42,.45); color: var(--text); text-decoration: none; border: 1px solid transparent; transition: border-color var(--dur-fast), transform var(--dur-fast); }
.ex-link:hover { border-color: rgba(212,175,55,.45); color: var(--text); transform: translateX(2px); }
.ex-type { font-size: 1.2rem; text-align: center; }
.ex-title { display: flex; flex-direction: column; font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.ex-title small { color: var(--text-muted); font-weight: 500; font-size: .78rem; }
.ex-score { font-weight: 800; font-size: .9rem; padding: 4px 10px; border-radius: var(--radius-pill); background: rgba(132,148,171,.18); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ex-link.is-pass .ex-score { background: var(--gold-metal); color: var(--text-dark); }
.ex-link.is-low .ex-score { background: rgba(31,91,255,.25); color: var(--royal-300); }
.locked-state { text-align: center; }
.locked-state h1, .error-state h1 { font-family: var(--font-title); font-size: 1.6rem; }
.locked-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(132,148,171,.15); color: var(--locked); margin-bottom: var(--space-3); }

/* Lectura */
.lesson { display: flex; flex-direction: column; gap: var(--space-4); }
.objective { margin-top: var(--space-3); padding: 12px 14px; border-left: 4px solid var(--gold-500); background: rgba(212,175,55,.08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.objective-label { display: block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-400); }
.objective p { margin: 4px 0 0; }
.prose { font-size: 1.07rem; line-height: 1.75; }
.prose p { margin-bottom: var(--space-4); }
.prose h3 { font-family: var(--font-title); font-size: 1.3rem; margin-top: var(--space-5); }
.prose strong { color: var(--gold-200); }
.prose-list { padding-left: 1.3em; margin: 0 0 var(--space-4); }
.prose-list li { margin-bottom: 8px; }
.prose-list li::marker { color: var(--gold-400); font-weight: 700; }
.callout { padding: 14px 16px; border-radius: var(--radius-md); margin: 0 0 var(--space-4); border: 1px solid rgba(111,160,255,.35); background: rgba(31,91,255,.1); }
.callout p:last-child { margin: 0; }
.callout-title { font-weight: 800; color: var(--royal-300); margin-bottom: 4px !important; }
.callout-ilustrativo { border-color: rgba(212,175,55,.45); background: rgba(212,175,55,.08); }
.callout-ilustrativo .callout-title { color: var(--gold-400); }
.callout-alerta { border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.08); }
.callout-alerta .callout-title { color: var(--error); }
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-4); border-radius: var(--radius-sm); border: var(--border-soft); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
@media (max-width: 420px) { table { font-size: .8rem; } th, td { padding: 8px 5px !important; } caption { padding: 8px 6px; } .card .table-wrap { margin-inline: -6px; } }
caption { text-align: left; padding: 10px 12px; font-weight: 700; color: var(--gold-400); caption-side: top; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(184,196,214,.14); font-variant-numeric: tabular-nums; }
th { background: rgba(6,19,42,.6); color: var(--gold-200); font-size: .85rem; }
.verse { display: flex; gap: 12px; border: 1px solid rgba(212,175,55,.4); background: linear-gradient(160deg, rgba(212,175,55,.12), rgba(6,19,42,.4)); }
.verse-icon { color: var(--gold-400); padding-top: 4px; }
.verse blockquote { margin: 0; }
.verse p { font-family: var(--font-title); font-style: italic; font-size: 1.12rem; line-height: 1.6; }
.verse cite { color: var(--gold-400); font-style: normal; font-weight: 700; font-size: var(--fs-sm); }
.tag-illustrative { display: inline-block; margin: 0 0 var(--space-3); padding: 4px 10px; border-radius: 10px; background: rgba(212,175,55,.14); color: var(--gold-400); font-size: .78rem; font-weight: 700; }
.example { border: 1px dashed rgba(212,175,55,.5); }
.key-ideas ol { margin: 0; padding: 0; list-style: none; counter-reset: k; display: flex; flex-direction: column; gap: 10px; }
.key-ideas li { counter-increment: k; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.key-ideas li::before { content: counter(k); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--gold-metal); color: var(--text-dark); font-weight: 800; box-shadow: 0 3px 0 var(--gold-700); }
.key-ideas h2, .action h2 { display: flex; align-items: center; gap: 8px; color: var(--gold-200); }
.action-steps { margin: 0; padding-left: 1.3em; }
.action-steps li { margin-bottom: 8px; }
.action-steps li::marker { color: var(--gold-400); font-weight: 800; }
.complete-box { text-align: center; }
.done-msg { display: inline-flex; align-items: center; gap: 8px; color: var(--success); font-weight: 700; margin: 0; }
.pager { display: flex; justify-content: space-between; gap: var(--space-3); }

/* ───────────── Ejercicios ───────────── */
.best-line { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.ex-card { padding: var(--space-4) var(--space-3); }
.ex-submit { margin-top: var(--space-4); }
.q { border: 0; margin: 0 0 var(--space-5); padding: 0; min-width: 0; }
.q legend, .q > label { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin-bottom: var(--space-3); padding: 0; font-size: 1.02rem; line-height: 1.45; }
.q-n { flex: 0 0 28px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--royal-500); color: #fff; font-size: .85rem; font-weight: 800; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; min-height: 52px; padding: 12px 14px; border-radius: var(--radius-sm); cursor: pointer; background: rgba(6,19,42,.5); border: 1px solid rgba(184,196,214,.22); transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast); }
.option:hover { border-color: rgba(212,175,55,.5); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-muted); display: grid; place-items: center; transition: border-color var(--dur-fast); }
.option:has(input:checked) { border-color: var(--gold-500); background: rgba(212,175,55,.1); box-shadow: 0 0 0 1px var(--gold-500) inset; }
.option:has(input:checked) .option-mark { border-color: var(--gold-500); }
.option:has(input:checked) .option-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); }
.option:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.option-text { line-height: 1.45; }
.option.is-answer { border-color: var(--success) !important; background: rgba(47,191,113,.12) !important; }
.is-wrong .option:has(input:checked):not(.is-answer) { border-color: var(--error); background: rgba(255,107,107,.1); }
.q-feedback { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; line-height: 1.55; background: rgba(6,19,42,.6); border-left: 4px solid var(--text-muted); }
.is-correct .q-feedback { border-left-color: var(--success); }
.is-correct .q-feedback strong { color: var(--success); }
.is-wrong .q-feedback { border-left-color: var(--error); }
.is-wrong .q-feedback strong { color: var(--error); }
.is-partial .q-feedback { border-left-color: var(--warning); }
.is-partial .q-feedback strong { color: var(--warning); }

/* Caso */
.case-intro { margin-bottom: var(--space-4); }
.case-steps { list-style: none; margin: 0; padding: 0; }
.case-step-n { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 4px; }
.case-situation { font-weight: 600; }

/* Calculadora */
.calc { margin-bottom: var(--space-5); }
.calc-title { font-size: 1.1rem; color: var(--gold-200); }
.calc-scenario { color: var(--text-muted); font-size: .95rem; }
.calc-fields { display: grid; gap: 4px; }
.field-inline { margin-bottom: var(--space-3); }
.calc-out { display: grid; gap: 8px; margin: var(--space-3) 0; }
.calc-result { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(18,48,90,.7); font-size: .95rem; }
.calc-result strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-result.is-main { background: var(--gold-metal); color: var(--text-dark); box-shadow: 0 4px 0 var(--gold-700); }
.calc-result.is-main strong { font-size: 1.25rem; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding: 8px 0 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar small { font-size: .65rem; color: var(--text-muted); }
.bar-total { position: relative; width: 100%; display: flex; align-items: flex-end; border-radius: 6px 6px 2px 2px; background: var(--gold-metal); min-height: 2px; transition: height var(--dur-med) var(--ease-out); }
.bar-contrib { display: block; width: 100%; background: var(--royal-500); border-radius: 0 0 2px 2px; }
.chart-legend { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 var(--space-3); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-gold { background: var(--gold-500); }
.lg-royal { background: var(--royal-500); margin-left: 8px; }
.q-num.is-correct .input-unit { border-color: var(--success); }
.q-num.is-wrong .input-unit { border-color: var(--error); }

/* Presupuesto */
.budget { display: flex; flex-direction: column; gap: var(--space-4); }
.budget-income { display: flex; flex-direction: column; gap: 2px; }
.budget-income strong { font-size: 1.6rem; color: var(--gold-400); font-variant-numeric: tabular-nums; }
.budget-income small { color: var(--text-muted); }
.budget-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.budget-cat { padding: 12px; border-radius: var(--radius-sm); background: rgba(6,19,42,.45); }
.budget-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.budget-cat-head label { font-weight: 700; }
.budget-cat-head .chip { white-space: nowrap; flex: 0 0 auto; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; margin-top: 6px; }
.budget-summary { position: sticky; bottom: calc(var(--nav-h) + 8px); z-index: 5; display: flex; flex-direction: column; gap: 10px; background: rgba(6,19,42,.95); backdrop-filter: blur(6px); box-shadow: 0 -6px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(212,175,55,.3); }
.budget-left { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.budget-left strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--warning); }
.budget-left.is-zero strong { color: var(--success); }
.budget-left.is-over strong { color: var(--error); }
.budget-group .bg-row { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; flex-wrap: wrap; }
.budget-group small { color: var(--text-muted); }
.budget-group .ok { color: var(--success); display: inline-flex; vertical-align: middle; }
.budget-group .warn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--error); color: var(--navy-950); font-weight: 900; font-size: .75rem; }
.bg-bar { position: relative; height: 10px; border-radius: 6px; background: rgba(184,196,214,.15); margin-top: 4px; }
.bg-bar span { display: block; height: 100%; border-radius: 6px; transition: width var(--dur-med) var(--ease-out); }
.bg-bar i { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--text); border-radius: 1px; }
.grp-need .bg-bar span { background: var(--royal-500); }
.grp-want .bg-bar span { background: var(--warning); }
.grp-save .bg-bar span { background: var(--success); }
.grp-give .bg-bar span { background: var(--give); }
.rule-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rule-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(6,19,42,.5); font-size: .95rem; }
.rule-list li.ok > span:first-child { color: var(--success); font-weight: 900; }
.rule-list li.bad > span:first-child { color: var(--error); font-weight: 900; }

/* Clasificar (arrastrar y soltar) */
.dnd { display: flex; flex-direction: column; gap: var(--space-3); }
.zone { border-radius: var(--radius-md); padding: 12px; border: 2px dashed rgba(184,196,214,.3); background: rgba(6,19,42,.4); transition: border-color var(--dur-fast), background var(--dur-fast); }
.zone-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 44px; }
.zone-count { font-size: .8rem; color: var(--text-muted); }
.zone-pool.is-empty { opacity: .7; }
.zone-pool.is-empty .zone-items { min-height: 0; }
.zone-pool.is-empty .zone-head { margin-bottom: 0; }
.zone-bin { border-color: rgba(212,175,55,.45); background: linear-gradient(160deg, rgba(212,175,55,.06), rgba(6,19,42,.4)); }
.zone.is-over { border-color: var(--gold-400); background: rgba(212,175,55,.14); }
.zone-items { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; }
.bins { display: grid; gap: var(--space-3); }
.bins-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
.bins-2 .zone { padding: 10px 8px; }
.bins-2 .zone-head { flex-direction: column; align-items: stretch; }
.bins-2 .place-btn { width: 100%; }
.dnd-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  font: 600 .95rem/1.3 var(--font-body); color: var(--text); text-align: left; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--surface-2); border: 1px solid rgba(184,196,214,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 #071528, 0 8px 14px rgba(0,0,0,.3);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.dnd-chip.is-selected { border-color: var(--gold-400); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 var(--gold-700), 0 0 0 3px rgba(212,175,55,.35); transform: translateY(-2px); }
.dnd-chip.is-dragging { opacity: .35; }
.dnd-chip.just-dropped { animation: drop .3s var(--ease-out); }
@keyframes drop { from { transform: scale(1.08); } }
.dnd-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: .95; cursor: grabbing; box-shadow: 0 18px 30px rgba(0,0,0,.5), 0 0 0 2px var(--gold-400); }
.dnd-chip.is-correct { border-color: var(--success); }
.dnd-chip.is-wrong { border-color: var(--error); }
.dnd-chip .mark { font-weight: 900; }
.dnd-chip.is-correct .mark { color: var(--success); }
.dnd-chip.is-wrong .mark { color: var(--error); }
.dnd-chip:disabled { cursor: default; opacity: 1; }
.classify-feedback { margin-top: var(--space-4); }
.classify-feedback ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.classify-feedback li { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(6,19,42,.5); border-left: 4px solid var(--success); font-size: .95rem; }
.classify-feedback li.bad { border-left-color: var(--error); }

/* Ordenar */
.order-criterion { margin-bottom: var(--space-3); font-size: .95rem; }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.order-item {
  display: grid; grid-template-columns: 22px 30px 1fr auto; grid-template-areas: "h p t b" "f f f f"; align-items: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 0 #071528; transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.order-handle { grid-area: h; color: var(--text-muted); cursor: grab; touch-action: none; font-weight: 900; letter-spacing: -2px; padding: 12px 0; text-align: center; }
.order-pos { grid-area: p; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--gold-metal); color: var(--text-dark); font-weight: 800; }
.order-text { grid-area: t; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.order-text small { color: var(--text-muted); font-size: .82rem; }
.order-btns { grid-area: b; display: flex; flex-direction: column; gap: 4px; }
.order-fb { grid-area: f; font-size: .9rem; padding: 8px 10px; border-radius: 8px; background: rgba(6,19,42,.6); }
.order-item.is-moving { transform: scale(1.02); box-shadow: 0 0 0 2px var(--gold-400); }
.order-item.is-dragging { box-shadow: 0 0 0 2px var(--gold-400), 0 14px 26px rgba(0,0,0,.45); transform: scale(1.02); z-index: 2; }
.order-item.is-correct { box-shadow: inset 0 0 0 2px var(--success); }
.order-item.is-wrong { box-shadow: inset 0 0 0 2px var(--error); }
.order-item.is-locked .order-handle { visibility: hidden; }

/* Resultado */
.result-card { border: 1px solid rgba(212,175,55,.45); outline: none; }
.result-top { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-3); }
.result-top h2 { font-family: var(--font-title); }
.result-top > div:last-child { flex: 1; min-width: 180px; }
.result-top p { margin: 0 0 4px; }
.result-summary { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(6,19,42,.5); }
.result-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.score-ring { position: relative; width: var(--size); height: var(--size); flex: 0 0 var(--size); }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 10; }
.score-ring .track { stroke: rgba(184,196,214,.15); }
.score-ring .value { stroke: var(--royal-300); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); }
.score-ring.is-pass .value { stroke: var(--gold-500); filter: drop-shadow(0 0 6px rgba(212,175,55,.6)); }
.score-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-num small { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-top: 34px; position: absolute; }

/* Examen */
.exam-facts { padding-left: 1.2em; }
.exam-facts li { margin-bottom: 6px; }
.exam-bar { position: sticky; top: 64px; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: var(--radius-md); background: rgba(6,19,42,.95); border: 1px solid rgba(212,175,55,.4); font-weight: 700; color: var(--gold-200); }
.exam-bar #clock { font-variant-numeric: tabular-nums; font-size: 1.15rem; color: var(--text); }
.exam-bar #clock.is-low { color: var(--error); }

/* ───────────── Ranking ───────────── */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: "p n s" "b b b"; align-items: center; gap: 6px 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-1); box-shadow: var(--bevel), 0 4px 0 #071528; }
.rank-row .progress { grid-area: b; height: 6px; margin: 0; }
.rank-pos { grid-area: p; font-weight: 800; font-size: 1.1rem; text-align: center; color: var(--text-muted); }
.rank-row.is-podium .rank-pos { font-size: 1.5rem; }
.rank-name { grid-area: n; display: flex; flex-direction: column; min-width: 0; }
.rank-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name small { color: var(--text-muted); font-size: .8rem; }
.rank-points { grid-area: s; font-weight: 800; color: var(--gold-400); font-variant-numeric: tabular-nums; text-align: right; }
.rank-points small { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 600; }
.rank-row.is-me { border: 1px solid var(--royal-300); box-shadow: var(--bevel), 0 4px 0 #062C99, var(--glow-royal); }
.rank-sep { margin: var(--space-3) 0 6px; }

/* ───────────── Avisos, modal, celebración ───────────── */
.toasts { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: var(--radius-md); background: var(--navy-800); color: var(--text); font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-2); border-left: 4px solid var(--royal-300); opacity: 0; transform: translateY(12px); transition: opacity var(--dur-med), transform var(--dur-med) var(--ease-out); pointer-events: auto; }
.toast.show { opacity: 1; transform: none; }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-warning { border-left-color: var(--warning); }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--gutter); background: rgba(3,10,25,.72); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur-med); }
.modal-backdrop.show { opacity: 1; }
.modal { width: min(440px, 100%); max-height: 90vh; overflow: auto; padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--bevel), var(--shadow-2); border: 1px solid rgba(212,175,55,.45); transform: translateY(16px) scale(.97); transition: transform var(--dur-med) var(--ease-out); }
.modal-backdrop.show .modal { transform: none; }
.modal h2 { font-family: var(--font-title); }
.modal-actions { display: flex; flex-direction: column-reverse; gap: var(--space-3); margin-top: var(--space-4); }
.modal-celebration .modal { text-align: center; }
.celebration-badge { width: 96px; height: 96px; margin: 0 auto var(--space-3); border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; background: var(--gold-metal); box-shadow: 0 6px 0 var(--gold-700), 0 0 40px rgba(212,175,55,.6); animation: pop .6s var(--ease-out); }
.celebration-badge-name { color: var(--gold-200); }
@keyframes pop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 85; pointer-events: none; width: 100%; height: 100%; }

/* ───────────── Certificados ───────────── */
.owned-cert { display: flex; flex-direction: column; gap: var(--space-4); }
.cert-preview {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 20px 16px; border-radius: var(--radius-md); background: linear-gradient(160deg, #12305A, #06132A);
  border: 2px solid var(--gold-500); box-shadow: inset 0 0 0 5px #0B1F3A, inset 0 0 0 6px rgba(184,148,42,.7), var(--shadow-1);
}
.cert-preview img { width: 44px; height: 44px; }
.cp-kicker { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); font-weight: 700; }
.cp-name { font-family: var(--font-title); font-size: 1.35rem; color: var(--text); line-height: 1.2; }
.cp-title { font-family: var(--font-title); color: var(--gold-200); font-size: .95rem; }
.cp-code { font-size: .72rem; color: var(--text-muted); letter-spacing: .06em; margin-top: 4px; }
.cert-data { display: grid; gap: 8px; margin: 0; }
.cert-data div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: rgba(6,19,42,.5); }
.cert-data dt { color: var(--text-muted); font-size: var(--fs-sm); }
.cert-data dd { margin: 0; font-weight: 700; text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.owned-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.test-flag { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.4); color: var(--error); font-weight: 700; font-size: var(--fs-sm); }
.buy-card { display: flex; flex-direction: column; gap: var(--space-3); }
.buy-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.buy-top > div { padding: 12px; border-radius: var(--radius-md); background: rgba(6,19,42,.55); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.price-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--gold-400); font-variant-numeric: tabular-nums; }
.buy-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.buy-points li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: .95rem; }
.buy-points svg { color: var(--success); margin-top: 4px; }
.pp-buttons { min-height: 120px; padding: 12px; border-radius: var(--radius-md); background: #fff; transition: opacity var(--dur-med); }
.pp-buttons .loading-block { color: #475569; padding: var(--space-4) 0; }
.pp-buttons .form-error { margin-bottom: 8px; }
.pp-buttons.is-busy { opacity: .5; pointer-events: none; }

/* ───────────── Página de verificación ───────────── */
.verify-form { display: flex; flex-direction: column; gap: var(--space-3); }
.verify-result { text-align: center; }
.verify-badge { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; font-size: 2.4rem; margin-bottom: var(--space-3); }
.verify-result.is-valid .verify-badge { background: rgba(47,191,113,.16); color: var(--success); box-shadow: 0 0 0 2px var(--success), 0 0 30px rgba(47,191,113,.35); }
.verify-result.is-invalid .verify-badge { background: rgba(255,107,107,.14); color: var(--error); box-shadow: 0 0 0 2px var(--error); }
.verify-result h2 { font-family: var(--font-title); font-size: 1.5rem; }
.verify-result .cert-data { text-align: left; margin: var(--space-4) 0; }

/* ───────────── Pie ───────────── */
.site-footer { max-width: var(--content-max); margin: var(--space-5) auto 0; padding: var(--space-5) var(--gutter); color: var(--text-muted); font-size: var(--fs-sm); text-align: center; border-top: 1px solid rgba(184,196,214,.14); }
.legal-main { color: var(--text); }
/* Pie de página: logo, frase, enlaces y derechos. El aviso legal solo se muestra a alumnos con sesión (panel). */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.student-legal { display: none; width: 100%; padding: 12px 14px; border-radius: var(--radius-md, 14px); background: rgba(212,175,55,.06); border: 1px solid rgba(212,175,55,.22); }
.student-legal .legal-main { margin: 0; font-size: var(--fs-xs); line-height: 1.55; }
body.is-signed .student-legal { display: block; }
.foot-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.foot-logo img { width: 132px; height: auto; filter: drop-shadow(0 6px 18px rgba(212,175,55,.25)); }
.foot-motto { margin: 0; font-family: var(--font-title); font-style: italic; font-size: 1.05rem; color: var(--gold-200); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.foot-rights { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.foot-rights span[aria-hidden] { color: var(--gold-600); margin: 0 4px; }
.foot-note { margin: 0; }
.legal-main strong { color: var(--gold-400); }
.noscript { padding: 20px; text-align: center; }
.error-state { text-align: center; }

/* ───────────── Pantallas más anchas ───────────── */
@media (min-width: 560px) {
  .cta-row { flex-direction: row; justify-content: center; max-width: none; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .result-actions, .modal-actions { flex-direction: row; justify-content: flex-end; }
  .bins-2 .zone-head { flex-direction: row; align-items: center; }
  .bins-2 .place-btn { width: auto; }
  .bins-3 { grid-template-columns: repeat(3, 1fr); }
  .cert-general { flex-direction: row; align-items: center; justify-content: space-between; }
  .owned-actions { flex-direction: row; flex-wrap: wrap; }
  .points-chip small { display: inline; }
  .card { padding: var(--space-6) var(--space-5); }
  .ex-card { padding: var(--space-5); }
  .calc-fields { grid-template-columns: 1fr 1fr; column-gap: var(--space-3); }
}
@media (max-width: 380px) {
  .step-face { grid-template-columns: 32px 24px 1fr auto; gap: 8px; padding: 10px; }
  .step-num { width: 32px; height: 32px; }
  .brand-text small { display: none; }
  .stat-value { font-size: 1.15rem; }
}

/* ───────────── Lección interactiva por pasos ───────────── */
.lsteps { margin-top: var(--space-4); }
.lsteps-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; font-size: var(--fs-sm); }
.lsteps-top span { color: var(--gold-400); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-xs); }
.lsteps-top strong { color: var(--text); }
.lsteps-dots { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.lsteps-dots button { width: 100%; min-height: 28px; padding: 10px 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.lsteps-dots button::before { content: ''; display: block; height: 6px; border-radius: 4px; background: rgba(132,148,171,.3); transition: background var(--dur-fast); }
.lsteps-dots button.is-done::before { background: var(--gold-600); }
.lsteps-dots button.is-current::before { background: var(--gold-400); box-shadow: 0 0 10px rgba(212,175,55,.6); }
.lsteps-dots button:disabled { cursor: default; }
.reader-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--space-3); }
.reader-progress { font-size: var(--fs-xs); color: var(--text-muted); }
.is-reading { background: rgba(212,175,55,.14); box-shadow: 0 0 0 6px rgba(212,175,55,.14); border-radius: 6px; transition: background var(--dur-fast); }
.step-body { display: flex; flex-direction: column; gap: var(--space-4); outline: none; }
.step-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-3); margin-top: var(--space-2); }
.step-nav .btn { min-height: 52px; }
.step-hint { text-align: center; min-height: 1.4em; margin: 0; }

.checkpoint { border: 1px solid rgba(111,160,255,.45); background: linear-gradient(160deg, #163a6e 0%, #102a4e 100%); }
.checkpoint.is-correct { border-color: rgba(47,191,113,.55); }
.check-q { font-size: 1.08rem; line-height: 1.4; }
.check-opts { display: flex; flex-direction: column; gap: 8px; margin: var(--space-3) 0; }
.check-opt { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; width: 100%; min-height: var(--tap-min); padding: 10px 12px; text-align: left;
  border-radius: var(--radius-md); border: 1px solid rgba(184,196,214,.28); background: rgba(6,19,42,.55); color: var(--text); font: 500 1rem/1.4 var(--font-body); cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast); }
.check-opt:hover:not(:disabled) { border-color: var(--gold-500); transform: translateY(-1px); }
.check-opt:disabled { cursor: default; opacity: .85; }
.opt-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--gold-400); font-weight: 800; box-shadow: var(--bevel); }
.check-opt.is-right { border-color: var(--success); background: rgba(47,191,113,.14); opacity: 1; }
.check-opt.is-right .opt-mark { background: var(--success); color: #062C17; }
.check-opt.is-wrong { border-color: var(--error); background: rgba(255,107,107,.1); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .check-opt.is-wrong { animation: none; } }
.fb-ok, .fb-bad { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.fb-ok { background: rgba(47,191,113,.12); color: #BFF0D4; border: 1px solid rgba(47,191,113,.4); }
.fb-bad { background: rgba(255,107,107,.08); color: #FFD0D0; border: 1px solid rgba(255,107,107,.35); }
.fb-ok svg { vertical-align: -3px; color: var(--success); }

.practice .calc { margin: var(--space-3) 0; }
.challenge { margin-top: var(--space-4); }
.challenge h3 { margin-bottom: 6px; }
.challenge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.challenge-fb { margin: 10px 0 0; min-height: 1.4em; }
.challenge-fb:empty { display: none; }
textarea { width: 100%; min-height: 72px; padding: 10px 14px; border-radius: var(--radius-sm); font: 500 1rem/1.5 var(--font-body); color: var(--text);
  background: rgba(6,19,42,.7); border: 1px solid rgba(184,196,214,.3); box-shadow: inset 0 2px 4px rgba(0,0,0,.35); resize: vertical; }
textarea:focus { outline: none; border-color: var(--gold-500); box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 0 0 3px rgba(212,175,55,.3); }
textarea::placeholder { color: #7F8DA3; }
.action-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.action-checks .check { padding: 8px 0; }
.action-checks input:checked + .opt-text { text-decoration: line-through; text-decoration-color: rgba(11,31,58,.5); opacity: .8; }
.card-gold .action-checks .check { color: var(--text); }
.test-intro h2 { font-family: var(--font-title); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }

/* ───────────── Calculadora: interés simple vs. compuesto (panel del alumno) ───────────── */
.ic-hero { overflow: hidden; }
.ic-lead { color: var(--text-muted); margin-bottom: var(--space-4); }
.ic-stage { position: relative; height: 240px; margin: 0 -8px; display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 18%;
  padding: 34px 16% 34px; perspective: 900px; }
.ic-floor { position: absolute; left: 6%; right: 6%; bottom: 14px; height: 56px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,.32), rgba(31,91,255,.12) 45%, transparent 70%); filter: blur(2px); transform: rotateX(62deg); }
.ic-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; z-index: 1; }
.ic-bar { --d: 18px; position: relative; width: 100%; max-width: 92px; height: var(--h, 10%); min-height: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 75%, #fff) 100%);
  border-radius: 3px 3px 0 0; box-shadow: 0 18px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35);
  transition: height 700ms var(--ease-out); }
.ic-col { --h: 10%; }
.ic-col .ic-bar { height: var(--h); }
.ic-top { position: absolute; left: 0; right: 0; top: 0; height: var(--d); transform-origin: bottom left; transform: translateY(-100%) skewX(-45deg) translateX(calc(var(--d) / 2));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, #fff), color-mix(in srgb, var(--c) 85%, #fff)); border-radius: 2px; }
.ic-side { position: absolute; top: 0; bottom: 0; right: 0; width: var(--d); transform-origin: top left; transform: translateX(100%) skewY(-45deg) translateY(calc(var(--d) / 2));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 60%, #000), color-mix(in srgb, var(--c) 40%, #000)); }
.ic-shine { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.ic-shine::after { content: ''; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: rotate(18deg); animation: ic-shine 4.5s ease-in-out infinite; }
@keyframes ic-shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.ic-tag { position: absolute; bottom: calc(var(--h) + 22px); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap;
  font-size: .95rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); transition: bottom 700ms var(--ease-out); }
.ic-name { position: absolute; bottom: -26px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.ic-col-compound .ic-name { color: var(--gold-400); }
.ic-badge { position: relative; width: max-content; max-width: 100%; margin: 0 auto var(--space-2); display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--gold-metal); color: var(--text-dark); box-shadow: 0 6px 18px rgba(212,175,55,.35), var(--bevel); white-space: nowrap; z-index: 2; }
.ic-end { font-size: 11px; font-weight: 700; fill: var(--text); font-family: var(--font-body); paint-order: stroke; stroke: #0E2547; stroke-width: 3px; }
.ic-badge span { font-weight: 800; font-size: .98rem; line-height: 1.1; }
.ic-badge small { font-size: .7rem; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ic-bar, .ic-tag { transition: none; } .ic-shine::after { animation: none; } }

.ic-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.chip-btn { min-height: 40px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid rgba(212,175,55,.5); background: rgba(212,175,55,.08);
  color: var(--gold-200); font: 600 var(--fs-sm) var(--font-body); cursor: pointer; transition: background var(--dur-fast), transform var(--dur-fast); }
.chip-btn:hover { background: rgba(212,175,55,.18); transform: translateY(-1px); }
.ic-field { margin: 0 0 var(--space-4); border: 0; padding: 0; min-width: 0; }
.ic-field-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ic-field-top label { font-weight: 600; font-size: var(--fs-sm); }
.ic-num { width: 9.5rem; flex: 0 0 auto; }
.ic-num input { text-align: right; }
.ic-range { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; min-height: 0; padding: 0; background: transparent; border: 0; box-shadow: none; cursor: pointer; }
.ic-range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--gold-500) var(--p, 0%), rgba(6,19,42,.8) var(--p, 0%)); box-shadow: inset 0 2px 4px rgba(0,0,0,.5); }
.ic-range::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--gold-500) var(--p, 0%), rgba(6,19,42,.8) var(--p, 0%)); }
.ic-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--gold-metal); border: 2px solid #fff3; box-shadow: 0 3px 0 var(--gold-700), 0 6px 14px rgba(0,0,0,.45); }
.ic-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-500); border: 2px solid #fff3; box-shadow: 0 3px 0 var(--gold-700); }
.ic-range:focus-visible { box-shadow: none; }
.ic-range:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.ic-period legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: 8px; padding: 0; }
.seg-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: rgba(6,19,42,.7); box-shadow: inset 0 2px 4px rgba(0,0,0,.45); }
.seg-pills label { position: relative; cursor: pointer; }
.seg-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-pills span { display: grid; place-items: center; min-height: 40px; border-radius: var(--radius-pill); font-weight: 700; font-size: var(--fs-sm); color: var(--text-muted); transition: background var(--dur-fast), color var(--dur-fast); }
.seg-pills input:checked + span { background: var(--gold-metal); color: var(--text-dark); box-shadow: var(--bevel); }
.seg-pills input:focus-visible + span { box-shadow: var(--focus-ring); }

.ic-results { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.ic-card { position: relative; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-1); box-shadow: var(--bevel), var(--shadow-2); overflow: hidden; min-width: 0; }
.ic-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.ic-card-simple::before { background: #4F86EE; }
.ic-card-compound { border: 1px solid rgba(212,175,55,.5); background: linear-gradient(160deg, #1d3f70 0%, #12305A 100%); }
.ic-card-compound::before { background: var(--gold-metal); }
.ic-card-k { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.ic-card-compound .ic-card-k { color: var(--gold-400); }
.ic-card-v { margin: 0 0 var(--space-3); font-size: clamp(1.15rem, 5vw, 1.7rem); font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.15; }
.ic-card dl { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ic-card dl div { display: flex; flex-direction: column; }
.ic-card dt { font-size: .74rem; color: var(--text-muted); }
.ic-card dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .92rem; }

.ic-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; padding: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.ic-legend i, .ic-tip i, .ic-learn h3 i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ic-legend i.dash, .ic-tip i.dash { background: repeating-linear-gradient(90deg, #8494AB 0 4px, transparent 4px 7px); }
.ic-chart { position: relative; width: 100%; touch-action: pan-y; }
.ic-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ic-grid { stroke: rgba(184,196,214,.12); stroke-width: 1; }
.ic-axis { fill: var(--text-muted); font-size: 11px; font-family: var(--font-body); }
.ic-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-line-main { stroke-width: 3; }
.ic-cross { stroke: rgba(243,227,168,.5); stroke-width: 1; }
.ic-dots circle { stroke: #0B1F3A; stroke-width: 2; }
.ic-hit { cursor: crosshair; }
.ic-tip { position: absolute; top: 6px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: rgba(6,19,42,.95); border: 1px solid rgba(212,175,55,.45); box-shadow: var(--shadow-2); font-size: .78rem; pointer-events: none; white-space: nowrap; z-index: 3; }
.ic-tip b { font-variant-numeric: tabular-nums; margin-left: 4px; }
.ic-table { margin-top: var(--space-3); }
.ic-table summary { cursor: pointer; color: var(--gold-400); font-weight: 600; min-height: var(--tap-min); display: flex; align-items: center; }
.ic-learn-grid { display: grid; gap: var(--space-4); }
@media (min-width: 620px) { .ic-learn-grid { grid-template-columns: 1fr 1fr; } }
.ic-learn h3 { font-size: 1rem; }
.ic-formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: rgba(6,19,42,.6); border: var(--border-soft); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--gold-200); }
.ic-double { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; padding: var(--space-3); border-radius: var(--radius-md); background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.3); font-size: var(--fs-sm); }
.ic-double:empty { display: none; }

/* Acceso desde el panel */
.tool-card { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-3); align-items: center; text-decoration: none; color: var(--text); }
.tool-card:hover { color: var(--text); border-color: rgba(212,175,55,.6); }
.tool-icon { position: relative; width: 64px; height: 56px; display: flex; align-items: flex-end; gap: 6px; padding: 0 8px; }
.tool-icon i { flex: 1; border-radius: 3px 3px 0 0; box-shadow: 4px 0 0 rgba(0,0,0,.35); }
.tool-icon i:first-child { height: 45%; background: linear-gradient(90deg, #3b6fd6, #4F86EE); }
.tool-icon i:last-child { height: 100%; background: var(--gold-metal); }
.tool-card h2 { font-size: 1.05rem; margin: 0 0 2px; }
.tool-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
/* Navegadores sin color-mix(): colores planos con brillo (la escena 3D se mantiene) */
@supports not (color: color-mix(in srgb, red, blue)) {
  .ic-bar { background: var(--c); }
  .ic-top { background: var(--c); filter: brightness(1.35); }
  .ic-side { background: var(--c); filter: brightness(.55); }
}

/* ───────── Mentoría personalizada (panel del alumno) ───────── */
.mentor-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-3); align-items: center; text-decoration: none; color: var(--text);
  background: radial-gradient(120% 140% at 100% 0%, rgba(212,175,55,.22), transparent 55%), var(--surface-1); border: 1px solid rgba(212,175,55,.5); }
.mentor-card:hover { color: var(--text); border-color: rgba(243,227,168,.8); box-shadow: var(--bevel), var(--shadow-2), 0 0 28px rgba(212,175,55,.25); }
.mentor-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.12) 50%, transparent 65%); transform: translateX(-120%); animation: mentorSweep 5s ease-in-out infinite; pointer-events: none; }
@keyframes mentorSweep { 55%, 100% { transform: translateX(120%); } }
.mentor-card-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.7rem; background: var(--gold-metal); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 8px 18px rgba(212,175,55,.3); }
.mentor-card .eyebrow { margin: 0 0 2px; }
.mentor-card h2 { font-size: 1.08rem; margin: 0 0 2px; color: var(--gold-200); }
.mentor-card p { margin: 0 0 6px; font-size: .92rem; color: var(--text-muted); }
.mentor-card-price { display: inline-block; font-size: .82rem; font-weight: 800; color: var(--text-dark); background: var(--gold-metal); padding: 3px 10px; border-radius: 999px; }
.mentor-card > svg { color: var(--gold-400); }
.btn-wa { background: linear-gradient(160deg, #12803F, #0B6B33); color: #fff; --btn-shadow: 0 4px 0 #064A22, 0 10px 22px rgba(37,211,102,.25); gap: 8px; }
.btn-wa:hover { color: #fff; filter: brightness(1.05); }
.mentor-owned h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.mentor-owned svg { color: var(--success); }
.a-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mentor-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: var(--border-soft); }
.mentor-row small { display: block; color: var(--text-muted); font-size: .82rem; }
.mentor-done { text-align: center; display: flex; flex-direction: column; gap: var(--space-3); align-items: stretch; }
.mentor-done-ic { font-size: 3rem; }
.mentor-done p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .mentor-card::after { animation: none; } }

/* ═════════ Oferta de Mentoría (panel del alumno) → enlace externo a mentoria.tiocolque.com ═════════ */
@property --mo-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.mentor-offer { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr; gap: 14px; padding: 22px 18px 20px; border-radius: 24px; overflow: hidden;
  text-decoration: none; color: var(--text); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  background: radial-gradient(90% 80% at 100% 0%, rgba(243,227,168,.28), transparent 55%), radial-gradient(80% 90% at 0% 100%, rgba(31,91,255,.45), transparent 60%), linear-gradient(150deg, #1B4177 0%, #0B1F3A 60%, #06132A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.35), 0 8px 0 #050f22, 0 22px 48px rgba(0,0,0,.55), 0 0 42px rgba(212,175,55,.32); }
/* Borde dorado animado que gira alrededor de la tarjeta */
.mentor-offer::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 2px; border-radius: inherit;
  background: conic-gradient(from var(--mo-angle), #8A6D1C, #F3E3A8 12%, #D4AF37 25%, #6FA0FF 40%, #D4AF37 55%, #FFF6D2 65%, #B8942A 80%, #8A6D1C);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: moSpin 6s linear infinite; }
@keyframes moSpin { to { --mo-angle: 360deg; } }
/* Brillo que barre la tarjeta */
.mentor-offer::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-120%); animation: moSweep 4.5s ease-in-out infinite; }
@keyframes moSweep { 55%, 100% { transform: translateX(120%); } }
.mentor-offer:hover, .mentor-offer:focus-visible { color: var(--text); transform: perspective(900px) rotateX(3deg) translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -3px 0 rgba(0,0,0,.35), 0 11px 0 #050f22, 0 30px 60px rgba(0,0,0,.6), 0 0 60px rgba(212,175,55,.5); }
.mentor-offer:focus-visible { outline: none; box-shadow: var(--focus-ring), 0 0 60px rgba(212,175,55,.5); }
.mentor-offer:active { transform: perspective(900px) translateY(4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 0 #050f22, 0 10px 24px rgba(0,0,0,.5); }
.mo-glow { position: absolute; z-index: -1; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(243,227,168,.45), transparent); animation: moBreath 4s ease-in-out infinite; }
@keyframes moBreath { 50% { opacity: .5; scale: 1.15; } }
.mo-spark { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mo-spark i { position: absolute; z-index: 0; width: 4px; height: 4px; border-radius: 50%; background: #FFF6D2; box-shadow: 0 0 10px 3px rgba(243,227,168,.85); opacity: 0; animation: moTwinkle 2.8s ease-in-out infinite; }
.mo-spark i:nth-child(1) { left: 12%; top: 14%; } .mo-spark i:nth-child(2) { left: 88%; top: 62%; animation-delay: .6s; }
.mo-spark i:nth-child(3) { left: 70%; top: 10%; animation-delay: 1.2s; } .mo-spark i:nth-child(4) { left: 30%; top: 88%; animation-delay: 1.8s; } .mo-spark i:nth-child(5) { left: 94%; top: 22%; animation-delay: 2.3s; }
@keyframes moTwinkle { 50% { opacity: 1; transform: scale(1.7); } }
/* Medallón 3D flotante */
.mo-medal { position: relative; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #FFF6D2 0%, #F3E3A8 20%, #D4AF37 52%, #8A6D1C 100%);
  box-shadow: inset 0 0 0 4px rgba(184,148,42,.9), inset 0 0 0 7px rgba(255,246,210,.45), inset 0 -6px 10px rgba(0,0,0,.25), 0 12px 24px rgba(0,0,0,.5), 0 0 30px rgba(212,175,55,.65);
  animation: moFloat 3.6s ease-in-out infinite; }
.mo-medal-in { font-size: 2.1rem; filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
@keyframes moFloat { 50% { translate: 0 -6px; rotate: -4deg; } }
.mo-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.mo-chip { align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--gold-200);
  background: linear-gradient(180deg, rgba(212,175,55,.25), rgba(212,175,55,.08)); border: 1px solid rgba(243,227,168,.55); box-shadow: 0 0 16px rgba(212,175,55,.3); }
.mo-title { font-family: var(--font-title); font-size: clamp(1.45rem, 6.4vw, 1.9rem); line-height: 1.12; font-weight: 800; color: #fff; text-shadow: 0 3px 14px rgba(0,0,0,.5); }
.mo-title span { background: linear-gradient(100deg, #B8942A 0%, #F3E3A8 25%, #D4AF37 45%, #FFF6D2 55%, #D4AF37 70%, #B8942A 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: moShimmer 4.5s linear infinite; filter: drop-shadow(0 0 12px rgba(212,175,55,.45)); }
@keyframes moShimmer { to { background-position: -220% 0; } }
.mo-text { font-size: .98rem; color: #D3DCEA; }
.mo-points { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-points span { padding: 6px 10px; border-radius: 10px; font-size: .8rem; font-weight: 700; color: var(--text); background: rgba(6,19,42,.55); border: 1px solid rgba(184,196,214,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.mo-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin-top: 6px; padding: 0 22px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; color: var(--text-dark); background: var(--gold-metal);
  box-shadow: 0 4px 0 var(--gold-700), 0 0 0 1px rgba(255,246,210,.45), 0 10px 30px rgba(212,175,55,.5); animation: moPulse 2.6s ease-in-out infinite; }
@keyframes moPulse { 50% { box-shadow: 0 4px 0 var(--gold-700), 0 0 0 1px rgba(255,246,210,.6), 0 12px 44px rgba(212,175,55,.8); } }
@media (min-width: 560px) {
  .mentor-offer { grid-template-columns: 96px 1fr; align-items: center; padding: 24px 24px 22px; gap: 18px; }
  .mo-medal { width: 96px; height: 96px; } .mo-medal-in { font-size: 2.6rem; }
  .mo-cta { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .mentor-offer, .mentor-offer *, .mentor-offer::before, .mentor-offer::after { animation: none !important; transition: none !important; } }

/* ═════════ Protección anticopia (js/protect.js · no aplica a /admin) ═════════ */
html.protected body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.protected input, html.protected textarea, html.protected select, html.protected [contenteditable="true"], html.protected .allow-copy { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.protected img, html.protected svg { -webkit-user-drag: none; user-drag: none; }
.protect-notice { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 300; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-size: .88rem; font-weight: 700; color: var(--gold-200); background: linear-gradient(160deg, #1B4177, #0B1F3A); border: 1px solid rgba(212,175,55,.6);
  box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 22px rgba(212,175,55,.3); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; }
.protect-notice.show { opacity: 1; transform: translate(-50%, 0); animation: protectHide .3s 2s forwards; }
@keyframes protectHide { to { opacity: 0; transform: translate(-50%, 12px); } }
@media print {
  html.protected body > * { display: none !important; }
  html.protected body::before { content: "Contenido protegido · © Academia Tío Colque. Descarga tus certificados en PDF desde tu panel."; display: block; padding: 40px; font: 16px/1.5 sans-serif; color: #000; }
}
