/* PreResi · Simulador — estilos
   Paleta A-14 de la landing (landing-3d/fuente/estilos/00-tokens.css) llevada al simulador (decisión D1 de Henkel, 2026-10-06):
   negro #0A0A0A, blanco, papel #F5F5F2 y cobre. Solo cambian los VALORES de los tokens; sus nombres siguen siendo los del simulador.
   Acierto = azul y error = cobre (siempre con icono y texto, nunca solo color); aviso = texto negro/blanco con barra cobre e icono ⚠.
   Contraste AA: texto ≥ 4,5:1 y gráficos, bordes y foco ≥ 3:1. Los valores, la equivalencia con la landing y cada par de contraste
   los comprueba simulador/pruebas/tokens-paridad.test.mjs contra simulador/pruebas/fixtures/tokens-unificados.json
   (si cambias un token aquí, cámbialo también allí). Revertir el semáforo = cambiar --ok, --bad, --warn y sus fondos.
   --accent = cobre como TEXTO o acento; --warn-bar = cobre como barra, punto o subrayado (gráfico, ≥ 3:1: no sirve de texto).
   El naranja del pulso 3D (#FF6A1A, 2,87:1) NO es color de interfaz. */
:root {
  color-scheme: light;
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --surface-2: #ECECE7;
  --text: #0A0A0A;
  --text-2: #4A4A46;
  --border: rgba(10, 10, 10, .14);
  --border-strong: rgba(10, 10, 10, .52);
  --primary: #0A0A0A;
  --primary-ink: #FFFFFF;
  --primary-soft: #ECECE7;
  --accent: #9A5524;
  --focus: #0A0A0A;
  --ok: #2357FF;
  --ok-bg: #EEF2FF;
  --bad: #9A5524;
  --bad-bg: #F6EEE7;
  --warn: #0A0A0A;
  --warn-bg: #ECECE7;
  --warn-bar: #B87333;
  --shadow: 0 1px 2px rgba(10, 10, 10, .06), 0 8px 24px -12px rgba(10, 10, 10, .16);
  --radius: 14px;
  --radius-pill: 999px;   /* formas de la landing (sitio único, 2026-10-07): botones en píldora = --radio-pill */
  --radius-l: 24px;       /* tarjetas = --radio-l (1,5 rem) de la landing */
  --progreso: #2357FF;    /* barra de progreso en el azul de la landing (--azul); no es --ok (acierto) */
  --radius-sm: 8px;
  --fs: 1.0625rem;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A0A0A; --surface: #141414; --surface-2: #1F1F1F; --text: #FFFFFF; --text-2: #B7B7B2;
    --border: rgba(255, 255, 255, .16); --border-strong: rgba(255, 255, 255, .42);
    --primary: #FFFFFF; --primary-ink: #0A0A0A; --primary-soft: #1F1F1F; --accent: #D08A4E; --focus: #FFFFFF;
    --progreso: #8EA6FF; --ok: #8EA6FF; --ok-bg: #172348; --bad: #D08A4E; --bad-bg: #32251A; --warn: #FFFFFF; --warn-bg: #281F18; --warn-bar: #D08A4E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0A0A; --surface: #141414; --surface-2: #1F1F1F; --text: #FFFFFF; --text-2: #B7B7B2;
  --border: rgba(255, 255, 255, .16); --border-strong: rgba(255, 255, 255, .42);
  --primary: #FFFFFF; --primary-ink: #0A0A0A; --primary-soft: #1F1F1F; --accent: #D08A4E; --focus: #FFFFFF;
  --progreso: #8EA6FF; --ok: #8EA6FF; --ok-bg: #172348; --bad: #D08A4E; --bad-bg: #32251A; --warn: #FFFFFF; --warn-bg: #281F18; --warn-bar: #D08A4E;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -12px rgba(0, 0, 0, .6);
}
:root[data-fs="grande"] { font-size: 112.5%; }
:root[data-fs="xl"] { font-size: 125%; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (max-width: 899px) { html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: var(--fs); line-height: 1.55; min-height: 100dvh;
}
/* enlaces: texto del tema con subrayado cobre (como en la landing); al pasar el cursor, cobre de texto (--accent) */
a { color: var(--text); text-decoration-color: var(--warn-bar); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:not([class]):hover { color: var(--accent); }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 8px; top: -60px; background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: 8px; z-index: 50; text-decoration: none; }
.saltar:focus { top: 8px; }

/* ---------- estructura ---------- */
.barra {
  position: sticky; top: 0; z-index: 20; background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px;
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1rem; }
.marca svg { flex: none; }
.marca small { display: block; font-weight: 500; color: var(--text-2); font-size: .78rem; line-height: 1.2; }
.barra .espacio { flex: 1; }
.cuenta { font-size: .85rem; color: var(--text-2); text-align: right; line-height: 1.25; }
.cuenta b { color: var(--text); font-size: 1rem; }
.btn-icono { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.btn-icono:hover { background: var(--surface-2); }

.layout { display: grid; grid-template-columns: 1fr; max-width: 1180px; margin: 0 auto; }
main { padding: 16px 16px 96px; min-width: 0; }
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface);
  border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
  color: var(--text-2); text-decoration: none; font-size: .72rem; font-weight: 600; border-radius: var(--radius);
}
/* sección activa: fondo suave + barra cobre (no depende solo del color del texto) */
.nav a[aria-current="page"] { color: var(--text); background: var(--primary-soft); box-shadow: inset 0 -3px 0 var(--warn-bar); }
.nav svg { width: 24px; height: 24px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 220px 1fr; gap: 8px; padding: 0 16px; }
  .nav {
    position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; gap: 4px;
    border: 1px solid var(--border); border-radius: var(--radius); margin-top: 16px; padding: 8px; background: var(--surface);
  }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; font-size: .95rem; min-height: 48px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--warn-bar); }
  main { padding: 16px 8px 48px; }
}

