/* ==========================================================================
   SubeNota — piel de la app (diseño v2 + funcionalidad real).
   Fuente única de estilos de la app. El examen oficial usa css/vue.css (Pearson VUE)
   y la sala en directo añade css/sala.css. No mezclar.
   Base de marca: tinta azul marino + naranja AWS como unico acento,
   IBM Plex Sans / Mono, radios de 6 y 10 px, una sola sombra.
   ========================================================================== */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #0f1b2d;
  --ink-2: #2e3d52;
  --muted: #56657a;
  --line: #dce3ec;
  --line-strong: #bcc7d6;

  --accent: #ff9900;
  --accent-hover: #e88b00;
  --on-accent: #0f1b2d;

  --ok: #17692f;
  --ok-bg: #e5f3e9;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;

  --focus: #0f1b2d;

  --seg-1: #ff9900;
  --seg-2: #0f1b2d;
  --seg-3: #40506a;
  --seg-4: #7a8ba3;
  --seg-5: #b4c0d0;

  --shadow-1: 0 1px 2px rgba(15, 27, 45, 0.06), 0 12px 28px -12px rgba(15, 27, 45, 0.22);
  --header-bg: rgba(246, 248, 251, 0.86);

  --r-1: 6px;
  --r-2: 10px;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* alias y tokens de la app real */
  --ink-3: var(--muted);
  --line-2: var(--surface-2);
  --r-card: var(--r-2);
  --r-ctrl: var(--r-1);
  --mono: var(--font-mono);
  --fs-1: 0.8125rem; --fs-2: 0.9375rem; --fs-3: 1.0625rem; --fs-5: 1.625rem;
  --accent-soft: #fff4e1;
  --k-panel: #0f1b2d;
  --warn: #8a4b00; --warn-bg: #fff5e5;
  --pend-bg: #fff1b8;
  --info: #0f4c7d; --info-bg: #e8f1f9;

  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1120px;
  --header-h: 64px;
}

/* modo oscuro: solo si el usuario lo elige con el botón (data-theme="dark"); por defecto, claro */

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #121c30;
  --surface-2: #18243b;
  --ink: #e9eef6;
  --ink-2: #c3cedd;
  --muted: #9aa9bd;
  --line: #243250;
  --line-strong: #37496f;
  --ok: #62d18c;
  --ok-bg: #12301f;
  --bad: #ff9a90;
  --bad-bg: #3a1a1a;
  --focus: #ffb84d;
  --seg-2: #e9eef6;
  --seg-3: #b7c3d6;
  --seg-4: #7f8fa8;
  --seg-5: #4a5a78;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -12px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(11, 18, 32, 0.86);
  --accent-soft: rgba(255, 153, 0, 0.16);
  --k-panel: #1a2846;
  --warn: #ffcf85; --warn-bg: #3a2a10;
  --pend-bg: #4a3b0c;
  --info: #9cc9f0; --info-bg: #132a44;
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -0.02em; font-weight: 700; line-height: 1.12; }
p, li, dd, .plan__lista span { text-wrap: pretty; }
/* cada frase empieza en su línea y se parte de forma equilibrada (nada de «En 3 / minutos») */
.frase { display: block; text-wrap: balance; }

.num, .tnum { font-variant-numeric: tabular-nums; }
.mono, [translate="no"].code { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection { background: var(--accent); color: var(--on-accent); }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--bg);
  border-radius: var(--r-1); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-1);
  font-weight: 600; font-size: 0.9375rem; line-height: 1; white-space: nowrap;
  text-decoration: none; touch-action: manipulation;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--quiet { background: transparent; color: var(--ink-2); padding-inline: 12px; }
.btn--quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }
.btn--sm { min-height: 44px; padding: 0 14px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid transparent; border-radius: var(--r-1); background: transparent; color: var(--ink-2);
  touch-action: manipulation;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .icon { width: 22px; height: 22px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header__row { display: flex; align-items: center; gap: 8px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; margin-right: auto; min-height: 44px; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand { font-weight: 800; letter-spacing: -0.035em; } .brand__nota { color: #2F6BF6; }

.nav { display: none; align-items: center; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-1); font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background-color 0.16s ease, color 0.16s ease; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-actions .btn { display: none; }

.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }


.menu-btn .i-x { display: none; }
.menu-btn[aria-expanded="true"] .i-list { display: none; }
.menu-btn[aria-expanded="true"] .i-x { display: block; }

.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu__inner { display: grid; gap: 4px; padding-block: 12px 20px; }
.mobile-menu a, .mobile-menu button.mm-link { display: flex; align-items: center; min-height: 48px; padding: 0 4px; font-weight: 500; text-decoration: none; background: none; border: 0; text-align: left; }
.mobile-menu a:hover, .mobile-menu button.mm-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 1180px) {
  .nav { display: flex; margin-right: 8px; }
  .brand { margin-right: 24px; }
  .site-header__row { justify-content: flex-start; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: inline-flex; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* ---------- Toast ---------- */
.toast-region { position: fixed; inset-inline: 0; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 90; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 480px; padding: 12px 16px; background: var(--ink); color: var(--bg); border-radius: var(--r-1); font-size: 0.9375rem; box-shadow: var(--shadow-1); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(32px, 6vw, 72px) clamp(48px, 7vw, 96px); }
.hero__grid { display: grid; gap: 40px; align-items: start; }
.hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.375rem); letter-spacing: -0.035em; line-height: 1.06; max-width: 20ch; }
.hero h1 .hl { box-shadow: inset 0 -0.14em 0 var(--accent); }
.hero__lede { margin-top: 20px; max-width: 46ch; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 64px; }
}

/* ---------- Tarjeta de pregunta (hero y examen) ---------- */
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); padding: clamp(18px, 3vw, 28px); }
.qcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.qcard__caption { margin-top: 12px; font-size: 0.8125rem; color: var(--muted); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: var(--r-1); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 4px; font-size: 0.875rem; font-weight: 600; color: var(--muted); transition: background-color 0.16s ease, color 0.16s ease; }
.seg input:hover + span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 27, 45, 0.14); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg--mono span { font-family: var(--font-mono); font-weight: 600; font-size: 0.8125rem; }

.q { border: 0; padding: 0; margin: 0; min-width: 0; }
.q__legend { display: block; padding: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.42; letter-spacing: -0.01em; margin-bottom: 16px; text-wrap: pretty; }
.q__hint { display: block; margin-top: 4px; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.q__opts { display: grid; gap: 8px; }

.opt { position: relative; display: grid; grid-template-columns: 28px 1fr 22px; align-items: start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); cursor: pointer; touch-action: manipulation; transition: border-color 0.16s ease, background-color 0.16s ease; }
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.opt__key { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 4px; font-family: var(--font-mono); font-weight: 600; font-size: 0.8125rem; color: var(--ink-2); transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease; }
.opt__text { font-size: 0.9375rem; line-height: 1.45; padding-top: 3px; }
.opt__state { width: 20px; height: 20px; margin-top: 4px; display: none; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.opt:has(input:checked) .opt__key { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.q.is-locked .opt.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.q.is-locked .opt.is-correct .opt__key { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.q.is-locked .opt.is-correct .opt__state { display: block; color: var(--ok); }
.q.is-locked .opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.q.is-locked .opt.is-wrong .opt__key { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.q.is-locked .opt.is-wrong .opt__state { display: block; color: var(--bad); }
.q.is-locked .opt { cursor: default; }
.q.is-locked .opt:hover { border-color: var(--line-strong); }
.q.is-locked .opt.is-correct:hover { border-color: var(--ok); }
.q.is-locked .opt.is-wrong:hover { border-color: var(--bad); }
.q.is-locked .opt:has(input:checked):not(.is-correct):not(.is-wrong) { background: var(--surface-2); }

.qcard__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.feedback { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface-2); font-size: 0.9375rem; }
.feedback__title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.feedback--ok { border-color: var(--ok); background: var(--ok-bg); }
.feedback--ok .feedback__title { color: var(--ok); }
.feedback--bad { border-color: var(--bad); background: var(--bad-bg); }
.feedback--bad .feedback__title { color: var(--bad); }
.feedback__tip { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-strong); color: var(--ink-2); }
.feedback__tip strong { color: var(--ink); }
/* cita del material de la que sale la pregunta (feedback, revisión, informe, sala y «Revisar IA») */
.evidence { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.evidence b { display: block; margin-bottom: 2px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.evidence q { quotes: "«" "»"; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 44px); }
.section__head h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
.section__head p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 56ch; }
.eyebrow { display: block; margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; color: var(--muted); }

/* ---------- Catalogo: buscador y filtros ---------- */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 24px; }
.search { position: relative; flex: 1 1 280px; max-width: 460px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 48px; padding: 0 14px 0 44px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-1); font-size: 1rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:hover { border-color: var(--ink); }
.search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
.results-count { margin-left: auto; font-size: 0.875rem; color: var(--muted); }

.empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-2); background: var(--surface); }
.empty h3 { font-size: 1.125rem; margin-bottom: 6px; }
.empty p { color: var(--ink-2); margin-bottom: 16px; }

/* ---------- Tarjeta de certificacion ---------- */
.cert-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .cert-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 24px; } }

.cert { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: clamp(20px, 3vw, 28px); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.cert:hover, .cert:focus-within { box-shadow: var(--shadow-1); border-color: var(--line-strong); }
.cert__code { font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; color: var(--ink-2); margin-bottom: 8px; }
.cert h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); letter-spacing: -0.025em; }
.cert h3 a { text-decoration: none; }
.cert h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.cert__lede { margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; max-width: 46ch; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-top: 24px; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts dt { font-size: 0.8125rem; color: var(--muted); }
.facts dd { margin-top: 2px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.facts dd small { font-size: 0.8125rem; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* barra de dominios */
.dbar { margin-top: 24px; }
.dbar__label { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 8px; }
.dbar__track { display: flex; gap: 2px; height: 12px; }
.dbar__seg { min-width: 4px; background: var(--seg-5); border-radius: 2px; transition: opacity 0.16s ease; }
.dbar__seg[data-rank="1"] { background: var(--seg-1); }
.dbar__seg[data-rank="2"] { background: var(--seg-2); }
.dbar__seg[data-rank="3"] { background: var(--seg-3); }
.dbar__seg[data-rank="4"] { background: var(--seg-4); }
.dbar__seg[data-rank="5"] { background: var(--seg-5); }
.dbar:hover .dbar__seg { opacity: 0.4; }
.dbar .dbar__seg:hover { opacity: 1; }
.dbar__legend { display: grid; gap: 4px 20px; margin-top: 12px; font-size: 0.8125rem; color: var(--ink-2); }
@media (min-width: 560px) { .dbar__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dbar__legend li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dbar__legend i { flex: none; width: 10px; height: 10px; border-radius: 2px; transform: translateY(1px); }
.dbar__legend i[data-rank="1"] { background: var(--seg-1); }
.dbar__legend i[data-rank="2"] { background: var(--seg-2); }
.dbar__legend i[data-rank="3"] { background: var(--seg-3); }
.dbar__legend i[data-rank="4"] { background: var(--seg-4); }
.dbar__legend i[data-rank="5"] { background: var(--seg-5); }
.dbar__legend span:first-of-type { min-width: 0; }
.dbar__legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

/* modos */
.modes { margin-top: auto; border-top: 1px solid var(--line); }
.dbar { margin-bottom: 28px; }
.mode { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 14px; min-height: 64px; padding: 10px 4px; text-decoration: none; border-bottom: 1px solid var(--line); border-radius: 0; transition: background-color 0.16s ease, padding 0.16s ease; }
.modes li:last-child .mode { border-bottom: 0; }
.mode:hover { background: var(--surface-2); padding-inline: 10px; }
.mode:focus-visible { outline-offset: -2px; }
.mode__ic { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-1); color: var(--ink); }
.mode__t { display: block; font-weight: 600; letter-spacing: -0.01em; }
.mode__d { display: block; font-size: 0.875rem; color: var(--muted); line-height: 1.35; }
.mode__go { color: var(--muted); transition: transform 0.16s ease, color 0.16s ease; }
.mode:hover .mode__go { color: var(--ink); transform: translateX(3px); }
.cert__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; min-height: 44px; }
.cert__more:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* ---------- Material propio ---------- */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; } }
.split h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
.split__lede { margin-top: 14px; color: var(--ink-2); font-size: 1.0625rem; max-width: 46ch; }
.checks { margin-top: 24px; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; color: var(--ink-2); }
.checks .icon { margin-top: 2px; color: var(--ink); }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2); padding: clamp(18px, 3vw, 28px); }
.section--tint .panel { background: var(--bg); }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-1); }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 4px; font-weight: 600; font-size: 0.9375rem; color: var(--muted); transition: background-color 0.16s ease, color 0.16s ease; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 27, 45, 0.14); }
.tabs button .icon { width: 18px; height: 18px; }
.tabs span.lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (min-width: 340px) { .tabs span.lbl { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } }
@media (max-width: 400px) { .tabs button { min-width: 0; padding: 0 6px; gap: 6px; } }   /* que «Texto» no se salga a 360 px */
.tabpanel { margin-top: 20px; }

