/* ============================================================
   ENIGMA ATLAS · Tema «prensa de noche» (rediseño del 1-dic-2026)
   CSS propio, sin build. Es el aire de la app Android (`movil/src/estilo.ts`): fondo oscuro,
   titulares en serif de diario, versalitas condensadas para etiquetas y un color por colección.
   Sustituye al tema de papel manila y máquina de escribir, que se leía mal en fichas de
   2.000 palabras. Los nombres de variable viejos (--paper, --ink, --desk…) se conservan con
   valores nuevos para no tener que reescribir cada regla: --paper e --ink son ahora texto
   claro, y --surface/--surface-2 son las tarjetas que antes eran de papel.
   ============================================================ */

:root {
  --desk:       #0E1116;   /* fondo (el `fondo` de la app) */
  --desk-2:     #161B22;
  --surface:    #161B22;   /* tarjeta */
  --surface-2:  #1C232C;   /* tarjeta alta */
  --paper:      #E6EDF3;   /* texto */
  --paper-2:    #1C232C;
  --ink:        #E6EDF3;
  --ink-soft:   #9AA7B4;   /* texto suave */
  --prose:      #D7DEE6;   /* cuerpo de lectura, un punto más bajo que los titulares */
  --stamp:      #C4312B;   /* rojo de aviso */
  --stamp-2:    #9E2621;
  --line:       #262C36;   /* borde */
  --accent:     #C8A24A;   /* oro de la marca */
  --lugar:      #8C7BE0;   /* un color por colección: los mismos que la app y `_marcas` */
  --criptido:   #43A878;
  --leyenda:    #E2A93B;
  --ovni:       #5BB8D6;
  --tinte-lugar:    #241f36;
  --tinte-criptido: #16281f;
  --tinte-leyenda:  #2b2316;
  --tinte-ovni:     #13262d;
  --ok:         #43A878;
  --tipo:       var(--accent);  /* lo fija cada ficha con `.tipo--…` */

  --f-serif: "Playfair Display", Georgia, "Times New Roman", serif;   /* titulares */
  --f-cond:  "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif; /* versalitas */
  --f-prose: "Source Serif 4", Georgia, "Times New Roman", serif;     /* lectura larga */
  --f-ui:    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.tipo--lugar    { --tipo: var(--lugar); }
.tipo--criptido { --tipo: var(--criptido); }
.tipo--leyenda  { --tipo: var(--leyenda); }
.tipo--ovni     { --tipo: var(--ovni); }

/* ------------------------------------------------------------
   Fuentes SELF-HOSTED: mismo origen, fingerprint + caché de un año vía Propshaft, y preload
   de las dos que pinta la ficha nada más abrir (titular y cuerpo) en el layout. Subset latin,
   que cubre EN y ES. Estáticas a propósito: la variable de Source Serif pesa 122 KB y cada
   peso estático, 20 KB. El cuerpo de la interfaz va en la fuente del sistema: cero bytes.
   ------------------------------------------------------------ */
@font-face { font-family: "Playfair Display"; src: url("/assets/playfair-display-latin-700-a51941ef.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/assets/playfair-display-latin-900-10d3f597.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/barlow-condensed-latin-600-1a79f86d.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/barlow-condensed-latin-700-74ef7090.woff2") format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/source-serif-4-latin-400-9a523421.woff2") format("woff2");
  font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/source-serif-4-latin-600-6988c85a.woff2") format("woff2");
  font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/source-serif-4-latin-400italic-e8438c2e.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- Cabecera ----------
   Una sola fila en cualquier anchura. En el móvil las secciones van tras el botón ☰, que es
   un checkbox con su <label>: abre y cierra sin una línea de JavaScript. Antes el menú
   ocupaba tres filas en un teléfono y el contenido empezaba a 280 px. Por debajo de 1.200 px
   va plegado: con las cuatro secciones, la pastilla de la app y la cuenta, a menos no cabe en
   una fila. La pastilla sale desde 900 px; por debajo anuncia la app la barra de `_app_banner`. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,17,22,.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  max-width: 1080px; margin: 0 auto; padding: .7rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.brand {
  font-family: var(--f-serif); font-weight: 900; letter-spacing: .02em;
  font-size: 1.35rem; line-height: 1.1; text-decoration: none; color: var(--paper);
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
}
.brand small { display: block; font-family: var(--f-cond); font-weight: 600; color: var(--ink-soft);
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; margin-left: auto; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav__secciones { display: flex; gap: .2rem; }
.nav__secciones a { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-soft);
  padding: .3rem .6rem; border-radius: 8px;
  font-family: var(--f-cond); font-weight: 700; font-size: .98rem; letter-spacing: .1em; text-transform: uppercase; }
.nav__secciones a:hover, .nav__secciones a.on { color: var(--paper); background: var(--surface-2); }
.nav__cuenta { display: flex; align-items: center; gap: .8rem; font-size: .9rem; color: var(--ink-soft); }
.nav__cuenta .button_to { margin: 0; }
.nav-toggle { display: none; }
.nav-toggle__btn { display: none; }

/* 📱 El enlace a la app: uno más de la cuenta, con el robot en oro para que se distinga sin
   gritar. En el móvil no sale (ahí está la barra de `_app_banner`). */
.nav__app { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; color: var(--ink-soft);
  font-family: var(--f-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; }
.nav__app .marca { width: 1.25em; height: 1.25em; color: var(--accent); }
.nav__app:hover { color: var(--paper); }

.lang-switch { display: inline-flex; gap: .1rem; font-family: var(--f-cond); font-weight: 700; letter-spacing: .1em; }
.lang-switch a { padding: .1rem .35rem; font-size: .85rem; color: var(--ink-soft); border-radius: 6px; }
.lang-switch a.on { color: var(--paper); background: var(--surface-2); }

@media (max-width: 899px) { .nav__app { display: none; } }

@media (max-width: 1199px) {
  .nav-toggle__btn { display: grid; place-items: center; margin-left: auto; cursor: pointer;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; font-size: 1.2rem; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .6rem;
    padding: .8rem 1.2rem 1.2rem; background: var(--desk); border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav__secciones { flex-direction: column; }
  .nav__secciones a { padding: .65rem .6rem; font-size: 1.1rem; }
  .nav__cuenta { justify-content: space-between; padding-top: .6rem; border-top: 1px solid var(--line); }
}

/* ---------- Contenedor ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }

/* ---------- Sellos ---------- */
.stamp {
  display: inline-block; font-family: var(--f-cond); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem;
  color: var(--stamp); border: 2px solid var(--stamp); border-radius: 3px;
  padding: .12rem .45rem; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1px rgba(163,39,27,.25); opacity: .9;
}
.stamp--active { color: var(--ok); border-color: var(--ok); transform: rotate(2deg); }
.stamp--classified { font-size: 1rem; padding: .2rem .7rem; }
/* Expediente ampliado: el sello del contenido bueno. Ámbar en vez de rojo para que
   se distinga del "ACTIVO" sin competir con él. */
.stamp--extended { color: var(--accent); border-color: var(--accent); transform: rotate(-2deg);
  box-shadow: inset 0 0 0 1px rgba(179,132,31,.25); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 2rem 0 1.4rem; }
.hero__title {
  font-family: var(--f-cond); font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; font-size: clamp(2rem, 6vw, 3.4rem); margin: .2rem 0; line-height: 1.05;
}
/* Palabra "resaltada" tipo expediente: barra oscura + texto legible (antes era negro
   sobre negro e invisible). En escritorio se puede pasar el ratón para el efecto. */
.hero__title .redacted { background: var(--ink); color: var(--accent); border-radius: 2px;
  padding: 0 .35rem; letter-spacing: .02em; box-decoration-break: clone; }
.hero__sub { max-width: 640px; margin: .6rem auto 1.2rem; opacity: .85; }
/* Entradilla de un listado o un hub de país, sobre el fondo oscuro. Antes se usaba
   `.file-lead`, que es la de la ficha —tinta oscura sobre papel— y aquí no se leía (20-nov-2026). */
.section-lead { max-width: 760px; margin: .6rem 0 1rem; font-size: 1.02rem; line-height: 1.55;
  color: var(--paper); opacity: .85; }
.hero__stats { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--f-cond); font-size: 2rem; color: var(--accent); }
.stat span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .12em;
  font-size: .85rem; padding: .55rem 1.1rem; border-radius: 3px;
  background: var(--stamp); color: #fff; border: 2px solid var(--stamp-2);
}
.btn:hover { background: var(--stamp-2); }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Rejilla de fichas ---------- */
.section-title {
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .18em;
  font-size: 1.1rem; color: var(--paper); border-left: 4px solid var(--stamp);
  padding-left: .6rem; margin: 2.2rem 0 1rem;
}
.files-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- Ficha de caso (papel manila) ---------- */
.file-card {
  position: relative; display: block; text-decoration: none;
  color: var(--ink); background: var(--surface);
  background-image: repeating-linear-gradient(0deg, transparent 0 26px, rgba(120,100,60,.10) 26px 27px);
  border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: 2px; padding: .9rem 1rem 1.1rem;
  box-shadow: 3px 4px 0 rgba(0,0,0,.35); transition: transform .12s ease, box-shadow .12s ease;
}
.file-card:hover { transform: translate(-1px,-2px); box-shadow: 5px 7px 0 rgba(0,0,0,.4); }
.file-card__no {
  font-size: .7rem; letter-spacing: .18em; color: var(--stamp); text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
.file-card__title {
  font-family: var(--f-cond); font-weight: 700; text-transform: uppercase;
  font-size: 1.15rem; line-height: 1.15; margin: .35rem 0 .1rem;
}
.file-card__emoji { font-size: 1.4rem; }
.dotline { border: none; border-top: 1px dotted var(--line); margin: .55rem 0; }
.file-card__meta { font-size: .78rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.file-card__excerpt { font-size: .85rem; color: var(--ink-soft); margin-top: .4rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Marcas (las mismas que la app Android) ---------- */
.sprite-marcas { position: absolute; width: 0; height: 0; overflow: hidden; }
.marca { width: 1.15em; height: 1.15em; vertical-align: -.22em; }
.marca--brand { width: 2.3rem; height: 2.3rem; vertical-align: -.7rem; margin-right: .15rem; }

/* La imagen de la tarjeta de listado: sangra hasta los bordes, como una foto grapada
   al expediente. Sin foto propia, la marca de la colección sobre su color. */
.file-card__media {
  margin: -.9rem -1rem .6rem; height: 150px; overflow: hidden;
  background: var(--desk-2); border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
}
.file-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card__media .marca--relleno { width: 62px; height: 62px; opacity: .6; }
.file-card__media--lugar    { background: var(--tinte-lugar); }
.file-card__media--criptido { background: var(--tinte-criptido); }
.file-card__media--leyenda  { background: var(--tinte-leyenda); }
.file-card__media--ovni     { background: var(--tinte-ovni); }

@media (max-width: 640px) { .file-card__media { height: 130px; } }

/* Chincheta del mapa: la figura sola, sin disco. El disco oscuro de antes (34px opacos)
   tapaba el mapa y lo dejaba todo negro con cien pines juntos (26-oct-2026). El contorno
   claro + la sombra son lo que sustituye al disco: separan la marca del mapa, que es claro
   pero tiene zonas verdes y azules. Los huecos oscuros de la marca (ventanas, puerta,
   cuerpo del críptido, mecha) se recolorean con `--marca-hueco`: CSS no entra en el shadow
   DOM de <use>, pero las variables personalizadas SÍ heredan dentro (ver `_marcas`). */
.map-pin {
  /* Los huecos, en claro: sobre el mapa un hueco negro parece un borrón (en la casita
     quedan además como ventanas encendidas). El aura, algo subida para que se vea. */
  --marca-hueco: #F4F1EA;
  --marca-aura: .3;
  width: 30px; height: 30px; cursor: pointer;
  display: grid; place-items: center;
  background: none; border: 0;
  filter:
    drop-shadow(0 0 1px rgba(255,255,255,.95))
    drop-shadow(0 0 2px rgba(255,255,255,.75))
    drop-shadow(0 1px 2px rgba(0,0,0,.45));
}
.map-pin svg { width: 30px; height: 30px; }
/* El críptido es casi todo hueco: en claro desaparece, en negro es un borrón. Verde muy
   oscuro, que sigue siendo una silueta pero no una mancha, y el aura algo más subida. */
.map-pin--criptido { --marca-hueco: #123024; --marca-aura: .4; }
.map-pin:hover { filter:
    drop-shadow(0 0 1px rgba(255,255,255,.95))
    drop-shadow(0 0 4px rgba(226,169,59,.9))
    drop-shadow(0 1px 2px rgba(0,0,0,.45)); }

/* 🛸 El veredicto como filtro del listado de casos ovni (explicado, probable, sin explicar,
   fraude). Pestañas de carpeta: la activa, en rojo sello como el resto de sellos. */
.ufo-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 1.2rem; }
.ufo-filter__item { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 3px;
  text-decoration: none; font-size: .85rem; letter-spacing: .06em; color: var(--paper); }
.ufo-filter__item:hover { border-color: var(--accent); color: var(--accent); }
.ufo-filter__item.is-active { background: var(--stamp); border-color: var(--stamp); color: var(--paper); }
.resolution-source { display: block; font-size: .78rem; opacity: .75; margin-top: .15rem; }

.risk { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; letter-spacing: .1em; }
.risk__bars { letter-spacing: .1em; color: var(--stamp); }

/* ---------- Mapa ---------- */
.map-frame { position: relative; margin: 1rem 0 0; border: 1px solid var(--line);
  border-radius: 3px; overflow: hidden; box-shadow: 3px 4px 0 rgba(0,0,0,.35); }
.map-label {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .2em;
  font-size: .7rem; background: var(--stamp); color: #fff; padding: .15rem .5rem; border-radius: 2px;
}
.map { width: 100%; height: 460px; background: var(--desk-2); }
.map--small { height: 300px; }
/* Facade del hueco (T5): rejilla tipo carta de radar + aviso mientras el mapa no está
   inicializado (el init es perezoso: a la interacción/IO). MapLibre añade .maplibregl-map
   al contenedor al arrancar → la facade desaparece sola, sin JS extra. */
.map:not(.maplibregl-map) {
  position: relative;
  background-image:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .4) 100%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(184, 169, 132, .12) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(184, 169, 132, .12) 39px 40px);
}
.map:not(.maplibregl-map)::after {
  content: attr(data-hint);
  position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: .25em; font-size: .72rem; color: var(--line); opacity: .75; text-align: center;
}
.maplibregl-popup-content { font-family: var(--f-ui); color: var(--ink); }

/* ---------- Buscador + relacionados ---------- */
.search-bar { display: flex; gap: .5rem; margin: 1rem 0; flex-wrap: wrap; }
.search-bar input[type="search"] { flex: 1 1 14rem; font-family: var(--f-ui); font-size: .95rem;
  color: var(--paper); background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 2px; padding: .5rem .7rem; }
.search-bar input[type="search"]::placeholder { color: var(--paper); opacity: .5; }
.related { margin-top: 2rem; }

/* ---------- Página de prosa (Acerca de) ---------- */
.page-prose { background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 8px solid var(--accent); border-radius: 3px;
  padding: 1.4rem 1.6rem 1.8rem; box-shadow: 4px 6px 0 rgba(0,0,0,.35); max-width: 68ch; }
.page-prose h2 { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .04em;
  font-size: 1.15rem; color: var(--stamp); margin: 1.6rem 0 .4rem; }
.page-prose p { line-height: 1.6; margin: .5rem 0; }
.page-prose ul { line-height: 1.6; margin: .5rem 0 .5rem 1.1rem; }
.page-prose li { margin: .3rem 0; }
.page-prose .btn { margin-right: .5rem; }
/* Botones ghost dentro de una tarjeta clara: el texto "paper" sería invisible → oscuro. */
.page-prose .btn--ghost { color: var(--ink); border-color: var(--stamp); }
.page-prose .btn--ghost:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Ficha (rediseño del 1-dic-2026, el de la app) ----------
   Un solo bloque del ancho del contenedor: la foto, el titular, la franja de datos y el
   texto miden lo mismo (decisión de Paco). Sin tarjeta de papel: la ficha va sobre el fondo. */
.file-detail { color: var(--ink); }
.ficha-hero { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface); }
.ficha-hero__img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: cover; }
.ficha-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 40%;
  background: linear-gradient(transparent, var(--desk)); pointer-events: none; }
