/* ISCOM Resuelve · estilos. Identidad propia «Resuelto»: verde esmeralda, bosque y lima; formas redondas. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fuentes/plus-jakarta-sans-latin.woff2") format("woff2");
  /* El archivo trae el alfabeto latino (español incluido); lo demás (flechas, símbolos) lo pone la letra del sistema. */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* .hoja-clara: contenido con diseño propio; conserva los colores del tema claro aunque la página esté en oscuro. */
:root, .hoja-clara {
  /* brand = esmeralda (600 es el color de la marca) · ink = bosque y sus grises verdosos · lima = el acento */
  --brand-900: #05382a; --brand-800: #084c36; --brand-700: #095c40; --brand-600: #0b6b4b; --brand-500: #12855f; --brand-100: #ddf0e6; --brand-50: #eef7f2;
  --ink-950: #0a1713; --ink-900: #0e1f1a; --ink-800: #1b2e27; --ink-700: #2f413a; --ink-500: #44574f; --ink-400: #7a8f86; --ink-300: #a9bfb4; --ink-200: #d3e6dc; --ink-100: #e6f1eb; --ink-50: #f3f8f5;
  --lima: #c6f068; --lima-suave: #e6f7bd; --sobre-lima: #0e1f1a; --lima-texto: #3b4f0a;
  --rojo: #b5121b; --rojo-fuerte: #a11118;
  --ok: #0f7a52; --ok-bg: #e5f6ef; --info: #1d4ed8; --info-bg: #e8effd; --warn: #b45309; --warn-bg: #fdf1e3; --mal: #b5121b; --mal-bg: #fdf4f4;

  --fondo: #ffffff; --fondo-2: var(--ink-50); --tarjeta: #ffffff; --texto: var(--ink-800); --titulo: var(--ink-900); --tenue: var(--ink-500);
  --borde: var(--ink-200); --borde-suave: var(--ink-100); --acento: var(--brand-600); --acento-fuerte: var(--brand-700); --sobre-acento: #ffffff;
  --boton: var(--brand-600); --boton-encima: var(--brand-700); --sobre-boton: #ffffff;
  --enlace: var(--brand-700); --foco: #2563eb; --barra: rgba(255, 255, 255, .92); --codigo: var(--ink-100);

  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(14, 31, 26, .07); --shadow: 0 8px 28px rgba(14, 31, 26, .10); --shadow-lg: 0 18px 48px rgba(14, 31, 26, .16);
  --container: 1180px; --barra-alto: 64px;
  color-scheme: light;
}