.field { display: grid; gap: 8px; }
.field + .field { margin-top: 16px; }
.field label, .field .label { font-size: 0.9375rem; font-weight: 600; }
.field .help { font-size: 0.8125rem; color: var(--muted); font-weight: 400; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-1); font-size: 1rem; }
.textarea { min-height: 148px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-color: var(--surface); color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2356657a'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 0.875rem; font-weight: 500; }

.drop { position: relative; display: grid; place-items: center; gap: 8px; min-height: 176px; padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-2); cursor: pointer; transition: border-color 0.16s ease, background-color 0.16s ease; }
.drop:hover, .drop.is-over { border-color: var(--ink); background: var(--surface-2); }
.drop:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .icon { width: 28px; height: 28px; color: var(--ink); }
.drop strong { font-size: 1rem; }
.drop small { color: var(--muted); font-size: 0.875rem; }
.drop__file { font-family: var(--font-mono); font-weight: 500; font-size: 0.875rem; word-break: break-all; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.form-note { font-size: 0.875rem; color: var(--muted); }
.status { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- Escala de nota ---------- */
.scale { position: relative; height: 156px; margin-top: 8px; }
.scale__track { position: absolute; left: 0; right: 0; top: 70px; height: 14px; border: 1px solid var(--line-strong); border-radius: 3px; background: linear-gradient(to right, var(--surface-2) 0 66.66%, var(--accent) 66.66% 100%); }
.scale__ends { position: absolute; left: 0; right: 0; top: 92px; display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale__mark { position: absolute; left: var(--x); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.scale__mark::after { content: ""; display: block; width: 2px; height: 26px; background: var(--ink); }
.scale__mark b { font-family: var(--font-mono); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.2; }
.scale__mark span { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.scale__mark--up { bottom: calc(156px - 70px); }
.scale__mark--down { top: 84px; flex-direction: column-reverse; }

.notes { display: grid; gap: 28px; margin-top: 8px; }
@media (min-width: 800px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; } }
.notes h3 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.notes p { color: var(--ink-2); max-width: 46ch; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 72px; } .faq-grid .section__head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; margin-bottom: 0; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 4px; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.faq summary .icon { flex: none; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details > div { padding: 0 4px 20px; color: var(--ink-2); max-width: 60ch; }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.875rem; }
.site-footer__row { display: grid; gap: 24px; }
@media (min-width: 720px) { .site-footer__row { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer p { max-width: 62ch; }
.site-footer .brand { margin-bottom: 8px; color: var(--ink); }

/* ---------- Pagina de certificacion ---------- */
.crumbs { padding-top: 24px; font-size: 0.875rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.cert-hero { padding-block: 8px clamp(32px, 5vw, 56px); }
.cert-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.035em; max-width: 20ch; }
.cert-hero__code { font-family: var(--font-mono); font-weight: 600; color: var(--ink-2); margin-bottom: 12px; font-size: 0.9375rem; }
.cert-hero p.lede { margin-top: 16px; max-width: 56ch; font-size: 1.125rem; color: var(--ink-2); }

.layout { display: grid; gap: 40px; padding-bottom: clamp(56px, 8vw, 104px); }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; } .layout__aside { position: sticky; top: calc(var(--header-h) + 24px); } }

.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; padding-block: 28px; border-block: 1px solid var(--line); margin-bottom: 48px; }
@media (min-width: 640px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat dt { font-size: 0.875rem; color: var(--muted); }
.stat dd { margin-top: 4px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat dd small { font-size: 0.875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .sub { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--muted); }

.block + .block { margin-top: 56px; }
.block > h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; margin-bottom: 8px; }
.block > p.sub { color: var(--ink-2); max-width: 56ch; margin-bottom: 24px; }

.domains { display: grid; gap: 22px; }
.domain { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; }
.domain__n { grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-1); font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; }
.domain__t { font-weight: 600; letter-spacing: -0.01em; }
.domain__w { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.domain__d { grid-column: 2 / span 2; color: var(--muted); font-size: 0.9375rem; }
.domain__bar { grid-column: 2 / span 2; height: 6px; margin-top: 6px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.domain__bar i { display: block; height: 100%; width: var(--w); background: var(--seg-2); border-radius: 2px; }
.domain[data-rank="1"] .domain__bar i { background: var(--seg-1); }

.spec { display: grid; gap: 0; }
.spec div { display: grid; gap: 2px 24px; padding: 14px 0; }
@media (min-width: 560px) { .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
.spec dt { font-size: 0.8125rem; color: var(--muted); }
.spec dd { font-weight: 500; }
.doc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }

.start { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 20px; box-shadow: var(--shadow-1); }
.start h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.start > p { margin-top: 4px; font-size: 0.9375rem; color: var(--muted); }
.start .modes { margin-top: 16px; }

/* ---------- Examen ---------- */
.exam-shell { min-height: calc(100dvh - var(--header-h)); padding-block: clamp(24px, 4vw, 48px) 72px; }
.exam { max-width: 760px; margin-inline: auto; }
.exam h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; }
.exam__lede { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 56ch; }
.exam__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; font-size: 0.9375rem; color: var(--ink-2); }
.exam__meta li { display: inline-flex; align-items: center; gap: 8px; }
.exam__go { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.domain-pick { margin-top: 24px; display: grid; gap: 8px; }
.domain-pick label { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); cursor: pointer; transition: border-color 0.16s ease, background-color 0.16s ease; }
.domain-pick label:hover { border-color: var(--ink); }
.domain-pick label:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.domain-pick label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.domain-pick input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.domain-pick .w { font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; color: var(--muted); }
.domain-pick small { display: block; color: var(--muted); font-size: 0.8125rem; }

.runbar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.runbar__title { font-weight: 600; margin-right: auto; }
.runbar__prog { font-size: 0.9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timer { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.timer.is-low { color: var(--bad); }
.progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 24px; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); transition: width 0.24s ease; }

.qnav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.qnav button { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; position: relative; transition: border-color 0.16s ease, background-color 0.16s ease; }
.qnav button:hover { border-color: var(--ink); }
.qnav button[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.qnav button.is-answered { background: var(--surface-2); }
.qnav button.is-flagged::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

.flag-btn[aria-pressed="true"] { background: var(--surface-2); border-color: var(--ink); }
.flag-btn[aria-pressed="true"] .icon { color: var(--accent); }

.exam .qcard { box-shadow: none; }
.exam .q__legend { font-size: 1.1875rem; }

dialog.dlg { position: relative; width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
dialog.dlg::backdrop { background: rgba(11, 18, 32, 0.6); }
dialog.dlg h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
dialog.dlg .comu-dlg__x ~ h2 { padding-right: 40px; }
dialog.dlg p { margin-top: 8px; color: var(--ink-2); }
dialog.dlg .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
dialog.dlg form { margin: 0; }

.result { display: grid; gap: 32px; }
.result__score { display: grid; gap: 4px; }
.result__num { font-family: var(--font-mono); font-weight: 600; font-size: clamp(3.5rem, 12vw, 5.5rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.result__num small { font-size: 0.35em; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.verdict { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: var(--r-1); font-weight: 700; font-size: 0.9375rem; }
.verdict--pass { background: var(--ok-bg); color: var(--ok); }
.verdict--fail { background: var(--bad-bg); color: var(--bad); }
.result h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.dres { display: grid; gap: 16px; }
.dres__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
.dres__row .bar { grid-column: 1 / -1; height: 8px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.dres__row .bar i { display: block; height: 100%; width: var(--w); background: var(--ink); }
.dres__row .pct { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.review details { border-bottom: 1px solid var(--line); }
.review details:first-of-type { border-top: 1px solid var(--line); }
.review summary { display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px; gap: 12px; align-items: center; min-height: 56px; padding: 12px 4px; cursor: pointer; list-style: none; font-size: 0.9375rem; }
.review summary::-webkit-details-marker { display: none; }
.review summary .ok { color: var(--ok); }
.review summary .no { color: var(--bad); }
.review summary .car { color: var(--muted); transition: transform 0.2s ease; }
.review details[open] summary .car { transform: rotate(180deg); }
.review .body { padding: 4px 4px 24px; }
.review .q__opts { pointer-events: none; }

/* ---------- Sala ---------- */
.room-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .room-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; } }
.room-grid .panel { background: var(--surface); }
.room-grid h2 { font-size: 1.375rem; letter-spacing: -0.025em; margin-bottom: 6px; }
.room-grid .sub { color: var(--ink-2); margin-bottom: 20px; font-size: 0.9375rem; }
.code-input { font-family: var(--font-mono); font-weight: 600; font-size: 1.75rem; letter-spacing: 0.3em; text-align: center; min-height: 64px; }
.code-input::placeholder { letter-spacing: 0.3em; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { padding: 0; font-weight: 600; font-size: 0.9375rem; margin-bottom: 8px; }
.radio-row { display: grid; gap: 8px; }
.radio-row label { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--bg); cursor: pointer; transition: border-color 0.16s ease, background-color 0.16s ease; }
.radio-row label:hover { border-color: var(--ink); }
.radio-row label:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.radio-row label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.radio-row input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.radio-row small { display: block; color: var(--muted); font-size: 0.8125rem; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .toast-region { display: none; }
  body { background: #fff; color: #000; }
}

/* Boton de tinta: accion secundaria fuerte (deja el naranja solo para la accion principal de la pagina) */
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: var(--ink-2); }

/* Detalle de certificacion: la accion primero en movil */
.layout__aside { order: -1; }
@media (min-width: 960px) { .layout__aside { order: 0; } }
.q:focus { outline: none; }
.link-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; margin-bottom: 8px; }
.link-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.link-back .icon { transform: rotate(180deg); }
.lbl-note { font-size: 0.875rem; color: var(--muted); margin-top: 16px; max-width: 56ch; }

/* ==========================================================================
   Añadidos de la app real (sesión, avisos, tablas, subida de material…)
   ========================================================================== */

/* ---------- utilidades ---------- */
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
.page { padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.page-head { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(1.875rem, 4.4vw, 2.75rem); letter-spacing: -0.03em; }
.page-head p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; }
main:focus { outline: none; }

/* ---------- sesión en la cabecera ---------- */
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-1); background: transparent; font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.user-btn:hover { background: var(--surface-2); }
.avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: var(--surface-2); }
.avatar--ini { display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--ink); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); z-index: 60; }
.user-menu .menu[hidden] { display: none; }
.user-menu .menu a, .user-menu .menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-1); background: none; text-align: left; font-size: 0.9375rem; text-decoration: none; color: var(--ink); }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--surface-2); }
/* menú de usuario: tú arriba (foto, nombre, a tu plataforma), lo justo, crear examen destacado y salir aparte */
.user-menu .menu { min-width: 260px; padding: 8px; }
.user-menu .menu .um-yo { gap: 12px; min-height: 64px; margin-bottom: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); border-radius: var(--r-1) var(--r-1) 0 0; }
.um-yo .avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; font-size: 1rem; }
.um-yo > span:last-child { display: grid; min-width: 0; } .um-nombre { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .um-rol { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.user-menu .menu .um-crear { justify-content: center; width: auto; min-height: 42px; margin: 8px 4px 4px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; }
.user-menu .menu .um-crear:hover { background: var(--accent-hover); }
.user-menu .menu .um-salir { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-1) var(--r-1); color: var(--muted); }
@media (max-width: 819px) { .user-menu { display: none; } .user-name { display: none; } }
@media (min-width: 820px) { .menu-only-mobile { display: none !important; } }

/* ---------- avisos, etiquetas, tablas ---------- */
.notice { padding: 12px 16px; border-radius: var(--r-1); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2); font-size: 0.9375rem; }
.notice--info { background: var(--info-bg); border-color: transparent; color: var(--info); }
.notice--ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.notice--warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.notice--bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.notice a { color: inherit; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--warn); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.table-wrap { overflow-x: auto; max-width: 100%; contain: inline-size; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9375rem; white-space: nowrap; }
.table th { font-size: 0.8125rem; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table td.mono { font-family: var(--font-mono); font-weight: 500; }

/* ---------- login ---------- */
.login-note { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
#gbtn { min-height: 44px; display: flex; justify-content: center; margin-top: 16px; }
.dlg .stack-sm > * + * { margin-top: 12px; }

/* ---------- catálogo dinámico ---------- */
.cert__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cert--mine { border-style: dashed; }
.mine-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mine-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.mine-card h3 { font-size: 1.125rem; letter-spacing: -0.02em; }
.mine-card .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8125rem; color: var(--muted); }
.mine-card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 0.875rem; }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); }
.mode__ic.mono { font-family: var(--font-mono); font-weight: 600; font-size: 0.875rem; }

/* ---------- examen (modos alumno / por dominio) ---------- */
.exam-shell .wrap { max-width: 820px; }
.opt.is-checked-multi { }
.result__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.q__opts .opt input:disabled { cursor: default; }
.qcard .q + .qcard__actions { margin-top: 20px; }
.dres__row .bar i.low { background: var(--bad); }