.ficha-hero__credito { margin: .5rem 0 1.2rem; font-family: var(--f-cond); font-weight: 600; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.ficha-hero__credito a { color: inherit; }
.ficha-hero__credito .photo-caption { display: block; text-transform: none; letter-spacing: .02em;
  font-family: var(--f-ui); font-style: italic; font-weight: 400; font-size: .85rem; margin-bottom: .1rem; }
.ficha-chip { display: inline-block; margin-top: .6rem; padding: .2rem .6rem; border-radius: 6px;
  background: var(--tipo); color: #0B0E13;
  font-family: var(--f-cond); font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.file-detail__title { font-family: var(--f-serif); font-weight: 900; letter-spacing: 0;
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: .7rem 0 1rem; }
.file-lead { margin: 0 0 1.4rem; font-family: var(--f-prose); font-size: 1.25rem; line-height: 1.55;
  color: var(--paper); font-style: normal; border: 0; padding: 0; }

/* La franja de datos: casillas con filete, como en la app. */
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0;
  margin: .6rem 0 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field-grid > div { padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.field-grid dt { font-family: var(--f-cond); font-weight: 700; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); }
.field-grid dd { margin: .1rem 0 0; font-family: var(--f-cond); font-weight: 600; font-size: 1.15rem;
  letter-spacing: .02em; color: var(--paper); }
.resolution-source { display: block; font-family: var(--f-ui); font-weight: 400; font-size: .85rem;
  letter-spacing: 0; color: var(--ink-soft); margin-top: .15rem; }

/* Las preguntas: antetítulo en versalitas del color de la colección + titular en serif.
   Siguen siendo <h2> con la pregunta entera, que es lo que la gente teclea (SEO/GEO). */
.file-detail h2.q { font-family: var(--f-serif); font-weight: 700; text-transform: none; letter-spacing: 0;
  font-size: clamp(1.5rem, 3.2vw, 1.95rem); line-height: 1.2; color: var(--paper); margin: 2.6rem 0 .9rem;
  padding-top: .9rem; border-top: 2px solid var(--tipo); }
.file-detail__body { margin-top: .4rem; white-space: pre-wrap; font-family: var(--f-prose);
  font-size: 1.16rem; line-height: 1.7; color: var(--prose); font-weight: 400; }
.file-detail__body p { margin: 0 0 1.1em; }
.file-detail__body strong, .file-detail__body b { font-weight: 600; color: var(--paper); }
.source-note a { color: var(--accent); }
.photo-credit { font-size: .72rem; opacity: .6; margin-top: .35rem; }
.photo-credit a { color: inherit; }
.photo-caption { display: block; font-style: italic; opacity: .85; margin-bottom: .15rem; }
.source-note { font-size: .8rem; color: var(--ink-soft); margin-top: 1rem; }

/* ---------- Contenido profundo de ficha (cronología, fuentes, revisión) ---------- */
.chronology { list-style: none; margin: 1rem 0 0; padding: 0; border-left: 2px solid var(--tipo); }
.chronology__item { position: relative; padding: 0 0 1.2rem 1.3rem; }
.chronology__item::before { content: ""; position: absolute; left: -8px; top: .35rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--desk); border: 2px solid var(--tipo); }
.chronology__when { display: block; font-family: var(--f-cond); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; color: var(--tipo); }
.chronology__what { display: block; margin-top: .15rem; font-family: var(--f-prose); font-size: 1.05rem;
  line-height: 1.6; color: var(--prose); }

.file-detail__body--skeptic { border-left: 3px solid var(--ok); padding-left: 1rem; }

.references { margin: 1rem 0 0; padding-left: 1.4rem; font-size: .92rem; color: var(--ink-soft); }
.references__item { margin-bottom: .6rem; }
.references__item a { color: var(--paper); text-decoration-color: var(--line); text-underline-offset: .18em; }
.references__item a:hover { color: var(--accent); }
.references__kind { font-family: var(--f-cond); font-weight: 600; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-soft); margin-left: .4rem; }

