/* DOBLE FILO · premium v5
   Hoja de overrides progresivos. Cargar después de style.css, enhancements.css y growth.css. */
:root {
  --df-paper: #f4f2eb;
  --df-ink: #161616;
  --df-orange: #ff6334;
  --df-line: #cccac1;
  --df-muted: #625f58;
  --df-display: var(--display, 'Barlow Condensed', Impact, sans-serif);
  --df-sans: var(--sans, 'Manrope', Arial, sans-serif);
}

html { scroll-padding-top: 1.5rem; }
body { overflow-x: clip; }
img { height: auto; }
main, footer { min-width: 0; }
::selection { color: var(--df-ink); background: #ffc0a8; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--df-orange);
  outline-offset: 3px;
}
:where(button, .pill, .filters button, .share, .listen, .search-jump) { min-height: 42px; }

/* Navegación: conservar sus enlaces accesibles sin apretar ni deformar el header. */
.nav-shell { min-width: 0; }
.nav-shell nav {
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--df-orange) transparent;
}
.nav-shell nav a { transition: color .16s ease; }
.nav-shell nav a:hover, .nav-shell nav a[aria-current="page"] { color: #a93818; }
.saved-link, .search-jump { flex-shrink: 0; }
.search-jump { min-width: 46px; }
.brand, .footer-logo { text-rendering: optimizeLegibility; }

/* Portada y jerarquía de titulares. */
.cover-image { isolation: isolate; }
.cover-image > img, .card-image img { transition: transform .35s ease; }
.cover-title h1 { max-width: 15ch; text-wrap: balance; }
.cover-title h1 em { color: #ff7954; }
.cover-title > span, .cover-kicker { text-shadow: 0 1px 12px #0008; }
.side-story h2, .news-card h3, .section-head h2, .article-title h1,
.plain-layout h1, .quick-title, .brief-heading { text-wrap: balance; }
.side-story, .news-card, .quiz-box, .article-columns, .article-body { min-width: 0; }
.side-story h2 a:focus-visible, .news-card h3 a:focus-visible {
  outline-offset: 5px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .14em;
}

/* Búsqueda y filtros: líneas claras, controles legibles y estados inequívocos. */
.search {
  min-width: 0;
  border-bottom: 2px solid var(--df-ink);
  transition: border-color .16s ease;
}
.search:focus-within { border-color: #b43f20; }
.search input { min-width: 0; min-height: 42px; font-size: 14px; }
.search input::placeholder { color: #66635c; opacity: 1; }
.filters button {
  min-height: 40px;
  border-radius: 0;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.filters button.selected { box-shadow: inset 0 -3px 0 var(--df-orange); }
.filters > span { line-height: 1.5; }

/* Lectura en pantalla grande: más aire, contraste y medidas de línea cómodas. */
.article-layout { padding-bottom: 2rem; }
.article-title { max-width: 1000px; }
.article-title h1 { max-width: 15ch; line-height: .96; }
.standfirst { color: #55534d; max-width: 66ch; text-wrap: pretty; }
.article-meta { align-items: center; }
.article-meta > span, .article-top, .breadcrumb { color: #4f4c46; }
.article-figure img { border: 1px solid #dedbd1; }
.article-figure figcaption { max-width: 90ch; }
.article-columns { grid-template-columns: minmax(150px, .8fr) minmax(0, 2.4fr); gap: clamp(28px, 5vw, 76px); }
.article-body { max-width: 72ch; font-size: 17px; line-height: 1.82; }
.readable > p { text-wrap: pretty; }
.article-body a, .sources a, .article-contact a, .plain-body a {
  text-decoration: underline;
  text-decoration-color: #a84b2f;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.article-body a:hover, .sources a:hover, .article-contact a:hover, .plain-body a:hover { text-decoration-thickness: 2px; }
.sources li { padding-left: .15rem; }
.takeaway { border-left-width: 4px; }
.related { padding-bottom: 1rem; }

/* Nuevos módulos editoriales: estructura sobria y reutilizable. */
.edition-brief {
  margin: clamp(2rem, 5vw, 4rem) 0;
  padding: clamp(1.1rem, 2.8vw, 2rem);
  color: var(--df-ink);
  background: #e9e5da;
  border-block: 2px solid var(--df-ink);
}
.brief-heading {
  margin: 0 0 1.2rem;
  font: 800 clamp(1.8rem, 4vw, 3rem)/.98 var(--df-display);
  letter-spacing: -.02em;
}
.brief-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--df-line); border: 1px solid var(--df-line); }
.brief-grid > article { min-width: 0; padding: 1.1rem; background: var(--df-paper); }
.brief-grid > article > :first-child { margin-top: 0; }
.brief-grid > article > :last-child { margin-bottom: 0; }
.brief-grid h3 { font: 700 1.35rem/1.05 var(--df-display); margin: .55rem 0; text-wrap: balance; }
.brief-grid p { margin: .5rem 0 0; color: #514e47; font-size: .92rem; line-height: 1.65; }
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.2rem;
  margin: 1.5rem 0;
  padding: .9rem 1rem;
  border-block: 1px solid var(--df-line);
  color: #393731;
  font-size: .82rem;
  line-height: 1.55;
}
.trust-strip > :first-child { font-weight: 800; }
.reading-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.reading-controls button {
  min-height: 44px;
  padding: .65rem .9rem;
  color: var(--df-ink);
  background: transparent;
  border: 1px solid #77736a;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.25;
}
.reading-controls button:hover, .reading-controls button[aria-pressed="true"] {
  color: var(--df-ink);
  background: var(--df-orange);
  border-color: var(--df-ink);
}
.article-toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--df-line);
  border-top: 3px solid var(--df-ink);
  background: #eeece4;
}
.article-toc > :first-child { margin-top: 0; }
.article-toc > :last-child { margin-bottom: 0; }
.article-toc ol, .article-toc ul { margin: .65rem 0 0; padding-left: 1.25rem; }
.article-toc li { padding: .2rem 0; line-height: 1.55; }
.article-toc a { text-decoration: underline; text-underline-offset: .16em; }
.back-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding: .55rem .85rem;
  color: var(--df-paper);
  background: var(--df-ink);
  border: 1px solid var(--df-ink);
  box-shadow: 0 2px 8px #16161624;
  font-size: .85rem;
  font-weight: 800;
}
.back-top:hover { color: var(--df-ink); background: var(--df-orange); }

/* Alternativa nocturna limitada al artículo y sus módulos de lectura. */
body.reader-night {
  --paper: #171817;
  --ink: #f2f0e9;
  --line: #484943;
  --muted: #b8b5aa;
  background: #171817;
  color: #f2f0e9;
  color-scheme: dark;
}
.reader-night .article-layout { color: #f2f0e9; }
.reader-night .article-meta > span, .reader-night .article-top, .reader-night .breadcrumb,
.reader-night .standfirst, .reader-night .article-figure figcaption,
.reader-night .sources > p, .reader-night .editor-note { color: #c1beb4; }
.reader-night .article-toc, .reader-night .edition-brief { color: #f2f0e9; background: #222420; }
.reader-night .brief-grid { background: #484943; border-color: #484943; }
.reader-night .brief-grid > article { color: #f2f0e9; background: #1d1f1c; }
.reader-night .brief-grid p, .reader-night .trust-strip { color: #d0cdc3; }
.reader-night .trust-strip { border-color: #484943; }
.reader-night .reading-controls button { color: #f2f0e9; border-color: #88867d; }
.reader-night .reading-controls button:hover, .reader-night .reading-controls button[aria-pressed="true"] {
  color: #171817; background: var(--df-orange); border-color: var(--df-orange);
}
.reader-night .article-toc a, .reader-night .article-body a, .reader-night .sources a,
.reader-night .article-contact a { color: #ffd0be; }
.reader-night .takeaway { color: #f2f0e9; background: #332d3b; border-color: #d5c3fa; }
.reader-night .back-top { color: #171817; background: #f2f0e9; border-color: #f2f0e9; }
.reader-night .back-top:hover { background: var(--df-orange); }

/* Modo lectura: se aparta el marco de navegación, nunca el contenido editorial. */
body.reader-focus .utility,
body.reader-focus > header,
body.reader-focus > .masthead,
body.reader-focus > .nav-shell,
body.reader-focus > footer,
body.reader-focus .related { display: none !important; }
body.reader-focus main.article-layout {
  max-width: 880px;
  padding-inline: clamp(18px, 4vw, 38px);
  padding-top: clamp(1rem, 3vw, 2.5rem);
}
body.reader-focus .article-columns { max-width: 760px; grid-template-columns: minmax(0, 1fr); }
body.reader-focus .article-aside { display: none; }
body.reader-focus .article-body { max-width: 72ch; margin-inline: auto; }
body.reader-focus .article-figure img { height: auto; max-height: 62vh; }
body.reader-focus .article-contact { margin-bottom: 2rem; }

/* Ajustes para 360/390 px: columnas a una sola vía, sin desbordes ni controles minúsculos. */
@media (max-width: 800px) {
  .utility { gap: .5rem; padding: 9px 18px; }
  .utility > span:nth-child(2) { display: none; }
  .masthead { padding-inline: 18px; }
  .masthead-home .brand { font-size: clamp(70px, 19vw, 130px); }
  .masthead-small .brand { font-size: clamp(48px, 12vw, 68px); }
  .masthead-small .brand-caption { gap: 12px; }
  .brand-caption { font-size: 7px; }
  .nav-shell { margin-inline: 14px; gap: 0; }
  .nav-shell nav {
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 12px 0;
    font-size: 11px;
    scrollbar-width: none;
  }
  .nav-shell nav::-webkit-scrollbar { display: none; }
  .saved-link { padding-inline: 10px; }
  .saved-link span { display: none; }
  .search-jump { min-width: 40px; padding-inline: 7px; }
  main { padding-inline: 18px; }
  .edition-line { align-items: flex-start; flex-wrap: wrap; line-height: 1.55; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cover-image { height: clamp(390px, 118vw, 510px); }
  .cover-title { left: 18px; right: 18px; bottom: 18px; }
  .cover-title h1 { max-width: 13ch; font-size: clamp(42px, 12vw, 70px); margin: 10px 0 12px; }
  .cover-title > span { font-size: 8px; }
  .cover-kicker { left: 16px; right: 16px; top: 16px; }
  .cover-fact { width: 88px; height: 88px; top: 66px; right: 16px; font-size: 29px; }
  .cover-fact small { font-size: 6px; }
  .cover-bottom { align-items: flex-end; gap: 12px; }
  .cover-bottom p { max-width: 31ch; font-size: 11px; }
  .cover-arrow { width: 44px; height: 44px; }
  .side-stories { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 12px; }
  .side-story { min-height: 180px; padding: 18px; }
  .side-story h2 { max-width: 20ch; font-size: clamp(30px, 8vw, 39px); }
  .culture-story { min-height: 195px; }
  .quick-strip { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 16px; }
  .quick-title { padding-bottom: 12px; }
  .quick-strip > a { min-height: 60px; padding: 12px 25px 12px 12px; border-left: 0; border-top: 1px solid var(--line); }
  .quick-strip strong { font-size: 22px; }
  .news-area { padding-top: 38px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .section-head h2 { font-size: clamp(44px, 12vw, 60px); }
  .section-head h2 > span { font-size: 31px; margin-left: 8px; }
  .search { width: 100%; max-width: none; }
  .filters { gap: 7px; padding-bottom: 14px; margin-bottom: 22px; }
  .filters button { padding: 8px 10px; font-size: 10px; }
  .filters > span { width: 100%; margin: 3px 0 0; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .card-image img { height: auto; aspect-ratio: 1.65 / 1; }
  .card-meta { font-size: 8px; }
  .news-card h3 { font-size: clamp(28px, 8vw, 36px); }
  .news-card > p { font-size: 13px; line-height: 1.7; color: #514f49; }
  .card-read { min-height: 40px; align-items: center; font-size: 9px; }
  .world-block { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 42px; padding: 25px 20px; }
  .world-title h2 { font-size: clamp(52px, 15vw, 76px); }
  .quiz-section { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 42px; padding: 24px 18px; }
  .quiz-intro h2 { font-size: clamp(50px, 14vw, 68px); }
  .quiz-box { padding: 20px 16px; }
  .quiz-box h3 { font-size: 29px; }
  .rss-block { margin-top: 38px; padding: 22px 0; }
  .rss-block h2 { font-size: clamp(34px, 10vw, 44px); }
  footer { padding: 38px 18px 22px; }
  .footer-top { gap: 16px; flex-wrap: wrap; }
  .footer-logo { font-size: clamp(42px, 12vw, 60px); }
  .footer-top > p { font-size: 8px; }
  .footer-bottom { flex-direction: column; gap: 16px; font-size: 10px; }
  .footer-bottom > div { gap: 10px 16px; }
  .footer-bottom > span:last-child { text-align: left; }
  .article-layout { padding-top: 18px; }
  .breadcrumb { gap: 6px; padding-bottom: 14px; font-size: 11px; }
  .article-top { font-size: 8px; }
  .article-title { padding-top: 26px; }
  .article-title h1 { max-width: 13ch; font-size: clamp(42px, 12vw, 66px); line-height: .98; margin: 15px 0; }
  .standfirst { margin-bottom: 20px; font-size: 16px; line-height: 1.65; }
  .article-meta { align-items: flex-start; flex-direction: column; gap: 12px; }
  .article-meta > span { font-size: 9px; }
  .article-meta > div { flex-wrap: wrap; gap: 8px; }
  .article-shortcuts { gap: 8px 12px; }
  .article-shortcuts > span { width: 100%; }
  .article-shortcuts a, .article-shortcuts button { min-height: 40px; display: inline-flex; align-items: center; }
  .article-figure { margin: 20px 0 30px; }
  .article-figure img { height: auto; aspect-ratio: 1.5 / 1; }
  .article-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .article-aside { padding: 15px; background: #e9e5da; }
  .article-aside > strong { font-size: 48px; margin: 9px 0; }
  .article-body { font-size: 16px; line-height: 1.78; }
  .readable > p { margin-bottom: 20px; }
  .readable > p:first-child:first-letter { font-size: 64px; }
  .takeaway { padding: 20px; }
  .takeaway p { font-size: 15px; }
  .sources h2 { font-size: 36px; }
  .sources li { font-size: 13px; }
  .related { margin-top: 36px; }
  .related .section-head h2 { font-size: 38px; }
  .plain-layout { padding-top: 28px; }
  .plain-layout h1 { font-size: clamp(48px, 14vw, 72px); margin: 20px 0 30px; }
  .stats-big { gap: 18px; padding: 24px 18px; }
  .stats-big strong { font-size: clamp(68px, 20vw, 100px); }
  .edition-brief { margin-block: 2rem; padding: 1rem; }
  .brief-grid > article { padding: .9rem; }
  .trust-strip { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .reading-controls { gap: .45rem; }
  .reading-controls button { flex: 1 1 auto; }
  .back-top { min-width: 44px; min-height: 44px; }
}

/* 768 px: dos columnas donde hay espacio, sin forzar la composición móvil. */
@media (min-width: 600px) and (max-width: 800px) {
  .masthead-home .brand { font-size: clamp(112px, 18vw, 145px); }
  .side-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-story { min-height: 220px; }
  .quick-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-title { grid-column: 1 / -1; }
  .quick-strip > a { border-top: 1px solid var(--line); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-body { font-size: 17px; }
  .brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .utility { padding-inline: 14px; }
  .masthead { padding-inline: 14px; }
  main { padding-inline: 14px; }
  .nav-shell { margin-inline: 10px; }
  .masthead-small .brand { font-size: clamp(44px, 11.5vw, 48px); }
  .masthead-small .brand-caption { gap: 8px; }
  .masthead-small .brand-caption > span:first-child { display: none; }
  .cover-image { height: clamp(390px, 120vw, 455px); }
  .cover-title h1 { font-size: clamp(39px, 11.2vw, 46px); }
  .cover-bottom p { font-size: 10px; }
  .filters button { padding-inline: 8px; }
  .article-top { flex-wrap: wrap; }
  .article-title h1 { font-size: clamp(40px, 11.3vw, 46px); }
  .article-meta > div { width: 100%; }
  .article-shortcuts { gap: 6px 9px; }
  .share, .listen { padding-inline: 10px; }
  .back-top { right: max(.65rem, env(safe-area-inset-right)); bottom: max(.65rem, env(safe-area-inset-bottom)); }
}

@media (min-width: 1100px) {
  .news-grid { gap: 40px 30px; }
  .card-image img { height: 250px; }
  .news-card h3 { font-size: clamp(30px, 2.25vw, 38px); }
  .cover-image { min-height: 525px; }
  .edition-brief { padding: 2rem; }
  .brief-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1440px) {
  .article-body { font-size: 18px; }
  .cover-image { height: 570px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body, body.reader-night { color: #111 !important; background: #fff !important; color-scheme: light; }
  .utility, .masthead, .nav-shell, footer, .article-shortcuts, .reading-controls,
  .related, .back-top, .skip, #reading-progress, #toast { display: none !important; }
  body.reader-focus > header, body.reader-focus > footer { display: none !important; }
  main.article-layout { max-width: none !important; padding: 0 !important; }
  .article-columns, body.reader-focus .article-columns { display: block; max-width: none; }
  .article-aside { display: none !important; }
  .article-body { max-width: none; color: #111 !important; font: 12pt/1.6 Georgia, serif; }
  .article-title h1 { max-width: none; color: #111 !important; font-size: 32pt !important; }
  .standfirst, .article-meta > span, .article-figure figcaption, .editor-note,
  .sources > p { color: #333 !important; }
  .article-figure { margin: 12pt 0; }
  .article-figure img { max-height: 190px; object-fit: contain; }
  .takeaway, .article-toc, .edition-brief, .brief-grid > article { color: #111 !important; background: #fff !important; border-color: #777 !important; break-inside: avoid; }
  .brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sources a { word-break: break-word; }
  .sources a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  a { color: #111 !important; text-decoration: underline; }
  .breadcrumb, .article-top { font-size: 9pt; }
  h2, h3 { break-after: avoid; }
}

/* Ajuste final de módulos editoriales y contraste nocturno. */
.brief-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;font:inherit;letter-spacing:normal}.brief-heading h2{font:800 clamp(30px,4vw,48px)/1 var(--display);margin:12px 0 0;letter-spacing:-.5px}.brief-heading>a{font:700 11px/1.5 var(--sans);white-space:nowrap;text-decoration:underline;text-underline-offset:3px}.brief-grid>article>span{font:800 10px/1.5 var(--sans);letter-spacing:1px}.brief-grid>article>a{display:inline-block;font:700 11px/1.6 var(--sans);margin-top:14px;text-decoration:underline;text-underline-offset:3px}.reading-controls{padding:14px 0;border-bottom:1px solid var(--line)}.reading-controls>span{font:800 10px/1.5 var(--sans);letter-spacing:.6px}.reading-controls>a{font:700 11px/1.5 var(--sans);text-decoration:underline}.reader-night .article-aside{background:#242621}.reader-night .news-card>p{color:#c1beb4}.reader-night .nav-shell nav a:hover{color:#ff7954}.reader-night .breadcrumb,.reader-night .article-contact,.reader-night .card-meta{color:#c1beb4}
@media(max-width:800px){.brief-heading{align-items:start;flex-direction:column;gap:16px}.brief-heading>a{white-space:normal}.reading-controls>span{width:100%}.trust-strip{margin:10px 0;padding:10px 0;flex-direction:row;font-size:11px;gap:8px 14px}.trust-strip>span{width:100%}}
