/* ÓRBITA · refinamiento visual editorial (cargar después de edition.css) */
:root {
  --accent-ink: #526300;
  --focus-ring: #526300;
  --measure: 68ch;
  --surface-shadow: 0 12px 30px rgba(22, 24, 21, .08);
}

html {
  scroll-padding-top: 84px;
  scrollbar-color: var(--warm-gray) var(--paper-2);
}

body {
  font-size: 16px;
  line-height: 1.62;
  font-kerning: normal;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--paper);
}

::target-text { background: var(--lime); }

/* Cabecera y navegación: jerarquía más nítida sin alterar el sistema existente. */
.utility { min-height: 34px; }
.utility a { text-underline-offset: 3px; }
.utility a:hover { color: var(--ink); text-decoration: underline; }
.masthead { padding-bottom: 22px; }
.brand { line-height: .82; }
.brand-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 22%, transparent); }
.navwrap { box-shadow: 0 5px 14px rgba(22, 24, 21, .045); }
.navwrap nav { scrollbar-width: thin; scrollbar-color: var(--warm-gray) transparent; }
.navlink, .search-toggle, .theme-control { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.navlink[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent-ink); }
.search-toggle { border-right: 1px solid var(--rule); }
.trending { scrollbar-width: thin; }
.trending a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Lectura: aire constante, medidas cómodas y detalles de edición. */
main { padding-bottom: clamp(52px, 7vw, 96px); }
.edition-line, .edition-status { min-height: 44px; }
.kicker, .section-heading .eyebrow, .eyebrow { color: var(--accent-ink); }
.hero-copy { max-width: 100%; }
.hero-caption { max-width: 68ch; }
.story-meta { row-gap: 5px; }
.article-top { padding-top: clamp(32px, 5vw, 60px); }
.breadcrumb a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.breadcrumb a:hover { text-decoration-color: var(--accent-ink); }
.standfirst { line-height: 1.42; }
.article-body, .prose { text-wrap: pretty; }
.article-body { max-width: var(--measure); line-height: 1.8; }
.article-body h2, .prose h2 { text-wrap: balance; }
.article-body a, .prose a, .source a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-ink) 55%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.article-body a:hover, .prose a:hover, .source a:hover { text-decoration-color: var(--accent-ink); text-decoration-thickness: 2px; }
.article-visual img, .discovery-image img, .feature-story > img { background: var(--paper-2); }
.article-visual figcaption { line-height: 1.5; }
.takeaway { border-top-width: 4px; }
.takeaway .eyebrow { color: var(--accent-ink); }

/* Cards y módulos: reglas, bordes y respuestas discretas al puntero. */
.story-card { border-top: 1px solid var(--rule); transition: border-color .2s ease; }
.story-card:hover { border-color: var(--accent-ink); }
.story-card .image-link, .discovery-image { background: var(--paper-2); }
.story-card .image-link img, .discovery-image img, .feature-story > img { transition: transform .45s cubic-bezier(.2, .65, .3, 1); }
.story-card:hover .image-link img, .discovery:hover .discovery-image img { transform: scale(1.025); }
.card-content { padding-top: 17px; }
.story-card h3, .rail-story h2, .rail-story h3 { text-wrap: balance; }
.story-card h3 a, .rail-story h2 a, .rail-story h3 a { text-decoration-thickness: 2px; text-underline-offset: .12em; }
.decision-grid { box-shadow: var(--surface-shadow); }
.decision-card { min-height: 250px; }
.decision-card:focus-visible { position: relative; z-index: 1; }
.decision-card .text-link { text-decoration: underline; text-underline-offset: 4px; }
.discovery { box-shadow: var(--surface-shadow); }
.feature-band { padding-top: clamp(30px, 4vw, 50px); padding-bottom: clamp(34px, 5vw, 58px); }
.feature-story:hover > img { transform: scale(1.018); }
.topic-strip { scrollbar-width: thin; scrollbar-color: var(--warm-gray) var(--paper-2); }
.topic-strip a { min-height: 46px; }
.newsletter-alt { box-shadow: inset 0 0 0 1px rgba(22, 24, 21, .08); }
.button, .voluntary-ad > a { transition: background-color .18s ease, color .18s ease, transform .18s ease; }
.button:hover, .voluntary-ad > a:hover { transform: translateY(-1px); }
.site-footer { padding-top: clamp(28px, 4vw, 44px); }
.footer-links a { text-underline-offset: 3px; }