/* ---------- subir material (Fase 2) ---------- */
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.9375rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.check--err { color: var(--bad); }
.steps { display: grid; gap: 4px; counter-reset: paso; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--muted); }
.step:last-child { border-bottom: 0; }
.step::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; font-family: var(--font-mono); font-weight: 600; font-size: 0.8125rem; }
.step b { font-weight: 600; color: inherit; }
.steps:not(:has(.is-active, .is-done, .is-error)) .step b { color: var(--ink); }
.step small { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.step.is-active { color: var(--ink); }
.step.is-active::before { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.step.is-done { color: var(--ink-2); }
.step.is-done::before { content: "✓"; border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.step.is-error { color: var(--bad); }
.step.is-error::before { content: "!"; border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.spin { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: giro 0.8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.meter { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); transition: width 0.3s ease; }
.dom-edit { display: grid; gap: 8px; }
.dom-edit .row-in { display: grid; grid-template-columns: 32px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.dom-edit .row-in .n { display: grid; place-items: center; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-1); font-family: var(--font-mono); font-weight: 600; font-size: 0.8125rem; }
.dom-edit .row-in button { height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: transparent; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-block: 20px; border-block: 1px solid var(--line); }
.summary-grid dt { font-size: 0.8125rem; color: var(--muted); }
.summary-grid dd { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- revisar pendientes ---------- */
.rev-list { display: grid; gap: 20px; }
.rev { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.rev__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rev .q__legend { font-size: 1rem; }
.rev__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.rev.is-done { opacity: 0.55; }

/* ---------- sala: tarjetas de elección y avisos (js/sala.js) ---------- */
.pick-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick { display: block; width: 100%; text-align: left; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); color: var(--ink); transition: border-color 0.16s ease, background-color 0.16s ease; }
.pick:hover { border-color: var(--ink); }
.pick.sel { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.pick h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.error { color: var(--bad); font-size: 0.875rem; font-weight: 500; }
.k-view .panel { background: var(--surface); }
.k-view .btn.btn--primary { min-height: 48px; }
.select-inline { width: auto; min-width: 120px; }

/* ---------- opciones plegadas del formulario de subida ---------- */
.opciones { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); }
.opciones summary { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); list-style: none; }
.opciones summary::-webkit-details-marker { display: none; }
.opciones summary::after { content: "+"; margin-left: auto; font-family: var(--font-mono); }
.opciones[open] summary::after { content: "–"; }
.opciones > :not(summary) { margin: 0 14px 14px; }

/* ---------- portada: «examen a tu formato» ---------- */
.hero__grid.is-working { grid-template-columns: minmax(0, 1fr); }
.hero__grid.is-working .hero__copy { display: none; }
#subir-root .panel { box-shadow: var(--shadow-1); background: var(--surface); }
#subir-root .drop { min-height: 132px; }
#subir-root .textarea { min-height: 110px; }
#subir-root .radio-row small { display: none; }
#subir-root .radio-row label { padding: 9px 12px; }
.hero .eyebrow { margin-bottom: 14px; color: var(--warn); }

/* ---------- portada: compactar el panel de subida y priorizarlo en móvil ---------- */
.btn--lg { min-height: 52px; padding-inline: 26px; font-size: 1rem; }
#subir-root .panel > h2 + .sub { margin-top: 4px; margin-bottom: 18px; }
#subir-root .panel > h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
#subir-root .form-actions { margin-top: 18px; }
#subir-root .form-actions .btn--lg { width: 100%; }
#subir-root .check { font-size: 0.8125rem; }
.linklike { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 899px) {
  .hero { padding-top: 24px; }
  .hero__copy .checks { display: none; }
  .hero__lede { margin-top: 12px; font-size: 1rem; }
  .hero__cta { margin-top: 16px; }
  .hero__grid { gap: 24px; }
}
.help { font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }

/* pop-ups de la subida: elegir modo y nº de preguntas */
dialog.dlg--wide { width: min(640px, calc(100vw - 32px)); }
.pcard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.pcard-grid--n { grid-template-columns: repeat(4, 1fr); }
.pcard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 120px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pcard:hover, .pcard:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.pcard b { font-size: 1.0625rem; letter-spacing: -0.01em; }
.pcard small { color: var(--ink-2); font-size: .875rem; line-height: 1.4; }
.pcard--n { align-items: center; justify-content: center; text-align: center; min-height: 96px; }
.pcard--n b { font-size: 1.5rem; }
@media (max-width: 520px) { .pcard-grid, .pcard-grid--n { grid-template-columns: repeat(2, 1fr); } .pcard { min-height: 104px; } }
@media (prefers-reduced-motion: reduce) { .pcard { transition: none; } .pcard:hover { transform: none; } }

/* «Pruébalo ahora»: manual + mini demo de 3 preguntas */
.demo-split { align-items: start; gap: 40px; }
.demo-manual h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); letter-spacing: -0.025em; }
.demo-steps { list-style: none; counter-reset: paso; position: relative; display: grid; gap: 18px; margin: 22px 0; padding: 0; }
.demo-steps::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.demo-steps li { counter-increment: paso; position: relative; padding-left: 44px; color: var(--ink-2); line-height: 1.5; font-size: 1.0625rem; }
.demo-steps li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 700; font-size: .875rem; box-shadow: 0 0 0 4px var(--surface); }
.demo-steps li:first-child::before { background: var(--accent); color: var(--ink); }
.demo-steps b { color: var(--ink); }
.demo-roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 18px; }
.demo-roles > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.demo-roles h3 { font-size: 1rem; margin-bottom: 4px; }
.demo-roles p { font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
.demo-value { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.demo-value .icon { flex: none; margin-top: 2px; color: var(--accent); }
.demo-root { padding: 20px 22px; display: grid; gap: 8px; align-content: start; min-height: 320px; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* el test de la demo, más compacto para pesar lo mismo que la tarjeta «Mi material» */
.dq--compact .q__legend { margin-bottom: 6px; font-size: 1rem; }
.dq--compact .q__opts { gap: 5px; }
.dq--compact .opt { padding: 7px 12px; }
.dq-acts { margin-top: 0; }
.demo-root .progress { margin-bottom: 0; }
.demo-intro { display: grid; gap: 14px; justify-items: start; }
.demo-intro p { color: var(--ink-2); }
.dm-h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
.dm-sub { margin-top: 4px; }
.dm-tabpanel { min-height: 124px; }   /* misma altura reservada para archivo/enlace/texto: cambiar de pestaña no debe mover el resto de la tarjeta */
.dm-tabpanel .textarea, .dm-tabpanel .input { width: 100%; }
.dm-tabpanel .field { height: 100%; }
/* versión compacta del selector de archivo: en la demo no hace falta tan grande como en la subida real */
.drop--compact { min-height: 100px; padding: 14px; gap: 4px; }
.drop--compact .icon { width: 20px; height: 20px; }
.drop--compact strong { font-size: 0.875rem; }
.drop--compact small { font-size: 0.8125rem; }
.dm-text--compact { height: 62px; min-height: 0; }
.dfb .feedback { margin-top: 4px; }
.demo-done { display: grid; gap: 12px; justify-items: start; padding: 6px 0; }
.demo-done__tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 700; letter-spacing: 0; text-transform: none; font-size: .8125rem; }
.demo-done__tag--warn { background: var(--warn-bg, #fdf1d6); color: var(--warn-ink, #7a4b00); }
.demo-done h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.demo-done p { color: var(--ink-2); max-width: 52ch; }
.demo-done__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-res { display: flex; gap: 20px; align-items: center; margin: 16px 0 12px; }
.demo-res__num { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.demo-res__num small { font-size: 1.25rem; color: var(--muted); font-weight: 600; }
.demo-res__pct { font-weight: 700; }
.demo-res__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: .9375rem; }
.demo-res__list li { display: flex; gap: 10px; align-items: flex-start; }
.demo-res__list li > span:first-child { flex: none; display: inline-flex; margin-top: 2px; }
.demo-res__list .ok { color: var(--ok, #067647); } .demo-res__list .no { color: var(--bad, #b42318); }
.status--warn { background: var(--warn-bg, #fdf1d6); }
.status--bad { background: #fde8e6; color: #7a1a12; border-color: #f4c2bd; }
#demo-informe { display: none; }
@media print {
  body.imprimiendo-demo > *:not(#demo-informe) { display: none !important; }
  body.imprimiendo-demo #demo-informe { display: block; padding: 30px; color: #14181f; background: #fff; font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; }
  #demo-informe .muted { color: #6b7280; font-size: 9.5pt; }
  #demo-informe .demo-inf-list { list-style: none; padding: 0; margin: 0; counter-reset: none; }
  #demo-informe .demo-inf-q { break-inside: avoid; padding: 14px 0; border-top: 1px solid #edeff2; }
  #demo-informe .demo-inf-q:first-child { border-top: 0; padding-top: 0; }
  #demo-informe .demo-inf-q__enun { font-weight: 600; font-size: 10.5pt; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  #demo-informe .demo-inf-q__tag { font-weight: 600; font-size: 8pt; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
  #demo-informe .demo-inf-q__tag.ok { background: #e3f5e9; color: #1a7a3e; }
  #demo-informe .demo-inf-q__tag.no { background: #fbe8e6; color: #b3261e; }
  #demo-informe .demo-inf-q ul { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; font-size: 9.5pt; }
  #demo-informe .demo-inf-q li.ok { color: #1a7a3e; font-weight: 600; }
  #demo-informe .demo-inf-q li.no { color: #b3261e; }
  #demo-informe .demo-inf-q__tip { font-size: 9pt; color: #4b5563; background: #f6f7f9; border-radius: 6px; padding: 6px 10px; margin: 6px -10px 0; }
  #demo-informe > .muted:last-child { border-top: 1px solid #e2e5ea; padding-top: 14px; margin-top: 22px; }

  /* Informe: cabecera tipo examen oficial, con recuadros como una fotocopia de facultad, + caja «Sobre este informe». */
  #demo-informe.ofi .ofi-head { display: grid; grid-template-columns: 70px 1fr 100px; border: 1.5px solid #14181f; margin-bottom: 18px; }
  #demo-informe.ofi .ofi-logo { display: flex; align-items: center; justify-content: center; border-right: 1.5px solid #14181f; font-size: 10pt; font-weight: 700; padding: 8px; text-align: center; }
  #demo-informe.ofi .ofi-logo b { color: #d9720e; }
  #demo-informe.ofi .ofi-mid { padding: 10px 16px; text-align: center; }
  #demo-informe.ofi .ofi-l1 { font-size: 13pt; font-weight: 700; letter-spacing: .01em; margin: 0; }
  #demo-informe.ofi .ofi-l2 { font-size: 10pt; font-weight: 600; margin: 3px 0 0; }
  #demo-informe.ofi .ofi-l3 { font-size: 10pt; font-weight: 600; margin: 3px 0 0; }
  #demo-informe.ofi .ofi-materia { font-size: 10pt; margin: 8px 0 0; }
  #demo-informe.ofi .ofi-nota { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-left: 1.5px solid #14181f; padding: 8px; }
  #demo-informe.ofi .ofi-nota span { font-size: 8.5pt; font-weight: 700; letter-spacing: .04em; }
  #demo-informe.ofi .ofi-nota b { font-size: 15pt; font-weight: 800; }
  #demo-informe.ofi .ofi-box { border: 1.5px solid #14181f; padding: 12px 16px; margin-bottom: 20px; }
  #demo-informe.ofi .ofi-box-t { font-size: 10pt; font-weight: 700; text-align: center; letter-spacing: .04em; margin: 0 0 8px; }
  #demo-informe.ofi .ofi-box p:not(.ofi-box-t) { font-size: 10pt; margin: 0; font-style: italic; }
  #demo-informe.ofi .demo-inf-q__tag.ok { background: none; color: #1a7a3e; border: 1px solid #1a7a3e; }
  #demo-informe.ofi .demo-inf-q__tag.no { background: none; color: #b3261e; border: 1px solid #b3261e; }
}
@media (max-width: 720px) { .demo-roles { grid-template-columns: 1fr; } .demo-split { gap: 24px; } .demo-res { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* «Pruébalo ahora»: pestañas de demo + franja alumno/profesor */
.demo-side { display: grid; gap: 14px; align-content: start; }
.demo-tabs { display: flex; }
.demo-tabs label { flex: 1; }
.demo-tabs span { width: 100%; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding-block: 10px; font-weight: 700; letter-spacing: .01em; }
/* portada · «Para estudiar. Y para enseñar.»: bloques alternos texto corto + imagen */
.roles__title { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; text-align: center; margin-bottom: clamp(32px, 5vw, 64px); }
.feat { display: grid; gap: 28px; align-items: start; }
.feat + .feat { margin-top: clamp(56px, 8vw, 104px); }
.feat__copy { display: grid; gap: 16px; justify-items: start; max-width: 30rem; }
.feat__tag { font-family: var(--font-mono); font-size: .8125rem; font-weight: 600; color: var(--warn); }
.feat h3 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.feat__lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-2); line-height: 1.45; }
.feat__list { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 12px; }
.feat__list li { position: relative; padding-left: 30px; font-size: 1.0625rem; color: var(--ink-2); line-height: 1.4; }
.feat__list li::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; }
.feat__list b { color: var(--ink); }
.feat__fig { margin: 0; display: grid; gap: 8px; }
.feat__fig figcaption { font-size: .8125rem; color: var(--muted); }
.feat__fig .mock { padding: clamp(18px, 3vw, 28px); background: var(--surface); box-shadow: var(--shadow-1); }
.feat__fig .role__shot { box-shadow: var(--shadow-1); }
@media (min-width: 860px) {
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; }
  .feat--rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .feat--rev .feat__copy { order: 2; }
}
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-2); line-height: 1.5; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--ink); font-size: .75rem; font-weight: 800; }
.role__fig { margin: 8px 0 0; display: grid; gap: 8px; }
.role__fig figcaption { font-size: .8125rem; color: var(--muted); }
.role__shot { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.role__shot img { display: block; width: 100%; height: auto; }
.role__shot .img-dark { display: none; }
:root[data-theme="dark"] .role__shot .img-light { display: none; }
:root[data-theme="dark"] .role__shot .img-dark { display: block; }

.mock { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.mock__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mock__chip { flex: none; white-space: nowrap; font-size: .75rem; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.mock__score { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.mock__num { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.mock__num small { font-size: 1.125rem; color: var(--muted); font-weight: 600; }
.mock__verdict { font-weight: 600; color: var(--ok, #067647); }
.mock__bars { display: grid; gap: 9px; }
.mock__row { display: grid; grid-template-columns: 110px 1fr 52px; gap: 10px; align-items: center; font-size: .9375rem; }
.mock__row b { text-align: right; font-variant-numeric: tabular-nums; }
.mock__bar { display: block; height: 8px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.mock__bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); border-radius: inherit; }
.mock__bar--ok::before { background: var(--ok, #067647); } .mock__bar--low::before { background: var(--bad, #b42318); }
.mock__fb { font-size: .9375rem; color: var(--ink-2); } .mock__ok { color: var(--ok, #067647); } .mock__bad { color: var(--bad, #b42318); }
.mock__reto { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-1); background: var(--surface); border: 1px dashed var(--line); font-size: .875rem; color: var(--ink-2); }
.mock__medal { flex: none; min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; font-size: .8125rem; }
@media (max-width: 860px) { .mock__row { grid-template-columns: 92px 1fr 46px; } .demo-tabs span { font-size: .875rem; } }
@media (max-width: 480px) { .demo-tabs label { display: flex; } .demo-tabs span { white-space: nowrap; padding-inline: 8px; } }

/* panel: puesto en un desafío de clase (discreto) */
.reto__gana { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ink-2); margin: 2px 0 6px; }
.reto__medal { flex: none; min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; font-size: .75rem; }

/* «otro test»: discreto, abajo a la derecha, para no animar a gastar más llamadas de IA */
.btn-link-quiet { display: block; margin-top: 12px; font: inherit; font-size: .8125rem; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: right; width: 100%; text-decoration: underline; text-underline-offset: 3px; }
.btn-link-quiet:hover, .btn-link-quiet:focus-visible { color: var(--ink-2); }

/* valoración con estrellas al terminar la demo */
.stars { display: flex; gap: 6px; }
.star { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--line); transition: transform .12s, color .12s; }
.star svg { width: 34px; height: 34px; fill: currentColor; }
.star.is-on, .star.is-hover { color: var(--accent); }
.star:hover { transform: scale(1.08); }
.star:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.stars__msg { color: var(--ink-2); font-size: .9375rem; min-height: 1.4em; }
@media (prefers-reduced-motion: reduce) { .star { transition: none; } .star:hover { transform: none; } }

/* ---------- portada centrada (titular grande arriba, subida debajo) ---------- */
.hero--centro .hero__grid, .hero--centro .hero__grid.is-working { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 32px; }
.hero--centro .hero__copy { display: grid; justify-items: center; text-align: center; }
.hero--centro .hero__grid.is-working .hero__copy { display: none; }
.hero--centro h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 14ch; text-wrap: balance; }
.hero--centro .hero__lede { margin-top: 20px; max-width: 54ch; text-wrap: pretty; }
.hero--centro #subir-root { width: 100%; max-width: 640px; text-align: left; }
.hero--centro .hero__grid.is-working #subir-root { max-width: none; }
.hero__pie { gap: 14px; justify-self: stretch; }  /* tan ancha como la subida */
.hero__puntos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.hero__puntos li { display: inline-flex; align-items: center; gap: 8px; }
.hero__puntos .icon { width: 18px; height: 18px; color: var(--ok); }
.hero__link { font-size: 0.9375rem; font-weight: 600; color: var(--muted); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hero__link:hover { color: var(--ink); }
@media (max-width: 899px) { .hero--centro #subir-root { max-width: none; } .hero--centro .hero__grid { gap: 24px; } .hero--centro .hero__lede { margin-top: 14px; } }

/* portada centrada: línea de ventajas bajo la frase y cuatro tarjetas de modos (estilo tarjetas de color) */
.hero--centro .hero__copy > .hero__puntos { margin-top: 18px; }
.hero__lede b { color: var(--ink); }
.modos-hero { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; max-width: var(--maxw); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left; }
.mh a { display: grid; gap: 14px; height: 100%; padding: 18px 16px 16px; border-radius: var(--r-2); text-decoration: none; color: var(--ink); transition: transform .16s ease, box-shadow .16s ease; }
.mh a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.mh a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mh__t { font-size: 1.25rem; letter-spacing: -0.02em; text-align: center; }
.mh--1 a { background: var(--accent); color: var(--on-accent); }
.mh--2 a { background: var(--k-panel); color: #fff; }
.mh--3 a { background: var(--accent-soft); border: 1px solid var(--line); }
.mh--4 a { background: var(--surface-2); border: 1px solid var(--line); }
.mh__card { display: grid; gap: 8px; align-content: start; min-height: 112px; padding: 14px; border-radius: var(--r-1); background: var(--surface); color: var(--ink); font-size: .875rem; box-shadow: 0 1px 2px rgba(15, 27, 45, .12); }
.mh__row { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.mh__row b { color: var(--ink); }
.mh__ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); }
.mh__ok .icon { width: 18px; height: 18px; }
.mh__tip { color: var(--ink-2); line-height: 1.4; }
.mh__bar { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; color: var(--ink-2); }
.mh__bar i { display: block; height: 8px; border-radius: 999px; background: linear-gradient(var(--ok), var(--ok)) 0 0 / var(--w) 100% no-repeat, var(--line); }
.mh__bar i.is-low { background: linear-gradient(var(--bad), var(--bad)) 0 0 / var(--w) 100% no-repeat, var(--line); }
.mh__rank { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; align-items: center; color: var(--ink-2); }
.mh__rank b { color: var(--warn); }
.mh__rank em { font-style: normal; font-weight: 600; color: var(--ink); }
.mh__rank:nth-child(2) { font-weight: 700; color: var(--ink); }
@media (max-width: 899px) { .modos-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .mh__t { font-size: 1.0625rem; } }
@media (prefers-reduced-motion: reduce) { .mh a { transition: none; } .mh a:hover { transform: none; } }
@media (max-width: 520px) {
  .mh a { padding: 14px 10px 10px; gap: 10px; }
  .mh__card { padding: 10px; font-size: .8125rem; min-height: 96px; }
  .mh__bar { grid-template-columns: 48px 1fr; }
  .mh__rank { grid-template-columns: 24px 1fr auto; }
  .hero__puntos { gap: 6px 16px; font-size: .875rem; }
}

/* cabecera: botón principal «Crear mi examen» (en escritorio junto a Entrar; en móvil dentro del menú) */
.header-actions .header-cta { display: none; }
@media (min-width: 1180px) { .header-actions .header-cta { display: inline-flex; } }
.mobile-menu a.mm-cta { justify-content: center; margin-top: 8px; padding: 0 16px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-1); font-weight: 700; text-decoration: none; }
.mobile-menu a.mm-cta:hover { background: var(--accent-hover); text-decoration: none; }

/* cifras bajo el hero */
.cifras { padding-block: clamp(28px, 4vw, 44px); border-block: 1px solid var(--line); background: var(--surface); }
.cifras__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cifras__grid li { display: grid; gap: 4px; justify-items: center; text-align: center; }
.cifras__grid b { font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.cifras__grid b small { font-size: .5em; color: var(--muted); }
.cifras__grid li:first-child b { box-shadow: inset 0 -0.12em 0 var(--accent); }
.cifras__grid span { max-width: 22ch; font-size: .9375rem; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 720px) { .cifras__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; } }

/* «¿Para qué examen estudias?» */
.section__head--centro { margin-inline: auto; text-align: center; }
.section__head--centro p { margin-inline: auto; }
.tipos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tipo { display: grid; gap: 6px; align-content: start; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease; }
@media (hover: hover) { .tipo:hover { border-color: var(--accent); box-shadow: var(--shadow-1); } }
.tipo:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tipo__tag { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; color: var(--warn); }
.tipo b { font-size: 1.1875rem; letter-spacing: -0.02em; }
.tipo__d { font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 899px) { .tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tipo { padding: 14px; } }
@media (max-width: 520px) { .tipo__d { display: none; } .tipo b { font-size: 1.0625rem; } }

/* opiniones con captura real */
.testi { margin: 0; display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); }
.testi__shot { height: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); }
.testi__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.testi blockquote { margin: 0; display: grid; gap: 8px; }
.testi blockquote p:last-child { font-size: 1.0625rem; line-height: 1.5; color: var(--ink); }
.testi__stars { color: var(--accent); letter-spacing: 2px; font-size: 1rem; }
.testi figcaption { display: flex; align-items: center; gap: 12px; }
.testi figcaption b { display: block; }
.testi figcaption small { display: block; font-size: .8125rem; color: var(--muted); }
.testi__av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9375rem; }
.testi--t1 .testi__av { background: var(--accent); color: var(--on-accent); }
.testi--t2 .testi__av { background: var(--k-panel); color: #fff; }
.testi--t3 .testi__av { background: var(--ok-bg); color: var(--ok); }

/* precios */
.planes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin-inline: auto; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); }
.plan--pro { border: 2px solid var(--accent); background: var(--surface); box-shadow: var(--shadow-1); }
.plan h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.plan__para { color: var(--ink-2); }
.plan__precio { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan__precio b { font-size: 2.75rem; letter-spacing: -0.03em; line-height: 1; }
.plan__precio span { color: var(--muted); font-size: .9375rem; }
.plan__lista { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 10px; }
.plan__lista li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--ink-2); line-height: 1.45; }
.plan__lista .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--ok); }
.plan__lista b { color: var(--ink); }
.plan__garantia { padding: 12px 14px; border-radius: var(--r-1); background: var(--accent-soft); font-size: .9375rem; color: var(--ink); line-height: 1.45; }
.plan .btn--lg { width: 100%; margin-top: auto; }
.plan .btn[disabled] { opacity: .75; cursor: not-allowed; }
.plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) { .planes { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* llamada final */
.cierre { padding-block: clamp(64px, 9vw, 112px); background: var(--accent-soft); border-top: 1px solid var(--line); }
.cierre__in { display: grid; justify-items: center; gap: 18px; text-align: center; }
.cierre h2 { max-width: 20ch; font-size: clamp(2rem, 4.8vw, 3.25rem); line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance; }
.cierre h2 .hl { box-shadow: inset 0 -0.14em 0 var(--accent); }
.cierre p { max-width: 56ch; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--ink-2); text-wrap: pretty; }
.cierre__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.cierre .cierre__riesgo { font-size: .9375rem; font-weight: 600; color: var(--muted); }
@media (max-width: 520px) { .cierre__acts .btn { width: 100%; } }

/* pie en columnas */
.site-footer__cols { display: grid !important; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; align-items: start; }
.site-footer__cols nav { display: grid; gap: 0; }
.site-footer__cols nav a { min-height: 36px; }
.site-footer__cols nav b { font-size: .875rem; color: var(--ink); margin-bottom: 4px; }
.site-footer__marca { display: grid; gap: 12px; justify-items: start; }
.site-footer__base { margin-top: 28px; font-size: .875rem; color: var(--muted); }
.site-footer__base > p { display: inline-block; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .site-footer__cols { grid-template-columns: repeat(2, 1fr); } .site-footer__marca { grid-column: 1 / -1; } }

/* precios: 3 planes iguales + franja de una línea para academias y colegios */
.planes--3 .plan__precio { gap: 4px; }
.planes--3 .plan--pro { border-width: 1px; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-1); }   /* mismo grosor: botones a la misma altura */
.planes--3 .plan__precio span { font-size: 1rem; }
.planes__centros { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; max-width: 1040px; margin: 20px auto 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); }
.planes__centros p { margin: 0; color: var(--ink-2); }
.planes__centros b { color: var(--ink); }
.testi__off { color: var(--line-strong); }
@media (max-width: 900px) { .planes__centros { max-width: 520px; } }
@media (max-width: 480px) { .planes__centros .btn { width: 100%; } .planes__centros b { display: block; } }

/* precios: el límite del plan Gratis no es una ventaja */
.plan__lista li.plan__limite { color: var(--muted); }
.plan__lista li.plan__limite .icon { color: var(--warn); }

/* contacto para academias y centros */
.contacto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contacto__copy h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
.contacto__copy p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 46ch; }
.contacto__lista { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.contacto__lista li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--ink-2); }
.contacto__lista .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--ok); }
.contacto__form { display: grid; gap: 14px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.contacto__fila { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.contacto__form .btn--lg { width: 100%; }
.contacto__form .status:empty { display: none; }
.contacto__trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) { .contacto { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .contacto__fila { grid-template-columns: minmax(0, 1fr); } }
.contacto__form .field + .field, .contacto__fila .field + .field { margin-top: 0; }
.contacto__form .field { gap: 6px; align-content: start; }

/* opiniones: dos carruseles (profes / alumnos), 3 visibles en escritorio */
.carrusel + .carrusel { margin-top: clamp(40px, 6vw, 64px); }
.carrusel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.carrusel__head h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.carrusel__btns { display: flex; gap: 8px; }
.carrusel__btns .icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.carrusel__btns [data-prev] .icon { transform: scaleX(-1); }
.carrusel__pista { --vis: 3; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--vis) - 1) * 20px) / var(--vis)); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__pista:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r-2); }
.carrusel__pista > .testi { scroll-snap-align: start; height: 100%; align-content: start; }
.testi__shot img { background: var(--surface); }
.testi__shot--sala img, .testi__shot--panel img, .testi__shot--reto img, .testi__shot--practica img, .testi__shot--resultados img { object-fit: contain; object-position: center; padding: 8px; }
@media (max-width: 1000px) { .carrusel__pista { --vis: 2; } }
@media (max-width: 640px) { .carrusel__pista { grid-auto-columns: 86%; gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .carrusel__pista { scroll-behavior: auto; } }
.testi__shot--revelado img, .testi__shot--ranking img, .testi__shot--temas img, .testi__shot--modos img, .testi__shot--clase img { object-fit: contain; object-position: center; padding: 8px; }
.testi__shot--pdf { background: var(--surface-2); }
.testi__shot--fotos img, .testi__shot--temasia img, .testi__shot--cuantas img, .testi__shot--falladas img, .testi__shot--progreso img, .testi__shot--codigo img, .testi__shot--continuar img, .testi__shot--nota img { object-fit: contain; object-position: center; padding: 8px; }

/* selector de idioma (arriba a la izquierda, junto al logo) */
.idioma { position: relative; margin-right: auto; }
.idioma__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.testi__mas::after { content: ""; position: absolute; inset: -13px -8px; }
.idioma__btn { position: relative; }
.idioma__btn::after { content: ""; position: absolute; inset: -4px 0; }  /* 44 px de alto al tocar */
.idioma__btn:hover { border-color: var(--line-strong); color: var(--ink); }
.idioma__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.idioma__btn .icon { width: 14px; height: 14px; }
.idioma__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 200px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); }
.idioma__menu button { display: flex; width: 100%; min-height: 38px; align-items: center; padding: 0 12px; border: 0; border-radius: var(--r-1); background: none; color: var(--ink-2); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.idioma__menu button:hover, .idioma__menu button:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.idioma__menu [aria-selected="true"] button { color: var(--ink); font-weight: 700; }
.idioma__menu [aria-selected="true"] button::after { content: "✓"; margin-left: auto; color: var(--accent); }
.brand { margin-right: 12px; }
@media (min-width: 1180px) { .idioma { margin-right: 20px; } }
/* Google Translate: sin barra superior ni resaltados */
.skiptranslate iframe, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, #gt-el { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.nav a { white-space: nowrap; }
@media (max-width: 420px) { .site-header__row { gap: 4px; } .brand { gap: 8px; font-size: 1.0625rem; margin-right: 6px; } .idioma__btn { padding: 0 7px; gap: 4px; font-size: .8125rem; } }
@media (max-width: 360px) { .header-actions .theme-toggle { display: none; } }

/* «Tengo un código ▾» (sala o grupo) */

/* grupos de estudio */
.g-h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
.g-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 20px; }
.g-borra { display: flex; gap: 10px; align-items: flex-start; }
.g-borra .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.g-borra a { font-weight: 700; color: inherit; }
.g-enlace { display: flex; gap: 8px; }
.g-enlace .input { flex: 1; min-width: 0; font-size: .8125rem; }
.g-miembros { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-miembros li { display: flex; align-items: center; gap: 10px; }
.g-compartir { margin-top: 8px; }
.g-compartir .row { flex-wrap: nowrap; }
.g-compartir .select { flex: 1; min-width: 0; }
.g-invita { max-width: 520px; margin: 24px auto; text-align: center; justify-items: center; }
.g-invita h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; }
.g-meta { justify-content: center; }
@media (max-width: 900px) { .g-grid { grid-template-columns: minmax(0, 1fr); } }

