/* ==========================================================================================================
   Gaceta — «la gaceta y los recortes». Un diario de papel bien compuesto y la mesa del documentalista.
   Cabecera en gótica, titulares y texto en Newsreader (tamaño óptico: hecha para leer prensa en pantalla),
   interfaz en Libre Franklin, sellos y datos en Courier Prime. Papel (claro) y tinta (oscuro).
   La base (estructura, botones, campos…) está en /kit/kit.css: aquí van las variables y la pieza propia.
   ========================================================================================================== */

@font-face { font-family: 'Gaceta Gótica'; src: url('/fuentes/unifraktur-maguntia.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fuentes/newsreader.woff2') format('woff2-variations'), url('/fuentes/newsreader.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fuentes/newsreader-italica.woff2') format('woff2-variations'), url('/fuentes/newsreader-italica.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('/fuentes/libre-franklin.woff2') format('woff2-variations'), url('/fuentes/libre-franklin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fuentes/courier-prime.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fuentes/courier-prime-negrita.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ── Papel (claro) ─────────────────────────────────────────────────────────────────────────────────────── */
:root {
  --f-texto: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-titulos: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-ui: 'Libre Franklin', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  --f-datos: 'Courier Prime', 'Courier New', ui-monospace, monospace;
  --f-gotica: 'Gaceta Gótica', 'Old English Text MT', 'Times New Roman', serif;
  --peso-titulos: 650;
  --tracking-titulos: -0.014em;

  --papel: #f4efe3;
  --papel-claro: #fbf8f0;
  --papel-hondo: #e9e1cf;
  --recorte-fondo: #fdfbf6;
  --tinta: #1c1a16;
  --tinta-2: #4b463c;
  --tinta-3: #6c6658;
  --filete: #1c1a16;
  --rojo: #a8231b;
  --rojo-suave: #f4ddd6;
  --marcador: rgb(247 212 66 / 0.6);
  --kraft: #d9c497;
  --kraft-hondo: #c6ad7a;
  --kraft-texto: #4a3b1f;
  --sombra-recorte: drop-shadow(0 1px 0 rgb(28 26 22 / 0.10)) drop-shadow(0 7px 10px rgb(28 26 22 / 0.10));
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .29 0 0 0 0 .18 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --fondo: var(--papel);
  --superficie: var(--papel-claro);
  --superficie-2: #efe8d9;
  --hundido: var(--papel-hondo);
  --linea: #ddd4c1;
  --linea-fuerte: #b8ad95;
  --texto: var(--tinta);
  --texto-2: var(--tinta-2);
  --texto-3: var(--tinta-3);
  --acento: var(--tinta);
  --acento-hover: var(--rojo);
  --acento-suave: #e9e1ce;
  --acento-texto: var(--tinta);
  --sobre-acento: var(--papel-claro);
  --ok: #2b6838; --ok-suave: #e0ecd9;
  --atencion: #865500; --atencion-suave: #f5e8cc;
  --error: var(--rojo); --error-suave: var(--rojo-suave);
  --info: #2c5477; --info-suave: #e2e9ee;

  --radio-s: 2px;
  --radio: 3px;
  --radio-l: 4px;
  --radio-xl: 6px;
  --radio-pildora: 3px;
  --sombra-1: 0 1px 0 rgb(28 26 22 / 0.07);
  --sombra-2: 0 1px 0 rgb(28 26 22 / 0.07), 0 12px 24px -16px rgb(28 26 22 / 0.4);
  --sombra-3: 0 2px 0 rgb(28 26 22 / 0.06), 0 28px 60px -20px rgb(28 26 22 / 0.5);
  --foco: 0 0 0 3px color-mix(in oklab, var(--rojo) 38%, transparent);
  --ancho: 1220px;
  --ancho-texto: 66ch;
  --barra-alto: 62px;
}

/* ── Tinta (oscuro) ────────────────────────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    --papel: #15130f; --papel-claro: #1d1a15; --papel-hondo: #0e0c09; --recorte-fondo: #221f19;
    --tinta: #ece5d3; --tinta-2: #c2b9a5; --tinta-3: #988f7b; --filete: #d9d0bc;
    --rojo: #e57c6e; --rojo-suave: #3b1e19; --marcador: rgb(226 176 44 / 0.36);
    --kraft: #4a3c25; --kraft-hondo: #5b4a2e; --kraft-texto: #efdfbd;
    --sombra-recorte: drop-shadow(0 1px 0 rgb(0 0 0 / 0.5)) drop-shadow(0 8px 12px rgb(0 0 0 / 0.45));
    --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --superficie-2: #25221c; --linea: #34302a; --linea-fuerte: #544c40;
    --acento-hover: var(--rojo); --acento-suave: #2a261f; --sobre-acento: #15130f;
    --ok: #82c891; --ok-suave: #16291a; --atencion: #e9b75a; --atencion-suave: #33270f; --info: #8db7dc; --info-suave: #16232e;
    --sombra-1: 0 1px 0 rgb(0 0 0 / 0.4);
    --sombra-2: 0 1px 0 rgb(0 0 0 / 0.4), 0 12px 26px -14px rgb(0 0 0 / 0.7);
    --sombra-3: 0 2px 0 rgb(0 0 0 / 0.4), 0 28px 70px -18px rgb(0 0 0 / 0.8);
  }
}
:root[data-tema='oscuro'] {
  --papel: #15130f; --papel-claro: #1d1a15; --papel-hondo: #0e0c09; --recorte-fondo: #221f19;
  --tinta: #ece5d3; --tinta-2: #c2b9a5; --tinta-3: #988f7b; --filete: #d9d0bc;
  --rojo: #e57c6e; --rojo-suave: #3b1e19; --marcador: rgb(226 176 44 / 0.36);
  --kraft: #4a3c25; --kraft-hondo: #5b4a2e; --kraft-texto: #efdfbd;
  --sombra-recorte: drop-shadow(0 1px 0 rgb(0 0 0 / 0.5)) drop-shadow(0 8px 12px rgb(0 0 0 / 0.45));
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --superficie-2: #25221c; --linea: #34302a; --linea-fuerte: #544c40;
  --acento-hover: var(--rojo); --acento-suave: #2a261f; --sobre-acento: #15130f;
  --ok: #82c891; --ok-suave: #16291a; --atencion: #e9b75a; --atencion-suave: #33270f; --info: #8db7dc; --info-suave: #16232e;
  --sombra-1: 0 1px 0 rgb(0 0 0 / 0.4);
  --sombra-2: 0 1px 0 rgb(0 0 0 / 0.4), 0 12px 26px -14px rgb(0 0 0 / 0.7);
  --sombra-3: 0 2px 0 rgb(0 0 0 / 0.4), 0 28px 70px -18px rgb(0 0 0 / 0.8);
}

/* ── Base ──────────────────────────────────────────────────────────────────────────────────────────────── */
body {
  background-color: var(--fondo);
  background-image: var(--grano);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-kerning: normal;
}
h1, h2, h3, h4 { font-optical-sizing: auto; }
h1 { font-weight: 700; letter-spacing: -0.022em; line-height: 1.04; }
a { color: var(--texto); text-decoration-color: color-mix(in oklab, var(--texto) 40%, transparent); }
a:hover { text-decoration-color: var(--rojo); }
::selection { background: var(--marcador); color: inherit; }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }
mark {
  background: var(--marcador);
  color: inherit;
  padding: 0 0.12em;
  margin: 0 -0.04em;
  border-radius: 0.18em 0.32em 0.22em 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
code { font-family: var(--f-datos); font-size: 0.86em; background: var(--superficie-2); padding: 0.1em 0.35em; border-radius: 2px; word-break: break-all; }

/* La interfaz (botones, etiquetas, menús) en Franklin; los textos en Newsreader */
.boton, .campo > label, .campo > .etiqueta, .navegacion, .pestanas, .segmentado, .etiqueta, .tabla th, .menu, .tostada, .casilla,
.interruptor, .migas, .cuenta-boton, .marca small, .pasos, details.desplegable > summary, .vacio h3, .aviso, .chip, .opcion, input, select, textarea {
  font-family: var(--f-ui);
}
.antetitulo {
  font-family: var(--f-ui);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 8px;
}
.entradilla { font-style: italic; color: var(--texto-2); font-size: 1.16rem; line-height: 1.5; }
.suave { color: var(--texto-2); }
.vacio { border-color: var(--linea-fuerte); background: color-mix(in oklab, var(--superficie) 50%, transparent); }
.vacio h3 { font-family: var(--f-titulos); font-size: 1.3rem; }
.vacio p { font-size: 0.98rem; }

/* Botones de imprenta: rectos, con tinta */
.boton { --b-borde: color-mix(in oklab, var(--tinta) 50%, transparent); --b-fondo: transparent; box-shadow: none; font-weight: 650; letter-spacing: 0.01em; }
.boton:hover { --b-hover: var(--superficie-2); }
.boton.primario { --b-fondo: var(--tinta); --b-texto: var(--sobre-acento); --b-hover: var(--rojo); --b-borde: transparent; }
.boton.primario:hover { color: var(--sobre-acento); }
.boton.fantasma { --b-borde: transparent; }
.boton.grande { border-radius: var(--radio); }
.boton.pequeno { font-size: 0.74rem; }
.boton[aria-pressed='true'] { color: var(--rojo); }
.campo input:not([type='checkbox']):not([type='radio']), .campo select, .campo textarea, .entrada { background: var(--papel-claro); border-color: var(--linea-fuerte); border-radius: var(--radio); }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--tinta); box-shadow: var(--foco); }
.segmentado { background: var(--superficie-2); border-color: var(--linea-fuerte); border-radius: var(--radio); }
.segmentado button[aria-pressed='true'], .segmentado a.activo { background: var(--tinta); color: var(--sobre-acento); box-shadow: none; }
.segmentado a { flex: 1 0 auto; padding: 6px 12px; border-radius: 2px; font-size: var(--t-s); font-weight: 600; color: var(--texto-2); text-decoration: none; white-space: nowrap; }
.casilla input:checked, .interruptor input:checked { background: var(--tinta); border-color: var(--tinta); }
.interruptor input:checked { background: var(--ok); }
.buscador input { font-family: var(--f-texto); font-size: max(16px, 1.08rem); border-radius: var(--radio); background: var(--papel-claro); border-color: color-mix(in oklab, var(--tinta) 45%, transparent); }
.buscador input:focus { border-color: var(--tinta); }
.tarjeta { background: var(--papel-claro); border-color: var(--linea-fuerte); box-shadow: none; border-radius: var(--radio); }
dialog.dialogo { border-radius: var(--radio-xl); background: var(--papel-claro); border-color: var(--linea-fuerte); }
dialog.dialogo > header h2 { font-family: var(--f-titulos); }
.tostada { font-family: var(--f-ui); border-radius: var(--radio); }
details.desplegable { background: transparent; border-color: var(--linea-fuerte); border-radius: var(--radio); }
details.desplegable > summary { font-size: 0.9rem; }
.pasos li { font-family: var(--f-ui); }
.pasos li[aria-current='step'] { border-color: var(--rojo); }
.migas { font-size: 0.8rem; }
.vista-estrecha { max-width: 640px; margin: 40px auto; }
.titulo-seccion { font-size: 1.35rem; margin: 34px 0 14px; padding-top: 10px; border-top: 3px double var(--filete); }
.globo {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 6px; border-radius: 10px;
  background: var(--rojo); color: var(--papel-claro); font-family: var(--f-ui); font-size: 0.66rem; font-weight: 800; line-height: 1;
}
.globo[hidden] { display: none; }