.review-note { font-size: .82rem; color: var(--ink-soft); margin-top: 1.6rem;
  padding-top: .8rem; border-top: 1px solid var(--line); }
.review-note a { color: var(--accent); }

/* El mapa de la ficha: más bajo, para que no parezca un hueco vacío antes de arrancar. */
.ficha .map--small { height: 240px; }

@media (max-width: 640px) {
  .ficha-hero { margin: -1.6rem -1.2rem 0; border-radius: 0; }
  .ficha-hero__img { max-height: 48vh; }
  .file-lead { font-size: 1.12rem; }
  .file-detail__body { font-size: 1.08rem; }
  .field-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Formularios ---------- */
.form, .comment-form { background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 3px; padding: 1.2rem; box-shadow: 3px 4px 0 rgba(0,0,0,.3); }
.form { max-width: 640px; margin: 1rem auto; }
.field { margin-bottom: .9rem; display: flex; flex-direction: column; }
.field label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); margin-bottom: .25rem; }
.field input, .field textarea, .field select {
  font-family: var(--f-ui); font-size: .95rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; padding: .5rem .6rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-actions { margin-top: .6rem; display: flex; gap: .6rem; align-items: center; }
.hint { font-size: .75rem; color: var(--ink-soft); }

/* ---------- Comentarios ---------- */
.comments { margin-top: 2rem; }
.comment { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 2px; padding: .7rem .9rem; margin-bottom: .7rem; }
.comment__head { font-size: .72rem; letter-spacing: .08em; color: var(--stamp); text-transform: uppercase;
  display: flex; justify-content: space-between; gap: .5rem; }
.comment__body { margin-top: .3rem; white-space: pre-wrap; }
.comment__meta { display: inline-flex; align-items: center; gap: .5rem; }
.comment__lang { font-size: .8rem; letter-spacing: normal; }
.comment__source { margin-top: .4rem; font-size: .72rem; color: var(--ink-soft); }
.comment__source a { color: var(--accent); }
.comment__translate { margin-top: .5rem; font-family: var(--f-ui); font-size: .72rem;
  background: transparent; color: var(--stamp); border: 1px solid var(--line); border-radius: 2px;
  padding: .2rem .5rem; cursor: pointer; }
.comment__translate:hover { border-color: var(--accent); color: var(--accent); }
.comment__translate:disabled { opacity: .6; cursor: default; }

/* ---------- Flash ---------- */
.flash { max-width: 1080px; margin: .8rem auto 0; padding: .7rem 1rem; border-radius: 3px;
  font-size: .9rem; border: 1px solid; }
.flash--notice { background: rgba(47,111,62,.15); border-color: var(--ok); color: #cdeccf; }
.flash--alert  { background: rgba(163,39,27,.15); border-color: var(--stamp); color: #f0cfc9; }

/* ---------- Pie ---------- */
.site-footer { border-top: 2px solid var(--stamp); padding: 1.4rem 1.2rem; text-align: center;
  font-size: .78rem; opacity: .7; }

/* ---------- Utilidades ---------- */
.muted { opacity: .7; }
.center { text-align: center; }
.empty { text-align: center; padding: 2rem; opacity: .7; }
@media (max-width: 520px) { .field--row { grid-template-columns: 1fr; } }

/* ---------- Consentimiento de cookies ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--ink); color: var(--paper); border-top: 3px solid var(--accent);
  padding: .9rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center;
  gap: .8rem 1.4rem; box-shadow: 0 -6px 20px rgba(0,0,0,.35); }
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { flex: 1 1 320px; margin: 0; font-size: .84rem; line-height: 1.5; }
.cookie-banner__text a { color: var(--accent); }
.cookie-banner__actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-banner__actions .btn { font-size: .82rem; padding: .45rem 1rem; }

/* ---------- Bloque de anuncio / placeholder ---------- */
/* Reserva el hueco del anuncio ANTES de que cargue → sin salto (CLS) al rellenarse.
   min-height ≈ alto típico servido en móvil; contain aísla su reflow del resto. */
.enigma-ad { display: block; margin: 1.6rem 0; min-height: 280px; contain: layout; }
.ad-mobile .enigma-ad { min-height: 280px; }
/* Reserva el hueco del iframe de Turnstile (~65px) para que no empuje el form al cargar. */
.cf-turnstile { display: block; min-height: 65px; margin: .5rem 0; }
.ad-placeholder { margin: 1.6rem 0; min-height: 100px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .2rem; text-align: center;
  border: 2px dashed var(--line); border-radius: 4px; background: repeating-linear-gradient(
    45deg, rgba(184,169,132,.06), rgba(184,169,132,.06) 10px, transparent 10px, transparent 20px);
  color: var(--ink-soft); }
.ad-placeholder span { font-family: var(--f-cond); letter-spacing: .25em; font-size: .8rem;
  opacity: .7; }
.ad-placeholder small { font-size: .7rem; opacity: .5; }

/* ---------- Columnas de publicidad (raíles laterales) ---------- */
.page-shell { display: flex; align-items: flex-start; justify-content: center;
  gap: 1.4rem; max-width: 1560px; margin: 0 auto; }
.page-shell > .container { margin: 0; flex: 1 1 auto; min-width: 0; }
.ad-rail { flex: 0 0 160px; position: sticky; top: 1rem; margin-top: 1.6rem; align-self: flex-start; }
.ad-rail .ad-placeholder { min-height: 600px; height: 600px; margin: 0; }
.ad-rail .adsbygoogle { display: block; min-height: 600px; width: 160px; }
/* Solo con sitio ancho: si no caben los raíles, se ocultan (móvil/tablet). */
@media (max-width: 1300px) { .ad-rail { display: none; } }

/* ---------- Anuncio solo-móvil (cuando las columnas laterales se ocultan) ---------- */
.ad-mobile { display: none; max-width: 1080px; margin: 0 auto; padding: 0 1.2rem 2.5rem; }
@media (max-width: 1300px) { .ad-mobile { display: block; } }

/* ---------- Reacciones de comunidad (👁️ / 🔎 / ❓) ---------- */
.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 1.4rem 0; padding-top: 1rem; border-top: 1px dashed var(--line); }
.reactions__label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stamp); margin-right: .3rem; }
.reactions form { display: inline; margin: 0; }
.reaction-btn { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font-family: var(--f-ui); font-size: .8rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px;
  padding: .35rem .7rem; transition: border-color .15s, background .15s; }
