/* Centro de datos — prensa (tipografía periódico, Courier New) */
@import url("components.css");
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --paper: #1a1a1a;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #d0d0d0;
  --accent-dim: #888888;
  --border: #444444;
  --rule: #666666;
  --emphasis: #ffffff;
  --inverse: #121212;
  --link: #cccccc;
  --link-hover: #ffffff;
  --link-visited: #aaaaaa;
  --ring: rgba(255, 255, 255, 0.15);
  --radius: 0;
  --shadow: none;
  --font: "Courier New", Courier, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #e8e4dc;
  --paper: #f5f2ea;
  --surface: #f5f2ea;
  --surface-2: #ebe6dc;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --accent: #2a2a2a;
  --accent-dim: #5c5c5c;
  --border: #1a1a1a;
  --rule: #888888;
  --emphasis: #000000;
  --inverse: #f5f2ea;
  --link: #1a1a1a;
  --link-hover: #000000;
  --link-visited: #3d3d3d;
  --ring: rgba(0, 0, 0, 0.1);
  --shadow: none;
}

* { box-sizing: border-box; }

body.newspaper {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
}

a:link { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  min-width: 0;
}

main.wrap {
  overflow-wrap: break-word;
}

/* —— Cabecera tipo periódico —— */
.site-header {
  background: var(--paper);
  border-bottom: 4px double var(--border);
  padding: 1.25rem 0 0.85rem;
  margin-bottom: 1.75rem;
}

.masthead {
  text-align: center;
  padding-bottom: 0.85rem;
}

.dateline {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.brand {
  display: block;
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0;
  margin: 0;
}

.brand:hover { color: var(--emphasis); }

.site-tag {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.header-rule {
  border-top: 1px solid var(--rule);
  margin: 0 0 0.65rem;
}

.header-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--emphasis);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-sep {
  color: var(--rule);
  margin: 0 0.45rem;
  user-select: none;
}

.foss-link { font-weight: 700; }

.theme-toggle {
  font-family: var(--font);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface-2);
}

main {
  flex: 1;
  padding-bottom: 2.5rem;
  background: var(--paper);
  margin: 0 auto;
  width: 100%;
  max-width: 720px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* —— Titulares —— */
h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  border-bottom: 3px double var(--border);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0;
}

h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.caso-meta {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  border-left: 3px solid var(--border);
  padding-left: 0.65rem;
}

.section-lead {
  color: var(--muted);
  font-size: 0.88rem;
  margin: -0.25rem 0 1rem;
  font-style: italic;
}