/* ── Barra: la cabecera pequeña de cada página ─────────────────────────────────────────────────────────── */
.barra { background: var(--fondo); background-image: var(--grano); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 3px double var(--filete); }
.marca { gap: 8px; align-items: baseline; }
.marca-gotica { font-family: var(--f-gotica); font-size: 1.9rem; font-weight: 400; line-height: 1; letter-spacing: 0; }
.marca small { font-size: 0.58rem; letter-spacing: 0.16em; color: var(--texto-3); }
.navegacion { margin-left: var(--e-5); gap: 4px; }
.navegacion a { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 0; font-size: 0.82rem; font-weight: 650; color: var(--texto-2); }
.navegacion a .pag { font-family: var(--f-datos); font-size: 0.72rem; font-weight: 400; color: var(--texto-3); }
.navegacion a:hover { background: none; color: var(--texto); }
.navegacion a[aria-current='page'] { background: none; color: var(--texto); }
.navegacion a[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: var(--rojo); }
.barra .acciones .boton.icono { color: var(--texto-2); }
.cuenta-boton { border-radius: var(--radio); background: transparent; border-color: var(--linea-fuerte); }
@media (max-width: 1020px) { .navegacion a .pag { display: none; } }

/* Pestañas abajo (solo móvil estrecho; en tableta ya cabe la navegación de arriba) */
.pestanas { background: var(--fondo); background-image: var(--grano); backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 3px double var(--filete); }
.pestanas a { position: relative; font-size: 0.68rem; font-weight: 650; letter-spacing: 0.02em; color: var(--texto-3); }
.pestanas a[aria-current='page'] { color: var(--rojo); }
.pestanas a .globo { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; }
@media (min-width: 761px) {
  .con-pestanas .pestanas { display: none; }
  .con-pestanas .principal { padding-bottom: clamp(40px, 6vw, 80px); }
  .con-pestanas .tostadas { bottom: 24px; }
}