.reaction-btn:hover { border-color: var(--accent); }
.reaction-btn.is-active { border-color: var(--stamp); background: var(--surface-2); color: var(--stamp-2); font-weight: 700; }
.reaction-btn.is-static { cursor: default; opacity: .85; }
.reaction-btn__count { font-weight: 700; min-width: 1ch; text-align: center; }
.reactions__login { font-size: .78rem; }
.reactions__login a { color: var(--accent); }
/* Variante mini para testimonios: solo emoji + contador, sin etiqueta ni borde superior */
.reactions--compact { margin: .5rem 0 0; padding-top: 0; border-top: 0; gap: .35rem; }
.reactions--compact .reaction-btn { padding: .15rem .5rem; font-size: .75rem; gap: .3rem; }
.reactions--compact .reaction-btn__label { display: none; }

/* ---------- Respuestas anidadas en testimonios ---------- */
.comment__author a { color: var(--accent); text-decoration: none; }
.comment__author a:hover { text-decoration: underline; }
.comment-thread { margin-bottom: 1rem; }
.comment--reply { margin-left: 1.6rem; border-left: 2px solid var(--accent); background: var(--surface); }
.comment-reply { margin: .3rem 0 0 1.6rem; }
.comment-reply > summary { display: inline-block; cursor: pointer; font-family: var(--f-ui);
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--stamp); padding: .2rem 0; }
.comment-reply > summary:hover { color: var(--accent); }
.comment-form--reply { margin-top: .4rem; }
.comment-add-title { font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--stamp); margin: 1.4rem 0 .5rem; }