.lead {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.banner-inaugural {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* —— Panel intensidad (destacado) —— */
.panel-intensidad {
  background: var(--surface-2);
  border: 2px solid var(--border);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  text-align: center;
}

.panel-intensidad .valor {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--emphasis);
  line-height: 1;
  letter-spacing: -0.02em;
}

.panel-intensidad .max {
  font-size: 1.15rem;
  color: var(--muted);
}

.panel-intensidad .lectura {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  text-transform: lowercase;
}

.panel-intensidad .lectura::first-letter {
  text-transform: uppercase;
}

.medicion-activa {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* —— Ejes (tabla tipográfica) —— */
.ejes {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
}

.ejes li {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3rem;
  gap: 0.65rem;
  align-items: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.ejes li:last-child { border-bottom: none; }

.eje-nombre {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.barra {
  height: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.barra span {
  display: block;
  height: 100%;
  background: var(--emphasis);
  min-width: 2px;
}

.eje-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* —— Buffers —— */
.buffer-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.buffer-panel--baseline {
  border-style: dashed;
  opacity: 0.92;
}

.buffer-intro { margin: 0 0 0.5rem; }

.buffer-nota {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.35rem 0;
  font-style: italic;
}

.delta-nota {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0.25rem 0 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.buffer-stats {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.buffer-files-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
  font-weight: 700;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.25rem;
}

.buffer-files { list-style: none; padding: 0; margin: 0; }

.buffer-files li {
  padding: 0.4rem 0;
  border-top: 1px dotted var(--rule);
  font-size: 0.88rem;
}

.buffer-files li:first-child { border-top: none; }

.buffer-files a.ext-link {
  text-decoration: none;
  font-weight: 700;
}

.buffer-files a.ext-link:hover { text-decoration: underline; }

.buffer-files a.ext-link::after {
  content: " ↗";
  font-size: 0.75em;
}

.path-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.buffer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
}

.buffer-card {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
}

.buffer-card:last-child { border-bottom: none; }

.buffer-card h3 { font-size: 0.88rem; margin-bottom: 0.35rem; }

.buffer-med-link {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* —— Timeline —— */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: edicion;
}

.timeline li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-bottom: 1px dotted var(--rule);
  counter-increment: edicion;
}

.timeline li::before {
  content: counter(edicion, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.45rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.82rem;
}

.timeline li.activa {
  color: var(--text);
  font-weight: 700;
  background: var(--surface-2);
  margin: 0 -0.5rem;
  padding-left: 2.5rem;
  padding-right: 0.5rem;
}

.timeline li.activa::before {
  color: var(--emphasis);
}

.timeline a { text-decoration: none; }
.timeline a:hover { text-decoration: underline; }

/* —— Catálogo —— */
.cards {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 2rem;
  border: 2px solid var(--border);
}

.card {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
}

.card:nth-child(2n) { border-right: none; }
.card:nth-last-child(-n+2) { border-bottom: none; }

.card:hover { background: var(--surface-2); }

.card.destacada {
  background: var(--surface-2);
  outline: 2px solid var(--emphasis);
  outline-offset: -2px;
}

.cards h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.cards h3 a {
  color: var(--text);
  text-decoration: none;
}

.cards h3 a:hover { text-decoration: underline; }

.cards .caso-meta {
  border: none;
  padding: 0;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

.cards .lectura {
  font-size: 0.82rem;
  font-style: italic;
  margin: 0.25rem 0 0;
}

.intensidad {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--emphasis);
  margin: 0.25rem 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.intensidad span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  background: var(--emphasis);
  color: var(--inverse);
  padding: 0.15rem 0.4rem;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.badge-inaugural {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.casos-registro {
  display: grid;
  gap: 0;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
}

.caso-card {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
}

.caso-card:last-child { border-bottom: none; }

.caso-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }

.caso-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.caso-card h3 a:hover { text-decoration: underline; }

.nota-registro {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.45rem 0 0;
  text-align: justify;
  hyphens: auto;
}

/* —— Botones —— */
.nav-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.download-pack {
  margin: 1rem 0 0;
}

.download-pack .btn { margin: 0; }

.btn {
  display: inline-block;
  background: var(--emphasis);
  color: var(--inverse) !important;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 2px solid var(--emphasis);
}

.btn:hover {
  background: transparent;
  color: var(--emphasis) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--link) !important;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--link-hover) !important;
}

/* —— Proveniencia transmedia —— */
.provenance {
  text-align: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.provenance-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.logo-frame {
  display: inline-flex;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  line-height: 0;
  text-decoration: none;
}

.provenance-logo {
  display: block;
  max-height: 32px;
  width: auto;
  border-radius: 50%;
}

.provenance-chain,
.provenance-footer-chain,
.provenance-footer-meta {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2rem 0.45rem;
}

.provenance-chain a,
.provenance-footer a {
  color: var(--muted);
  text-decoration: none;
}

.provenance-chain a:hover,
.provenance-footer a:hover {
  color: var(--link-hover);
}

.provenance-sep {
  margin: 0 0.25em;
  opacity: 0.6;
}

.provenance-footer {
  text-align: center;
}

.provenance-footer-meta {
  margin-top: 0.5rem;
  font-size: 0.68rem;
}

/* —— Pie —— */
.site-footer {
  border-top: 4px double var(--border);
  padding: 1rem 0 1.25rem;
  margin-top: auto;
  background: var(--paper);
}

.footer-colophon {
  margin: 0;
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

code {
  font-family: var(--font);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.3em;
  border: 1px solid var(--rule);
}

p { margin: 0 0 0.85rem; }

/* —— Publicaciones agente —— */
.publicaciones-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.publicacion-item {
  border: 2px solid var(--border);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  background: var(--surface);
}

.publicacion-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.pub-meta, .pub-resumen-list {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.publicacion-meta .pub-etiqueta {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--muted);
}

.publicacion-cuerpo .pieza-agente {
  border-left: 4px solid var(--border);
  padding-left: 1.25rem;
  margin: 1.25rem 0;
}

.pieza-lead {
  font-size: 1.05rem;
  color: var(--muted);
}

.publicacion-redes .redes-preview {
  width: 100%;
  max-width: 540px;
  height: 540px;
  border: 2px solid var(--border);
  margin-top: 0.75rem;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .card { border-right: none !important; }
  .card:not(:last-child) { border-bottom: 1px solid var(--border) !important; }
  .ejes li { grid-template-columns: 4rem 1fr 2.5rem; font-size: 0.8rem; }
  .panel-intensidad .valor { font-size: 2rem; }
  .header-toolbar { flex-direction: column; align-items: flex-start; }
  .nav-sep { display: none; }
  .site-header nav a { display: block; margin: 0.2rem 0; }
}
