/* Páginas internas compartidas (watchlist, newsletters, newsletter, media)
   — mismo lenguaje noir que la home y el artículo.
   EL TEMA ES EL MISMO SISTEMA QUE LA HOME (css/home.css): los tokens viven
   en el scope de la página y responden a html[data-theme] / html[data-accent].
   Default = claro (papel #f0eee7); [data-theme="dark"] = tinta #050505.
   Así el switch de la portada también gobierna estas páginas. */

.p-noir {
  --p-bg: var(--paper-100, #f0eee7);
  --p-surface: #e6e2d6;
  --p-text: #14120f;
  --p-muted: rgba(20, 18, 15, 0.62);
  --p-line: rgba(20, 18, 15, 0.22);
  --p-line-strong: rgba(20, 18, 15, 0.34);
  --p-invert-bg: #14120f;
  --p-invert-text: var(--paper-100, #f0eee7);
  --p-top-bg: rgba(240, 238, 231, 0.92);
  --p-poster-filter: grayscale(1) contrast(1.12);
}
html[data-theme="dark"] .p-noir {
  --p-bg: var(--ink-950, #050505);
  --p-surface: var(--ink-800, #141414);
  --p-text: #f0eee7;
  --p-muted: rgba(255, 255, 255, 0.66);
  --p-line: rgba(255, 255, 255, 0.2);
  --p-line-strong: rgba(255, 255, 255, 0.34);
  --p-invert-bg: #f0eee7;
  --p-invert-text: #050505;
  --p-top-bg: rgba(5, 5, 5, 0.88);
  --p-poster-filter: grayscale(1) contrast(1.08);
}
/* Punto de tinta (modo color): la tinta roja pasa a ser el texto de acento
   sobre blanco, como en la home. */
html[data-accent="color"] .p-noir {
  --p-invert-bg: #fff;
  --p-invert-text: #ff1a1a;
}
/* Watchlist: mismo criterio que .d-home en la home y que la vista lectura
   del artículo — con la tinta activada el fondo pasa a blanco puro (no al
   papel crudo del claro normal) aunque el tema esté en oscuro, porque la
   tinta se escribe sobre papel blanco. Selector con más especificidad que
   [data-theme="dark"] .p-noir, así gana sin depender del orden. */
html[data-accent="color"] body.wl-page.p-noir {
  --p-bg: #fff;
  --p-surface: #f2f0ea;
  --p-text: #14120f;
  --p-muted: rgba(20, 18, 15, 0.62);
  --p-line: rgba(20, 18, 15, 0.18);
  --p-line-strong: rgba(20, 18, 15, 0.32);
  --p-top-bg: rgba(255, 255, 255, 0.92);
  --p-poster-filter: contrast(1.1);
}

body.p-noir {
  background: var(--p-bg);
  color: var(--p-text);
  transition: background 0.2s ease, color 0.2s ease;
}
/* En las páginas de artículo (article/review/podcast) el fondo NO lo pinta
   p-noir: la vista audio es siempre noir y la de lectura usa sus propias
   --a-* (feed.css). p-noir solo aporta los tokens del header compartido. */
/* En las páginas de artículo (article/review/podcast) el fondo NO lo pinta
   p-noir: la vista audio es siempre noir y la de lectura usa sus propias
   --a-* (feed.css). p-noir solo aporta los tokens del header compartido.
   :not(.mode-read) evita pisar el papel de la vista lectura (feed.css);
   en audio restaura el negro de .article-body que body.p-noir arrastraría a papel. */
body.article-body.p-noir:not(.mode-read) {
  background: var(--feed-bg, #050505);
  color: #fff;
}
/* Y el header compartido, en páginas de artículo, sigue la vista activa:
   audio = noir (blanco sobre negro, como la home mobile), lectura = el tema
   de la nota (--a-*). Así el menú nunca queda "papel sobre negro". */
body.article-body:not(.mode-read) {
  --p-bg: var(--feed-bg, #050505);
  --p-text: #fff;
  --p-muted: rgba(255, 255, 255, 0.66);
  --p-line: rgba(255, 255, 255, 0.2);
  --p-line-strong: rgba(255, 255, 255, 0.34);
  --p-invert-bg: #fff;
  --p-invert-text: #050505;
  --p-top-bg: rgba(5, 5, 5, 0.82);
}
body.article-body.mode-read {
  --p-bg: var(--a-bg, #ece4d0);
  --p-text: var(--a-text, #14120f);
  --p-muted: var(--a-text-soft, rgba(20, 18, 15, 0.62));
  --p-line: var(--a-line, rgba(20, 18, 15, 0.3));
  --p-line-strong: var(--a-line-strong, rgba(20, 18, 15, 0.5));
  --p-invert-bg: var(--a-text, #14120f);
  --p-invert-text: var(--a-bg, #ece4d0);
  --p-top-bg: var(--a-bg, #ece4d0);
}

/* Grano de papel sutil en claro, cine en oscuro — el mismo criterio 4.5
   de la home: perceptible pero no invasivo. (Las páginas de artículo
   tienen su propio grano en feed.css; este es para las secciones.) */
body.p-noir:not(.article-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.33'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body.p-noir:not(.article-body)::before {
  opacity: 0.05;
  mix-blend-mode: overlay;
}
html[data-accent="color"] body.wl-page::before {
  opacity: 0.14;
  mix-blend-mode: multiply;
}

/* ===== Menú superior compartido — EL MISMO en todas las páginas ===== */
.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--p-top-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--p-line);
}
.site-top-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* .site-top como ancestro para ganarle a `.article-body a` de feed.css
   (el logo del artículo quedaba blanco en la vista lectura). */
.site-top .site-logo {
  font: 400 1.05rem "Libre Caslon Display", Georgia, serif;
  letter-spacing: -0.03em;
  color: var(--p-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-top .site-logo i {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin: 0 3px 2px;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font: 500 0.66rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
  text-decoration: none;
  padding: 7px 10px;
}
.site-nav a:hover { color: var(--p-text); }
.site-nav a.active { color: var(--p-invert-text); background: var(--p-invert-bg); }
.site-actions { display: flex; align-items: center; gap: 10px; }
.site-btn {
  font: 500 0.66rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: 1px solid var(--p-line-strong);
  color: var(--p-text);
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 0;
  height: auto;
}
.site-btn:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.site-actions .theme-toggle,
.site-actions .ink-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  background: transparent;
  border: 1px solid var(--p-line-strong);
  color: var(--p-text); cursor: pointer;
  border-radius: 0;
}
.site-actions .theme-toggle:hover,
.site-actions .ink-toggle:hover {
  background: var(--p-invert-bg); color: var(--p-invert-text);
}
.site-actions .icon-theme-light { display: none; }
html[data-theme="dark"] .site-actions .icon-theme-dark { display: none; }
html[data-theme="dark"] .site-actions .icon-theme-light { display: inline-block; }
.site-actions .ink-toggle .icon { color: var(--accent-ink, #ff1a1a); }
html[data-accent="color"] .site-actions .ink-toggle {
  background: var(--accent-ink, #ff1a1a); border-color: var(--accent-ink, #ff1a1a);
}
html[data-accent="color"] .site-actions .ink-toggle .icon { color: #fff; }
.site-actions .user-chip {
  border-radius: 0;
  border: 1px solid var(--p-line-strong);
  background: transparent;
  color: var(--p-text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  font-size: 13px;
}
.site-actions .user-chip img { width: 26px; height: 26px; }
.site-actions #btn-logout {
  background: transparent;
  border: 0;
  color: var(--p-muted);
  cursor: pointer;
  display: inline-flex;
  padding: 2px;
}
.site-actions #btn-logout:hover { color: var(--p-text); }
.site-actions #btn-logout svg { width: 14px; height: 14px; }

/* Hamburguesa (mobile) — oculta en desktop */
.site-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: transparent;
  border: 1px solid var(--p-line-strong);
  color: var(--p-text);
  cursor: pointer;
  border-radius: 0;
}
.site-burger:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.site-burger .icon-close { display: none; }
.site-top.menu-open .site-burger .icon-menu { display: none; }
.site-top.menu-open .site-burger .icon-close { display: inline-block; }

/* Mobile: TODO el menú (nav + acciones) se unifica en la hamburguesa */
@media (max-width: 720px) {
  .site-top-inner {
    flex-wrap: wrap;
    padding: 10px 14px;
    row-gap: 0;
  }
  .site-logo { order: 1; }
  .site-burger { order: 2; margin-left: auto; display: inline-flex; }
  /* Panel desplegable: nav y acciones ocultos hasta abrir la hamburguesa */
  .site-nav,
  .site-actions {
    display: none;
    width: 100%;
  }
  .site-top.menu-open .site-nav { display: flex; order: 3; }
  .site-top.menu-open .site-actions { display: flex; order: 4; }
  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 6px;
  }
  .site-nav a {
    padding: 13px 2px;
    border-top: 1px solid var(--p-line);
    font-size: 0.78rem;
  }
  .site-actions {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 8px;
    border-top: 1px solid var(--p-line);
  }
}

/* ===== Cabecera de página: doble filete + título display ===== */
.p-noir-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 18px;
}
.p-noir-head .p-kicker {
  display: block;
  font: 500 0.66rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--p-muted);
  margin-bottom: 10px;
}
.p-noir-head h1 {
  margin: 0;
  font: 400 clamp(2.55rem, 6.5vw, 4.6rem)/0.95 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.04em;
  color: var(--p-text);
}
.p-noir-head .p-sub {
  margin: 10px 0 0;
  font: 400 1rem/1.4 Georgia, "Iowan Old Style", serif;
  color: var(--p-muted);
  max-width: 640px;
}
.p-noir-head::after {
  content: "";
  display: block;
  margin-top: 20px;
  border-top: 3px double var(--p-line-strong);
}

/* ===== Contenido ===== */
.p-noir-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 80px;
}

/* Footer */
.p-noir-footer {
  border-top: 3px double var(--p-line-strong);
  padding: 22px 24px 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font: 500 0.64rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
}

/* Spinner neutral (funciona en ambos extremos) */
.p-noir .spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(128, 128, 128, 0.3);
  border-top-color: rgba(128, 128, 128, 0.9);
  animation: p-spin 0.9s linear infinite;
  margin: 60px auto;
  display: block;
}
@keyframes p-spin { to { transform: rotate(360deg); } }
.p-noir .empty-state,
.p-noir .error-state { color: var(--p-muted); padding: 40px 0; text-align: center; }

/* Gate de login para ediciones del archivo (todas menos la del día) */
.nl-gate {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.nl-gate-title { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 12px; }
.nl-gate p { color: var(--p-muted); margin-bottom: 22px; }
.nl-gate .btn-primary { margin-bottom: 20px; }
.nl-gate .ed-back { display: block; color: var(--p-muted); text-decoration: none; font-size: 0.8rem; }
.nl-gate .ed-back:hover { color: var(--p-text); }

/* ===== Watchlist: grilla tipo cartelera con filetes ===== */
.p-noir-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.p-noir-filters input,
.p-noir-filters select {
  font: 400 0.72rem "DM Mono", monospace;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--p-text);
  border: 1px solid var(--p-line-strong);
  border-radius: 0;
  padding: 9px 12px;
  height: auto;
}
.p-noir-filters input::placeholder { color: var(--p-muted); }
.p-noir-filters select option { background: var(--p-surface); color: var(--p-text); }
.p-noir-filters input:focus,
.p-noir-filters select:focus {
  outline: none;
  border-color: var(--p-text);
}

.wl-grid {
  display: grid;
  /* auto-fit (no auto-fill): mismo criterio que .nl-grid — evita la columna
     vacía reservada que deja espacio muerto a la derecha. */
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  border-top: 1px solid var(--p-line);
  border-left: 1px solid var(--p-line);
}
.wl-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--p-text);
  background: var(--p-bg);
  border-right: 1px solid var(--p-line);
  border-bottom: 1px solid var(--p-line);
  transition: background 0.15s ease, color 0.15s ease;
}
.wl-card:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.wl-card .wl-poster {
  aspect-ratio: 2/3;
  width: 100%;
  object-fit: cover;
  display: block;
  filter: var(--p-poster-filter);
}
.wl-card .wl-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.wl-card .wl-title {
  font: 400 1.25rem/1.12 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.02em;
}
.wl-card .wl-meta {
  font: 500 0.62rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--p-muted);
  border-top: 1px solid var(--p-line);
  padding-top: 8px;
  margin-top: auto;
}
.wl-count {
  margin: 16px 0 0;
  font: 500 0.64rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
}

/* ===== Newsletters: acumulado (archivo) =====
   Misma jerarquía "lead + secundarias" que la vista diaria: la última
   edición queda destacada (imagen grande, dos columnas), el resto en una
   grilla de tarjetas — mismo lenguaje que .wl-grid/.wl-card (bordes que
   colapsan en grilla, hover invertido, filtro de imagen que ya responde a
   la tinta vía --p-poster-filter). */
/* Sin max-width propio: usa todo el ancho de .p-noir-main (1280px, igual
   que .p-noir-head arriba) — antes quedaba una caja de 1040px pegada a la
   izquierda dentro de un contenedor más ancho, dejando un margen muerto a
   la derecha que no combinaba con el resto de la página. */
.nl-index { margin: 0; }
.nl-featured {
  display: grid;
  grid-template-columns: 1fr;
  text-decoration: none;
  color: var(--p-text);
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  margin-bottom: 32px;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (min-width: 640px) {
  .nl-featured { grid-template-columns: 1.1fr 1fr; }
}
/* Sin imagen (fuentes que no traen thumbnail, ej. Hacker News): una sola
   columna a todo el ancho — si no, la grilla de 2 columnas deja la segunda
   vacía y aparece una franja en blanco al lado del texto. */
.nl-featured.nl-featured-solo { grid-template-columns: 1fr; }
.nl-featured:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.nl-featured-media {
  aspect-ratio: 16/9;
  overflow: hidden;
}
@media (min-width: 640px) { .nl-featured-media { aspect-ratio: auto; height: 100%; } }
.nl-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: var(--p-poster-filter);
}
.nl-featured-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  justify-content: center;
}
.nl-featured-title {
  font: 400 clamp(1.6rem, 3vw, 2.3rem)/1.1 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.025em;
}
.nl-summary {
  display: block;
  font: 400 0.92rem/1.45 Georgia, serif;
  color: var(--p-muted);
  filter: grayscale(1); /* el resumen trae el ⭐ del score como texto crudo: sin esto queda dorado */
}
.nl-count {
  display: block;
  font: 500 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
}
.nl-date {
  font: 500 0.62rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
}
/* --p-muted no reacciona al hover invertido (queda fijo en el tono apagado
   del tema activo): sin esto, al invertir a fondo oscuro el texto muted
   sigue oscuro y se vuelve ilegible ("todo negro"). */
.nl-featured:hover .nl-summary,
.nl-featured:hover .nl-count,
.nl-featured:hover .nl-date,
.nl-card:hover .nl-summary,
.nl-card:hover .nl-count,
.nl-card:hover .nl-date {
  color: inherit;
  opacity: 0.75;
}
.nl-grid {
  display: grid;
  /* auto-fit (no auto-fill): así las tarjetas reales se estiran para llenar
     la fila en vez de dejar una columna vacía reservada a la derecha. */
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--p-line);
  border-left: 1px solid var(--p-line);
}
.nl-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--p-text);
  background: var(--p-bg);
  padding: 14px;
  border-right: 1px solid var(--p-line);
  border-bottom: 1px solid var(--p-line);
  transition: background 0.15s ease, color 0.15s ease;
}
.nl-card:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.nl-card-media {
  aspect-ratio: 16/10;
  margin: -14px -14px 6px;
  overflow: hidden;
}
.nl-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: var(--p-poster-filter);
}
.nl-card .nl-title {
  font: 400 1.05rem/1.25 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.02em;
}
.nl-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }

/* ===== Ficha de media (media.html) ===== */
.md-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  max-width: 1040px;
  margin: 0 auto;
}
@media (max-width: 800px) {
  .md-grid { grid-template-columns: 1fr; gap: 24px; }
}
.md-poster-wrap {
  border: 1px solid var(--p-line-strong);
  padding: 8px;
  background: var(--p-surface);
  align-self: start;
}
.md-poster-wrap .poster {
  width: 100%;
  display: block;
  filter: var(--p-poster-filter);
  border-radius: 0;
  border: 0;
}
.md-poster-fallback {
  aspect-ratio: 2/3;
  display: grid;
  place-items: center;
  color: var(--p-muted);
  font: 500 0.7rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.md-title {
  margin: 0 0 10px;
  font: 400 clamp(2.15rem, 5vw, 3.4rem)/0.98 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.03em;
  color: var(--p-text);
}
.md-meta {
  font: 500 0.66rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p-muted);
  margin-bottom: 14px;
}
.md-why {
  border-top: 3px double var(--p-line-strong);
  border-bottom: 1px solid var(--p-line);
  padding: 14px 0;
  font: 400 1.05rem/1.5 Georgia, serif;
  color: var(--p-text);
  margin-bottom: 18px;
}
.md-synopsis {
  font: 400 1rem/1.65 Georgia, serif;
  color: var(--p-muted);
  margin-bottom: 22px;
}
.md-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--p-line);
  border: 1px solid var(--p-line);
  margin-bottom: 22px;
}
.md-fact {
  background: var(--p-bg);
  padding: 12px 14px;
}
.md-fact strong {
  display: block;
  font: 500 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--p-muted);
  margin-bottom: 5px;
}
.md-fact span { font: 400 0.92rem/1.35 "Inter", sans-serif; color: var(--p-text); }
.md-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 0.68rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--p-invert-bg);
  color: var(--p-invert-text);
  border: 0;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
}
.md-cta:hover { filter: contrast(1.06); }
.md-cta.ghost {
  background: transparent;
  color: var(--p-text);
  border: 1px solid var(--p-line-strong);
}
.md-cta.ghost:hover { background: var(--p-invert-bg); color: var(--p-invert-text); }
.md-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.md-where { margin-bottom: 22px; }
.md-where strong {
  display: block;
  font: 500 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--p-muted);
  margin-bottom: 8px;
}
.md-where-list { display: flex; gap: 6px; flex-wrap: wrap; }
.md-where-list .badge {
  background: transparent;
  border: 1px solid var(--p-line-strong);
  color: var(--p-text);
  filter: none;
}