/* ── Página de periódico: cintillo arriba, folio abajo ─────────────────────────────────────────────────── */
.cintillo {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 12px;
  padding-bottom: 6px; margin-bottom: clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--filete);
  font-family: var(--f-ui); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--texto-2);
}
.cintillo-marca { font-family: var(--f-gotica); font-size: 1.1rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--texto); }
.cintillo-seccion { text-align: center; font-weight: 800; color: var(--texto); }
.cintillo-pag { text-align: right; }
.folio { margin: 56px 0 0; padding-top: 12px; border-top: 1px solid var(--linea); text-align: center; font-family: var(--f-datos); font-size: 0.86rem; color: var(--texto-3); }
.folio span { display: block; font-family: var(--f-ui); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.16em; margin-top: 2px; }
.cabecera-gaceta { align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--linea); }
.cabecera-gaceta h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.3rem); font-weight: 720; letter-spacing: -0.024em; line-height: 1.02; }
.cabecera-gaceta p:not(.antetitulo) { font-style: italic; font-size: 1.1rem; max-width: 62ch; }
@media (max-width: 600px) {
  .cintillo { grid-template-columns: auto 1fr; }
  .cintillo-seccion { display: none; }
}

/* ── La cabecera del diario (portada) ──────────────────────────────────────────────────────────────────── */
.cabecera-diario { text-align: center; margin-bottom: 8px; }
.orejas { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 36px); }
.oreja {
  display: flex; flex-direction: column; gap: 2px; max-width: 220px; margin: 0; padding: 8px 12px;
  border: 1px solid var(--filete); font-family: var(--f-ui); font-size: 0.68rem; line-height: 1.35; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-2);
}
.oreja strong { color: var(--texto); font-weight: 800; letter-spacing: 0.1em; }
.oreja.izq { justify-self: start; text-align: left; }
.oreja.der { justify-self: end; text-align: right; }
.nombre-diario {
  margin: 0; font-family: var(--f-gotica); font-weight: 400; font-size: clamp(3.8rem, 1.6rem + 9vw, 8.6rem); line-height: 0.92; letter-spacing: 0;
  color: var(--texto); animation: entintar 640ms var(--curva) both;
}
.linea-fecha {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 18px;
  margin: 12px 0 0; padding: 6px 2px 5px; border-top: 1px solid var(--filete); border-bottom: 4px double var(--filete);
  font-family: var(--f-ui); font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.12em; color: var(--texto-2);
}
.linea-fecha .fecha-larga { font-family: var(--f-texto); font-style: italic; font-size: 1rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--texto); }
.no-oficial { margin: 8px 0 0; font-style: italic; font-size: 0.84rem; color: var(--texto-3); }
@media (max-width: 760px) {
  .orejas { grid-template-columns: 1fr; }
  .oreja { display: none; }
  .linea-fecha { justify-content: center; text-align: center; }
}
@keyframes entintar { from { opacity: 0; filter: blur(3px); transform: translateY(5px); } }

/* Bienvenida y prueba en vivo: el cupón recortable */
.bienvenida { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); align-items: start; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--filete); }
.bienvenida h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); font-weight: 720; letter-spacing: -0.02em; line-height: 1.05; }
.bienvenida .fila { margin: 18px 0 10px; }
.prueba { position: relative; margin: 0; padding: 20px clamp(16px, 2.4vw, 24px) 18px; background: var(--recorte-fondo); border: 2px dashed color-mix(in oklab, var(--tinta) 42%, transparent); border-radius: 2px; }
.tijera-cupon { position: absolute; top: -13px; left: 22px; padding: 0 6px; background: var(--fondo); color: var(--rojo); line-height: 0; }
.tijera-cupon svg { width: 22px; height: 22px; }
.prueba > .antetitulo { display: block; }
.prueba .buscador input { height: 52px; font-size: max(16px, 1.15rem); }
.ejemplos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 10px 0 0; }
.ejemplo { padding: 2px 0; border: 0; border-bottom: 1px dotted var(--texto-3); background: none; font-family: var(--f-datos); font-size: 0.84rem; color: var(--texto); cursor: pointer; }
.ejemplo:hover { color: var(--rojo); border-color: var(--rojo); }
.prueba-salida { margin-top: 14px; transition: opacity var(--medio); }
.prueba-salida.pensando, .previa-caja.pensando { opacity: 0.5; }
.prueba-pista { margin: 0; font-style: italic; color: var(--texto-3); font-size: 0.95rem; }
.previa { display: grid; gap: 12px; }
.previa-cifra { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.previa-cifra strong {
  display: inline-block; font-size: 2.5rem; font-weight: 750; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums;
  background: linear-gradient(transparent 62%, var(--marcador) 62% 92%, transparent 92%);
}
.previa-cifra.cero { font-style: italic; color: var(--texto-2); }
.previa-muestras { display: grid; gap: 14px; margin: 4px 0 6px; }
.previa > .boton { justify-self: start; }
@media (max-width: 860px) { .bienvenida { grid-template-columns: 1fr; } }

/* Tu resumen del día */
.resumen-dia {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 18px 32px; align-items: center;
  margin: 18px 0 0; padding: 18px 20px; border: 1px solid var(--filete); background: var(--recorte-fondo);
}
.resumen-dia h2 { font-size: 1.55rem; margin: 0 0 4px; }
.resumen-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.resumen-lista a { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 560; }
.resumen-lista .globo { margin: 0; }
@media (max-width: 860px) { .resumen-dia { grid-template-columns: 1fr; } }

/* Navegación entre ediciones */
.barra-edicion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 18px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--linea); }
.ediciones { display: flex; align-items: center; gap: 6px; }
.elegir-dia input { height: 36px; padding: 4px 8px; border: 1px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--papel-claro); color: var(--texto); font-family: var(--f-datos); font-size: 0.9rem; }
.buscador-edicion { width: min(340px, 100%); }
.buscador-edicion input { height: 40px; font-size: max(16px, 1rem); }
.cuenta-busqueda { flex-basis: 100%; margin: 0; }
.aviso-lectura { margin-bottom: 18px; }
.sin-edicion { margin: 30px 0; }