/* Inputs, búsquedas y controles con estados visibles y contraste coherente. */
button, input, select, textarea { accent-color: var(--accent-ink); }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .62; }
.archive-filters input:focus-visible, .archive-filters select:focus-visible,
.search-head input:focus-visible, #search-input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.archive-filters input, .archive-filters select { border-color: color-mix(in srgb, var(--ink) 42%, var(--paper)); }
.archive-filters button:hover, .share button:hover, .reading-tools button:hover { color: var(--ink); }
dialog#search-dialog { box-shadow: 0 24px 80px rgba(0, 0, 0, .24); }
dialog#search-dialog::backdrop { backdrop-filter: blur(3px); }
.search-result h2, .search-result h3 { text-wrap: balance; }

/* Tema oscuro: conserva el acento lima y evita texto secundario apagado. */
body.dark-theme {
  --accent-ink: #dcfb53;
  --focus-ring: #dcfb53;
  --surface-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
body.dark-theme .navlink[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--lime); }
body.dark-theme .kicker, body.dark-theme .section-heading .eyebrow,
body.dark-theme .eyebrow, body.dark-theme .takeaway .eyebrow { color: var(--accent-ink); }
body.dark-theme .article-body a, body.dark-theme .prose a, body.dark-theme .source a { text-decoration-color: color-mix(in srgb, var(--accent-ink) 65%, transparent); }
body.dark-theme .archive-filters input, body.dark-theme .archive-filters select { border-color: var(--rule); }
body.dark-theme .archive-filters input::placeholder, body.dark-theme .search-head input::placeholder { color: var(--warm-gray); opacity: 1; }
body.dark-theme .decision-grid, body.dark-theme .discovery { box-shadow: var(--surface-shadow); }

@media (min-width: 1100px) {
  .cover-intro { gap: clamp(36px, 6vw, 84px); }
  .cover-promise { padding-left: clamp(26px, 3vw, 44px); }
  .front-grid { gap: clamp(24px, 3vw, 40px); }
  .news-grid { column-gap: clamp(22px, 3vw, 38px); row-gap: 34px; }
}