/* ---------- Perfil de agente ---------- */
.agent-profile .file-detail__title { margin-bottom: .6rem; }
.agent-testimonies { list-style: none; padding: 0; margin: .6rem 0 0; }
.agent-testimonies li { padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.agent-testimonies a { color: var(--accent); }

/* ---------- Acreditación (rango y puntos) ----------
   Reservamos alto fijo en la barra para que no provoque salto de layout: la ficha
   de agente comparte plantilla con las de contenido, donde el CLS sí se mide. */
.clearance { margin: .2rem 0 1rem; }
.clearance__head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: .1em; font-size: .78rem; color: var(--ink-soft); }
.clearance__head strong { color: var(--stamp); }
.clearance__points { margin-left: auto; }
.clearance__bar { height: 6px; margin: .4rem 0 .3rem; border: 1px solid var(--line);
  border-radius: 3px; background: rgba(33,28,20,.06); overflow: hidden; }
.clearance__bar > span { display: block; height: 100%; background: var(--accent); }
.clearance__next { margin: 0; font-size: .8rem; color: var(--ink-soft); }
.clearance__breakdown { margin: .15rem 0 0; font-size: .78rem; }

/* Distintivo de rango junto al autor de un testimonio. */
.rank-badge { display: inline-block; margin-left: .4rem; padding: .05rem .35rem;
  border: 1px solid var(--line); border-radius: 2px; background: rgba(33,28,20,.04);
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: .08em; font-size: .62rem; color: var(--ink-soft); vertical-align: middle; }
.rank-badge--investigator { border-color: var(--accent); color: #7a5a12; }
.rank-badge--special-agent,
.rank-badge--case-chief { border-color: var(--stamp); color: var(--stamp); }

/* ---------- Teletipo de actividad ---------- */
.teletype { list-style: none; padding: 0; margin: 0; border-top: 1px dashed var(--line); }
.teletype__row { display: flex; align-items: baseline; gap: .6rem; padding: .55rem .2rem;
  border-bottom: 1px dashed var(--line); font-size: .92rem; }
.teletype__icon { flex: 0 0 1.2rem; }
.teletype__text { flex: 1 1 auto; min-width: 0; }
.teletype__actor { font-family: var(--f-cond);
  text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.teletype__detail { color: var(--ink-soft); font-size: .85rem; }
.teletype__time { flex: 0 0 auto; color: var(--ink-soft); font-size: .75rem; white-space: nowrap; }
@media (max-width: 560px) {
  /* En móvil la hora baja a su propia línea: apretarla contra el texto lo partía feo. */
  .teletype__row { flex-wrap: wrap; }
  .teletype__time { flex-basis: 100%; padding-left: 1.8rem; }
}

/* ---------- Campana de notificaciones ---------- */
.nav-bell { position: relative; text-decoration: none; font-size: 1.05rem; line-height: 1; padding: 0 .1rem; }
.nav-bell__badge { position: absolute; top: -.5rem; right: -.55rem; min-width: 1.1rem; height: 1.1rem;
  padding: 0 .25rem; box-sizing: border-box; border-radius: 999px; background: var(--stamp); color: #fff;
  font-family: var(--f-ui); font-size: .62rem; font-weight: 700; line-height: 1.1rem;
  text-align: center; }
.notifications { list-style: none; padding: 0; margin: 0; }
.notification { border-bottom: 1px dashed var(--line); }
.notification__link { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .7rem .6rem; color: var(--ink); text-decoration: none; }
.notification__link:hover { background: var(--surface-2); }
.notification--unread .notification__link { border-left: 3px solid var(--stamp); background: var(--surface-2); }
.notification__text { font-size: .92rem; }
.notification__time { font-size: .72rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Rendimiento: saltar el render de secciones bajo el pliegue ---------- */
/* Comentarios y "related" están al final de la ficha: el navegador puede saltarse su
   render hasta que se acerquen al viewport (mejora INP/render inicial). El
   contain-intrinsic-size reserva su alto estimado para NO reintroducir CLS. */
.comments, .related { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ------------------------------------------------------------
   Enlaces dentro de la prosa y registro de correcciones
   ------------------------------------------------------------ */

/* Un enlace dentro del texto de una ficha. Discreto a propósito: se subraya con la línea del
   expediente y solo se tiñe de rojo sello al pasar por encima, para que leer no sea ir
   esquivando enlaces. */
.prose-link { color: inherit; text-decoration: underline;
              text-decoration-color: var(--line); text-underline-offset: .18em; }
.prose-link:hover, .prose-link:focus { color: var(--stamp); text-decoration-color: var(--stamp); }

.corrections { list-style: none; margin: 1rem 0 0; padding: 0; counter-reset: correction; }

.correction { border-left: 3px solid var(--line); padding: .1rem 0 .1rem .9rem; margin: 0 0 1.4rem; }
.correction:hover { border-left-color: var(--stamp); }

.correction__head { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline;
                    margin: 0 0 .35rem; }
.correction__head a { font-family: var(--f-cond);
                      text-transform: uppercase; letter-spacing: .03em; color: var(--ink);
                      text-decoration: none; border-bottom: 1px solid var(--stamp); }
.correction__head a:hover { color: var(--stamp); }

.correction__meta { font-size: .8rem; color: var(--ink-soft); text-transform: uppercase;
                    letter-spacing: .05em; }

.correction__said strong { color: var(--stamp); }
.correction__true strong { color: var(--ok); }
.correction__src { font-size: .92rem; color: var(--ink-soft); }
.correction__src strong { color: var(--ink-soft); }

.correction__updated { font-size: .85rem; color: var(--ink-soft); border-top: 1px solid var(--line);
                       padding-top: .7rem; margin-top: 1.2rem; }

@media (max-width: 600px) {
  .correction { padding-left: .7rem; }
  .correction__head { gap: .2rem .5rem; }
}

.corrections__tally { font-size: .9rem; color: var(--ink-soft); text-transform: uppercase;
                      letter-spacing: .04em; border-bottom: 1px solid var(--line);
                      padding-bottom: .6rem; margin: 0 0 1.2rem; }
.corrections__tally-item { white-space: nowrap; }

.corrections__nav { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between;
                    flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .9rem;
                    margin-top: 1.4rem; font-family: var(--f-cond);
                    text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.corrections__nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--stamp); }
.corrections__nav a:hover { color: var(--stamp); }
.corrections__nav span { color: var(--ink-soft); }

/* ---------- 📱 La app de Android ----------
   La barra va en el FLUJO, debajo de la cabecera sticky, y solo en móvil: pegada al borde
   pelearía con la cabecera (arriba) o con el anuncio anchor de AdSense (abajo). Llega con
   `hidden` y lo quita app-banner.js si no está descartada, así que no parpadea. */
.app-banner { display: flex; align-items: center; gap: .7rem;
  padding: .55rem .9rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--desk-2), var(--desk));
  font-size: .82rem; color: var(--paper); }
.app-banner[hidden] { display: none; }
.app-banner__text { flex: 1 1 auto; opacity: .85; }
.app-banner__cta { flex: 0 0 auto; text-decoration: none; white-space: nowrap;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: .1em; font-size: .78rem; padding: .3rem .8rem; border-radius: 3px;
  background: var(--stamp); color: #fff; border: 1px solid var(--stamp-2); }
.app-banner__cta:hover { background: var(--stamp-2); }
.app-banner__close { flex: 0 0 auto; background: none; border: 0; cursor: pointer;
  color: var(--paper); opacity: .6; font-size: 1.3rem; line-height: 1;
  /* 44px de zona táctil: cerrar no puede ser un juego de puntería. */
  min-width: 44px; min-height: 44px; }
.app-banner__close:hover { opacity: 1; color: var(--stamp); }
/* En escritorio no se enseña: un enlace a Play no sirve ahí, y el pie ya lleva el suyo.
   La EXCEPCIÓN es la portada (`--portada`), donde sí sale en ordenador: ahí el enlace va a
   /app, que es lo único aprovechable desde un escritorio. En esa anchura se centra con el
   mismo ancho que el contenido, para que no quede una franja de borde a borde. */
@media (min-width: 900px) {
  .app-banner { display: none; }
  .app-banner--portada { display: flex; max-width: 1100px; margin: .9rem auto 0;
    border: 1px solid var(--line); border-radius: 8px; }
}

.app-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin: 1.4rem 0; }
.app-cta--end { border-top: 1px dashed var(--line); padding-top: 1.2rem; margin-top: 2rem; }
.app-cta__note { font-size: .82rem; color: var(--ink-soft); }

/* Tarjeta que anuncia la app en la portada y al final de cada ficha. A diferencia de
   `.app-banner`, esta SÍ se ve en escritorio: lleva a /app, no a Play, que es lo único
   que un lector de ordenador puede aprovechar. En el móvil se apila. */
.app-promo { display: flex; align-items: center; gap: 1rem; margin: 2.4rem 0;
  padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--desk); }