/* ── Primera plana ─────────────────────────────────────────────────────────────────────────────────────── */
.primera { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); }
.primera-principal { padding-right: clamp(18px, 3vw, 34px); border-right: 1px solid var(--filete); }
.abre .antetitulo { margin-bottom: 10px; }
.titular-abre { margin: 0 0 12px; font-size: clamp(1.9rem, 1.15rem + 3vw, 3.5rem); font-weight: 730; line-height: 1.03; letter-spacing: -0.026em; }
.titular-abre a, .breves a, .columna-tema a, .items-boletin a, .titular-recorte a, .fila-archivo h3 a { color: inherit; text-decoration: none; }
.titular-abre a:hover, .breves a:hover, .columna-tema a:hover, .items-boletin a:hover, .titular-recorte a:hover, .fila-archivo h3 a:hover { text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; }
.ante-abre { margin: 0 0 12px; font-style: italic; color: var(--texto-2); font-size: 1.08rem; }
.acciones-abre { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; }
.breves { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--linea-fuerte); }
.breves ul { list-style: none; margin: 0; padding: 0; columns: 2 260px; column-gap: 28px; }
.breves li { break-inside: avoid; padding: 8px 0 10px; border-bottom: 1px dotted var(--linea-fuerte); }
.breves li a { font-size: 1.04rem; font-weight: 620; line-height: 1.28; }
.ante-breve { display: block; margin-top: 3px; font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.columna-tema .ante-breve { margin: 0 0 2px; }

.columna-registro { padding-left: clamp(18px, 3vw, 34px); }
.cifras-registro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0 0 12px; }
.cifras-registro div { padding: 8px 0 6px; border-top: 1px solid var(--linea-fuerte); }
.cifras-registro dt { font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.cifras-registro dd { margin: 0; font-size: 2rem; font-weight: 720; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }

.columnas-tematicas { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: 28px; border-top: 4px double var(--filete); }
.columna-tema { padding: 14px 18px 18px; border-left: 1px solid var(--linea-fuerte); }
.columna-tema:first-child { border-left: 0; padding-left: 0; }
.columna-tema h3 { margin: 0 0 6px; font-family: var(--f-ui); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.cifra-tema { margin: 0 0 8px; }
.cifra-tema strong { display: block; font-size: 2.6rem; font-weight: 740; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.cifra-tema span { font-style: italic; font-size: 0.9rem; color: var(--texto-2); }
.columna-tema ul { list-style: none; margin: 0; padding: 0; }
.columna-tema li { padding: 8px 0; border-top: 1px dotted var(--linea-fuerte); font-size: 0.96rem; line-height: 1.32; }
.mas-tema { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-family: var(--f-ui); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rojo); text-decoration: none; }
.mas-tema:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .primera { grid-template-columns: 1fr; }
  .primera-principal { padding-right: 0; border-right: 0; }
  .columna-registro { padding: 16px 0 0; margin-top: 22px; border-top: 4px double var(--filete); }
  .columna-tema { padding-left: 0; padding-right: 0; border-left: 0; border-top: 1px solid var(--linea-fuerte); }
  .columna-tema:first-child { border-top: 0; }
}
@media (min-width: 560px) and (max-width: 900px) {
  .columnas-tematicas { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .columna-tema:nth-child(2) { border-top: 0; }
}

/* ── La edición entera ─────────────────────────────────────────────────────────────────────────────────── */
.edicion-completa { margin-top: 52px; }
.titulo-edicion { margin: 0 0 6px; padding-top: 12px; border-top: 4px double var(--filete); text-align: center; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-style: italic; font-weight: 600; }
.cabeza-boletin { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 30px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--filete); }
.cabeza-boletin > span { font-family: var(--f-ui); font-size: 1.3rem; font-weight: 850; letter-spacing: 0.08em; }
.cabeza-boletin small { font-family: var(--f-datos); color: var(--texto-2); }
.cabeza-boletin .oficial { margin-left: auto; }
details.seccion-diario { border-bottom: 1px solid var(--linea-fuerte); }
details.seccion-diario > summary {
  list-style: none; display: grid; grid-template-columns: 66px minmax(0, 1fr) auto 18px; align-items: baseline; gap: 10px;
  padding: 14px 2px 12px; cursor: pointer;
}
details.seccion-diario > summary::-webkit-details-marker { display: none; }
details.seccion-diario > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--texto-3); border-bottom: 2px solid var(--texto-3); rotate: 45deg; translate: 0 -3px; transition: rotate var(--medio); }
details.seccion-diario[open] > summary::after { rotate: 225deg; translate: 0 2px; }
details.seccion-diario > summary:hover .nombre-seccion { text-decoration: underline; text-decoration-color: var(--rojo); }
.romano { font-size: 1.35rem; font-weight: 750; color: var(--rojo); font-variant-numeric: lining-nums; }
.nombre-seccion { font-size: 1.22rem; font-weight: 620; }
.cuenta-seccion { font-family: var(--f-datos); font-size: 0.88rem; color: var(--texto-2); }
.cuerpo-seccion { padding: 0 0 22px; }
.departamentos { columns: 2 380px; column-gap: 38px; column-rule: 1px solid var(--linea); }
.grupo-depto { break-inside: auto; }
.depto { margin: 14px 0 4px; padding-top: 6px; border-top: 1px solid var(--filete); font-family: var(--f-ui); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; break-after: avoid; }
.items-boletin { list-style: none; margin: 0; padding: 0; }
.items-boletin li { padding: 7px 0 9px; border-bottom: 1px dotted var(--linea-fuerte); break-inside: avoid; }
.items-boletin li > a { font-size: 0.98rem; line-height: 1.42; }
.epigrafe { display: block; font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.pie-item { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 3px; font-family: var(--f-ui); font-size: 0.72rem; color: var(--texto-3); }
.ident { font-family: var(--f-datos); font-size: 0.76rem; }
.oficial { display: inline-flex; align-items: center; gap: 2px; font-family: var(--f-ui); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.02em; color: var(--rojo); text-decoration: none; white-space: nowrap; }
.oficial:hover { text-decoration: underline; }
.oficial svg { width: 13px; height: 13px; }
.provincias-borme { padding-top: 8px; }
.resumen-actos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.lista-provincias { list-style: none; margin: 0; padding: 0; }
details.provincia > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 9px 2px; border-bottom: 1px dotted var(--linea-fuerte); cursor: pointer; font-weight: 600; }
details.provincia > summary::-webkit-details-marker { display: none; }
details.provincia > summary::before { content: '+'; width: 14px; font-family: var(--f-datos); color: var(--rojo); }
details.provincia[open] > summary::before { content: '−'; }
.asientos { padding: 4px 0 12px 18px; }