/* ---------- tipografía y bloques ---------- */
h1 { font-size: 1.6rem; line-height: 1.2; margin: 4px 0 12px; letter-spacing: -.025em; font-weight: 500; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 24px 0 10px; letter-spacing: -.015em; font-weight: 500; }
h3 { font-size: 1.02rem; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 10px; }
.sub { color: var(--text-2); font-size: .95rem; }
.peq { font-size: .85rem; color: var(--text-2); }
.tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 18px; box-shadow: none; }   /* como las tarjetas de la landing (2026-10-07) */
.tarjeta + .tarjeta { margin-top: 12px; }
.rejilla { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.rejilla-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.rejilla > .tarjeta + .tarjeta, .rejilla-2 > .tarjeta + .tarjeta { margin-top: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-size: 1.9rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--text-2); font-size: .85rem; }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
/* estados con icono además del color (✓ acierto, ✕ error, ⚠ aviso) */
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.ok::before { content: "✓\A0"; content: "✓\A0" / ""; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.bad::before { content: "✕\A0"; content: "✕\A0" / ""; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bar); }
.chip.warn::before { content: "⚠\FE0E\A0"; content: "⚠\FE0E\A0" / ""; color: var(--accent); }
.chip.pri { background: var(--surface); color: var(--text); border-color: var(--primary); }
/* aviso: texto negro/blanco, barra cobre de 4 px e icono ⚠ (se distingue del error por icono, texto y fondo) */
.aviso { position: relative; border-radius: var(--radius-sm); padding: 12px 14px 12px 40px; background: var(--warn-bg); color: var(--warn); border-left: 4px solid var(--warn-bar); font-size: .92rem; }
.aviso::before { content: "⚠\FE0E"; content: "⚠\FE0E" / ""; position: absolute; left: 12px; top: 12px; color: var(--accent); font-weight: 600; }
.aviso.info { padding-left: 14px; background: var(--primary-soft); color: var(--text); border-left-color: var(--primary); }
.aviso.info::before { content: none; }
.vacio { text-align: center; padding: 32px 16px; color: var(--text-2); }