/* estadísticas de un examen propio: muy pequeño, debajo de los datos */
.ex-stats { margin-top: 6px; font-size: .75rem; color: var(--muted); line-height: 1.4; }
.ex-stats b { color: var(--ink-2); font-weight: 600; }
.g-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* explorador de exámenes */
.explora { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.explora .search { flex: 1 1 320px; max-width: none; }
.explora__orden { display: flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--ink-2); }
.explora__orden .select { min-height: 48px; width: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip__n { font-family: var(--font-mono); font-size: .75rem; opacity: .7; }
#certificaciones .results-count { margin: 10px 0 16px; font-size: .875rem; color: var(--muted); }
.ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ex { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); transition: border-color .16s ease, box-shadow .16s ease; }
.ex:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.ex__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ex h3 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; }
.ex h3 a { color: var(--ink); text-decoration: none; }
.ex h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ex__meta { font-size: .875rem; color: var(--ink-2); }
.ex__autor { font-size: .8125rem; color: var(--muted); }
.ex__acts { margin-top: auto; padding-top: 8px; }
.ex-mas { display: flex; justify-content: center; margin-top: 20px; }
@media (max-width: 1000px) { .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ex-grid { grid-template-columns: minmax(0, 1fr); } .explora__orden label { display: none; } }
@media (min-width: 900px) { .chips { flex-wrap: wrap; overflow: visible; } }
.pub-cat { margin-top: 10px; gap: 8px; flex-wrap: nowrap; }
.pub-cat .select { flex: 1; min-width: 0; min-height: 36px; }