/* Actos del Registro */
.actos { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.acto { display: inline-block; padding: 1px 6px; border: 1px solid var(--linea-fuerte); border-radius: 2px; font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-2); white-space: nowrap; }
.acto[data-acto='constitucion'] { color: var(--ok); border-color: currentColor; }
.acto[data-acto='disolucion'], .acto[data-acto='extincion'], .acto[data-acto='concurso'], .acto[data-acto='cierre'] { color: var(--rojo); border-color: currentColor; }

/* ── El recorte ────────────────────────────────────────────────────────────────────────────────────────── */
.recorte { position: relative; filter: var(--sombra-recorte); transform: rotate(var(--giro, 0deg)); transition: transform var(--medio) var(--curva), opacity var(--medio); }
.recorte:hover { transform: rotate(0deg) translateY(-1px); }
.recorte .papel {
  position: relative; padding: 18px 20px 10px; background: var(--recorte-fondo);
  clip-path: polygon(0.3% 0.9%, 14% 0, 33% 0.7%, 52% 0.1%, 71% 0.8%, 88% 0.2%, 99.7% 0.6%, 100% 22%, 99.5% 47%, 100% 73%, 99.6% 99.3%, 82% 100%, 61% 99.4%, 42% 100%, 21% 99.5%, 0.4% 100%, 0 76%, 0.5% 51%, 0 24%);
}
.recorte.compacto .papel { padding: 14px 16px 8px; }
.recorte.se-va { opacity: 0; transform: translateY(10px) rotate(-2deg); }
.sello {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--linea);
  font-family: var(--f-datos); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-2);
}
.sello-id { color: var(--texto-3); text-transform: none; }
.recorte.nuevo .sello { padding-right: 84px; }
.titular-recorte { margin: 0 0 4px; font-size: 1.2rem; font-weight: 660; line-height: 1.22; letter-spacing: -0.01em; }
.compacto .titular-recorte { font-size: 1.04rem; }
.datos-recorte { margin: 2px 0 4px; font-family: var(--f-ui); font-size: 0.72rem; color: var(--texto-3); }
.fragmento { margin: 6px 0 8px; font-size: 0.95rem; line-height: 1.5; color: var(--texto-2); }
.compacto .fragmento { font-size: 0.88rem; }
.nota-margen { margin: 10px 0 6px; padding: 6px 10px; border-left: 3px solid var(--rojo); background: color-mix(in oklab, var(--rojo-suave) 45%, transparent); font-style: italic; white-space: pre-line; }
.acciones-recorte { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--linea-fuerte); }
.acciones-recorte .oficial { margin-left: auto; padding: 0 6px; }
.acciones-recorte .boton.pequeno { padding-inline: 8px; }
.acciones-recorte .boton svg { width: 15px; height: 15px; }
.compacto .acciones-recorte { display: none; }
.tampon {
  position: absolute; top: 13px; right: 14px; z-index: 1; padding: 1px 8px; border: 2px solid currentColor; border-radius: 3px;
  font-family: var(--f-datos); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--rojo);
  transform: rotate(-7deg); opacity: 0.9; animation: sellar 420ms var(--curva-salto) both;
}
.recorte.nuevo::before { content: ''; position: absolute; left: 4px; right: 4px; top: -7px; border-top: 1.5px dashed var(--rojo); opacity: 0.75; }
.tijera { position: absolute; top: -17px; left: 14px; padding: 0 3px; line-height: 0; color: var(--rojo); background: var(--fondo); animation: cortar 760ms var(--curva) both; }
.tijera svg { width: 20px; height: 20px; }
.mesa .tijera, .carpeta .tijera { background: var(--fondo); }
@keyframes sellar { 0% { opacity: 0; transform: rotate(-7deg) scale(1.8); } 70% { opacity: 0.95; transform: rotate(-7deg) scale(0.95); } 100% { opacity: 0.9; transform: rotate(-7deg) scale(1); } }
@keyframes cortar { from { opacity: 0; transform: translateX(180px); } 25% { opacity: 1; } to { opacity: 1; transform: none; } }