/* Modal trailer hereda el tema: borde recto, fondo del extremo activo */
.yt-modal-box {
  background: var(--p-bg) !important;
  color: var(--p-text);
  border: 1px solid var(--p-line-strong) !important;
  border-radius: 0 !important;
}
.yt-modal-close { color: var(--p-text) !important; }

/* ===== Newsletter individual (edición) ===== */
/* La edición se imprime SIEMPRE en papel — como la vista lectura del
   artículo: es el objeto diario. En modo oscuro, el papel se apaga un
   tono (periódico envejecido bajo luz de sala) pero sigue siendo papel.
   El nameplate (.ed-title) es una placa centrada tipo cabecera de diario;
   el resto del contenido (items) sigue con sangría editorial a la izquierda. */
.ed-paper {
  background: #ece4d0;
  color: #14120f;
  margin: 0 auto 40px;
  padding: 44px 24px 34px;
  max-width: 900px;
}
html[data-theme="dark"] .ed-paper {
  background: #e2dac4;
}
/* Punto de tinta: mismo criterio que watchlist y la vista lectura del
   artículo — el papel pasa a blanco puro, tinta sobre blanco. */
html[data-accent="color"] .ed-paper {
  background: #fff;
}
@media (min-width: 721px) {
  .ed-paper { padding: 52px 40px 42px; }
}
.ed-paper-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.ed-paper .ed-back,
.ed-paper .ed-email-link {
  display: inline-block;
  font: 500 0.64rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(20, 18, 15, 0.6);
  text-decoration: none;
}
.ed-paper .ed-back:hover,
.ed-paper .ed-email-link:hover { color: #14120f; }
.ed-folio {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 3px double rgba(20, 18, 15, 0.5);
  border-bottom: 1px solid rgba(20, 18, 15, 0.35);
  padding: 8px 0;
  font: 500 0.62rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(20, 18, 15, 0.65);
}
/* Nameplate del diario (nombre del sitio, no el título de la edición):
   placa centrada tipo cabecera de diario impreso — versalitas trackeadas,
   no el titular editorial de la izquierda que llevan los items. */
.ed-title {
  margin: 8px 0 20px;
  padding: 6px 0 22px;
  border-bottom: 1px solid rgba(20, 18, 15, 0.35);
  font: 400 clamp(1.9rem, 6vw, 3.4rem)/1 "Libre Caslon Display", Georgia, serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #14120f;
}
.ed-dateline {
  font: 500 0.66rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(20, 18, 15, 0.6);
  text-align: center;
  margin-bottom: 8px;
}
.ed-items { max-width: 760px; margin-left: 0; margin-right: auto; }
.ed-items .ed-item { border-bottom: 1px solid rgba(20, 18, 15, 0.3); padding: 26px 0; overflow: hidden; }
.ed-items .ed-item:last-child { border-bottom: 0; }
/* Imagen por item: la historia principal (idx 0) va grande y arriba del
   título; el resto son thumbnails chicos flotando a la izquierda, como los
   bloques secundarios de un newsletter editorial (Axios/Morning Brew). */
.ed-item-media {
  margin: 0 0 14px;
}
.ed-item-media img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(1) contrast(1.1);
}
html[data-accent="color"] .ed-item-media img { filter: contrast(1.1); }
.ed-item:not(.ed-item-lead) .ed-item-media {
  float: left;
  width: 108px;
  margin: 4px 16px 10px 0;
}
.ed-item:not(.ed-item-lead) .ed-item-media img {
  max-height: 108px;
  border-radius: 3px;
}
@media (max-width: 480px) {
  .ed-item:not(.ed-item-lead) .ed-item-media { width: 76px; }
  .ed-item:not(.ed-item-lead) .ed-item-media img { max-height: 76px; }
}
.ed-items h2 {
  font: 400 clamp(1.65rem, 3.4vw, 2.2rem)/1.06 "Libre Caslon Display", Georgia, serif;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: #14120f;
}
.ed-item-lead h2 { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.ed-items h2 a { color: inherit; text-decoration: none; }
.ed-items h2 a:hover { text-decoration: underline; }
.ed-items .ed-item-meta {
  font: 500 0.6rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(20, 18, 15, 0.6);
  margin-bottom: 12px;
}
.ed-items .ed-item-body {
  font: 400 1rem/1.68 Georgia, serif;
  color: rgba(20, 18, 15, 0.88);
}
.ed-items .ed-item-body p { margin: 0 0 0.9em; }
.ed-items .ed-item-body p:last-child { margin-bottom: 0; }
.ed-items .ed-item-body a { color: #14120f; text-decoration: underline; }
.ed-items .ed-item-body code {
  font-family: "DM Mono", monospace;
  background: rgba(20, 18, 15, 0.08);
  padding: 1px 5px;
}
.ed-items .ed-item-context {
  border-left: 3px solid rgba(20, 18, 15, 0.45);
  padding-left: 12px;
  color: rgba(20, 18, 15, 0.62);
  font-size: 0.95rem;
  margin: 14px 0;
}
.ed-items .ed-item-context p { margin: 0; }
.ed-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.ed-item-foot .ed-more {
  font: 500 0.64rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #14120f;
  text-decoration: none;
  border-bottom: 1px solid rgba(20, 18, 15, 0.5);
  padding-bottom: 2px;
}
.ed-item-foot .ed-more:hover { background: #14120f; color: #ece4d0; }
.ed-item-foot .ed-tags span {
  font: 500 0.58rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(20, 18, 15, 0.6);
  margin-right: 10px;
}