.app-promo__icono { flex: 0 0 auto; border-radius: 10px; }
.app-promo__texto { flex: 1 1 auto; min-width: 0; }
.app-promo__titulo { margin: 0 0 .2rem; font-weight: 600; }
.app-promo__lead { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.app-promo__cta { flex: 0 0 auto; white-space: nowrap; }
/* Al final de una ficha va más discreta: sin caja, separada por el mismo filete de puntos
   que usa el resto del expediente. */
.app-promo--ficha { border: 0; border-top: 1px dashed var(--line); border-radius: 0;
  background: none; padding: 1.2rem 0 0; margin: 2rem 0 0; }
@media (max-width: 560px) {
  .app-promo { flex-wrap: wrap; }
  .app-promo__cta { width: 100%; text-align: center; }
}

/* Las tres capturas, en una fila en escritorio y apiladas en el móvil. En rejilla y no en
   flex porque con flex la tercera se quedaba sola en una segunda fila. */
.app-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem; justify-items: center; margin: 1.2rem 0 2rem; }
.app-shots img { width: 100%; max-width: 240px; height: auto;
  border: 1px solid var(--line); border-radius: 6px; background: var(--desk); }
@media (max-width: 600px) { .app-shots { grid-template-columns: 1fr; gap: 1.2rem; } }