/* Tema oscuro: por elección de la persona o, si no eligió, por la preferencia de su sistema. El botón principal pasa a lima. */
:root[data-tema="oscuro"] {
  --fondo: #0a1713; --fondo-2: #0e1f1a; --tarjeta: #13271f; --texto: #d3e2da; --titulo: #f2f8f5; --tenue: #94aaa0;
  --borde: #2a4338; --borde-suave: #1c3229; --acento: #4fd19c; --acento-fuerte: #7be0b7; --sobre-acento: #0e1f1a;
  --boton: #c6f068; --boton-encima: #d6f590; --sobre-boton: #0e1f1a;
  --enlace: #7be0b7; --barra: rgba(10, 23, 19, .9); --codigo: #1c3229;
  --ok-bg: #0f2f26; --info-bg: #14264d; --warn-bg: #33230d; --mal-bg: #33161a; --ok: #3ccf98; --info: #7aa7ff; --warn: #f0a04b; --mal: #f58a8f;
  --brand-50: #10291f; --brand-100: #173a2c; --lima-suave: #2e3d14; --lima-texto: #c6f068;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4); --shadow: 0 8px 28px rgba(0, 0, 0, .45); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #0a1713; --fondo-2: #0e1f1a; --tarjeta: #13271f; --texto: #d3e2da; --titulo: #f2f8f5; --tenue: #94aaa0;
    --borde: #2a4338; --borde-suave: #1c3229; --acento: #4fd19c; --acento-fuerte: #7be0b7; --sobre-acento: #0e1f1a;
    --boton: #c6f068; --boton-encima: #d6f590; --sobre-boton: #0e1f1a;
    --enlace: #7be0b7; --barra: rgba(10, 23, 19, .9); --codigo: #1c3229;
    --ok-bg: #0f2f26; --info-bg: #14264d; --warn-bg: #33230d; --mal-bg: #33161a; --ok: #3ccf98; --info: #7aa7ff; --warn: #f0a04b; --mal: #f58a8f;
    --brand-50: #10291f; --brand-100: #173a2c; --lima-suave: #2e3d14; --lima-texto: #c6f068;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4); --shadow: 0 8px 28px rgba(0, 0, 0, .45); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--barra-alto) + 20px); }
body { margin: 0; font-family: var(--font-sans); font-size: 16.5px; line-height: 1.6; color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--titulo); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--enlace); text-underline-offset: 3px; }
img, video { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.salto { position: absolute; left: -999px; top: 8px; background: var(--acento); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 100; }
.salto:focus { left: 12px; }
.sin-js { max-width: 640px; margin: 40px auto; padding: 0 20px; }
.pre { max-width: 820px; margin: 0 auto; padding: 32px 20px; }
.contenedor { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--borde-campo); background: var(--tarjeta); color: var(--titulo); font-weight: 700; font-size: .93rem; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { border-color: var(--titulo); background: var(--fondo-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--boton); border-color: var(--boton); color: var(--sobre-boton); box-shadow: 0 6px 18px color-mix(in srgb, var(--boton) 26%, transparent); }
.btn-primario:hover { background: var(--boton-encima); border-color: var(--boton-encima); }
/* Botón bosque: «Entrar» en la barra. En tema oscuro se invierte (claro con texto oscuro). */
.btn-oscuro { background: var(--titulo); border-color: var(--titulo); color: var(--fondo); }
.btn-oscuro:hover { background: var(--texto); border-color: var(--texto); }
.btn-claro { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-claro:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-plano { border-color: transparent; background: transparent; padding: 0 12px; }
.btn-plano:hover { background: var(--fondo-2); border-color: transparent; }
.btn-peligro { color: var(--mal); }
.btn-chico { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-icono { width: 42px; padding: 0; }
.btn-chico.btn-icono { width: 34px; }
.btn svg, .ic { width: 18px; height: 18px; flex: none; }

/* ---------- Barra superior ---------- */
.barra { position: sticky; top: 0; z-index: 40; background: var(--barra); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--borde-suave); }
.barra-in { display: flex; align-items: center; gap: 14px; height: var(--barra-alto); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--titulo); flex: none; }
.marca img { height: 36px; width: 36px; display: block; }
.marca-nombre { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1; }
/* El nombre de la empresa acompaña a la marca en una pastilla lima. */
.marca-empresa { padding: 3px 9px; border-radius: 999px; background: var(--lima); color: var(--sobre-lima); font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; line-height: 1.4; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-busca { flex: 1 1 0; min-width: 0; max-width: 460px; margin-left: auto; position: relative; }
.barra-acciones { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.barra-busca + .barra-acciones { margin-left: 0; }
.campo-busca { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; background: var(--fondo-2); border: 1.5px solid var(--borde); border-radius: 999px; color: var(--tenue); transition: border-color .15s, box-shadow .15s; }
.campo-busca:focus-within { border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 18%, transparent); }
.campo-busca input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--titulo); font-weight: 500; }
.campo-busca input::placeholder { color: var(--tenue); }
.tecla { font: 600 .72rem/1 var(--font-mono); padding: 4px 6px; border: 1px solid var(--borde); border-radius: 6px; color: var(--tenue); background: var(--tarjeta); }
.sugerencias { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; text-align: left; }
.sugerencia { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; text-decoration: none; color: var(--texto); border-bottom: 1px solid var(--borde-suave); }
.sugerencia:last-child { border-bottom: 0; }
.sugerencia:hover, .sugerencia.activa { background: var(--fondo-2); }
.sugerencia b { color: var(--titulo); display: block; font-size: .95rem; line-height: 1.3; }
.sugerencia small { color: var(--tenue); }
.sugerencia .ic { margin-top: 3px; color: var(--tenue); }
.sugerencia-pie { padding: 10px 16px; font-size: .82rem; color: var(--tenue); background: var(--fondo-2); display: flex; justify-content: space-between; gap: 10px; }
.menu-usuario { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--titulo); color: var(--fondo); font-weight: 800; font-size: .9rem; display: grid; place-items: center; }
.avatar.cliente { background: var(--brand-600); color: #fff; }
.desplegable { position: absolute; right: 0; top: calc(100% + 10px); min-width: 260px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; }
.desplegable .quien { padding: 10px 12px 12px; border-bottom: 1px solid var(--borde-suave); margin-bottom: 6px; }
.desplegable .quien b { display: block; color: var(--titulo); }
.desplegable .quien small { color: var(--tenue); word-break: break-all; }
.desplegable a, .desplegable button.op { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: transparent; border-radius: var(--radius-sm); text-decoration: none; color: var(--texto); font-weight: 600; font-size: .93rem; text-align: left; }
.desplegable a:hover, .desplegable button.op:hover { background: var(--fondo-2); }

/* ---------- Etiquetas de audiencia y tipo ---------- */
.insignia { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.insignia .ic { width: 13px; height: 13px; }
.i-publico { background: var(--ink-100); color: var(--ink-700); }
.i-clientes { background: var(--info-bg); color: var(--info); }
.i-cuentas { background: var(--brand-100); color: var(--acento-fuerte); }
.i-agentes { background: var(--warn-bg); color: var(--warn); }
.i-borrador { background: transparent; border-color: var(--borde); color: var(--tenue); }
.i-archivado { background: transparent; border-color: var(--borde); color: var(--tenue); text-decoration: line-through; }
.i-publicado { background: var(--brand-600); color: #fff; }
.i-tipo { background: transparent; border-color: var(--borde); color: var(--tenue); }
:root[data-tema="oscuro"] .i-publico { background: #1c3229; color: #b9cdc3; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .i-publico { background: #1c3229; color: #b9cdc3; } }

/* ---------- Portada ---------- */
/* La bienvenida va en un bloque menta redondeado, centrada, con la búsqueda como protagonista. */
.heroe { position: relative; padding: 10px 16px 0; }
.heroe > .contenedor { background: var(--brand-50); border-radius: 32px; padding: clamp(36px, 6vw, 68px) clamp(18px, 5vw, 56px) clamp(40px, 6vw, 72px); text-align: center; color: var(--texto); }
.heroe h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 14px; }
/* La palabra clave lleva un subrayado de marcador lima (en oscuro, la palabra misma va en lima). */
.heroe h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--lima) 62%, var(--lima) 94%, transparent 94%); padding: 0 .06em; }
:root[data-tema="oscuro"] .heroe h1 em { background: none; color: var(--lima); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .heroe h1 em { background: none; color: var(--lima); } }
.heroe p.lema { font-size: 1.1rem; color: var(--texto); max-width: 620px; margin: 0 auto 28px; }
.ceja { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--lima); color: var(--sobre-lima); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.ceja.sesion { background: var(--tarjeta); color: var(--titulo); letter-spacing: 0; text-transform: none; font-size: .84rem; border: 1px solid var(--borde); }
.busca-grande { position: relative; max-width: 720px; margin: 0 auto; }
.busca-grande .campo-busca { height: 64px; padding: 0 9px 0 24px; background: #fff; box-shadow: 0 14px 36px rgba(14, 31, 26, .10); font-size: 1.08rem; color: var(--ink-500); }
.busca-grande .campo-busca input { color: var(--ink-900); }
.busca-grande .campo-busca input::placeholder { color: var(--ink-500); }
.busca-grande .btn { min-height: 46px; padding: 0 24px; }
/* El campo es blanco también en oscuro: su botón conserva el verde de la marca. */
.busca-grande .btn-primario { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: none; }
.busca-grande .btn-primario:hover { background: var(--brand-700); border-color: var(--brand-700); }
.busca-grande .sugerencias { color-scheme: light; }
.temas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; align-items: center; justify-content: center; font-size: .88rem; color: var(--tenue); }
.temas a { color: var(--titulo); text-decoration: none; min-height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border: 1.5px solid var(--borde-campo); border-radius: 999px; font-weight: 700; background: transparent; }
.temas a:hover { background: var(--tarjeta); border-color: var(--titulo); }
.seccion { padding: 44px 0 8px; }
.seccion:last-of-type { padding-bottom: 56px; }
.seccion-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.seccion-cab h2 { font-size: 1.45rem; margin: 0; }
.seccion-cab p { margin: 4px 0 0; color: var(--tenue); font-size: .95rem; }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rejilla-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
/* Tarjetas suaves: relleno menta muy claro, sin sombra; el contorno aparece al pasar el cursor. */
.tarjeta { background: var(--fondo-2); border: 1px solid var(--borde-suave); border-radius: var(--radius-lg); padding: 22px; }
a.tarjeta { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--texto); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.tarjeta:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--acento); }
.cat-icono { width: 48px; height: 48px; border-radius: 16px; background: var(--brand-100); color: var(--acento-fuerte); display: grid; place-items: center; margin-bottom: 6px; }
.cat-icono .ic { width: 24px; height: 24px; }
.tarjeta h3 { font-size: 1.08rem; margin: 0; }
.tarjeta p { margin: 0; color: var(--tenue); font-size: .92rem; }
.tarjeta .pie { margin-top: auto; padding-top: 10px; font-size: .82rem; font-weight: 700; color: var(--tenue); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tarjeta .pie .ir { color: var(--acento); }
.art-tarjeta .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.franja-empresa { background: linear-gradient(135deg, var(--brand-50), transparent 70%); border: 1px solid var(--brand-100); border-radius: var(--radius-lg); padding: 24px; }
.lista-arts { display: grid; gap: 2px; }
.fila-art { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); text-decoration: none; color: var(--texto); }
.fila-art:hover { background: var(--fondo-2); }
.fila-art .ic-tipo { width: 38px; height: 38px; border-radius: 11px; background: var(--fondo-2); border: 1px solid var(--borde-suave); display: grid; place-items: center; color: var(--tenue); flex: none; }
.fila-art:hover .ic-tipo { background: var(--tarjeta); color: var(--acento); }
.fila-art b { color: var(--titulo); display: block; line-height: 1.3; }
.fila-art p { margin: 3px 0 0; color: var(--tenue); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila-art .derecha { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; padding-top: 2px; }
mark { background: var(--lima-suave); color: inherit; border-radius: 6px; padding: 0 3px; }
.ayuda-final { margin: 56px 0 0; background: var(--ink-950); color: #b9cdc3; padding: 48px 0; }
.ayuda-final h2 { color: #fff; font-size: 1.6rem; }
/* Sobre el bosque, el botón principal va en lima. */
.ayuda-final .btn-primario { background: var(--lima); border-color: var(--lima); color: var(--sobre-lima); box-shadow: none; }
.ayuda-final .btn-primario:hover { background: #d6f590; border-color: #d6f590; }
.ayuda-final .fila { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.ayuda-final .acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.pie-sitio { background: var(--ink-950); color: #9db3a8; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; }
.pie-sitio .fila { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.pie-sitio a { color: #cfe2d8; text-decoration: none; }
.pie-sitio a:hover { color: #fff; }
.vacio { text-align: center; padding: 56px 20px; color: var(--tenue); border: 1.5px dashed var(--borde); border-radius: var(--radius-lg); }
.vacio h2, .vacio h3 { margin-bottom: 6px; }
.vacio .acciones { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Migas, encabezado de página ---------- */
/* Solo el alto: los márgenes laterales los pone .contenedor (antes se perdían entre 641 y 1228 px de ancho). */
.pagina { min-height: 60vh; }
.contenedor.pagina { padding-top: 28px; padding-bottom: 56px; }
.migas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .86rem; color: var(--tenue); margin-bottom: 18px; }
.migas a { color: var(--tenue); text-decoration: none; font-weight: 600; }
.migas a:hover { color: var(--acento); }
.migas .sep { opacity: .5; }
.cab-pagina h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.cab-pagina p { color: var(--tenue); max-width: 720px; }

/* ---------- Artículo ---------- */
.art-malla { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 48px; align-items: start; }
.art-cab h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 14px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--tenue); font-size: .87rem; margin-bottom: 8px; }
.art-acciones { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--borde-suave); }
.aviso-estado { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: .92rem; margin-bottom: 18px; }
.aviso-estado.exclusivo { background: var(--brand-50); color: var(--acento-fuerte); }
.indice { position: sticky; top: calc(var(--barra-alto) + 24px); font-size: .9rem; max-height: calc(100vh - var(--barra-alto) - 48px); overflow: auto; }
/* «En esta página»: un panel suave; el apartado que se está leyendo queda resaltado como pastilla. */
.indice { background: var(--fondo-2); border-radius: var(--radius-lg); padding: 18px 12px; }
.indice:empty { display: none; }
.indice h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tenue); margin: 0 12px 10px; }
.indice a { display: block; padding: 7px 12px; border-radius: 12px; color: var(--texto); text-decoration: none; line-height: 1.35; font-weight: 600; }
.indice a.n3 { padding-left: 24px; font-size: .86rem; }
.indice a:hover { color: var(--titulo); background: var(--borde-suave); }
.indice a.activo { color: var(--acento-fuerte); background: var(--tarjeta); font-weight: 800; }
.prosa { font-size: 1.04rem; line-height: 1.72; overflow-wrap: break-word; }
.prosa > :first-child { margin-top: 0; }
.prosa h2 { font-size: 1.5rem; margin: 1.9em 0 .6em; padding-top: .2em; }
.prosa h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.prosa h4, .prosa h5, .prosa h6 { font-size: 1.02rem; margin: 1.4em 0 .4em; color: var(--titulo); }
.prosa ul, .prosa ol { padding-left: 1.5em; margin: 0 0 1.1em; }
.prosa li { margin: .3em 0; }
.prosa li > p { margin-bottom: .4em; }
.prosa img { border-radius: var(--radius); border: 1px solid var(--borde); box-shadow: var(--shadow-sm); cursor: zoom-in; display: block; margin: 1.2em 0; }
.prosa figure { margin: 1.4em 0; }
.prosa figcaption { font-size: .86rem; color: var(--tenue); text-align: center; margin-top: 8px; }
.prosa blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--borde); color: var(--tenue); }
.prosa code, .prosa kbd, .prosa samp { font-family: var(--font-mono); font-size: .88em; }
.prosa :not(pre) > code { background: var(--codigo); padding: 2px 6px; border-radius: 6px; color: var(--titulo); }
.prosa kbd { background: var(--tarjeta); border: 1px solid var(--borde); border-bottom-width: 3px; border-radius: 7px; padding: 1px 7px; color: var(--titulo); font-weight: 600; white-space: nowrap; }
.prosa pre { position: relative; background: var(--ink-950); color: #dfeae4; padding: 18px 20px; border-radius: var(--radius); overflow: auto; font-size: .9rem; line-height: 1.55; margin: 1.2em 0; }
.prosa pre code { background: transparent; padding: 0; color: inherit; }
.copiar-codigo { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #dfe6f1; font-size: .76rem; font-weight: 700; }
.copiar-codigo:hover { background: rgba(255, 255, 255, .18); }
.tabla-scroll { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--borde); border-radius: var(--radius); }
.prosa table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prosa th, .prosa td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--borde-suave); vertical-align: top; }
.prosa thead th, .prosa tbody th { background: var(--fondo-2); color: var(--titulo); font-weight: 700; }
.prosa tbody tr:last-child > * { border-bottom: 0; }
.prosa hr { border: 0; border-top: 1px solid var(--borde); margin: 2em 0; }
.prosa details { border: 1px solid var(--borde); border-radius: var(--radius); padding: 0 16px; margin: 1em 0; background: var(--tarjeta); }
.prosa summary { cursor: pointer; font-weight: 700; color: var(--titulo); padding: 13px 0; }
.prosa details[open] summary { border-bottom: 1px solid var(--borde-suave); margin-bottom: 12px; }
.prosa .kb-aviso { border-radius: var(--radius); padding: 14px 16px 14px 46px; margin: 1.3em 0; position: relative; background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.prosa .kb-aviso > :last-child { margin-bottom: 0; }
.prosa .kb-aviso::before { content: "i"; position: absolute; left: 14px; top: 15px; width: 22px; height: 22px; border-radius: 50%; background: var(--info); color: #fff; font: 800 .8rem/22px var(--font-sans); text-align: center; }
.prosa .kb-consejo { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.prosa .kb-consejo::before { content: "✓"; background: var(--ok); }
.prosa .kb-exito { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.prosa .kb-exito::before { content: "✓"; background: var(--ok); }
.prosa .kb-atencion { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.prosa .kb-atencion::before { content: "!"; background: var(--warn); }
.prosa .kb-peligro { background: var(--mal-bg); border-color: color-mix(in srgb, var(--mal) 26%, transparent); }
.prosa .kb-peligro::before { content: "!"; background: var(--rojo); }
.prosa iframe.kb-video, .prosa video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); background: #000; display: block; margin: 1.2em 0; }
/* Demostraciones interactivas (Arcade). Si el HTML del artículo le dio su propio tamaño, manda ese. */
.prosa iframe.kb-interactivo { width: 100%; aspect-ratio: 16 / 10; height: auto; border: 0; border-radius: var(--radius); background: var(--fondo-2); display: block; margin: 1.2em 0; }
.prosa iframe.kb-interactivo:not([style]) { min-height: min(420px, 80vh); }
.prosa iframe[style] { margin: 0; border-radius: 0; background: transparent; }
/* Diseño escrito en el HTML del artículo: nada se sale del ancho de la página. */
.prosa [style*="width"], .prosa iframe { max-width: 100%; }
/* Tablas que solo acomodan (role="presentation" o border="0"): sin rayas, relleno ni encabezado gris. */
.prosa table:is([role="presentation"], [role="none"], [border="0"]) { border-collapse: separate; border-spacing: 0; font-size: inherit; }
.prosa table:is([role="presentation"], [role="none"], [border="0"]) > * > tr > :is(td, th) { padding: 0; border-bottom: 0; background: none; font-weight: inherit; }
/* En tema oscuro, el contenido con diseño propio va sobre una hoja clara: sus colores se pensaron para fondo blanco. */
:root[data-tema="oscuro"] .prosa.hoja-clara { background: #fff; color: var(--texto); color-scheme: light; padding: clamp(14px, 3vw, 24px); border-radius: var(--radius-lg); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .prosa.hoja-clara { background: #fff; color: var(--texto); color-scheme: light; padding: clamp(14px, 3vw, 24px); border-radius: var(--radius-lg); } }
@media print { .prosa.hoja-clara { padding: 0; } }
.prosa a[target="_blank"]::after { content: "↗"; font-size: .8em; margin-left: 2px; opacity: .7; }
.adjunto { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--borde); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .92rem; background: var(--tarjeta); }
.visor { position: fixed; inset: 0; z-index: 90; background: rgba(6, 14, 11, .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.visor img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* Guía con casillas */
.avance { position: sticky; top: var(--barra-alto); z-index: 5; background: var(--fondo); padding: 12px 0; display: flex; align-items: center; gap: 14px; font-size: .88rem; font-weight: 700; color: var(--tenue); border-bottom: 1px solid var(--borde-suave); margin-bottom: 18px; }
.avance .riel { flex: 1; height: 8px; background: var(--ink-100); border-radius: 999px; overflow: hidden; }
:root[data-tema="oscuro"] .avance .riel { background: var(--borde); }
.avance .riel i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .3s; }
.pasos { list-style: none; padding: 0; margin: 0; counter-reset: paso; }
/* Lo que va después de los pasos de una guía (cómo quedó, qué hacer si algo sale mal). */
.guia-cierre { margin-top: 30px; }
/* Cada paso es su propia tarjeta suave. */
.paso { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px; margin: 0 0 14px; border-radius: var(--radius-lg); background: var(--fondo-2); }
.paso-num { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--borde-campo); background: var(--tarjeta); color: var(--titulo); font-weight: 800; display: grid; place-items: center; transition: all .2s; padding: 0; position: relative; z-index: 1; }
.paso-num:hover { border-color: var(--ok); }
.paso.hecho .paso-num { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.paso h3 { margin: 9px 0 8px; font-size: 1.14rem; }
.paso.hecho h3 { color: var(--tenue); }
.paso .prosa { font-size: 1rem; }
.paso .marcar { margin-top: 6px; }

/* Recorrido interactivo */
.recorrido { border: 1px solid var(--borde); border-radius: var(--radius-lg); overflow: hidden; background: var(--tarjeta); box-shadow: var(--shadow); margin: 8px 0 24px; }
.rec-cab { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--borde-suave); font-size: .88rem; font-weight: 700; color: var(--tenue); }
.rec-cab .puntos { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.rec-cab .puntos button { width: 22px; height: 6px; border-radius: 999px; border: 0; background: var(--borde); padding: 0; }
.rec-cab .puntos button.visto { background: color-mix(in srgb, var(--acento) 45%, var(--borde)); }
.rec-cab .puntos button.actual { background: var(--acento); width: 34px; }
.rec-escena { position: relative; background: var(--ink-950); display: grid; place-items: center; }
.rec-lienzo { position: relative; line-height: 0; max-width: 100%; }
.rec-lienzo img, .rec-lienzo video { display: block; max-width: 100%; max-height: 68vh; width: auto; height: auto; border: 0; border-radius: 0; margin: 0; cursor: default; }
/* El punto donde hacer clic: aro esmeralda con relleno lima y un filo blanco, para que se vea sobre cualquier captura. */
.rec-punto { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid var(--brand-600); background: rgba(198, 240, 104, .5); outline: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 0 rgba(11, 107, 75, .6); animation: pulso 1.6s infinite; padding: 0; }
.rec-punto.num { animation: none; outline: 0; background: var(--brand-600); color: #fff; font: 800 .95rem/40px var(--font-sans); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-color: #fff; }
@keyframes pulso { 70% { box-shadow: 0 0 0 20px rgba(11, 107, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(11, 107, 75, 0); } }
.rec-nota { padding: 18px 20px; display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--borde-suave); }
.rec-nota .n { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.rec-nota .t { flex: 1; font-size: 1.05rem; color: var(--titulo); font-weight: 600; line-height: 1.45; }
.rec-nota .t small { display: block; color: var(--tenue); font-weight: 600; font-size: .8rem; margin-top: 2px; }
.rec-nota .nav { display: flex; gap: 8px; flex: none; }
.rec-fin { padding: 56px 24px; text-align: center; }
.rec-fin .palomita { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.rec-fin .palomita .ic { width: 32px; height: 32px; }

/* Diagnóstico */
.diag { border: 1px solid var(--borde); border-radius: var(--radius-lg); background: var(--tarjeta); box-shadow: var(--shadow); padding: 28px; margin: 8px 0 24px; }
.diag-camino { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; font-size: .82rem; }
.diag-camino span { background: var(--fondo-2); border: 1px solid var(--borde-suave); border-radius: 999px; padding: 3px 10px; color: var(--tenue); font-weight: 600; }
.diag h2 { font-size: 1.4rem; margin-bottom: 12px; }
.diag-opciones { display: grid; gap: 10px; margin-top: 20px; }
.diag-opcion { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 18px; border: 1.5px solid var(--borde); border-radius: var(--radius); background: var(--tarjeta); font-weight: 700; color: var(--titulo); transition: all .15s; }
.diag-opcion:hover { border-color: var(--acento); background: var(--brand-50); transform: translateX(2px); }
.diag-solucion { border-left: 5px solid var(--ok); padding-left: 20px; }
.diag-pie { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

/* Opinión, relacionados, navegación */
.opinion { margin: 40px 0 0; padding: 24px; border: 1px solid var(--borde); border-radius: var(--radius-lg); background: var(--fondo-2); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.opinion b { color: var(--titulo); font-size: 1.05rem; }
.opinion .botones { display: flex; gap: 8px; }
.opinion textarea { width: 100%; }
.opinion .gracias { color: var(--ok); font-weight: 700; }
.vecinos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.vecinos a { border: 1px solid var(--borde); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--titulo); font-weight: 700; line-height: 1.35; }
.vecinos a small { display: block; color: var(--tenue); font-weight: 600; font-size: .78rem; margin-bottom: 2px; }
.vecinos a:hover { border-color: var(--acento); }
.vecinos a.sig { text-align: right; grid-column: 2; }

/* ---------- Formularios ---------- */
.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo > label, .campo > .rotulo { font-weight: 700; font-size: .88rem; color: var(--titulo); }
.campo small { color: var(--tenue); font-size: .82rem; line-height: 1.4; }
.entrada, select.entrada, textarea.entrada { width: 100%; min-height: 44px; padding: 9px 14px; border: 1.5px solid var(--borde); border-radius: 14px; background: var(--tarjeta); color: var(--titulo); transition: border-color .15s, box-shadow .15s; }
textarea.entrada { min-height: 90px; resize: vertical; line-height: 1.5; }
.entrada:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 16%, transparent); }
.entrada.codigo { font: 700 1.9rem/1 var(--font-mono); letter-spacing: .42em; text-align: center; padding-left: .42em; min-height: 62px; }
.fila-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.error { background: var(--mal-bg); color: var(--mal); border-radius: 11px; padding: 10px 14px; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.nota-suave { background: var(--fondo-2); border: 1px solid var(--borde-suave); border-radius: 11px; padding: 10px 14px; font-size: .88rem; color: var(--tenue); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Entrar ---------- */
.entrar { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: 880px; margin: 0 auto; }
.entrar .tarjeta { padding: 30px; }
.entrar h2 { font-size: 1.3rem; }
.entrar .tarjeta > p { color: var(--tenue); font-size: .95rem; }
.btn-ms { width: 100%; min-height: 48px; background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.btn-ms:hover { background: var(--ink-800); border-color: var(--ink-800); }
:root[data-tema="oscuro"] .btn-ms { background: #fff; border-color: #fff; color: var(--ink-900); }

/* ---------- Avisos flotantes ---------- */
.avisos { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.aviso { background: var(--ink-900); color: #fff; padding: 13px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .93rem; animation: sube .2s ease-out; pointer-events: auto; border: 1px solid rgba(255, 255, 255, .12); }
.aviso.mal { background: var(--rojo-fuerte); }
.aviso.bien { background: var(--brand-600); }
@keyframes sube { from { opacity: 0; transform: translateY(8px); } }
.sin-red { position: sticky; top: 0; z-index: 70; background: var(--warn); color: #fff; text-align: center; font-weight: 700; font-size: .86rem; padding: 6px 12px; }
.cargando { display: grid; place-items: center; min-height: 40vh; color: var(--tenue); }
.rueda { width: 30px; height: 30px; border: 3px solid var(--borde); border-top-color: var(--acento); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Ventanas ---------- */
.velo { position: fixed; inset: 0; z-index: 100; background: rgba(6, 14, 11, .55); display: grid; place-items: center; padding: 20px; overflow: auto; }
.ventana { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(100%, 560px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.ventana.ancha { width: min(100%, 900px); }
.ventana-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--borde-suave); }
.ventana-cab h2 { margin: 0; font-size: 1.15rem; }
.ventana-cuerpo { padding: 22px; overflow: auto; }
.ventana-pie { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--borde-suave); flex-wrap: wrap; }

/* ---------- Administración ---------- */
.adm { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - var(--barra-alto)); }
.adm-nav { border-right: 1px solid var(--borde-suave); background: var(--fondo-2); padding: 20px 12px; position: sticky; top: var(--barra-alto); height: calc(100vh - var(--barra-alto)); overflow: auto; }
.adm-nav h2 { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); padding: 0 12px; margin: 18px 0 6px; }
.adm-nav h2:first-child { margin-top: 0; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; color: var(--texto); text-decoration: none; font-weight: 600; font-size: .93rem; }
.adm-nav a:hover { background: var(--tarjeta); }
.adm-nav a.activo { background: var(--boton); color: var(--sobre-boton); font-weight: 800; }
.adm-cuerpo { padding: 28px 32px 64px; min-width: 0; }
.adm-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.adm-cab h1 { font-size: 1.6rem; margin: 0; }
.adm-cab p { margin: 4px 0 0; color: var(--tenue); font-size: .93rem; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filtros .entrada { width: auto; min-height: 40px; }
.filtros .crece { flex: 1; min-width: 200px; }
.tabla { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabla th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); padding: 10px 12px; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: 12px; border-bottom: 1px solid var(--borde-suave); vertical-align: middle; }
.tabla tr:hover td { background: var(--fondo-2); }
.tabla td.titulo a { color: var(--titulo); font-weight: 700; text-decoration: none; }
.tabla td.titulo a:hover { color: var(--acento-fuerte); }
.tabla td.titulo small { display: block; color: var(--tenue); }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla-caja { border: 1px solid var(--borde); border-radius: var(--radius); overflow: auto; background: var(--tarjeta); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.cifra { border: 1px solid var(--borde); border-radius: var(--radius); padding: 16px 18px; background: var(--tarjeta); }
.cifra b { display: block; font-size: 1.9rem; color: var(--titulo); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cifra span { color: var(--tenue); font-size: .85rem; font-weight: 600; }
.dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.panel { border: 1px solid var(--borde); border-radius: var(--radius); background: var(--tarjeta); padding: 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 4px; }
.panel > p.sub { color: var(--tenue); font-size: .88rem; margin-bottom: 14px; }
.lista-simple { list-style: none; margin: 0; padding: 0; }
.lista-simple li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--borde-suave); align-items: center; }
.lista-simple li:last-child { border-bottom: 0; }
.lista-simple a { color: var(--titulo); font-weight: 600; text-decoration: none; }
.lista-simple a:hover { color: var(--acento-fuerte); }
.lista-simple .n { color: var(--tenue); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barras { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.barras i { flex: 1; min-width: 3px; background: var(--acento); border-radius: 3px 3px 0 0; opacity: .85; }
.barras i:hover { opacity: 1; }
.barras i.cero { background: var(--borde); }
.estado-punto { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.estado-punto::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-300); }
.estado-punto.bien::before { background: var(--ok); }
.estado-punto.mal::before { background: var(--mal); }
.llave { font: 600 .9rem/1.5 var(--font-mono); background: var(--codigo); padding: 12px 14px; border-radius: 10px; word-break: break-all; color: var(--titulo); user-select: all; }

/* ---------- Editor ---------- */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.ed-titulo { width: 100%; border: 0; background: transparent; font: 800 1.9rem/1.2 var(--font-sans); color: var(--titulo); padding: 4px 0 10px; outline: none; letter-spacing: -.01em; }
.ed-titulo::placeholder { color: var(--ink-300); }
.ed-caja { border: 1.5px solid var(--borde); border-radius: var(--radius); background: var(--tarjeta); overflow: clip; }
.ed-caja:focus-within { border-color: var(--ink-400); }
.ed-pestanas { display: flex; gap: 2px; padding: 6px 6px 0; background: var(--fondo-2); border-bottom: 1px solid var(--borde); }
.ed-pestanas button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px 9px 0 0; font-weight: 700; font-size: .87rem; color: var(--tenue); }
.ed-pestanas button.activa { background: var(--tarjeta); color: var(--titulo); box-shadow: 0 -1px 0 var(--borde), 1px 0 0 var(--borde), -1px 0 0 var(--borde); }
.ed-barra { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--borde-suave); position: sticky; top: var(--barra-alto); background: var(--tarjeta); z-index: 4; }
.ed-barra button, .ed-barra select { height: 34px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--texto); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ed-barra button:hover, .ed-barra select:hover { background: var(--fondo-2); color: var(--titulo); }
.ed-barra .sep { width: 1px; background: var(--borde); margin: 5px 4px; }
.ed-area { min-height: 380px; padding: 22px 24px; outline: none; }
.ed-area:empty::before { content: attr(data-vacio); color: var(--ink-300); }
.ed-area img { cursor: default; }
.ed-html { width: 100%; min-height: 420px; border: 0; padding: 18px 20px; background: var(--ink-950); color: #dfeae4; font: 500 .88rem/1.6 var(--font-mono); resize: vertical; outline: none; display: block; tab-size: 2; }
.ed-vista { padding: 22px 24px; min-height: 380px; }
.ed-lado { position: sticky; top: calc(var(--barra-alto) + 20px); display: grid; gap: 14px; max-height: calc(100vh - var(--barra-alto) - 40px); overflow: auto; padding-right: 4px; }
.ed-lado .panel { margin: 0; padding: 16px; }
.ed-lado .panel h2 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tenue); margin-bottom: 12px; }
.ed-lado .campo:last-child { margin-bottom: 0; }
.audiencias { display: grid; gap: 6px; }
.audiencia { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 11px; cursor: pointer; }
.audiencia:has(input:checked) { border-color: var(--acento); background: var(--brand-50); }
.audiencia input { margin-top: 4px; accent-color: var(--brand-600); }
.audiencia b { display: block; color: var(--titulo); font-size: .92rem; }
.audiencia small { color: var(--tenue); font-size: .8rem; line-height: 1.35; display: block; }
.fichas { display: flex; flex-wrap: wrap; gap: 6px; }
.ficha { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--fondo-2); border: 1px solid var(--borde); font-size: .83rem; font-weight: 700; color: var(--titulo); }
.ficha button { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 50%; color: var(--tenue); padding: 0; line-height: 1; font-size: 1rem; }
.ficha button:hover { background: var(--borde); color: var(--titulo); }
.resultados-cuentas { border: 1px solid var(--borde); border-radius: 11px; margin-top: 6px; max-height: 190px; overflow: auto; }
.resultados-cuentas button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--borde-suave); }
.resultados-cuentas button:hover { background: var(--fondo-2); }
.ed-acciones { position: sticky; bottom: 0; background: var(--fondo); border-top: 1px solid var(--borde-suave); padding: 14px 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 6; }
.ed-acciones .crece { flex: 1; color: var(--tenue); font-size: .85rem; }
.ed-paso { border: 1.5px solid var(--borde); border-radius: var(--radius); background: var(--tarjeta); margin-bottom: 12px; }
.ed-paso-cab { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--borde-suave); background: var(--fondo-2); border-radius: var(--radius) var(--radius) 0 0; }
.ed-paso-cab .n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink-900); color: #fff; font-weight: 800; font-size: .82rem; display: grid; place-items: center; flex: none; }
.ed-paso-cab input { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 700; color: var(--titulo); outline: none; padding: 6px; }
.ed-paso .ed-area { min-height: 90px; padding: 14px 16px; }
.ed-paso .ed-barra { position: static; }
.ed-captura { position: relative; line-height: 0; background: var(--ink-950); cursor: crosshair; text-align: center; }
.ed-captura img { max-height: 380px; max-width: 100%; }
.ed-captura .rec-punto { pointer-events: none; }
.ed-paso-cuerpo { padding: 14px 16px; display: grid; gap: 12px; }
.tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tipo { text-align: left; border: 1.5px solid var(--borde); border-radius: var(--radius); background: var(--tarjeta); padding: 18px; display: grid; gap: 6px; }
.tipo:hover { border-color: var(--acento); background: var(--brand-50); }
.tipo b { color: var(--titulo); }
.tipo small { color: var(--tenue); line-height: 1.4; }
.versiones li { align-items: flex-start; }
.versiones small { color: var(--tenue); display: block; }

/* ---------- Adaptación a pantallas chicas ---------- */
@media (max-width: 1000px) {
  .art-malla { grid-template-columns: minmax(0, 1fr); }
  .indice { display: none; }
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-lado { position: static; max-height: none; }
}
@media (max-width: 820px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: static; height: auto; display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--borde-suave); }
  .adm-nav h2, .adm-nav .adm-grupo { display: none; }
  .adm-nav a { white-space: nowrap; }
  .adm-cuerpo { padding: 20px 16px 56px; }
  .tabla .ocultable { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .contenedor { padding: 0 16px; }
  .barra-in:has(.barra-busca) .marca-nombre { display: none; }
  .barra-busca .tecla { display: none; }
  .heroe { padding: 6px 10px 0; }
  .heroe > .contenedor { border-radius: 24px; }
  .marca-empresa { display: none; }
  .busca-grande .campo-busca { height: 54px; padding-left: 16px; }
  .busca-grande .btn span { display: none; }
  .fila-campos { grid-template-columns: 1fr; }
  .rec-nota { flex-wrap: wrap; }
  .rec-nota .nav { width: 100%; justify-content: space-between; }
  .vecinos { grid-template-columns: 1fr; }
  .vecinos a.sig { grid-column: auto; text-align: left; }
  .fila-art .derecha { display: none; }
  .diag { padding: 20px; }
}

/* ---------- Impresión: solo el artículo ---------- */
@media print {
  .barra, .indice, .art-acciones, .opinion, .vecinos, .ayuda-final, .pie-sitio, .avisos, .migas, .relacionados, .avance, .copiar-codigo, .marcar { display: none !important; }
  body { font-size: 11.5pt; background: #fff; color: #000; }
  .contenedor.pagina { padding: 0; }
  .art-malla { display: block; }
  .prosa pre { background: #f3f4f6; color: #000; border: 1px solid #ccc; white-space: pre-wrap; }
  .paso { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Revisión, notas internas, fragmentos y biblioteca (v1.2) ---------- */
.i-revision { background: var(--lima); color: var(--sobre-lima); }
.tenue { color: var(--tenue); }
.con-notas { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; color: var(--info); font-weight: 700; }
.con-notas .ic { width: 13px; height: 13px; }

/* Lo que espera a quien entra a la administración */
.bandeja { border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-bg); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.bandeja h2 { display: flex; gap: 8px; align-items: center; font-size: 1rem; margin: 0 0 8px; color: var(--warn); }
.bandeja h2 .ic { width: 18px; height: 18px; }
.bandeja-grupo { margin-top: 10px; }
.bandeja-grupo > b { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tenue); }
.bandeja-grupo > a { font-weight: 700; color: var(--titulo); }
.bandeja .lista-simple li { border-color: color-mix(in srgb, var(--warn) 18%, transparent); padding: 7px 0; }
.bandeja .lista-simple .n { font-weight: 600; font-size: .85rem; white-space: normal; text-align: right; }

/* Notas internas: solo las ve el equipo */
.notas { margin: 40px 0 0; padding: 22px 24px; border: 1.5px dashed var(--borde); border-radius: var(--radius-lg); background: var(--fondo-2); }
.notas.compacto { margin: 0; padding: 0; border: 0; background: transparent; }
.notas-cab { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.notas-cab h2 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; margin: 0; flex: 1; }
.notas-cab h2 .ic { width: 17px; height: 17px; color: var(--tenue); }
.notas-cab .n { font-size: .82rem; font-weight: 800; color: var(--warn); }
.notas > p.sub { color: var(--tenue); font-size: .88rem; margin: 0 0 14px; }
.notas-vacio { color: var(--tenue); font-size: .9rem; margin: 10px 0; }
.nota { border: 1px solid var(--borde); border-radius: 12px; background: var(--tarjeta); padding: 12px 14px; margin: 10px 0; }
.nota.resuelta { opacity: .72; }
.nota-cab { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--tenue); }
.nota-cab b { color: var(--titulo); }
.nota p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nota-cita { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 6px 10px; border-left: 3px solid var(--borde); color: var(--tenue); font-style: italic; font-size: .9rem; overflow-wrap: anywhere; }
.nota-cita span { flex: 1; }
.nota-cita button { border: 0; background: transparent; color: var(--tenue); font-size: 1.1rem; line-height: 1; padding: 0 4px; }
.nota-acciones { display: flex; gap: 4px; margin-top: 6px; }
.nota-acciones:empty { display: none; }
.notas-forma { display: grid; gap: 10px; margin-top: 14px; }
.notas-forma small { color: var(--tenue); }
.notas.compacto .notas-forma small { display: none; }

/* Biblioteca de archivos */
.biblio { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.biblio.grande { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.biblio-item { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--borde); border-radius: 12px; background: var(--tarjeta); text-align: left; min-width: 0; }
.biblio-item:hover { border-color: var(--acento); box-shadow: var(--shadow-sm); }
.biblio-item img, .biblio-icono { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--fondo-2); }
.biblio-icono { display: grid; place-items: center; color: var(--tenue); }
.biblio-icono .ic { width: 34px; height: 34px; }
.biblio-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--titulo); }
.biblio-item small.tenue { font-weight: 500; color: var(--tenue); }

/* Marcador de un fragmento reutilizable: en el editor se ve como una ficha; quien lee ve su contenido. */
.kb-fragmento { border: 1.5px dashed var(--info); border-radius: 12px; background: var(--info-bg); padding: 10px 14px; margin: 1em 0; color: var(--info); font-size: .9rem; font-weight: 700; user-select: none; cursor: default; }
.kb-fragmento::before { content: "Fragmento reutilizable: " attr(data-fragmento); }

@media print { .notas, .bandeja { display: none !important; } }

/* ---------- Tarjetas con vista previa del artículo (v1.3) ---------- */
.vistas-art { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.vista-art { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 16px; border: 1px solid var(--borde-suave); border-radius: var(--radius-lg); background: var(--fondo-2); color: var(--texto); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.vista-art:hover { border-color: var(--acento); box-shadow: var(--shadow); transform: translateY(-2px); }
.vista-art:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.vista-art > :not(.vista-img) { margin-inline: 6px; }
.vista-img { display: block; aspect-ratio: 16 / 10; border: 1px solid var(--borde-suave); border-radius: 14px; overflow: hidden; background: var(--tarjeta); margin-bottom: 6px; }
.vista-img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.vista-img .sin-imagen { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-300); background: linear-gradient(135deg, var(--fondo-2), var(--brand-50)); }
.vista-img .sin-imagen .ic { width: 42px; height: 42px; stroke-width: 1.4; }
.vista-art > b { color: var(--titulo); font-size: 1rem; line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }
.vista-art:hover > b { text-decoration: underline; }
.vista-resumen { font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vista-meta { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; color: var(--acento-fuerte); font-weight: 700; font-size: .84rem; }
.seccion-arts { margin-bottom: 34px; }
.seccion-arts > h2 { font-size: 1.15rem; margin: 0 0 12px; }
.seccion-arts > h2 a { color: inherit; text-decoration: none; }
.seccion-arts > h2 a:hover { color: var(--acento-fuerte); }
.seccion-arts > p.sub { color: var(--tenue); margin: -6px 0 14px; font-size: .93rem; }
.seccion-arts .ver-mas { margin: 14px 0 0; font-weight: 700; }
.seccion-arts .ver-mas a { text-decoration: none; }
.barra-vista { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--tenue); font-size: .9rem; }
.conmutador { display: inline-flex; border: 1px solid var(--borde); border-radius: 999px; padding: 3px; background: var(--tarjeta); }
.conmutador .btn { border: 0; background: transparent; border-radius: 999px; box-shadow: none; }
.conmutador .btn[aria-pressed="true"] { background: var(--titulo); color: var(--fondo); font-weight: 800; }
/* En el editor: la imagen que llevará la tarjeta */
.portada-ed { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; }
.portada-ed .vista-img { margin: 0; }
.portada-ed .botones { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) { .vistas-art { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .vista-art { padding: 10px; } .vista-resumen { -webkit-line-clamp: 3; font-size: .84rem; } }
@media print { .barra-vista { display: none !important; } }
/* Miniatura del propio artículo dentro de la tarjeta: la hoja se dibuja a 760 px y se reduce al ancho de la caja. */
.vista-img.mini { position: relative; background: #fff; }
.vista-img.mini::after { content: ""; position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.prosa.mini-hoja { position: absolute; top: 0; left: 0; width: 760px; padding: 26px 30px; margin: 0; border-radius: 0; background: #fff; color: var(--texto); color-scheme: light; transform-origin: top left; transform: scale(var(--escala, .3)); pointer-events: none; user-select: none; }
.mini-hoja img { cursor: default; }
.kb-previa-video { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--ink-900) center / 64px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5.5v13l11-6.500z'/%3E%3C/svg%3E"); margin: 1em 0; }
/* Recorridos con acercamiento (lo graba Paso a Paso): la captura se acerca al punto del clic dentro de su marco. */
.rec-escena { overflow: hidden; }
.rec-lienzo.con-zoom { transition: transform .7s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.rec-lienzo.con-zoom .rec-punto { scale: calc(1 / var(--zoom, 1)); }
.rec-lupa { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 23, 19, .72); color: #fff; display: grid; place-items: center; padding: 0; }
.rec-lupa[aria-pressed="true"] { background: var(--brand-600); border-color: var(--brand-600); }
.rec-lupa .ic { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .rec-lienzo.con-zoom { transition: none; } }

/* ---------- Conectar una aplicación de escritorio (v1.4) ---------- */
.conectar { max-width: 640px; margin: 24px auto; padding: 30px; }
.conectar h1 { font-size: 1.6rem; margin: 14px 0 10px; }
.conectar .quien { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--borde); border-radius: 12px; background: var(--fondo-2); }
.conectar .quien .ic { width: 20px; height: 20px; color: var(--tenue); flex: none; }
.conectar .quien span { display: grid; }
.conectar .quien small { color: var(--tenue); }
.conectar .dos-listas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 18px 0; }
.conectar .dos-listas h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); margin: 0 0 8px; }
.conectar .dos-listas ul { margin: 0; padding-left: 18px; font-size: .93rem; }
.conectar .dos-listas li { margin: 0 0 6px; }
.conectar .acciones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.conectar .pie-conectar { color: var(--tenue); font-size: .84rem; margin: 16px 0 0; }

/* ---------- Accesibilidad (v1.4.1) ---------- */
/* Solo para lectores de pantalla: está en la página, pero no se ve. */
.solo-lector { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* El contorno de un campo se distingue del fondo (3:1), en claro y en oscuro. */
:root, .hoja-clara { --borde-campo: #6f8a7d; }
:root[data-tema="oscuro"] { --borde-campo: #6c8a7c; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) { --borde-campo: #6c8a7c; } }
.entrada, select.entrada, textarea.entrada, .campo-busca, .ed-caja { border-color: var(--borde-campo); }
.entrada:focus { border-color: var(--acento); }
.campo-busca:focus-within { border-color: var(--acento); }
/* El foco siempre se ve, también donde se escribe el artículo. */
.ed-caja:focus-within { border-color: var(--foco); box-shadow: 0 0 0 3px color-mix(in srgb, var(--foco) 30%, transparent); }
.ed-titulo:focus-visible, .ed-paso-cab input:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
main h1[tabindex="-1"]:focus-visible { outline-offset: 6px; }
/* Contraste de textos pequeños sobre color. */
.salto { background: var(--brand-700); }
.tarjeta .pie .ir { color: var(--enlace); }
/* Los títulos de grupo del menú de administración ya no son encabezados de la página. */
.adm-nav .adm-grupo { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); padding: 0 12px; margin: 18px 0 6px; }
.adm-nav .adm-grupo:first-child { margin-top: 0; }
/* Puntos de avance del recorrido: la raya se ve igual de fina, pero se toca en un área de 24 px. */
.rec-cab .puntos { gap: 2px; }
.rec-cab .puntos button, .rec-cab .puntos button.visto, .rec-cab .puntos button.actual { position: relative; width: 26px; height: 24px; background: transparent; border-radius: 6px; }
.rec-cab .puntos button.actual { width: 38px; }
.rec-cab .puntos button::before { content: ""; position: absolute; left: 2px; right: 2px; top: 9px; height: 6px; border-radius: 999px; background: var(--borde-campo); }
.rec-cab .puntos button.visto::before { background: color-mix(in srgb, var(--acento) 55%, var(--borde)); }
.rec-cab .puntos button.actual::before { background: var(--acento); }
.migas a, .pie-sitio a { display: inline-block; min-height: 24px; line-height: 24px; }
/* El punto donde hacer clic late tres veces y se queda quieto (sigue viéndose). */
.rec-punto { animation-iteration-count: 3; }
/* Avisos de error: se quedan hasta que se cierran. */
.aviso { display: flex; gap: 12px; align-items: flex-start; }
.aviso > span { flex: 1; }
.aviso > button { flex: none; border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; min-width: 24px; min-height: 24px; padding: 0 4px; border-radius: 6px; }
/* Imágenes: sin descripción se señalan en el editor; al leer, se amplían también con el teclado. */
.ed-area img { cursor: pointer; }
.ed-area img[alt=""] { outline: 3px dashed var(--warn); outline-offset: 2px; }
.prosa a.ampliar { display: block; width: fit-content; max-width: 100%; text-decoration: none; border-radius: var(--radius); }
.prosa a.ampliar::after { content: none; }
.visor-cerrar { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 23, 19, .82); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; }
.visor-cerrar .ic { width: 20px; height: 20px; }
/* La sugerencia elegida con las flechas se distingue por algo más que un tono de gris. */
.sugerencia.activa { box-shadow: inset 3px 0 0 var(--acento); }
/* Enlaces de las tablas de administración y el botón de quitar una ficha: área de al menos 24 px. */
.tabla td.titulo > a, .tabla td.titulo > span > a { display: inline-block; min-height: 24px; line-height: 24px; }
.ficha button { width: 24px; height: 24px; }

/* ---------- Pantallas angostas: nada se sale de lado (v1.4.2) ---------- */
/* Las columnas piden 340 px solo si la pantalla los tiene: en un teléfono de 320 px ocupan lo que hay. */
.dos-col { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.dos-col > * { min-width: 0; }
/* En una fila de artículo el texto cede el espacio; las insignias bajan de renglón antes que empujar la página. */
.fila-art { min-width: 0; }
.fila-art > span:not(.ic-tipo):not(.derecha) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fila-art .derecha { flex: 0 1 auto; max-width: 45%; }
.lista-simple li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.lista-simple .n { white-space: normal; text-align: right; }
.panel code, .nota-suave code { overflow-wrap: anywhere; }
.cab-pagina h1, .adm-cab h1 { overflow-wrap: anywhere; }
