:root {
  --ink: #121212;
  --ink-2: #333;
  --muted: #666;
  --rule: #e2e2e2;
  --rule-strong: #121212;
  --paper: #ffffff;
  --paper-2: #f6f5f1;
  --accent: #c8102e;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* una palabra o un enlace muy largos se parten en vez de salirse de su columna */
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 12px; font-family: var(--sans); }

/* ---------- cabecera ---------- */

.topbar {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.topbar-links { display: flex; gap: 16px; font-weight: 500; color: var(--ink-2); }

.masthead { text-align: center; padding: 22px 0 16px; }
.logo {
  display: inline-block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(38px, 8vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
/* el PNG del logo tiene mucho margen transparente arriba y abajo: se recorta a la franja del texto */
.logo-img img {
  width: min(520px, 86vw);
  height: auto;
  aspect-ratio: 4.6;
  object-fit: cover;
  object-position: 50% 47%;
}
.logo-sm { font-size: 30px; }

/* portada en papel del día, a la derecha del logo */
.masthead .wrap { position: relative; }
.print-edition {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  text-align: right;
  color: var(--ink);
}
.print-edition:hover { text-decoration: none; }
.print-edition img {
  width: 100px;
  aspect-ratio: 1 / 1.414;
  object-fit: cover;
  object-position: top;
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transform: rotate(2deg);
  transition: transform .2s ease, box-shadow .2s ease;
}
.print-edition:hover img { transform: rotate(0) scale(1.05); box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.print-edition-text { font-size: 12px; line-height: 1.35; color: var(--muted); order: -1; }
.print-edition-text strong { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 1150px) { .print-edition-text { display: none; } .print-edition img { width: 84px; } }
/* en el móvil no cabe junto al logo: enlace de texto debajo del lema */
@media (max-width: 800px) {
  .print-edition { position: static; transform: none; justify-content: center; margin-top: 10px; }
  .print-edition img { display: none; }
  .print-edition-text { display: block; order: 0; text-align: center; font-size: 12px; }
  .print-edition-text strong { display: inline; margin-right: 6px; }
}
.tagline {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sections {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 3px double var(--rule-strong);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
}
.sections .wrap { display: flex; align-items: center; gap: 16px; }
.sections ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.sections ul::-webkit-scrollbar { display: none; }
.sections li a { display: block; padding: 12px 10px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.sections li a:hover { text-decoration: none; color: var(--accent); }
.sections li a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-search input {
  font: inherit;
  font-weight: 400;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px 7px 36px;
  width: 280px;
  background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%23666' stroke-width='2.2'/%3E%3Cpath d='M16.5 16.5 21 21' stroke='%23666' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 13px center / 15px 15px;
}
@media (max-width: 1100px) { .nav-search input { width: 220px; } }
@media (max-width: 860px) { .nav-search { display: none; } }

.ticker { background: var(--ink); color: #fff; font-family: var(--sans); font-size: 14px; }
.ticker .wrap { display: flex; align-items: center; gap: 14px; padding-top: 9px; padding-bottom: 9px; overflow: hidden; }
.ticker-label {
  flex: none;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
}
.ticker-label { position: relative; z-index: 1; }
.ticker-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  /* los titulares aparecen y desaparecen suavemente por los bordes */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.ticker-belt { display: flex; width: max-content; animation: ticker-move var(--ticker-duration, 60s) linear infinite; }
.ticker-track:hover .ticker-belt,
.ticker-track:focus-within .ticker-belt { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; }
.ticker li { white-space: nowrap; font-weight: 500; padding-right: 22px; }
.ticker li::after { content: '•'; color: var(--accent); margin-left: 22px; }
.ticker li b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c, #fff) 55%, #fff);
  margin-right: 8px;
}
.ticker li.is-breaking b { color: #ff5a6e; }
.ticker a:hover { text-decoration: underline; }
@keyframes ticker-move { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-belt { animation: none; }
  .ticker-belt ul[aria-hidden] { display: none; }
  .ticker-track { overflow-x: auto; scrollbar-width: none; }
}

main.wrap { padding-top: 28px; padding-bottom: 48px; min-height: 50vh; background: var(--paper); }

/* ---------- transición suave entre páginas ---------- */
/* Chrome, Edge y Safari recientes; en otros navegadores se cambia de página sin efecto. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  main { view-transition-name: page; }

  /* la cabecera y el menú se quedan quietos */
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }

  /* el contenido anterior se desvanece y el nuevo aparece subiendo un poco */
  ::view-transition-old(page) { animation: page-fade-out .18s ease-in both; }
  ::view-transition-new(page) { animation: page-fade-in .32s ease-out .08s both; }
}

@keyframes page-fade-out { to { opacity: 0; } }
@keyframes page-fade-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- elementos comunes ---------- */

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kicker a { color: var(--c, var(--accent)); }
.badge { background: var(--accent); color: #fff; padding: 2px 6px; font-size: 10px; letter-spacing: .08em; }
.badge-exclusive { background: var(--ink); color: #fff; border-left: 3px solid var(--accent); }
/* noticia privada: logo IN del periódico */
.badge-in { display: inline-flex; flex: none; }
.badge-in img { width: 18px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px var(--rule); }
.story-head .badge-in img { width: 22px; height: 22px; }

.headline { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0; letter-spacing: -0.005em; }
.dek { color: var(--ink-2); margin: 8px 0 0; font-size: 16px; line-height: 1.45; }
.meta { font-family: var(--sans); font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.author { font-family: var(--sans); font-weight: 600; color: var(--ink-2); }

.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); margin-bottom: 10px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-media:hover img { transform: scale(1.03); }

.ph {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  color: rgba(255,255,255,.9);
}
.ph span { font-family: var(--display); font-weight: 700; font-size: clamp(18px, 3vw, 30px); letter-spacing: .01em; }

/* ---------- portada ---------- */

.top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-strong);
}
.top > * { padding: 0 20px; }
.top > *:first-child { padding-left: 0; }
.top > *:last-child { padding-right: 0; }
.top > * + * { border-left: 1px solid var(--rule); }

.lead .headline { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; }
.lead .dek { font-size: 19px; }
.lead .card-media { margin-bottom: 14px; }

/* principal anterior, debajo de la actual en la misma columna */
.card-prev {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 18px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.card-prev .card-media { margin: 0; }
.card-prev .headline { font-size: 24px; line-height: 1.15; }
.card-prev .dek { font-size: 16px; }
@media (max-width: 640px) {
  .card-prev { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card-prev .headline { font-size: 21px; }
}

.secondary .card { padding: 0 0 16px; }
.secondary .card + .card { border-top: 1px solid var(--rule); padding-top: 16px; }
.secondary .headline { font-size: 20px; }
.secondary .dek { font-size: 15px; }

.rail-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-top: 3px solid var(--ink);
  padding-top: 10px;
  margin: 0 0 8px;
}
.most-read ol { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
  counter-increment: mr;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}
.most-read li::before {
  content: counter(mr);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}

@media (max-width: 1020px) {
  .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 24px; }
  .lead-col { grid-column: 1 / -1; padding: 0 !important; border: 0 !important; }
  .secondary { padding-left: 0 !important; border-left: 0 !important; }
}
@media (max-width: 640px) {
  .top { grid-template-columns: minmax(0, 1fr); }
  .top > * { padding: 0 !important; border-left: 0 !important; }
  .rail { border-top: 0; }
}

.section-block { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 3px solid var(--c, var(--ink));
  padding-top: 10px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 700; }
.section-head .more { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card-sm .headline { font-size: 18px; }

/* sección con más de 4 noticias: fila que se arrastra a izquierda y derecha */
.carousel {
  container-type: inline-size;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  -webkit-user-select: none;
          user-select: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel.is-dragging a { pointer-events: none; }
.carousel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* 4 a la vista (2 en tableta, casi 1 en móvil) */
.slide { flex: none; width: calc((100cqw - 72px) / 4); scroll-snap-align: start; }
@media (max-width: 1020px) { .slide { width: calc((100cqw - 24px) / 2); } }
@media (max-width: 520px) { .slide { width: 80cqw; } }

.card-opinion .headline { font-style: italic; font-weight: 600; }

/* ---------- noticia ---------- */

.page-with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 960px) {
  .page-with-rail { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
.page-with-rail .rail { position: sticky; top: 64px; }
@media (max-width: 960px) { .page-with-rail .rail { position: static; } }

/* la noticia va sola, centrada, con un ancho de lectura cómodo (unas 70 letras por línea);
   la foto principal se sale de la columna para ganar presencia */
.story { max-width: 760px; margin: 0 auto; }
/* "anywhere" permite partir una palabra larga también junto a la letra capitular,
   para que el texto siga al lado de la letra y no se vaya debajo de ella */
.story-title, .story-dek, .story-body, .story figcaption { overflow-wrap: anywhere; }
.story .story-figure {
  width: min(1040px, calc(100vw - 32px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.story-title { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; margin: 4px 0 0; letter-spacing: -0.01em; }
.story-dek { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.4; color: var(--ink-2); margin: 14px 0 0; }
.byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  margin: 22px 0;
}
.byline .meta { margin-top: 2px; }
.share { display: flex; gap: 8px; font-family: var(--sans); font-size: 12px; font-weight: 600; }
.share a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; transition: background .15s, color .15s, border-color .15s; }
.share a:hover { text-decoration: none; color: #fff; }
.share svg { flex: none; }
.share-whatsapp svg { color: #25d366; }
.share-facebook svg { color: #1877f2; }
.share-x svg { color: #000; }
.share-whatsapp:hover { background: #25d366; border-color: #25d366; }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-x:hover { background: #000; border-color: #000; }
.share a:hover svg { color: #fff; }
@media (max-width: 480px) { .share { flex-wrap: wrap; } }

/* ficha del autor, al final de la noticia */
.author-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.author-photo {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
  background: var(--paper-2);
}
.author-initials { display: grid; place-items: center; filter: none; background: var(--ink); color: #fff; font-family: var(--display); font-size: 30px; font-weight: 700; }
.author-name { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
.author-links { display: grid; gap: 3px; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.author-links a { display: inline-flex; align-items: center; gap: 7px; width: fit-content; overflow-wrap: anywhere; }
.author-links svg { flex: none; width: 14px; height: 14px; }
@media (max-width: 480px) {
  .author-photo { width: 64px; height: 64px; }
  .author-name { font-size: 19px; }
}

/* imágenes adicionales: se respeta su proporción (horizontal o vertical) sin recortarlas */
.story-photo { margin: 1.6em 0; }
.story-photo img { max-width: 100%; max-height: 85vh; width: auto; height: auto; margin: 0 auto; }
.story-photo figcaption { font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--rule); }
.story-gallery { margin-top: 8px; }
.story-figure { margin: 0 0 24px; }
.story-figure img { width: 100%; }
.story-figure figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--rule); }

.story-body { font-size: 20px; line-height: 1.7; }
.story-body p { margin: 0 0 1.2em; }
.story-body > p.dropcap::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.4em;
  line-height: .9;
  font-weight: 900;
  padding: 6px 10px 0 0;
}
/* Chrome, Edge y Safari: la capitular ocupa exactamente dos líneas, alineada arriba con
   la primera y abajo con la segunda. Firefox usa la versión flotante de arriba. */
@supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
  .story-body > p.dropcap::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    margin-right: 12px;
    -webkit-initial-letter: 2;
            initial-letter: 2;
  }
}
.story-body h2 { font-size: 26px; line-height: 1.25; margin: 1.6em 0 .6em; }
.story-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--accent);
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink-2);
}
.story-body ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.story-body li { margin-bottom: .4em; }
.story-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.tags { list-style: none; margin: 32px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: block; font-family: var(--sans); font-size: 13px; background: var(--paper-2); padding: 5px 12px; border-radius: 999px; }

.related { margin-top: 40px; border-bottom: 0; }

/* ---------- aviso de cookies ---------- */

html.cc-open { overflow: hidden; }
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 18, 18, .55);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: cc-fade .2s ease-out;
}
.cc-box {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--paper);
  padding: 28px 30px 24px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  border-top: 4px solid var(--accent);
}
.cc-box h2 { font-family: var(--display); font-size: 26px; line-height: 1.2; color: var(--ink); margin: 0 0 12px; }
.cc-box p { margin: 0 0 16px; }
.cc-box strong { color: var(--ink); }
.cc-box a { color: var(--accent); text-decoration: underline; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 10px; }
.cc-btn {
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.cc-btn:hover { background: var(--paper-2); }
.cc-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cc-btn-primary:hover { background: var(--accent); filter: brightness(1.1); }
.cc-config-toggle {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-panel { border-top: 1px solid var(--rule); margin: 8px 0 16px; padding-top: 4px; }
.cc-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
}
.cc-option > span:first-child { flex: 1; }
.cc-option small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cc-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #c9c9c9; position: relative; transition: background .2s; }
.cc-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.cc-option input:checked + .cc-switch { background: var(--accent); }
.cc-option input:checked + .cc-switch::after { transform: translateX(18px); }
.cc-option input:disabled + .cc-switch { opacity: .55; }
.cc-option input:disabled ~ * { cursor: not-allowed; }
.cc-option input:focus-visible + .cc-switch { outline: 2px solid var(--ink); outline-offset: 2px; }
.cc-save { width: 100%; margin-top: 16px; }
.cc-note { font-size: 13px; text-align: center; }
.cc-login { text-align: center; font-weight: 600; color: var(--ink); margin: 0 !important; }
@keyframes cc-fade { from { opacity: 0; } }
@media (max-width: 480px) {
  .cc-box { padding: 22px 18px 18px; }
  .cc-actions { grid-template-columns: 1fr; }
}

.legal-page { max-width: 760px; font-size: 18px; }
.legal-page h2 { font-size: 24px; margin: 1.6em 0 .5em; }
.table-scroll { overflow-x: auto; }
.cookie-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.cookie-table th, .cookie-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cookie-table th { background: var(--paper-2); font-weight: 700; }
.site-footer [data-cookie-settings] { cursor: pointer; }

/* ---------- cuentas de lectores ---------- */

.topbar-links { align-items: center; }
.topbar-account { display: flex; align-items: center; gap: 8px; }
.topbar-account a:hover { text-decoration: none; }
.btn-login, .btn-register { display: block; padding: 3px 12px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.btn-login { border: 1px solid var(--ink); }
.btn-login:hover { background: var(--paper-2); }
.btn-register { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn-register:hover { filter: brightness(1.1); }
.account { color: var(--muted); font-weight: 400; white-space: nowrap; }
.account strong { color: var(--ink); font-weight: 600; }
.logout { margin: 0; }
.logout button { font: inherit; font-weight: 600; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px; color: var(--ink); cursor: pointer; }
.logout button:hover { background: var(--paper-2); }
@media (max-width: 560px) {
  .topbar .wrap > span:first-child, .btn-register, .account { display: none; }
  .topbar .wrap { justify-content: flex-end; }
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; background: var(--paper-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); }

/* el final del texto visible se desvanece hacia el recuadro de registro */
.story-body.is-locked { position: relative; }
.story-body.is-locked::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--paper));
  pointer-events: none;
}
.paywall {
  border-top: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 28px 28px 30px;
  text-align: center;
  font-family: var(--sans);
}
.paywall-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.paywall h2 { font-family: var(--display); font-size: 30px; margin: 8px 0 6px; }
.paywall p { margin: 0 0 18px; color: var(--ink-2); font-size: 16px; }
.paywall-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.auth { max-width: 440px; margin: 16px auto 0; font-family: var(--sans); }
.auth h1 { font-family: var(--display); font-size: clamp(30px, 5vw, 40px); margin: 0 0 6px; }
.auth-lead { color: var(--ink-2); margin: 0 0 22px; font-size: 16px; }
.auth-error { background: #fdecee; border: 1px solid #f3b8c1; color: #9b0c23; padding: 10px 14px; font-size: 15px; margin: 0 0 18px; }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-form input { font: inherit; font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid #bdbdbd; background: var(--paper); }
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.auth-form small { font-weight: 400; color: var(--muted); font-size: 13px; }
.auth-form .btn { margin-top: 4px; font-size: 16px; }
.auth-switch { margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.auth-switch a { color: var(--accent); font-weight: 600; }

.preview-banner {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  background: #fff4d6;
  border: 1px solid #f0d58a;
  padding: 10px 14px;
  margin-bottom: 24px;
}

/* ---------- secciones y búsqueda ---------- */

.page-head { border-top: 3px solid var(--c, var(--ink)); padding-top: 10px; margin-bottom: 8px; }
.page-head h1 { font-family: var(--display); font-size: clamp(32px, 5vw, 48px); margin: 0; }

.list-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.list-item .card-media { margin: 0; }
.list-item .headline { font-size: 24px; }
@media (max-width: 640px) {
  .list-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .list-item .headline { font-size: 21px; }
}

.pagination { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.pagination span:not(:empty) { color: var(--muted); font-weight: 400; }

.big-search { display: flex; gap: 8px; margin: 16px 0 8px; }
.big-search input { flex: 1; min-width: 0; font: inherit; font-size: 20px; padding: 12px 16px; border: 1px solid var(--ink); }
.big-search button { font-family: var(--sans); font-weight: 600; font-size: 15px; padding: 0 22px; border: 0; background: var(--ink); color: #fff; cursor: pointer; }


.empty { padding: 40px 0; color: var(--muted); }
.empty h1 { font-family: var(--display); color: var(--ink); }
.empty a { color: var(--accent); text-decoration: underline; }

/* ---------- pie ---------- */

.site-footer { background: var(--ink); color: #d9d9d9; font-family: var(--sans); font-size: 14px; padding: 40px 0 28px; }
.site-footer .logo { color: #fff; }
.footer-brand p { margin: 8px 0 24px; color: #9a9a9a; }
.site-footer ul { list-style: none; margin: 0; padding: 20px 0; display: flex; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid #333; border-bottom: 1px solid #333; font-weight: 500; }
.legal { color: #8a8a8a; font-size: 12px; margin: 20px 0 0; }
.legal a { color: #bdbdbd; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