/* ============================================================
   Ajustes del tema oscuro sobre el resto de la web (1-dic-2026). Las reglas de arriba
   vienen del tema de papel; aquí se corrige lo que con los colores nuevos quedaba mal.
   Portada y listados se rediseñan en otro PR: de momento solo heredan el tema.
   ============================================================ */
.container { max-width: 1080px; }
.hero__title { font-family: var(--f-serif); font-weight: 900; text-transform: none; letter-spacing: 0; }
.hero__title .redacted { background: none; color: var(--accent); padding: 0; }
.stat b { font-family: var(--f-serif); font-weight: 900; }
.section-title { font-family: var(--f-cond); font-weight: 700; border-left: 0; padding-left: 0;
  color: var(--paper); letter-spacing: .14em; }
.btn { border-radius: 10px; font-family: var(--f-cond); font-weight: 700; border-width: 1px; }
.btn--ghost { background: var(--surface); color: var(--paper); border-color: var(--line); }
.stamp { transform: none; box-shadow: none; border-width: 1px; border-radius: 6px; font-family: var(--f-cond); }
.stamp--classified { display: none; }

/* Tarjetas de listado: oscuras, con la foto arriba y el titular en serif. */
.file-card { background: var(--surface); background-image: none; color: var(--ink);
  border: 1px solid var(--line); border-top: 0; border-radius: 12px; box-shadow: none; overflow: hidden; }