@media (max-width: 800px) {
  .navwrap nav { scroll-snap-type: x proximity; overscroll-behavior-inline: contain; }
  .navlink, .search-toggle, .theme-control { scroll-snap-align: start; }
  .decision-card { min-height: 220px; }
  .reading-layout { gap: 28px; }
  .takeaway { max-width: 34ch; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 62px; }
  .utility { gap: 8px; letter-spacing: .07em; }
  .utility a { white-space: nowrap; }
  .site-header .masthead { padding-top: 18px; padding-bottom: 17px; }
  .navwrap { box-shadow: 0 4px 12px rgba(22, 24, 21, .06); }
  .navwrap nav { min-height: 50px; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: 0; scroll-padding-inline: var(--gutter); }
  .navlink, .search-toggle { min-height: 50px; }
  .search-toggle { padding-right: max(14px, env(safe-area-inset-right)); padding-left: 14px; }
  .edition-status { min-height: 42px; line-height: 1.45; }
  .cover-intro { gap: 17px; }
  .cover-promise { border-top: 1px solid var(--rule); padding-top: 15px; }
  .cover-small { line-height: 1.55; }
  .front-grid { gap: 25px; }
  .briefing { border-top: 1px solid var(--ink); padding-top: 14px; }
  .briefing .rail-story { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .story-number { font-size: 30px; }
  .section-heading { padding-bottom: 14px; }
  .section-heading > a { max-width: 125px; }
  .news-grid { row-gap: 16px; }
  .story-card { grid-template-columns: minmax(104px, .78fr) 1.22fr; gap: 14px; padding-bottom: 15px; }
  .story-card .image-link { aspect-ratio: 1.04; }
  .card-content { padding-top: 1px; }
  .story-card h3 { line-height: 1.02; }
  .story-card .story-meta { line-height: 1.35; }
  .decision-card { min-height: 0; padding: 23px 20px; }
  .decision-card p { line-height: 1.55; }
  .discovery { box-shadow: none; }
  .trust-band { gap: 8px; }
  .archive-filters { gap: 13px; }
  .article-top { padding-top: 27px; }
  .article-body { max-width: 100%; font-size: 17px; line-height: 1.78; }
  .article-body p { margin-bottom: 1.35em; }
  .article-visual img { min-height: 0; }
  .share button, .reading-tools button { min-height: 42px; }
  .footer-links { gap: 12px 18px; }
  .footer-links a { min-height: 30px; display: inline-flex; align-items: center; }
}

@media (max-width: 380px) {
  .utility span:first-child { letter-spacing: .035em; }
  .cover-intro h1 { font-size: clamp(43px, 12vw, 52px); }
  .story-card { grid-template-columns: minmax(92px, .72fr) 1.28fr; gap: 11px; }
  .story-card h3 { font-size: 22px; }
  .story-card .kicker { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .story-card:hover .image-link img, .discovery:hover .discovery-image img,
  .feature-story:hover > img, .button:hover, .voluntary-ad > a:hover { transform: none; }
}

@media print {
  :root, body, body.dark-theme {
    --ink: #000;
    --paper: #fff;
    --paper-2: #f3f3f3;
    --warm-gray: #444;
    --rule: rgba(0, 0, 0, .3);
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #000 !important; font: 10.5pt/1.5 Georgia, "Times New Roman", serif; }
  .site-header, .navwrap, .trending, .site-footer, .reading-progress, .share,
  .reading-tools, .search-toggle, .theme-control, .newsletter-alt .button,
  .voluntary-ad > a { display: none !important; }
  main { max-width: none; padding: 0; }
  .cover-intro, .edition-status, .article-top, .prose { max-width: none; }
  .cover-intro { padding: 12pt 0 18pt; }
  .front-grid, .news-grid, .feature-grid, .decision-grid, .discovery, .trust-band,
  .archive-list, .source-directory { break-inside: avoid; }
  .hero, .feature-band, .discovery, .newsletter-alt, .decision-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hero { min-height: 260pt !important; height: auto !important; }
  .hero-img { min-height: 260pt !important; }
  .hero-copy { top: auto !important; bottom: 0 !important; position: absolute !important; }
  .hero-shade { background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.12)) !important; }
  .article-top h1, .prose h1 { font: 700 30pt/1.12 Georgia, "Times New Roman", serif; }
  .article-body, .prose { max-width: none; font: 11pt/1.55 Georgia, "Times New Roman", serif; }
  .reading-layout { display: block; }
  .takeaway { position: static; margin-bottom: 16pt; }
  .article-visual { margin: 12pt 0; }
  .article-visual img { max-height: 340pt; }
  .article-body a, .prose a { color: #000; text-decoration: underline; }
  .article-body a[href^="http"]::after, .prose a[href^="http"]::after { content: " (" attr(href) ")"; font: 8pt/1.3 Georgia, serif; overflow-wrap: anywhere; }
  .source, .article-body h2, .article-body h3, figure, blockquote { break-inside: avoid; }
  .story-card, .archive-item, .source-group article { break-inside: avoid; }
  a { color: #000; }
}