/* La mesa: la bandeja de una alerta */
.mesa { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 30px 26px; padding: 14px 0 6px; align-items: start; }
.mesa > .recorte { animation: caer 340ms var(--curva) both; }
.mesa > .recorte:nth-child(2) { animation-delay: 40ms; }
.mesa > .recorte:nth-child(3) { animation-delay: 80ms; }
.mesa > .recorte:nth-child(4) { animation-delay: 120ms; }
.mesa > .recorte:nth-child(n + 5) { animation-delay: 160ms; }
@keyframes caer { from { opacity: 0; translate: 0 10px; } }
.mesa > .vacio { grid-column: 1 / -1; }
.separador-leido { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 6px 0 -8px; font-family: var(--f-ui); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; color: var(--texto-3); }
.separador-leido::before, .separador-leido::after { content: ''; flex: 1; border-top: 1px solid var(--linea-fuerte); }
.separador-leido.nuevo { color: var(--rojo); }
.filtro-bandeja { margin: 16px 0 6px; }
.nota-bandeja { margin-top: 26px; max-width: 70ch; font-style: italic; }

/* ── Fichero de alertas y plantillas (fichas de cartulina) ─────────────────────────────────────────────── */
.ficha {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 12px; text-align: left; color: var(--texto);
  background-color: var(--recorte-fondo);
  background-image:
    linear-gradient(transparent 2.55rem, var(--rojo) 2.55rem, var(--rojo) calc(2.55rem + 1px), transparent calc(2.55rem + 1px)),
    repeating-linear-gradient(transparent 0 calc(1.55rem - 1px), color-mix(in oklab, var(--info) 14%, transparent) calc(1.55rem - 1px) 1.55rem);
  background-position: 0 0, 0 2.6rem;
  background-repeat: no-repeat, repeat;
  border: 1px solid var(--linea-fuerte); border-radius: 3px; box-shadow: var(--sombra-1);
  font: inherit; text-decoration: none;
}
.ficha-titulo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 2rem; font-size: 1.14rem; font-weight: 680; line-height: 1.2; }
.ficha-texto { font-size: 0.93rem; line-height: 1.55rem; color: var(--texto-2); }
.fichas-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); gap: 18px; margin: 14px 0 6px; }
.ficha-plantilla { cursor: pointer; min-height: 168px; transition: transform var(--medio) var(--curva), box-shadow var(--medio); }
.ficha-plantilla:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: var(--sombra-2); }
.ficha-plantilla:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }
.ficha-plantilla.de-cero { background-color: transparent; border-style: dashed; }
.fichero { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ficha-alerta { flex-direction: row; align-items: flex-start; gap: 10px; padding-right: 8px; }
.ficha-alerta.con-nuevas { border-left: 4px solid var(--rojo); }
.ficha-alerta.pausada { opacity: 0.72; }
.ficha-enlace { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.ficha-enlace:hover .ficha-titulo { text-decoration: underline; text-decoration-color: var(--rojo); }
.ficha-cifras { font-family: var(--f-datos); font-size: 0.76rem; color: var(--texto-3); }
.ficha .etiqueta { font-size: 0.64rem; }
.resumen-linea { margin: 0 0 12px; color: var(--texto-2); }
.columnas-alertas { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.panel-avisos { padding: 16px 18px; border: 1px solid var(--filete); background: var(--papel-claro); }
.panel-avisos h2 { margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--filete); font-family: var(--f-ui); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; }
.etiqueta-panel { margin: 16px 0 6px; font-family: var(--f-ui); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--texto-3); }
.avisos-caja { display: grid; gap: 10px; }
.avisos-estado { display: flex; align-items: flex-start; gap: 10px; }
.avisos-estado .punto { margin-top: 7px; }
.avisos-estado strong { font-family: var(--f-ui); font-size: 0.88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.chip { display: inline-flex; align-items: baseline; gap: 3px; max-width: 100%; padding: 2px 7px; border: 1px solid var(--linea-fuerte); border-radius: 2px; background: var(--papel); font-size: 0.74rem; line-height: 1.45; color: var(--texto); overflow-wrap: anywhere; }
.chip-k { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.chip-grande { font-size: 0.92rem; padding: 6px 10px; margin: 0; }
.vista-bandeja > .chips { margin-top: 10px; }

/* ── Asistente de alertas ──────────────────────────────────────────────────────────────────────────────── */
.vista-editor .pasos { max-width: 560px; }
.editor-columnas { grid-template-columns: minmax(0, 1fr) minmax(300px, 410px); gap: clamp(22px, 4vw, 46px); }
.panel-previa { position: sticky; top: calc(var(--barra-alto) + 16px); max-height: calc(100dvh - var(--barra-alto) - 32px); overflow-y: auto; padding: 16px 16px 18px; background: var(--papel-hondo); background-image: var(--grano); border-radius: var(--radio); }
.form-alerta { gap: 18px; }
.campo-con-modo { gap: 8px; }
.campo-con-modo input { flex: 1; min-width: 0; }
.tema-plantilla { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--linea-fuerte); border-radius: var(--radio); }
.afinar > summary { font-family: var(--f-ui); }
.afinar-cuerpo { gap: 16px; }
.chips-opcion { display: flex; flex-wrap: wrap; gap: 6px; }
.opcion { min-height: 36px; padding: 6px 10px; border: 1px solid var(--linea-fuerte); border-radius: 2px; background: var(--papel-claro); font-size: 0.78rem; font-weight: 600; color: var(--texto-2); cursor: pointer; transition: background var(--rapido), color var(--rapido); }
.opcion:hover { color: var(--texto); border-color: var(--tinta); }
.opcion[aria-pressed='true'] { background: var(--tinta); border-color: var(--tinta); color: var(--sobre-acento); }
.opcion-k { font-family: var(--f-datos); font-weight: 700; }
.sugerencias { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--papel-claro); }
.sugerencias:empty { display: none; }
.sugerencias li + li { border-top: 1px solid var(--linea); }
.sugerencias button { width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; color: var(--texto); cursor: pointer; font-family: var(--f-texto); }
.sugerencias button:hover, .sugerencias button:focus-visible { background: var(--superficie-2); }
.empresa-elegida:empty { display: none; }
.empresa-elegida { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pie-editor { justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--linea); }
.paso-avisos { max-width: 920px; }
.rejilla.dos.canales { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 24px; }
.canal { padding: 14px 16px; border: 1px solid var(--linea-fuerte); background: var(--papel-claro); border-radius: var(--radio); }
.canal h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--f-ui); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.canal h2 svg { width: 18px; height: 18px; color: var(--rojo); }
.canal-apagado { border-style: dashed; background: transparent; }
@media (max-width: 480px) { .campo-con-modo { flex-wrap: wrap; } .campo-con-modo .segmentado { width: 100%; } }
@media (max-width: 960px) { .panel-previa { position: static; max-height: none; } }