.file-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35); border-color: #3a4250; }
.file-card__media { border-bottom: 0; }
.file-card__no { color: var(--accent); font-family: var(--f-cond); font-weight: 700; }
.file-card__title { font-family: var(--f-serif); font-weight: 700; text-transform: none; font-size: 1.3rem; }
.dotline { border-top: 1px solid var(--line); }

.map-frame { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.map-label { background: var(--surface-2); color: var(--paper); font-family: var(--f-cond); font-weight: 700; border-radius: 6px; }
.map { background: var(--surface); }
.map:not(.maplibregl-map) { background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(154,167,180,.07) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(154,167,180,.07) 39px 40px); }
.map:not(.maplibregl-map)::after { color: var(--ink-soft); font-family: var(--f-cond); font-weight: 700; }
/* El popup de MapLibre es blanco: ahí el texto va oscuro. */
.maplibregl-popup-content { color: #14181f; font-family: var(--f-ui); }

.page-prose, .file-detail.agent-profile, .form, .comment-form { border-radius: 12px; box-shadow: none; border-top-width: 1px; }
.page-prose h2 { font-family: var(--f-serif); text-transform: none; letter-spacing: 0; color: var(--paper); font-size: 1.4rem; }
.page-prose .btn--ghost { color: var(--paper); border-color: var(--line); }
.field label, .comment__head, .reactions__label, .comment-add-title, .comment-reply > summary { color: var(--ink-soft); }
.field input, .field textarea, .field select { font-family: var(--f-ui); color: var(--paper);
  background: var(--desk); border-color: var(--line); border-radius: 8px; }
.search-bar input[type="search"] { font-family: var(--f-ui); background: var(--surface); border-radius: 10px; }
.comment { border-radius: 10px; border-left-color: var(--tipo, var(--accent)); }
.reaction-btn { font-family: var(--f-ui); border-radius: 999px; }
.reaction-btn.is-active { color: var(--paper); border-color: var(--accent); }
.rank-badge { background: transparent; }
.rank-badge--investigator { color: var(--accent); }
.clearance__bar { background: var(--surface-2); }
.notification__link { color: var(--paper); }
.app-banner { background: var(--surface); border-bottom-color: var(--line); }
.app-banner__cta { border-radius: 8px; }
.app-promo { background: var(--surface); border-radius: 12px; }
.site-footer { border-top: 1px solid var(--line); opacity: 1; color: var(--ink-soft); }
.ad-placeholder { border-color: var(--line); background: none; color: var(--ink-soft); }

/* ---------- Anclas de la ficha (1-dic-2026) ----------
   El índice «En esta página» y el # de cada pregunta. `scroll-margin-top` deja sitio a la
   cabecera sticky, que si no tapa el titular al saltar a él. */
.file-detail h2.q[id] { scroll-margin-top: 5rem; }
.ancla { margin-left: .3em; color: var(--tipo); text-decoration: none; opacity: 0; transition: opacity .15s; }
.file-detail h2.q:hover .ancla, .ancla:focus { opacity: .8; }
@media (hover: none) { .ancla { opacity: .45; } }
.ficha-indice { margin: 1.2rem 0 .4rem; padding: .9rem 1.1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; }
.ficha-indice__titulo { display: block; margin-bottom: .5rem; font-family: var(--f-cond); font-weight: 700;
  font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.ficha-indice ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ficha-indice a { display: inline-flex; gap: .4rem; align-items: baseline; padding: .35rem .75rem;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--paper);
  font-family: var(--f-cond); font-weight: 600; font-size: 1rem; letter-spacing: .04em; }
.ficha-indice a span { color: var(--tipo); font-weight: 700; }
.ficha-indice a:hover { border-color: var(--tipo); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* La cuenta, con la misma letra que las secciones y separada de ellas por un filete. */
.nav__cuenta > a:not(.nav-bell), .nav__cuenta > span > a { font-family: var(--f-cond); font-weight: 700; font-size: .95rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.nav__cuenta > a:hover { color: var(--paper); }
@media (min-width: 1200px) { .nav__cuenta { padding-left: 1rem; border-left: 1px solid var(--line); } }

/* La cuenta de quien está dentro: el nombre abre un desplegable con el perfil, la moderación
   (solo admin) y «Salir». Sin JavaScript: es un <details>. */
.nav-user { position: relative; }
.nav-user > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--f-cond); font-weight: 700; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper); padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 8px; max-width: 12rem; }
.nav-user > summary::-webkit-details-marker { display: none; }
.nav-user > summary::after { content: "▾"; color: var(--ink-soft); font-size: .8em; }
.nav-user > summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user[open] > summary { background: var(--surface-2); }
.nav-user__menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 60; min-width: 12rem;
  display: flex; flex-direction: column; padding: .4rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.nav-user__menu a, .nav-user__salir { display: block; width: 100%; text-align: left; padding: .5rem .7rem;
  border-radius: 6px; text-decoration: none; color: var(--paper); font: inherit; font-size: .95rem;
  background: none; border: 0; cursor: pointer; }
.nav-user__menu a:hover, .nav-user__salir:hover { background: var(--surface-2); }
.nav-user__menu form { margin: 0; }
@media (max-width: 1199px) {
  .nav-user__menu { position: static; box-shadow: none; margin-top: .4rem; }
}
@media (max-width: 1199px) {
  .nav__cuenta { flex-wrap: wrap; }
  .nav-user { order: 9; flex: 1 1 100%; }
  .nav-user > summary { max-width: none; }
}