/* opinión al final de cada examen (beta) */
.opinion { display: grid; gap: 10px; margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.opinion h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.opinion .stars { display: flex; gap: 4px; }
.opinion .star { width: 40px; height: 40px; border: 0; background: none; font-size: 1.75rem; line-height: 1; color: var(--line-strong); cursor: pointer; border-radius: var(--r-1); }
.opinion .star.on { color: var(--accent); }
.opinion .star:focus-visible { outline: 2px solid var(--focus); }
.opinion .row { align-items: center; gap: 12px; }
.planes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; }
.plan__precio s { color: var(--muted); }
.planes__nota { margin-top: 18px; text-align: center; font-size: .9375rem; color: var(--muted); }
@media (max-width: 900px) { .planes--3 { grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 16px; } }
.mock__examen { margin-top: -6px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }

/* plazas de fundador (escasez real: cuentas creadas) */
.fundador { max-width: 460px; margin: 18px auto 0; display: grid; gap: 8px; }
.plan__alt { text-align: center; font-size: .875rem; font-weight: 600; color: var(--muted); }

/* pase automático de pantallas («Tu clase, en directo») */
.slider { display: grid; }
.slider .slide { grid-area: 1 / 1; display: grid; gap: 16px; align-content: center; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s .5s; }
.slider .slide.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease; }
/* pantallas del profe en el mismo estilo que la tarjeta del alumno */
.mp__q { padding: 12px 14px; border-radius: var(--r-1); background: #0f1b2d; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.mp__ops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp__op { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-1); font-weight: 700; font-size: .9375rem;
  /* atenuada: fondo suave y texto en su color (legible); la correcta y las «vivas», en color lleno */
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.mp__op i { font-style: normal; font-size: .8125rem; }
.mp__op b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mp__op--a { --c: #C42847; } .mp__op--b { --c: #2B66C4; } .mp__op--c { --c: #9A6700; } .mp__op--d { --c: #1E7A3C; }
.mp__op--ok, .mt .mp__op--vivo { color: #fff; background: var(--c); }
.mp__op--ok { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #9A6700; }
.mp__rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mp__rank li { display: grid; grid-template-columns: 28px 1fr auto 64px; gap: 10px; align-items: center; padding: 6px 10px; border-radius: var(--r-1); background: var(--surface); border: 1px solid var(--line); font-size: .9375rem; }
.mp__rank li:first-child { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.mp__rank b { text-align: right; font-variant-numeric: tabular-nums; }
.mp__pos { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); font-size: .8125rem; font-weight: 800; }
.mp__rank li:first-child .mp__pos { background: var(--accent); }
.mp__rank em { font-style: normal; font-size: .8125rem; font-weight: 700; }
.mp__sube { color: var(--ok, #067647); } .mp__baja { color: var(--bad, #b42318); }
.slider__pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.slider__cap { font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.slider__dots { display: flex; gap: 6px; flex: none; }
.slider__dot { position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.slider__dot::after { content: ""; position: absolute; inset: -17px -3px; }  /* zona táctil de 44 px sin mover los puntos */
.slider__dot[aria-current="true"] { background: var(--accent); width: 22px; border-radius: 999px; }
.slider__dot:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.slider__nota { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .slider .slide, .slider .slide.is-on { transition: none; } }

/* código SUBENOTA (30 días gratis) */
.codigo__chip { justify-self: start; display: inline-block; padding: 6px 14px; border: 2px dashed var(--accent); border-radius: 999px; background: var(--accent-soft); font-size: .9375rem; color: var(--ink); }

/* pantalla de pago sin tarjeta (plan.html) */
.pago { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; max-width: 960px; margin: 24px auto; }
.pago--uno { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.pago__plan h2 { font-size: 2rem; letter-spacing: -0.03em; margin-top: 4px; }
.pago__plan .plan__lista { margin-top: 16px; }
.pago__caja { display: grid; gap: 16px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.pago__bum { display: grid; gap: 2px; padding: 14px 16px; border: 2px dashed var(--accent); border-radius: var(--r-2); background: var(--accent-soft); animation: bum .5s ease-out; }
.pago__bum b { font-size: 1.125rem; }
@keyframes bum { 0% { transform: scale(.92); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }
.pago__lineas { display: grid; gap: 8px; margin: 0; }
.pago__lineas div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.pago__lineas dd { margin: 0; font-variant-numeric: tabular-nums; }
.pago__desc dd { color: var(--ok); font-weight: 700; }
.pago__total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.25rem; font-weight: 700; color: var(--ink) !important; }
.pago__nota { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.pago__quedan { font-size: .9375rem; }
.pago__dias { font-size: 1.125rem; }
.pago__dias b { font-size: 2rem; }
.pago .btn--lg { width: 100%; }
@media (max-width: 820px) { .pago { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .pago__bum { animation: none; } }
/* «Te quedan X días · Activa tu plan» */
a.plan-pill:not(.plan-pill--menu):not(.notice) { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
a.plan-pill b { font-weight: 700; }
.plan-pill--menu { font-size: .8125rem !important; background: var(--accent-soft) !important; }
@media (max-width: 1180px) { a.plan-pill:not(.plan-pill--menu):not(.notice) span { display: none; } }

/* ---------- pago en dos pasos y comunidad ---------- */
.pasos { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; font-size: .875rem; color: var(--muted); }
.pasos li { display: flex; align-items: center; gap: 8px; }
.pasos b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: .8125rem; }
.pasos [aria-current] { color: var(--ink); font-weight: 600; }
.pasos [aria-current] b { background: var(--ink); color: var(--surface); }
.pago__h { font-size: 1.375rem; letter-spacing: -0.02em; }
.pago__fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.pago__fila .field + .field { margin-top: 0; }
.pago__codigo { display: grid; gap: 6px; }
.pago__codigo label { font-weight: 600; font-size: .9375rem; }
.pago__codigo .row { flex-wrap: nowrap; }
.pago__codigo .input { flex: 1; min-width: 0; }
.tarjeta { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r-2); display: grid; gap: 12px; background: var(--bg); }
.tarjeta legend { padding: 0 6px; font-weight: 600; font-size: .9375rem; }
.tarjeta .input { background: var(--surface); }
.tarjeta[disabled] > :not(legend) { opacity: .5; }
.pago .status:empty, .comu__st:empty { display: none; }
.tarjeta .pago__fila { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
.tarjeta--libre { position: relative; }
.tarjeta--libre::after { content: "No hace falta"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -10%) rotate(-6deg); box-shadow: var(--shadow-1); padding: 6px 14px; border: 2px solid var(--ok); border-radius: 8px; color: var(--ok); font-weight: 800; font-size: 1.125rem; letter-spacing: .02em; background: var(--surface); }
.pago__dejar { font-size: .875rem; }
.pago__comu { font-size: .9375rem; text-align: center; }
.link { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.comu { background: var(--accent-soft); }
.comu__in { display: grid; gap: 24px; align-items: center; }
.comu__copy { display: grid; gap: 12px; }
.comu__copy h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.1; }
.comu .hl, .comu-dlg .hl { box-shadow: inset 0 -0.14em 0 var(--accent); }
.comu__caja { padding: clamp(18px, 3vw, 28px); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.comu__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.comu__form .comu__st, .comu__acepto { grid-column: 1 / -1; }
.comu__acepto { font-size: 0.8125rem; line-height: 1.45; text-align: left; }
.comu__acepto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.comu__ok { display: grid; gap: 8px; }
@media (min-width: 900px) { .comu__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; } }
@media (max-width: 480px) { .comu__form { grid-template-columns: minmax(0, 1fr); } .pago__fila { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.comu-dlg { width: min(92vw, 480px); padding: clamp(22px, 4vw, 32px); border: 0; border-radius: var(--r-2); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(15, 27, 45, .28); }
.comu-dlg::backdrop { background: rgba(15, 27, 45, .55); }
.comu-dlg > * + * { margin-top: 12px; }
.comu-dlg h2 { font-size: 1.625rem; letter-spacing: -0.03em; line-height: 1.15; }
.comu-dlg__x { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.comu-dlg__x:hover { background: var(--bg); color: var(--ink); }
/* pantallas del alumno (mismo estilo que las del profe) */
.mp__nota { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--r-1); background: #0f1b2d; color: #fff; line-height: 1.3; font-size: .9375rem; }
.mp__nota b { color: #7ee2a0; font-size: 1.0625rem; }
.mp__num { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.mp__num small { font-size: 1rem; opacity: .7; font-weight: 600; }
.mp__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp__opt { display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--r-1); border: 2px solid; font-weight: 700; font-size: 1.0625rem; }
.mp__opt em { font-style: normal; font-size: .8125rem; font-weight: 600; }
.mp__opt--mal { border-color: var(--bad, #b42318); background: var(--bad-bg, #fef3f2); color: var(--bad, #b42318); }
.mp__opt--bien { border-color: var(--ok, #067647); background: var(--ok-bg, #ecfdf3); color: var(--ok, #067647); }
.mp__exp { padding: 10px 14px; border-radius: var(--r-1); background: var(--surface); border: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
.mp__rank--prog li { grid-template-columns: 1fr auto 64px; padding: 10px 12px; }
.mp__rank--prog li:first-child { font-weight: 600; }

/* «Si estudias» y «Si enseñas»: cada bloque en su propio panel con un color sutil, para separarlos al hacer scroll */
#roles .feat { padding: clamp(24px, 4vw, 56px); border-radius: 28px; border: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
#roles .feat--rev { background: color-mix(in srgb, #3d7be0 7%, var(--bg)); }
#roles .feat + .feat { margin-top: clamp(28px, 4vw, 48px); }

/* buscador de exámenes: búsqueda grande + tipos como filtro (sin filas de chips con números) */
.search--grande { max-width: 640px; margin: 0 auto 20px; }
.search--grande input { min-height: 56px; font-size: 1.0625rem; }
#certificaciones .tipos { margin-bottom: 24px; }
#certificaciones .tipo { gap: 2px; padding: 14px 16px; text-align: left; font: inherit; cursor: pointer; width: 100%; }
#certificaciones .tipo b { font-size: 1.0625rem; }
#certificaciones .tipo[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.ex-barra { display: flex; align-items: center; gap: 12px; min-height: 36px; margin-bottom: 12px; }
.ex-barra .results-count { margin: 0; }
.ex-barra:has(.results-count:empty):has(.ex-quitar[hidden]) { display: none; }
.ex-barra:has(.results-count:empty):has(.ex-quitar[hidden]) + .ex-grid { margin-top: 20px; }
.ex-quitar { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: var(--ink); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.ex-quitar span { font-size: 1.125rem; line-height: 1; }
@media (max-width: 640px) {                                             /* en móvil, los tipos en una fila que se desliza */
  #certificaciones .tipos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  #certificaciones .tipos::-webkit-scrollbar { display: none; }
  #certificaciones .tipos li { flex: none; scroll-snap-align: start; }
  #certificaciones .tipo { padding: 10px 16px; border-radius: 999px; white-space: nowrap; }
  #certificaciones .tipo b { font-size: .9375rem; }
  #certificaciones .tipo .tipo__tag { display: none; }
}

/* ---------- «Si enseñas»: el flujo en 4 pasos y «Ver demo» ---------- */
.flujo { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.flujo li { position: relative; padding-left: 30px; font-size: 1.0625rem; color: var(--ink-2); line-height: 1.4; }
.flujo li::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; }
.flujo b { color: var(--ink); }
.feat__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.play { font-size: .75em; margin-right: 2px; }

/* ---------- demo «Tu clase, en directo»: pantalla del profe (proyector) + móvil del alumno ---------- */
.dp { --dp-h: 470px; width: min(96vw, 960px); max-height: 94vh; padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(15, 27, 45, .35); overflow: auto; }
.dp::backdrop { background: rgba(15, 27, 45, .6); }
.dp__barra { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 22px; background: var(--surface); }
.dp__chip { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dp__titulo { flex: 1; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.dp__x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dp__x:hover { background: var(--bg); color: var(--ink); }
.dp__pasos { list-style: none; margin: 0; padding: 0 22px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid var(--line); }
.dp__pasos li { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 3px solid var(--line); color: var(--muted); font-size: .875rem; font-weight: 600; transition: color .3s, border-color .3s; }
.dp__pasos span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: .75rem; font-weight: 800; }
.dp__pasos li.is-on { border-color: var(--accent); color: var(--ink); }
.dp__pasos li.is-on span { background: var(--accent); color: #111; }
.dp__pasos li.is-hecho { border-color: var(--ok, #067647); color: var(--ink-2); }
.dp__pasos li.is-hecho span { background: var(--ok, #067647); color: #fff; }
.dp__escena { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding: 22px; align-items: start; background: var(--bg); }
.dp__lado { display: grid; gap: 8px; }
.dp__lado--movil { justify-items: center; }
.dp__quien { font-family: var(--font-mono); font-size: .75rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); }
/* pantalla del profe */
.dp__pantalla { height: var(--dp-h); display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.dp__pantalla-top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #0f1b2d; color: #cbd5e1; font-size: .75rem; }
.dp__pantalla-top i { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.dp__pantalla-top span { margin-left: 8px; }
.dp__prof { flex: 1; min-height: 0; padding: 24px; display: grid; }
.dp__over { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.dp__entra { color: var(--ink-2); font-size: 1rem; }
.dp__codigo { font-family: var(--font-mono); font-size: clamp(3.5rem, 8vw, 5.25rem); font-weight: 800; letter-spacing: .08em; line-height: 1; color: var(--ink); }
.dp__codigo--md { font-size: 2.75rem; }
.dp__compartir { display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; }
.dp__enlace { display: flex; align-items: center; gap: 10px; width: min(100%, 420px); margin-top: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.dp__enlace span { flex: 1; min-width: 0; text-align: left; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp__sala { display: grid; grid-template-rows: auto 1fr auto; gap: 18px; }
.dp__sala-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dp__cuenta { display: grid; justify-items: end; line-height: 1; color: var(--muted); font-size: .875rem; }
.dp__cuenta b { font-size: 2.75rem; color: var(--ok, #067647); }
.dp__huecos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; align-content: stretch; }
.dp__hueco { border: 2px dashed var(--line); border-radius: 12px; }
.dp__alumno { display: grid; place-content: center; justify-items: center; gap: 6px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: .875rem; animation: dp-entra .35s ease-out; }
.dp__ini { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; }
.dp__empezar { width: 100%; }
.dp__marcha { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.dp__marcha-t { font-size: 2.5rem; letter-spacing: -0.03em; }
.dp__barra-prog { width: 260px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dp__barra-prog i { display: block; width: 10%; height: 100%; background: var(--accent); }
/* móvil del alumno */
.dp__movil { position: relative; width: 250px; height: var(--dp-h); padding: 34px 14px 16px; border: 10px solid #0f1b2d; border-radius: 40px; background: var(--surface); box-shadow: 0 18px 40px rgba(15, 27, 45, .25); overflow: hidden; }
.dp__notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; border-radius: 999px; background: #0f1b2d; }
.dp__status { position: absolute; top: 8px; left: 18px; right: 18px; display: flex; justify-content: space-between; font-size: .6875rem; font-weight: 700; color: var(--ink); }
.dp__status span:last-child { letter-spacing: -1px; font-size: .5625rem; }
.dp__al { height: 100%; }
.dp__chat, .dp__entrar, .dp__estado { height: 100%; display: flex; flex-direction: column; }
.dp__chat-top { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.dp__chat-top div { display: grid; line-height: 1.2; } .dp__chat-top b { font-size: .875rem; } .dp__chat-top small { color: var(--muted); font-size: .6875rem; }
.dp__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #dcfce7; color: #166534; font-size: .6875rem; font-weight: 800; }
.dp__chat-cuerpo { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding-top: 10px; }
.dp__vacio { margin: auto; color: var(--muted); font-size: .8125rem; }
.dp__msg { align-self: flex-start; max-width: 94%; padding: 8px 10px 6px; border-radius: 14px 14px 14px 4px; background: var(--bg); border: 1px solid var(--line); font-size: .8125rem; line-height: 1.4; animation: dp-entra .35s ease-out; }
.dp__msg small { display: block; font-weight: 700; color: var(--ok, #067647); }
.dp__msg time { display: block; text-align: right; color: var(--muted); font-size: .625rem; margin-top: 2px; }
.dp__link { padding: 0; border: 0; background: none; color: #2563eb; font: inherit; text-decoration: underline; cursor: pointer; word-break: break-all; }
.dp__app { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.dp__app span:last-child:not(.dp__logo) { margin-left: auto; color: var(--muted); font-size: .75rem; }
.dp__logo { display: flex; align-items: flex-end; gap: 2px; width: 20px; height: 20px; padding: 4px; border-radius: 6px; background: #0f1b2d; }
.dp__logo i { display: block; flex: 1; height: 45%; border-radius: 1px; background: #fff; opacity: .55; } .dp__logo i:nth-child(2) { height: 72%; opacity: 1; } .dp__logo i:nth-child(3) { height: 100%; opacity: 1; background: var(--accent); }
.dp__entrar-cuerpo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.dp__tit { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.25; }
.dp__label { margin-top: 10px; font-weight: 600; font-size: .8125rem; }
.dp__entrar .input { width: 100%; }
.dp__nota { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.dp__entrar .btn { width: 100%; }
.dp__estado-cuerpo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.dp__check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg, #ecfdf3); color: var(--ok, #067647); font-weight: 800; font-size: 1.5rem; }
.dp__check--play { background: var(--accent-soft); color: var(--ink); font-size: 1.125rem; }
.dp__puntos i { font-style: normal; animation: dp-latido 1.2s infinite; } .dp__puntos i:nth-child(2) { animation-delay: .2s; } .dp__puntos i:nth-child(3) { animation-delay: .4s; }
/* final */
.dp__pie { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.dp__pie[hidden] { display: none; }
.dp__pie-ok { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ok-bg, #ecfdf3); color: var(--ok, #067647); font-weight: 800; }
.dp__pie p { flex: 1; color: var(--ink-2); font-size: .9375rem; line-height: 1.45; }
.dp__pie p b { color: var(--ink); }
.dp__pie-acts { display: flex; gap: 10px; flex: none; }
/* ratón y globo */
.dp__hot { position: relative; animation: dp-pulso 1.6s ease-out infinite; }
.dp__cursor { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; opacity: 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); transform: translate(60%, 90%); transition: transform .8s cubic-bezier(.3, .7, .3, 1), opacity .3s; }
.dp__cursor.is-on { opacity: 1; }
.dp__cursor.is-clic svg { animation: dp-clic .25s ease-in-out; }
.dp__tip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 10px)); padding: 6px 12px; border-radius: 8px; background: #0f1b2d; color: #fff; font-size: .8125rem; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .25s; }
.dp__tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.dp__tip.is-on { opacity: 1; }
@keyframes dp-pulso { 0% { box-shadow: 0 0 0 0 rgba(255, 153, 0, .55); } 70% { box-shadow: 0 0 0 12px rgba(255, 153, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0); } }
@keyframes dp-clic { 50% { transform: scale(.8); } }
@keyframes dp-latido { 50% { opacity: .25; } }
@keyframes dp-entra { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 760px) {
  .dp { --dp-h: clamp(300px, calc(94vh - 330px), 440px); }
  .dp__escena { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .dp__escena[data-foco="prof"] .dp__lado--movil, .dp__escena[data-foco="al"] .dp__lado:not(.dp__lado--movil) { display: none; }
  .dp__prof { padding: 16px; }
  .dp__huecos { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .dp__codigo { font-size: 3rem; } .dp__codigo--md { font-size: 2rem; } .dp__cuenta b { font-size: 2rem; }
  .dp__alumno { font-size: .75rem; } .dp__ini { width: 28px; height: 28px; }
  .dp__pasos { padding: 0 14px 12px; } .dp__pasos li { font-size: .75rem; }
  .dp__pie { flex-wrap: wrap; } .dp__pie-acts { width: 100%; } .dp__pie-acts .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .dp__hot, .dp__puntos i, .dp__alumno, .dp__msg { animation: none; } .dp__cursor { transition: none; } .dp__hot { box-shadow: 0 0 0 3px var(--accent); } }

/* mis exámenes: nombre con lápiz para renombrar, y buscador si hay más de 10 */
.ren { display: flex; align-items: flex-start; gap: 6px; }
.ren__btn { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: -3px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.ren__btn:hover, .ren__btn:focus-visible { background: var(--bg); color: var(--ink); }
.ren__btn .icon { width: 18px; height: 18px; }
.ren--editando { flex-wrap: wrap; align-items: center; gap: 8px; }
.ren--editando .input { flex: 1 1 200px; min-width: 0; }
.mios-buscar { grid-column: 1 / -1; max-width: 480px; margin-bottom: 12px; }
.mine-card[hidden] { display: none; }
.status:empty { display: none; }                                         /* sin mensaje no se ve la cajita gris */
.badge--ia { background: #ede9fe; color: #5b21b6; }
/* revisar IA: verificar o editar las preguntas que contestó o completó la IA */
.rev__ia { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #ede9fe; color: #5b21b6; font-size: .8125rem; font-weight: 700; }
.rev.is-ok { border-color: var(--ok, #067647); }
.rev.is-ok .rev__ia { background: var(--ok-bg, #ecfdf3); color: var(--ok, #067647); }
.rev__edit { display: grid; gap: 10px; margin-top: 12px; }
.rev__edit .input, .rev__edit textarea { width: 100%; }
.rev__edit-op { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; }
.rev__edit-op b { text-align: center; }

/* ---------- sello del examen y estrellita ✦ IA del autor ---------- */
.sello-fila { margin-top: 8px; }
.ia-star { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 1px solid #c4b5fd; border-radius: 999px; background: #ede9fe; color: #5b21b6; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.ia-star__tip { position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); width: 240px; padding: 10px 12px; border-radius: 10px; background: #0f1b2d; color: #fff; font-size: .8125rem; font-weight: 500; line-height: 1.4; text-align: left; white-space: normal; opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.ia-star__tip b { display: block; margin-top: 6px; color: #fbbf24; }
.ia-star:hover .ia-star__tip, .ia-star:focus-visible .ia-star__tip { opacity: 1; visibility: visible; }
.ia-star:not(:hover):not(:focus-visible) .ia-star__tip { display: none; }   /* escondida no ocupa sitio: no ensancha la página en el móvil */
.ia-star__tip { max-width: calc(100vw - 32px); }
/* pop-up «Revisar» */
.rvp { width: min(96vw, 820px); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(15, 27, 45, .35); overflow: auto; }
.rvp::backdrop { background: rgba(15, 27, 45, .6); }
.rvp__top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rvp__top h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.rvp__x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.rvp__lista { display: grid; gap: 14px; padding: 18px 20px; }
.rvp__q { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); }
.rvp__q--ia { border-color: #c4b5fd; }
.rvp__q.is-fuera { opacity: .45; }
.rvp__qh { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.rvp__q textarea, .rvp__q .input { width: 100%; }
.rvp__ops { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.rvp__op { display: grid; grid-template-columns: 22px 20px minmax(0, 1fr); gap: 8px; align-items: center; }
.rvp__op > input[type=radio], .rvp__op > input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok, #067647); }
.rvp__extra { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.rvp__extra label { display: grid; gap: 4px; }
.rvp__pie { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 600px) { .rvp__extra { grid-template-columns: minmax(0, 1fr); } }

/* ---------- opiniones: la pantalla de cada opinión, en HTML (nítida y dentro de la tarjeta, como «Si estudias / Si enseñas») ---------- */
.testi__mock { display: grid; align-content: start; align-items: start; padding: 14px 16px; background: var(--surface); }
.mt { display: grid; gap: 10px; font-size: .875rem; }
.mt .mock__top b { font-size: .9375rem; }
.mt .mp__q { padding: 9px 12px; font-size: .875rem; }
.mt .mp__ops { gap: 6px; } .mt .mp__op { padding: 7px 10px; font-size: .8125rem; }
.mt .mock__bars { gap: 7px; } .mt .mock__row { grid-template-columns: 96px 1fr 44px; font-size: .8125rem; }
.mt .mp__rank { gap: 5px; } .mt .mp__rank li { padding: 4px 10px; font-size: .8125rem; } .mt .mp__pos { width: 20px; height: 20px; font-size: .6875rem; }
.mt .mp__rank--prog li { padding: 7px 10px; }
.mt .mp__nota { padding: 9px 12px; } .mt .mp__num { font-size: 1.75rem; }
.mt .mp__opt { padding: 7px 10px; font-size: .9375rem; }
.mt__meta { color: var(--muted); font-size: .8125rem; }
.mt__fallo { padding: 7px 10px; border-radius: var(--r-1); border: 1px dashed var(--line); background: var(--bg); font-size: .8125rem; display: grid; gap: 2px; }
.mt__fallo em { font-style: normal; font-weight: 700; }
.mt__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mt__tile { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg); }
.mt__tile b { font-size: .875rem; } .mt__tile small { color: var(--muted); font-size: .75rem; }
.mt__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mt__lista li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg); font-size: .8125rem; }
.mt__lista small { margin-left: auto; color: var(--muted); }
.mt__lista li.is-on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.mt__radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.is-on > .mt__radio { border: 4px solid var(--accent); }
.mt__files { display: grid; gap: 6px; }
.mt__file { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg); font-family: var(--font-mono); font-size: .75rem; }
.mt__file i { font-style: normal; }
.mt__btn { display: block; padding: 8px 12px; border-radius: var(--r-1); background: var(--accent); color: #111; font-weight: 700; text-align: center; font-size: .8125rem; }
.mt__pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .8125rem; }
.mt__pasos li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.mt__pasos li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.mt__pasos li.is-ok { color: var(--ink-2); } .mt__pasos li.is-ok::before { content: "✓"; display: grid; place-items: center; border: 0; background: var(--ok-bg, #ecfdf3); color: var(--ok, #067647); font-size: .625rem; font-weight: 800; }
.mt__pasos li.is-on { color: var(--ink); font-weight: 700; } .mt__pasos li.is-on::before { border-color: var(--accent); border-top-color: transparent; }
.mt__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt__chips span { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); font-size: .75rem; font-weight: 600; }
.mt__nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mt__nums span { display: grid; place-items: center; padding: 10px 0; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg); font-size: .875rem; }
.mt__nums span.is-on { border-color: var(--accent); background: var(--accent-soft); }
.mt__prog { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; } .mt__prog i { display: block; height: 100%; background: var(--accent); }
.mt__tip { padding: 7px 10px; border-radius: var(--r-1); background: var(--bg); border: 1px solid var(--line); font-size: .8125rem; }
.mt__codigo { display: grid; justify-items: center; gap: 8px; text-align: center; }
.mt__big { font-family: var(--font-mono); font-size: 2.25rem; font-weight: 800; letter-spacing: .08em; line-height: 1; }
.mt__input { width: 100%; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); text-align: left; font-size: .875rem; }
.mt__codigo .mt__btn { width: 100%; }
.mt__medal { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.mt__medal span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; font-size: .8125rem; }
.mt__cont { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg); }
.mt__cont small { color: var(--muted); font-size: .75rem; }
.mt__res { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .8125rem; }
.mt__res li { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--r-1); background: var(--bg); border: 1px solid var(--line); }
.mt__res li::before { font-weight: 800; } .mt__res li.ok::before { content: "✓"; color: var(--ok, #067647); } .mt__res li.no::before { content: "✗"; color: var(--bad, #b42318); }
/* opiniones: todas las tarjetas igual de altas: la cita se corta a 3 líneas con «Ver más» y el nombre va siempre abajo */
.carrusel__pista > .testi { grid-template-rows: auto 1fr auto; }
.testi blockquote { align-content: start; }
.testi__txt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.testi.is-abierta .testi__txt { -webkit-line-clamp: unset; display: block; }
.testi__mas { position: relative; justify-self: start; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* formulario de academias: estilo institucional (etiquetas claras, * en obligatorios, sin ejemplos dentro de los campos) */
.contacto__fila--2 { grid-template-columns: 1fr 1fr; }
.req { color: var(--bad, #b42318); font-weight: 700; }
.contacto__form label { font-weight: 600; font-size: .9375rem; }
.contacto__temas { margin: 0; padding: 0; border: 0; }
.contacto__temas legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .9375rem; }
.contacto__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.contacto__chips .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.contacto__chips .chip[aria-pressed="true"]::before { content: "✓ "; font-weight: 800; }
.contacto__ayuda { color: var(--muted); font-size: .8125rem; }
.contacto__priv { font-weight: 400 !important; font-size: .875rem !important; }
.contacto__oblig { margin-top: -4px; color: var(--muted); font-size: .8125rem; }
@media (max-width: 560px) { .contacto__fila--2 { grid-template-columns: minmax(0, 1fr); } }
/* academias: columnas equilibradas — texto más grande y centrado, formulario más compacto, 3 opciones en una fila */
.contacto { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-items: center; justify-content: space-between; }
.contacto__copy h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.05; }
.contacto__copy p { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); margin-top: 16px; }
.contacto__form { gap: 12px; padding: clamp(18px, 2.4vw, 24px); }
.contacto__form label, .contacto__temas legend { font-size: .875rem; }
.contacto__form .input, .contacto__form .select { min-height: 42px; padding-block: 8px; font-size: .9375rem; }
.contacto__form .textarea { font-size: .9375rem; }
.contacto__form .field { gap: 4px; }
.contacto__chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.contacto__chips .chip { justify-content: center; min-height: 36px; padding: 6px 8px; font-size: .8125rem; white-space: nowrap; }
.contacto__chips .chip[aria-pressed="true"]::before { content: "✓"; margin-right: 4px; }
.contacto__form .btn--lg { min-height: 48px; }
@media (max-width: 900px) { .contacto { grid-template-columns: minmax(0, 1fr); } }
.contacto__chips .chip[aria-pressed="true"]::before { content: none; }
.contacto__chips .chip[aria-pressed="true"] { font-weight: 700; }
.contacto__form .textarea { min-height: 84px; height: 84px; }
@media (max-width: 420px) { .contacto__chips .chip { font-size: .75rem; padding: 6px 4px; } }
.contacto { align-items: start; }                                       /* el título arriba, a la altura del formulario */
.nowrap { white-space: nowrap; }
/* cierre: cada frase del titular en su línea y más aire entre titular, texto, botones y nota */
.cierre__in { gap: 0; }
.cierre h2 { max-width: none; line-height: 1.12; }
.cierre h2 .cierre__l1, .cierre h2 .hl { display: inline-block; }
.cierre h2 .hl { margin-top: .12em; padding-bottom: .04em; }
.cierre h2 + p { margin-top: 28px; max-width: 46ch; line-height: 1.6; }
.cierre__acts { margin-top: 32px; }
.cierre .cierre__riesgo { margin-top: 18px; }
@media (max-width: 600px) { .cierre h2 .cierre__l1 { display: block; } .cierre h2 .hl { display: inline; } .cierre h2 + p { margin-top: 20px; } .cierre__acts { margin-top: 24px; } }

/* ---------- textos legales: dato que falta por rellenar ---------- */
.pendiente { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink); background: var(--pend-bg); padding: 1px 6px; border-radius: 4px; }
.legal-nota { margin-top: 12px; font-size: 0.8125rem; color: var(--muted); }
.legal-nota a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- opiniones: pestañas Alumnos | Docentes, una destacada y el resultado arriba ---------- */
.op-nota { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.op-nota__estrellas { color: var(--accent); font-size: 1.125rem; }
.op-tabs { display: flex; width: max-content; margin: 0 auto clamp(20px, 3vw, 28px); padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.op-tabs button { min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.op-tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.op-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#opiniones .carrusel + .carrusel { margin-top: 0; }
#opiniones .carrusel__head { justify-content: flex-end; margin-bottom: 12px; }
.testi__res { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.testi--destacada { border: 2px solid var(--accent); background: var(--surface); box-shadow: var(--shadow-1); }
.testi--destacada .testi__res { color: var(--warn); }
#opiniones .carrusel__head { margin-top: calc(-1 * (48px + clamp(20px, 3vw, 28px))); margin-bottom: clamp(20px, 3vw, 28px); min-height: 48px; }   /* flechas en la fila de las pestañas */
@media (max-width: 600px) { #opiniones .carrusel__head { margin-top: 0; justify-content: center; } }
.mt__notas { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; counter-reset: n; }
.mt__notas li { display: flex; justify-content: space-between; padding: 5px 10px; border-radius: var(--r-1); background: var(--bg); border: 1px solid var(--line); font-size: .8125rem; }
.mt__notas b { font-variant-numeric: tabular-nums; }
/* opiniones: la pantalla de ejemplo ajustada a su contenido (sin hueco en blanco) y todas del mismo alto */
#opiniones .testi__shot { height: auto; }
#opiniones .carrusel__pista { grid-template-rows: auto 1fr auto; row-gap: 0; }
#opiniones .carrusel__pista > .testi { grid-row: span 3; grid-template-rows: subgrid; height: auto; }   /* pantalla, cita y nombre alineados entre tarjetas */
#opiniones .testi__mock { padding: 12px 14px; align-items: center; }
#opiniones .mt { gap: 8px; }
#opiniones .testi { gap: 12px; }
/* sala: aviso de salida de pantalla */
.k-aviso { margin-top: 12px; text-align: center; color: var(--muted); font-size: .875rem; }
.k-salidas { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--r-1); background: var(--warn-bg, #fdf1d6); color: var(--ink); font-size: .9375rem; }
.al__salidas { margin: 6px 0 0; color: var(--warn); font-size: .875rem; font-weight: 600; }
.k-stage .k-q, .k-stage .k-opts { -webkit-user-select: none; user-select: none; }
/* grupos: seguimiento de cada alumno (solo el creador) */
.g-seg { margin-top: 24px; }
.g-seg__tabla { overflow-x: auto; }
.g-seg__tabla th, .g-seg__tabla td { vertical-align: top; white-space: nowrap; }
.g-seg__dato { display: block; font-size: .875rem; color: var(--ink-2); }
.g-seg__dato b { color: var(--ink); }
.g-seg__nada { color: var(--bad, #b42318); font-size: .875rem; font-weight: 600; }

/* entrar con el correo (js/auth.js) */
.login-o { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8125rem; }
.login-o::before, .login-o::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-correo { display: grid; gap: 8px; }
.login-correo .login-note:empty { display: none; }
.pagar-dlg .pagar-dlg__acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }

/* subir: las tres pestañas (archivo, enlace, texto) con la misma altura; el texto se amplía hasta un tope */
#subir-root .tabpanel { min-height: 136px; }
#subir-root #panel-url, #subir-root #panel-text { display: grid; align-content: start; }
#subir-root #panel-url[hidden], #subir-root #panel-text[hidden] { display: none; }
#subir-root #panel-text .field { gap: 4px; }
#subir-root #material-text { min-height: 84px; height: 84px; max-height: 320px; resize: vertical; }

/* pop-up de la comunidad: titular grande, una línea y lo que se gana */
.comu-dlg { width: min(92vw, 460px); text-align: center; }
.comu-dlg > * + * { margin-top: 10px; }
.comu-dlg .eyebrow { display: block; }
.comu-dlg h2.comu-dlg__t { font-size: clamp(1.875rem, 6vw, 2.375rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 800; }
.comu-dlg__t .hl { color: var(--accent); box-shadow: none; }
.comu-dlg__lede { font-size: 1.0625rem; color: var(--ink-2); }
.comu-dlg__lista { list-style: none; margin: 14px 0 6px; padding: 12px 16px; display: grid; gap: 6px; justify-items: start; border-radius: 14px; background: var(--surface-2); text-align: left; font-weight: 600; font-size: .9375rem; }
.comu-dlg__lista li { display: flex; align-items: center; gap: 8px; }
.comu-dlg__lista .icon { width: 18px; height: 18px; color: var(--ok); flex: none; }
.comu-dlg .comu__form { text-align: left; }
.comu-dlg__pie { margin-top: 12px; }
.rol-form { display: grid; gap: 12px; max-width: 560px; }
.rol-form__doc { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.rol-form__doc[hidden] { display: none; }
@media (max-width: 560px) { .rol-form__doc { grid-template-columns: 1fr; } }
.rol-form .seg { justify-self: start; }
.rol-form__doc .field { align-content: start; margin-top: 0; }

/* las ventanas modales, siempre centradas en la pantalla (el «position: relative» de .dlg las mandaba arriba del todo de la página) */
dialog.dlg:modal, dialog.comu-dlg:modal, dialog.da-dlg:modal, dialog.dc:modal, dialog.dp:modal { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 32px); overflow: auto; }

/* «Valora SubeNota» al terminar una demo: centrado (el ratón suele estar en el centro o a la derecha) y estrellas grandes */
.demo-done { display: grid; justify-items: center; text-align: center; gap: 10px; }
.demo-done .stars { justify-content: center; }
.demo-done .star { font-size: 2.25rem; }
.demo-done__acts { justify-content: center; }
.demo-done .btn-link-quiet { justify-self: center; }
.demo-done .stars .star { font-size: 2.5rem; width: auto; height: auto; padding: 0 4px; }

/* «Valora SubeNota»: título y estrellas grandes, para que apetezca valorar */
.demo-done h3 { font-size: clamp(1.625rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.demo-done .stars { gap: 4px; margin: 4px 0 2px; }
.demo-done .stars .star { width: 58px; height: 58px; padding: 0; border-radius: 14px; }
.demo-done .star svg { width: 48px; height: 48px; }
.demo-done .star.is-on, .demo-done .star.is-hover { color: #f5a400; }
.demo-done .star:hover { transform: scale(1.12); }
.demo-done .stars__msg { font-size: .9375rem; }
.demo-done .stars .star { width: 70px; height: 70px; }
.demo-done .star svg { width: 60px; height: 60px; }
@media (max-width: 420px) { .demo-done .stars .star { width: 54px; height: 54px; } .demo-done .star svg { width: 46px; height: 46px; } }

/* «Código de clase» en la cabecera: código → Entrar → nombre → dentro */
.codigo { position: relative; }
.codigo__fila { display: flex; align-items: center; height: 40px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: border-color .16s ease, box-shadow .16s ease; }
.codigo__fila:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.codigo__input { flex: 1; min-width: 0; width: 160px; height: 100%; padding: 0 6px 0 12px; border: 0; background: none; color: var(--ink); font: inherit; font-size: .9375rem; outline: none; }
.codigo__input::placeholder { color: var(--muted); }
.codigo__btn { flex: none; height: 100%; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; }
.codigo__btn:hover { opacity: .88; }
.codigo__btn--ir { display: grid; place-items: center; width: 34px; padding: 0; }
.codigo__btn--ir .icon { width: 16px; height: 16px; }
.codigo--mm .codigo__btn--ir { width: 42px; }
.codigo__btn:disabled { opacity: .5; cursor: progress; }
.codigo__pop { display: grid; gap: 8px; margin-top: 8px; }
.codigo__pop[hidden], .codigo__err[hidden] { display: none; }
.codigo__t { margin: 0; font-size: .875rem; color: var(--muted); }
.codigo__t b { color: var(--ink); letter-spacing: .08em; }
.codigo__l { font-size: .875rem; font-weight: 600; color: var(--ink); }
.codigo__pop .codigo__input { width: auto; }
.codigo__otro { justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8125rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.codigo__err { margin: 8px 0 0; font-size: .8125rem; font-weight: 500; color: var(--danger, #c0362c); }
.codigo--cab { display: none; margin-right: 4px; }
.codigo--cab .codigo__caja { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 280px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-1); }
.codigo--cab .codigo__caja:has(> .codigo__pop[hidden]):has(> .codigo__err[hidden]) { display: none; }
.codigo--cab .codigo__pop { margin-top: 0; }
.codigo--cab .codigo__pop[hidden] + .codigo__err { margin-top: 0; }
.codigo--mm { padding: 4px 4px 8px; }
.codigo--mm .codigo__fila { height: 48px; }
.codigo--mm .codigo__input { width: auto; font-size: 1rem; }
@media (min-width: 1180px) { .codigo--cab { display: block; } }
@media (min-width: 1180px) and (max-width: 1299px) { .site-header .nav a { padding: 0 6px; } .site-header .brand { margin-right: 16px; } .codigo--cab { margin-right: 0; } .codigo__input { width: 136px; padding-left: 10px; font-size: .875rem; } }

/* pie compacto, como el de las webs de universidad: 4 columnas parejas, enlaces juntos y lo legal en una franja abajo */
.site-footer.pie { padding-block: 36px calc(14px + env(safe-area-inset-bottom)); font-size: .875rem; }
.pie__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px 32px; align-items: start; }
.pie__marca { display: grid; gap: 8px; justify-items: start; }
.pie__marca .brand { margin: 0; }
.pie__marca p { margin: 0; color: var(--muted); }
.site-footer.pie nav { display: grid; gap: 0; align-content: start; }
.site-footer.pie nav b { margin-bottom: 6px; color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.site-footer.pie nav a { min-height: 0; padding: 3px 0; line-height: 1.5; color: var(--ink-2); }
.pie__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.pie__base p { margin: 0; }
.site-footer.pie .pie__base nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer.pie .pie__base nav a { padding: 6px 0; color: var(--muted); }
@media (max-width: 760px) {
  .pie__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .pie__marca { grid-column: 1 / -1; }
  .site-footer.pie nav a { padding: 5px 0; }   /* en el móvil, algo más de aire para el dedo */
}
@media (max-width: 420px) { .pie__cols { gap: 20px 10px; } .site-footer.pie .pie__cols nav a { font-size: .8125rem; white-space: nowrap; } }
@media (max-width: 340px) { .pie__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* sin selector de idioma: los botones de la cabecera van a la derecha */
.site-header .header-actions { margin-left: auto; }
.pie__abrazo { max-width: 62ch; }

/* Entrar — como el de VitalSource: ventana grande y blanca; frase y dibujo a la izquierda, tarjeta a la derecha, idioma/SubeNota/Contacto abajo */
dialog.dlg.login { position: fixed; width: min(96vw, 1280px); max-width: 1280px; height: min(92vh, 780px); max-height: 92vh; padding: 0 !important; overflow: hidden; border: 0; border-radius: 22px; background: #fff; color: #1d2b5b; }
dialog.dlg.login[open] { display: block; }
.login__lado { position: absolute; left: 6%; top: 22%; max-width: 40%; }
.login__grande { margin: 0; color: #1d2b5b; font-size: clamp(2.5rem, 4.4vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
.login__sub { margin: 14px 0 0; color: #1d2b5b; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.login__dibujo { position: absolute; left: 0; bottom: 0; width: 58%; max-width: 720px; pointer-events: none; }
.login__der { position: absolute; inset: 0 5% 64px auto; display: flex; align-items: center; }
.login__caja { position: relative; display: flex; flex-direction: column; gap: 12px; width: 360px; max-height: calc(92vh - 110px); overflow: auto; padding: 30px 32px 20px; border: 1px solid #e3e6ea; border-radius: 6px; background: #fff; box-shadow: 0 14px 40px -18px rgba(15, 23, 42, .25); }
.login__x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: #64748b; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.login__x:hover { background: #f1f5f9; color: #0f172a; }
.login__marca { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 0 4px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: #1f2937; }
.login__marca svg { width: 24px; height: 24px; } .login__marca b { color: #2F6BF6; font-weight: 700; }
dialog.dlg.login .login__caja h2 { margin: 6px 0 0; color: #0f172a; font-size: 1.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.login__nuevo { margin: -6px 0 4px; color: #1f2937; font-size: .875rem; }
.login__enlace { padding: 0; border: 0; background: none; color: #1a64c4; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.login__lbl { color: #0f172a; font-size: .8125rem; font-weight: 600; }
.login .login-correo { display: grid; gap: 7px; }
.login .login-correo .input { min-height: 40px; height: 40px; border: 1px solid #9aa3ae; border-radius: 3px; font-size: .9375rem; }
.login__btn { width: 100%; min-height: 40px; margin-top: 10px; border-radius: 999px; background: #2b6aa6; border-color: #2b6aa6; font-size: .9375rem; font-weight: 600; box-shadow: none; }
.login__btn:hover { background: #245a8e; border-color: #245a8e; }
.login__pista { margin: 0; color: #64748b; font-size: .75rem; text-align: center; }
.login .login-correo .login-note:empty { display: none; }
.login .login-o { margin: 4px 0; font-size: .75rem; }
.login__redes { display: grid; gap: 10px; justify-items: stretch; }
.login__redes #gbtn { display: flex; justify-content: center; min-height: 40px; }
.login__apple { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; border: 1px solid #1f2937; border-radius: 999px; background: #fff; color: #1f2937; font-family: "Google Sans", Roboto, Arial, sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; }
.login__apple:hover { background: #f8f9fa; } .login__apple svg { width: 17px; height: 17px; } .login__apple[hidden] { display: none; }
.login__powered { margin: 10px 0 0; color: #475569; font-size: .75rem; text-align: center; } .login__powered b { color: #2F6BF6; font-weight: 700; }
.login__pie { position: absolute; right: 5%; bottom: 20px; display: flex; align-items: center; gap: 28px; font-size: .875rem; }
.login__pie a, .login__idioma { display: inline-flex; align-items: center; gap: 6px; color: #1a64c4; font-weight: 500; text-decoration: none; }
.login__pie a:hover { text-decoration: underline; } .login__pie svg { width: 16px; height: 16px; }
.login__idioma select { border: 0; background: none; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
@media (max-width: 900px) {
  dialog.dlg.login { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; overflow: auto; }
  .login__lado, .login__dibujo { display: none; }
  .login__der { position: static; display: flex; justify-content: center; padding: 24px 16px 8px; }
  .login__caja { width: 100%; max-width: 400px; max-height: none; }
  .login__pie { position: static; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 12px 16px 24px; }
}
.login__luna { position: absolute; left: 34%; top: 5%; width: 230px; pointer-events: none; }
.login__grande, .login__sub { color: #26235c; }
@media (max-width: 900px) { .login__luna { display: none; } }
dialog.dlg.login .login__grande, dialog.dlg.login .login__sub { color: #26235c; }
/* Entrar: ritmo de espacios fijo dentro de la tarjeta (múltiplos de 4) */
dialog.dlg.login .login__caja { gap: 0; padding: 32px 32px 22px; }
dialog.dlg.login .login__marca { margin: 0 0 18px; }
dialog.dlg.login .login__caja h2 { margin: 0; }
dialog.dlg.login .login__nuevo { margin: 6px 0 20px; }
dialog.dlg.login .login-correo { gap: 0; }
dialog.dlg.login .login__lbl { margin-bottom: 6px; }
dialog.dlg.login .login__btn { margin-top: 16px; }
dialog.dlg.login .login__pista { margin-top: 8px; }
dialog.dlg.login .login-correo .login-note { margin-top: 8px; }
dialog.dlg.login .login-o { margin: 18px 0 14px; }
dialog.dlg.login .login__redes { gap: 10px; }
dialog.dlg.login .login__redes #gbtn { min-height: 40px; height: 40px; overflow: hidden; align-items: center; }
dialog.dlg.login #login-msg:not([hidden]) { margin-top: 12px; }
dialog.dlg.login #dev-wrap:not([hidden]) { margin-top: 12px; }
dialog.dlg.login .login__powered { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #eef0f3; }
dialog.dlg.login .login__x { top: 10px; right: 10px; }
.login__lado { top: 50%; transform: translateY(-80%); }
dialog.dlg.login .login-o { margin: 16px 0 8px; } .login__lado { transform: translateY(-95%); }
/* Entrar: los archivos (PDF, DOC, TXT, enlace) flotan y se convierten en examen */
.login__luna { left: 30%; top: 7%; width: 270px; }
.login__dibujo { bottom: 18px; }
.login__flota { animation: login-flota 6s ease-in-out infinite; }
.login__flota--2 { animation-delay: -2s; } .login__flota--3 { animation-delay: -4s; }
@keyframes login-flota { 50% { translate: 0 -8px; } }
.login__flujo path { animation: login-flujo 1.6s linear infinite; }
@keyframes login-flujo { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .login__flota, .login__flujo path { animation: none; } }
/* Entrar en pantallas bajas (portátil con la ventana pequeña): el dibujo no se monta encima de la frase */
@media (min-width: 901px) and (max-height: 700px) { .login__dibujo, .login__luna { display: none; } .login__lado { transform: translateY(-50%); } }
/* Creando tu examen: «no cierres la página» tachado y corregido con rotulador amarillo */
.tachon { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #e8432e; }
.rotu { display: inline-block; margin-top: 4px; padding: 0 4px; border-radius: 3px; color: var(--ink); font-weight: 600; background: linear-gradient(100deg, rgba(255, 224, 102, .2) 0, #ffe066 6%, #ffd84d 94%, rgba(255, 216, 77, .3) 100%) no-repeat 0 55% / 0% 78%; -webkit-box-decoration-break: clone; box-decoration-break: clone; animation: rotu-pinta .7s ease-out .5s forwards; }
@keyframes rotu-pinta { to { background-size: 100% 78%; } }
@media (prefers-reduced-motion: reduce) { .rotu { animation: none; background-size: 100% 78%; } }
:root[data-theme="dark"] .rotu { color: #1a1a1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rotu { color: #1a1a1a; } }
/* (i) en resultado e informe: respuesta que no venía en el examen subido (la completamos nosotros) */
.info-resp { position: relative; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e8efff; color: #2F6BF6; font: italic 700 13px/1 Georgia, serif; cursor: help; vertical-align: middle; }
.info-resp:focus-visible { outline: 2px solid #2F6BF6; outline-offset: 2px; }
.info-resp__tip { position: absolute; z-index: 20; top: calc(100% + 8px); right: -6px; width: min(300px, 80vw); padding: 10px 12px; border-radius: 10px; background: #14213d; color: #fff; font: 400 13px/1.45 var(--font-sans, system-ui), sans-serif; font-style: normal; text-align: left; box-shadow: 0 12px 30px -10px rgba(15,23,42,.5); opacity: 0; visibility: hidden; transition: opacity .15s; }
.info-resp__tip a { color: #9cc0ff; }
.info-resp:hover .info-resp__tip, .info-resp:focus .info-resp__tip, .info-resp:focus-within .info-resp__tip { opacity: 1; visibility: visible; }
.inf-q { position: relative; } .inf-q > .info-resp { position: absolute; top: 12px; right: 0; }
details > summary .info-resp { order: 9; margin-left: auto; }
.info-pie { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: #f4f7fd; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.info-resp--quieto { cursor: default; margin-top: 1px; }
@media print { .info-resp__tip { display: none; } }

/* «Creando tu examen» (Tarea 2, v8): dato real a la derecha y cuadro con la hora de inicio y de fin */
.cr-der { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 140px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.step.is-done .cr-der { color: var(--ok); font-weight: 600; }
.step.is-active .cr-der { color: var(--ink); font-weight: 600; }
.cr-horas { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cr-horas div { padding: 12px 16px; } .cr-horas div + div { border-left: 1px solid var(--line); }
.cr-horas span { display: block; color: var(--muted); font-size: .8125rem; } .cr-horas b { font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cr-horas.fin div + div b { color: var(--ok); }
@media (max-width: 600px) { .step:has(.cr-der) { grid-template-columns: 28px minmax(0, 1fr); } .step .estado-paso:has(.cr-der) { grid-column: 2; justify-self: start; margin-top: -6px; } .cr-der { min-width: 0; justify-content: flex-start; } }

/* «Creando tu examen» en directo: como el coche que llega en Uber, ves las preguntas escribirse */
.vivo { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.vivo__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.vivo__top b { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.vivo__eta { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vivo__pulso { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: vivo-pulso 1.4s ease-out infinite; }
@keyframes vivo-pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.vivo.is-fin .vivo__pulso { background: var(--ok); animation: none; }
.vivo.is-fin .vivo__top b, .vivo.is-fin .vivo__eta { color: var(--ok); font-weight: 600; }
.vivo__hoja { position: relative; height: 248px; padding: 14px 16px; overflow: hidden; background: var(--surface-2); }
.vivo__hoja::after { content: ""; position: absolute; inset: auto 0 0; height: 48px; background: linear-gradient(transparent, var(--surface-2)); pointer-events: none; }
.vivo__lineas i { display: block; height: 10px; margin: 12px 0; border-radius: 6px; background: var(--line); animation: vivo-brillo 1.2s ease-in-out infinite alternate; }
.vivo__lineas i:nth-child(2n) { width: 82%; } .vivo__lineas i:nth-child(3n) { width: 64%; }
@keyframes vivo-brillo { from { opacity: .45; } to { opacity: 1; } }
.vivo__texto { position: relative; font-size: .875rem; line-height: 1.6; color: var(--ink-2); }
.vivo__texto::before { content: ""; position: absolute; left: -16px; right: -16px; height: 1.6em; background: color-mix(in srgb, var(--accent) 16%, transparent); animation: vivo-escaneo 2.4s linear infinite; }
@keyframes vivo-escaneo { from { top: 0; } to { top: calc(100% - 1.6em); } }
.vivo__nota { font-size: .8125rem; color: var(--muted); margin-bottom: 10px; }
.vivo__temas { display: flex; flex-wrap: wrap; gap: 8px; }
.vivo__temas span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 600; opacity: 0; animation: vivo-entra .35s ease-out forwards; animation-delay: calc(var(--i) * 220ms); }
.vivo__lista { display: flex; flex-direction: column; gap: 10px; }
.vivo__q { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: vivo-entra .3s ease-out; }
.vivo__q:not(:first-child) { opacity: .6; }
.vivo__num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vivo__q.is-hecha .vivo__num { background: var(--ok-bg); color: var(--ok); }
.vivo__q p { font-weight: 600; font-size: .9375rem; line-height: 1.4; min-height: 1.4em; }
.vivo__q ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: .8125rem; color: var(--ink-2); }
.vivo__q li { display: flex; gap: 8px; opacity: 0; } .vivo__q li b { color: var(--muted); }
.vivo__q.is-hecha li { animation: vivo-entra .25s ease-out forwards; animation-delay: calc(var(--i) * 70ms); }
.vivo__q:not(:first-child) li { opacity: 1; animation: none; }
@keyframes vivo-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vivo__pulso, .vivo__lineas i, .vivo__texto::before { animation: none; } .vivo__temas span, .vivo__q, .vivo__q li { animation: none; opacity: 1; } }

/* pop-up final: que se vea que ha salido bien (listo, cuántas, módulos, guardar) y las 4 formas de hacerlo */
.pick-listo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); }
.pick-listo__ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: var(--surface); }
.pick-listo__ic .icon { width: 20px; height: 20px; }
.pick-listo b { display: block; font-size: 1.0625rem; } .pick-listo span:not(.pick-listo__ic) { display: block; color: var(--ink); font-size: .875rem; margin-top: 2px; }
.pick-datos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pick-datos span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: .875rem; color: var(--ink-2); } .pick-datos b { color: var(--ink); font-variant-numeric: tabular-nums; }
dialog.dlg h2.pick-q { margin-top: 18px; font-size: 1.375rem; }
#pick-dlg .pcard-grid { margin-top: 12px; }
.pick-google { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; font-size: .875rem; }
.pick-ok { display: flex; align-items: center; gap: 8px; color: var(--ok) !important; font-weight: 600; font-size: .875rem; margin-top: 16px !important; }
.pick-prev { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; }
.pick-prev summary { cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: .9375rem; }
.pick-prev ol { margin: 0; padding: 0 14px 12px 34px; display: grid; gap: 12px; }
.pick-prev ol > li p { margin: 0 !important; color: var(--ink) !important; font-weight: 600; font-size: .875rem; }
.pick-prev ul { list-style: none; padding: 0; margin: 4px 0 0; font-size: .8125rem; color: var(--ink-2); display: grid; gap: 2px; } .pick-prev ul b { color: var(--muted); margin-right: 6px; }
#pick-dlg { max-height: calc(100dvh - 24px); overflow-y: auto; }
#pick-dlg .actions { margin-top: 14px; }
@media (max-width: 520px) { .pick-google { flex-direction: column; align-items: stretch; } }
.vivo__q--pensando { opacity: 1 !important; border-style: dashed; }
.vivo__q--pensando p { color: var(--muted); font-weight: 500; }
.vivo__q--pensando .vivo__lineas i { margin: 8px 0 0; height: 8px; }
@media (max-width: 600px) { .vivo__top { flex-wrap: wrap; row-gap: 2px; } .vivo__eta { flex-basis: 100%; padding-left: 20px; } .vivo__hoja { height: 220px; } }
.pick-temas { display: grid; gap: 10px; margin-top: 16px; }
.pick-temas .pcard { min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.pick-temas .pcard small { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* «Leyendo tus notas»: un folio con sus renglones y el láser que los repasa */
.vivo__folio { position: relative; height: 100%; padding: 16px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 27px, color-mix(in srgb, var(--line) 70%, transparent) 27px 28px); background-position: 0 14px; }
.vivo__folio p { margin: 0; font-size: .875rem; line-height: 28px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vivo__folio p.vivo__titulo { font-weight: 700; color: var(--ink); }
.vivo__laser { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--accent) 55%, transparent); animation: vivo-laser 2.6s ease-in-out infinite alternate; z-index: 1; }
.vivo__laser::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 28px; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 12%, transparent)); }
@keyframes vivo-laser { from { top: 8px; } to { top: calc(100% - 10px); } }
@media (prefers-reduced-motion: reduce) { .vivo__laser { animation: none; top: 40%; } }
/* la (i) del resultado en su sitio: en la misma línea, antes de la flecha */
.review summary:has(.info-resp) { grid-template-columns: 24px minmax(0, 1fr) 20px 20px; }
.review summary .info-resp { grid-column: 3; grid-row: 1; margin: 0; }