/* ── La carpeta de recortes ────────────────────────────────────────────────────────────────────────────── */
.barra-carpeta { margin: 22px 0 0; }
.buscador-pequeno { width: min(360px, 100%); }
.buscador-pequeno input { height: 42px; }
.carpeta {
  position: relative; margin-top: 46px; padding: clamp(26px, 3vw, 38px) clamp(14px, 3vw, 32px) 30px;
  background: var(--kraft); background-image: var(--grano), linear-gradient(170deg, transparent 60%, color-mix(in oklab, var(--kraft-hondo) 60%, transparent));
  border-radius: 2px 6px 6px 6px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 0 rgb(0 0 0 / 0.08), 0 22px 44px -28px rgb(40 28 8 / 0.65);
}
.carpeta::before { content: ''; position: absolute; left: 0; top: -32px; width: min(360px, 78%); height: 33px; background: var(--kraft); background-image: var(--grano); border-radius: 6px 12px 0 0; clip-path: polygon(0 0, 89% 0, 100% 100%, 0 100%); }
.rotulo { position: absolute; top: -25px; left: 16px; z-index: 1; padding: 2px 10px; background: var(--recorte-fondo); font-family: var(--f-datos); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto); box-shadow: var(--sombra-1); max-width: calc(min(360px, 78%) - 48px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recortes-columnas { columns: 3 320px; column-gap: 26px; }
.recortes-columnas > .recorte { break-inside: avoid; margin-bottom: 26px; }
.recortes-columnas > .vacio { column-span: all; background: color-mix(in oklab, var(--recorte-fondo) 80%, transparent); }
.carpeta .tijera { background: var(--kraft); }

/* ── Hemeroteca ────────────────────────────────────────────────────────────────────────────────────────── */
.form-hemeroteca { margin: 22px 0 10px; }
.buscador-grande { gap: 10px; align-items: stretch; }
.buscador-grande .buscador input { height: 52px; }
.buscador-grande .boton { min-height: 52px; }
.filtros { margin-top: 12px; }
.filtros .formulario { padding-top: 4px; }
.cabeza-resultados { margin: 22px 0 4px; padding-bottom: 10px; border-bottom: 3px double var(--filete); }
.total-resultados { margin: 0; font-style: italic; font-size: 1.08rem; }
.total-resultados strong { font-style: normal; font-size: 1.5rem; }
.archivo { list-style: none; margin: 0; padding: 0; }
.fila-archivo { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 20px; padding: 16px 0 14px; border-bottom: 1px solid var(--linea); }
.fecha-archivo { padding-top: 3px; font-family: var(--f-datos); font-size: 0.8rem; text-transform: uppercase; color: var(--texto-2); }
.ante-archivo { margin: 0; font-family: var(--f-ui); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.fila-archivo h3 { margin: 3px 0 4px; font-size: 1.14rem; font-weight: 630; line-height: 1.28; }
.acciones-archivo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 0; }
.ayuda-hemeroteca { max-width: 760px; }
.consejos { padding-left: 1.1em; }
.consejos li { margin-bottom: 0.4em; }
.ejemplos-busqueda { list-style: none; padding: 0; display: grid; gap: 6px; }
.ejemplos-busqueda a { font-family: var(--f-datos); font-size: 0.92rem; }
@media (max-width: 600px) {
  .fila-archivo { grid-template-columns: 1fr; }
  .buscador-grande { flex-wrap: wrap; }
  .buscador-grande .boton { width: 100%; }
}

/* ── Empresas ──────────────────────────────────────────────────────────────────────────────────────────── */
.buscador-empresas { margin: 22px 0 14px; max-width: 720px; }
.buscador-empresas input { height: 54px; font-size: max(16px, 1.15rem); }
.lista-empresas, .lista-recientes, .lista-anuncios, .lista-personas { list-style: none; margin: 0; padding: 0; }
.lista-empresas li, .lista-recientes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 0; border-bottom: 1px dotted var(--linea-fuerte); }
.lista-empresas a, .lista-recientes a { text-decoration: none; }
.lista-empresas a strong, .lista-recientes a strong { font-weight: 640; }
.lista-empresas a:hover strong, .lista-recientes a:hover strong { text-decoration: underline; text-decoration-color: var(--rojo); }
.lista-recientes p { flex-basis: 100%; color: var(--texto-2); }
.seccion-empresas { margin-top: 30px; }
.seccion-empresas > .fila { padding-top: 10px; border-top: 3px double var(--filete); margin-bottom: 8px; }
.seccion-empresas > .fila .titulo-seccion { border: 0; padding: 0; margin: 0; }
.campo-provincia select { min-width: 200px; }
.datos-empresa { display: flex; flex-wrap: wrap; margin: 0 0 26px; border-top: 1px solid var(--filete); border-bottom: 1px solid var(--filete); }
.datos-empresa > div { padding: 10px 22px 10px 0; margin-right: 22px; border-right: 1px solid var(--linea); }
.datos-empresa > div:last-child { border-right: 0; }
.datos-empresa dt { font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.datos-empresa dd { margin: 0; }
.datos-empresa dd.datos { font-family: var(--f-datos); }
.columnas-ficha { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.cronologia-empresa li { padding-bottom: 22px; }
.cronologia-empresa time { font-size: 0.78rem; text-transform: uppercase; }
.texto-asiento { margin: 4px 0 6px; font-size: 0.96rem; line-height: 1.55; }
.texto-asiento.grande { font-size: 1.08rem; line-height: 1.65; }
.nombre-acto { font-variant-caps: all-small-caps; font-weight: 750; letter-spacing: 0.04em; color: var(--texto); }
.tarjeta-lateral { margin-bottom: 26px; padding-top: 10px; border-top: 3px double var(--filete); }
.tarjeta-lateral h2 { margin: 0 0 8px; font-family: var(--f-ui); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.lista-personas li { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px dotted var(--linea-fuerte); }
.lista-personas strong { font-weight: 600; font-size: 0.98rem; }
.lista-personas .cesada strong { color: var(--texto-3); font-weight: 500; }
.lista-anuncios li { padding: 7px 0; border-bottom: 1px dotted var(--linea-fuerte); font-size: 0.95rem; }
.lista-anuncios li > a { display: block; text-decoration: none; }
.lista-anuncios li > a:hover { text-decoration: underline; text-decoration-color: var(--rojo); }
.lista-anuncios time { font-family: var(--f-datos); font-size: 0.74rem; color: var(--texto-2); text-transform: uppercase; }
.aviso.pequeno { font-size: 0.82rem; }

/* ── Un documento: artículo de periódico ───────────────────────────────────────────────────────────────── */
.articulo { max-width: 1100px; margin-inline: auto; }
.ante-documento { margin-bottom: 6px; }
.rango-documento { margin: 0 0 6px; font-family: var(--f-ui); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-2); }
.titular-documento { margin: 0 0 10px; max-width: 26em; font-size: clamp(1.8rem, 1.2rem + 2.7vw, 3.1rem); font-weight: 730; line-height: 1.06; letter-spacing: -0.024em; }
.vista-documento > .entradilla { margin: 0 0 14px; max-width: 60ch; }
.datos-documento { margin: 0; padding: 7px 0; border-top: 1px solid var(--filete); border-bottom: 1px solid var(--linea); font-family: var(--f-datos); font-size: 0.82rem; color: var(--texto-2); }
.titulo-oficial { margin: 12px 0 0; max-width: 80ch; font-size: 0.92rem; color: var(--texto-2); }
.etiqueta-titulo { font-family: var(--f-ui); font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--texto-3); }
.acciones-documento { margin: 20px 0 30px; }
.columnas-documento { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: clamp(22px, 4vw, 48px); }
.extracto { columns: 2 300px; column-gap: 34px; column-rule: 1px solid var(--linea); font-size: 1.02rem; line-height: 1.62; }
.extracto p { margin: 0 0 0.8em; }
.extracto.con-capitular p:first-child::first-letter { float: left; margin: 0.06em 0.1em 0 0; font-size: 3.5em; font-weight: 740; line-height: 0.84; color: var(--texto); }
.aviso-extracto { margin: 14px 0 0; padding-top: 8px; border-top: 1px dashed var(--linea-fuerte); font-family: var(--f-ui); font-size: 0.78rem; color: var(--texto-3); }
.materias { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.ficha-documento { padding: 14px 16px; border: 1px solid var(--filete); background: var(--papel-claro); align-self: start; }
.ficha-documento h2 { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--filete); font-family: var(--f-ui); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.ficha-documento dl { margin: 0; }
.ficha-documento dl div { padding: 7px 0; border-bottom: 1px dotted var(--linea-fuerte); }
.ficha-documento dl div:last-child { border-bottom: 0; }
.ficha-documento dt { font-family: var(--f-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.ficha-documento dd { margin: 0; font-size: 0.96rem; overflow-wrap: anywhere; }
.tabla-personas { margin-bottom: 10px; }
.otros-asientos { margin-top: 30px; }
.pie-documento { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 34px; font-size: 0.86rem; }
.pie-documento svg { width: 16px; height: 16px; }

/* ── Ajustes y páginas legales ─────────────────────────────────────────────────────────────────────────── */
.vista-ajustes { max-width: 860px; }
.vista-ajustes .tarjeta { margin-top: 18px; }
.ajuste h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.3rem; }
.ajuste h2 svg { width: 22px; height: 22px; color: var(--rojo); }
.ajuste-apagado { border-style: dashed; background: transparent; }
.prosa-gaceta { margin-inline: auto; }
.prosa-gaceta h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.prosa-gaceta h2 { margin-top: 1.8em; padding-top: 12px; border-top: 1px solid var(--linea-fuerte); font-size: 1.3rem; }
.prosa-gaceta p, .prosa-gaceta li { font-size: 1.05rem; }

/* Pie con la fuente de los datos */
.pie-gaceta { border-top: 4px double var(--filete); padding: 14px 0 0; }
.pie-gaceta p { margin: 0; font-style: italic; font-size: 0.88rem; color: var(--texto-2); }
.pie { border-top: 0; }

/* ── Móvil estrecho ────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .columnas-alertas, .columnas-ficha, .columnas-documento, .editor-columnas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .recorte .papel { padding: 16px 14px 8px; }
  .recorte.nuevo .sello { padding-right: 0; padding-top: 22px; }
  .tampon { top: 8px; }
  .mesa { gap: 26px; }
  .acciones-recorte .boton.pequeno { padding-inline: 6px; }
}

/* ── Impresión: la edición, la carpeta o un documento, limpios ─────────────────────────────────────────── */
@media print {
  body { background: #fff; background-image: none; }
  .cintillo, .tijera, .tampon, .acciones-recorte, .barra-edicion, .bienvenida, .resumen-dia, .acciones-documento, .barra-carpeta, .filtro-bandeja, .pie-gaceta { display: none !important; }
  .recorte { filter: none; transform: none !important; break-inside: avoid; }
  .recorte .papel { clip-path: none; border: 1px solid #999; }
  .recorte.nuevo::before { display: none; }
  .carpeta { margin: 0; padding: 0; background: none; box-shadow: none; }
  .carpeta::before, .rotulo { display: none; }
  .recortes-columnas { columns: 2; }
  .nombre-diario { animation: none; }
  .folio { margin-top: 20px; }
  a { text-decoration: none; }
}