/* ---------- botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; font-size: 1rem; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.pri:hover { background: var(--accent); border-color: var(--accent); color: var(--primary-ink); }
.btn.peligro { color: var(--bad); border-color: var(--bad); }
.btn.bloque { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.chico { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.campo .peq { font-weight: 400; }
select, input[type="number"], input[type="date"], input[type="search"], input[type="text"], textarea {
  font: inherit; font-size: 1rem; min-height: 48px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); width: 100%;
}
textarea { min-height: 90px; }
.opciones-filtro { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: .92rem;
}
.toggle input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; margin-bottom: 8px; }

/* ---------- pregunta ---------- */
.q-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.q-enunciado { font-size: calc(var(--fs) * 1.06); font-weight: 600; line-height: 1.55; margin: 6px 0 14px; white-space: pre-line; }
.q-opciones { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.opcion {
  width: 100%; text-align: left; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 56px; padding: 10px 14px; border-radius: var(--radius); border: 2px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.opcion:hover:not([disabled]) { background: var(--surface-2); }
.opcion .letra {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .9rem;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.opcion[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px var(--primary); }
.opcion[aria-pressed="true"] .letra { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.opcion.correcta { border-color: var(--ok); background: var(--ok-bg); }
.opcion.correcta .letra { background: var(--ok); color: var(--surface); border-color: var(--ok); }
.opcion.incorrecta { border-color: var(--bad); background: var(--bad-bg); }
.opcion.incorrecta .letra { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.opcion.incorrecta[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--bad); }
.opcion[disabled] { cursor: default; }
.opcion .icono-res { font-weight: 600; }
.explicacion { margin-top: 14px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 14px; }
.explicacion h3 { margin-bottom: 4px; }
.explicacion .ref { margin-top: 8px; font-size: .85rem; color: var(--text-2); }
.resultado-linea { font-weight: 600; margin-top: 12px; }
.resultado-linea.ok { color: var(--ok); }
.resultado-linea.bad { color: var(--bad); }
.acciones-q { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.acciones-q .espacio { flex: 1; }
.progreso-barra { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progreso-barra > i { display: block; height: 100%; background: var(--progreso); border-radius: 999px; }
.reloj { font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); }
.reloj.alerta { color: var(--accent); }

/* navegador de preguntas del simulacro */
.mapa { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.mapa button {
  min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; position: relative;
}
.mapa button.resp { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.mapa button[aria-current="step"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); text-decoration: underline 2px; text-underline-offset: 3px; font-weight: 600; }
.mapa button.marc::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-bar); box-shadow: 0 0 0 2px var(--surface); }
.mapa button.ok { background: var(--ok-bg); border-color: var(--ok); }
.mapa button.bad { background: var(--bad-bg); border-color: var(--bad); }

/* ---------- gráficos ---------- */
.barras { display: grid; gap: 10px; }
.barra-fila { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 52px; gap: 10px; align-items: center; font-size: .92rem; }
.barra-fila .pista { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.barra-fila .pista i { display: block; height: 100%; background: var(--primary); }
.barra-fila .pista i.bajo { background: var(--bad); }
.barra-fila .pista i.medio { background: var(--text-2); }
.barra-fila .pista i.alto { background: var(--ok); }
.barra-fila .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.grafico svg { width: 100%; max-width: 640px; height: auto; display: block; margin-inline: auto; }
.calor { display: grid; grid-template-columns: repeat(auto-fill, 14px); gap: 3px; }
.calor i { width: 14px; height: 14px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.calor i.n1 {
  background: var(--primary-soft);
  background: color-mix(in srgb, var(--primary) 50%, var(--surface));
}
.calor i.n2 {
  background: var(--primary);
  background: color-mix(in srgb, var(--primary) 75%, var(--surface));
}
.calor i.n3 { background: var(--primary); }

/* ---------- lista del banco ---------- */
.lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lista li a, .lista li button.item {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font: inherit; cursor: pointer;
}
.lista li a:hover, .lista li button.item:hover { background: var(--surface-2); }
.lista .linea2 { font-size: .82rem; color: var(--text-2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }

dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; max-width: min(560px, 92vw); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 60; font-weight: 600; box-shadow: var(--shadow); max-width: 90vw; }
.cargando { display: grid; place-items: center; min-height: 60vh; gap: 12px; text-align: center; color: var(--text-2); }
@media (prefers-reduced-motion: no-preference) {
  .opcion, .btn, .mapa button { transition: background-color .15s, border-color .15s; }
}
main:focus, h1[tabindex="-1"]:focus { outline: none; }
.q-enunciado, .opcion > span:nth-child(2), .lista li a, .explicacion, .barra-fila > span:first-child, .aviso { overflow-wrap: anywhere; hyphens: auto; }
::placeholder { color: var(--text-2); opacity: 1; }
/* botón activado (aria-pressed): fondo suave + borde negro/blanco de 2 px, no solo color de texto */
.btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--text); box-shadow: inset 0 0 0 1px var(--primary); }
.q-titulo { font-size: 1.05rem; margin: 0; line-height: 1.3; }
.h-tarjeta { font-size: 1.02rem; margin: 0 0 6px; }
.tarjeta.destacada { border-color: var(--primary); }
.reloj.alerta::before { content: "⚠ "; }
.dlg-botones { justify-content: flex-end; margin-top: 16px; }
.aviso-global { margin: 8px; position: relative; z-index: 70; }
.btn-archivo { position: relative; overflow: hidden; }
.archivo-oculto { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.btn-archivo:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.item-btn { width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 6px 4px; border-radius: var(--radius-sm); cursor: pointer; }
.item-btn:hover { background: var(--surface-2); }
.filtro-anios summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.reporte summary { cursor: pointer; color: var(--text-2); font-size: .9rem; min-height: 32px; }
kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 4px; }
/* cabecera de la sesión siempre visible */
.ses-cabecera { position: sticky; top: 57px; z-index: 10; background: var(--bg); padding: 8px 0 6px; margin-top: -8px; }
.ses-cabecera .fila-ses { gap: 6px; }
.ses-cuenta { font-weight: 600; }
@media (min-width: 521px) { .ses-cabecera { top: 65px; } }
@media (max-width: 899px) {
  /* acciones al alcance del pulgar */
  .acciones-q { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; background: var(--surface);
    margin: 16px -16px -16px; padding: 10px 16px; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
  .acciones-q .btn { flex: 1 1 7.5rem; white-space: normal; min-width: 0; padding-inline: 10px; }
  .acciones-q .espacio { display: none; }
  body.en-sesion .nav { display: none; }
  body.en-sesion main { padding-bottom: 24px; }
  .pie-form { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--surface); padding: 10px 0 0; margin-top: 8px; }
  .atajos { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .barra { min-height: 48px; padding: 4px 12px; }
  .barra .btn-icono { width: 40px; height: 40px; }
  .marca small, .cuenta-larga { display: none; }
  .nav a { min-height: 44px; flex-direction: row; gap: 6px; }
  .ses-cabecera { top: 49px; }
}
@media (max-width: 520px) {
  .marca small, .cuenta-larga { display: none; }
  .barra { min-height: 52px; padding: 8px 12px; }
  h1 { font-size: 1.4rem; }
  .q-cabecera { align-items: flex-start; }
}
.resultado-linea:focus { outline: none; }
/* ---------- E2-P04: caso de la pregunta anterior (IA-05) y texto editado por IA (IA-07) ----------
   Solo tokens existentes: texto --text sobre --surface-2 (>= 7:1), secundarios --text-2 (>= 5:1), borde --border-strong (>= 3:1).
   Sin anchos fijos: con 375 px y con el texto al 175-200 % (CAL-07) todo parte y baja de linea (overflow-wrap + flex-wrap). */
.caso-previo { margin: 6px 0 12px; border: 1px solid var(--border-strong); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); padding: 0 14px 2px; }
.caso-previo summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: .9rem; }
.caso-previo p { margin: 0 0 10px; white-space: pre-line; }
.texto-ia { margin: 10px 0; }
.texto-ia p { margin: 0 0 8px; }
.texto-ia.erratas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; color: var(--text-2); }
.texto-ia.erratas .orig-res { flex: 1 1 100%; }
.orig-res { margin-top: 8px; font-size: .92rem; }
.orig-res:empty { margin: 0; }
.orig-det { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: 0 12px 6px; }
.orig-det summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.orig-det p { margin: 0 0 6px; white-space: pre-line; }
.orig-det ol { margin: 0; padding-left: 1.8em; }
.caso-previo, .caso-previo p, .texto-ia, .orig-det { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
@media print {
  .barra, .nav, .acciones-q { display: none !important; }
  main { padding: 0; }
}

/* Sitio unido (integración landing ↔ simulador, 2026-10-09): banda de la práctica gratis. La inserta sitio/construir_sitio.py
   SOLO en la copia de /demo/ (tras la barra); el simulador solo no la usa. Colores solo con tokens. */
.banda-sitio { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--border); font-size: .95rem; }
.banda-sitio p { margin: 0; }
.banda-sitio .fila { gap: 8px; }
.banda-sitio__mas { display: inline; }
body.en-sesion .banda-sitio { display: none; } /* durante preguntas y simulacros no distrae */
@media (max-width: 600px) { .banda-sitio { padding: 8px 16px; font-size: .9rem; } .banda-sitio__mas { display: none; } }
@media print { .banda-sitio { display: none; } }
