:root {
  --paper: #eee9df;
  --paper-2: #e4ddd1;
  --paper-3: #f7f4ee;
  --ink: #181714;
  --ink-soft: #3e3a34;
  --muted: #746d63;
  --rule: #b8ad9e;
  --blood: #741f2b;
  --blood-dark: #52151d;
  --olive: #555747;
  --gold: #a8782c;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Courier New", Courier, monospace;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24, 23, 20, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 42px;
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blood); text-underline-offset: .18em; }
a:hover { color: var(--blood-dark); }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 999;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--blood);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #f7f2e9;
  background: rgba(24, 23, 20, .97);
  border-bottom: 3px double #716657;
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(var(--max), calc(100% - 3rem));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: #f7f2e9;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #9c8b76;
  color: #d7bd8a;
  font: 700 .72rem/1 var(--mono);
  transform: rotate(-2deg);
}
.brand-copy { display: grid; gap: .08rem; }
.brand-name {
  font: 700 .92rem/1.1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand-sub {
  color: #aaa093;
  font: 400 .6rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-nav { justify-self: end; display: flex; align-items: center; gap: 1.45rem; }
.site-nav a {
  color: #c7bfb4;
  font: 600 .68rem/1 var(--sans);
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav .nav-report {
  padding: .7rem .9rem;
  color: #ead6aa;
  border: 1px solid #746a5c;
}
.menu-button {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  color: #ead6aa;
  background: transparent;
  border: 1px solid #746a5c;
  cursor: pointer;
}

.eyebrow, .case-label, .section-label, .article-meta, .rail-label {
  font-family: var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-main { width: min(var(--max), calc(100% - 3rem)); margin: 0 auto; }
.cover {
  min-height: 540px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: stretch;
  border-inline: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cover-copy {
  padding: clamp(4rem, 9vw, 7rem) clamp(2rem, 6vw, 5rem) 4rem;
  border-right: 1px solid var(--rule);
}
.cover .eyebrow { margin: 0 0 2rem; color: var(--blood); font-size: .72rem; }
.cover h1 {
  max-width: 780px;
  margin: 0;
  font: 700 clamp(3.25rem, 7vw, 6.7rem)/.89 var(--serif);
  letter-spacing: -.055em;
}
.cover h1 em { display: block; color: var(--blood); font-weight: 400; }
.cover-deck {
  max-width: 650px;
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font: 400 clamp(1.05rem, 2vw, 1.35rem)/1.65 var(--serif);
}
.cover-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1rem;
  color: #fff;
  background: var(--blood);
  border: 1px solid var(--blood);
  font: 700 .7rem/1 var(--mono);
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover { color: #fff; background: var(--blood-dark); border-color: var(--blood-dark); }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--rule); }
.button.secondary:hover { color: var(--blood); background: var(--paper-3); }
.cover-folio {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #eee8de;
  background: var(--olive);
}
.folio-number { font: 400 clamp(6rem, 13vw, 11rem)/.8 var(--serif); letter-spacing: -.08em; }
.folio-copy { max-width: 19rem; }
.folio-copy strong { display: block; margin-bottom: .5rem; font: 700 .75rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.folio-copy p { margin: 0; color: #d7d2c9; font: 400 .92rem/1.65 var(--sans); }

.registry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  border-inline: 1px solid var(--rule);
}
.registry { padding: 4rem clamp(1.5rem, 4vw, 4rem) 5rem; border-right: 1px solid var(--rule); }
.section-label { margin: 0 0 2.5rem; color: var(--muted); font-size: .68rem; }
.case-group { margin-bottom: 3.4rem; }
.group-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--ink);
}
.group-header h2 { margin: 0; font: 600 clamp(1.55rem, 3vw, 2.15rem)/1.1 var(--serif); }
.group-header span { color: var(--muted); font: .67rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.case-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 82px;
  padding: .8rem 0;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.case-row:hover { background: rgba(255,255,255,.28); }
.case-row:hover .case-title { color: var(--blood); }
.case-num { color: var(--blood); font: 700 .78rem/1 var(--mono); letter-spacing: .1em; }
.case-title { font: 600 clamp(1.02rem, 2vw, 1.25rem)/1.3 var(--serif); }
.case-desc { margin-top: .22rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.case-arrow { color: var(--muted); font: 1rem/1 var(--mono); }
.registry-aside { position: sticky; top: 76px; padding: 3rem 2rem; }
.aside-block { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.aside-block:first-child { padding-top: 0; border-top: 0; }
.aside-block h2 { margin: 0 0 .75rem; font: 600 1.15rem/1.2 var(--serif); }
.aside-block p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .86rem; }
.aside-link { font: 700 .68rem/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; }

.article-shell {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px minmax(0, 760px);
  gap: clamp(2rem, 6vw, 6rem);
  justify-content: center;
  padding: clamp(3rem, 7vw, 6rem) 0 5rem;
}
.article-rail { position: sticky; top: 110px; align-self: start; }
.rail-stamp {
  width: 118px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  color: var(--blood);
  border: 2px solid var(--blood);
  border-radius: 50%;
  text-align: center;
  transform: rotate(-4deg);
}
.rail-stamp span { display: block; font: 700 1.8rem/1 var(--serif); }
.rail-stamp small { display: block; margin-top: .3rem; font: 700 .58rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.rail-details { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.rail-label { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .58rem; }
.rail-details p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .75rem; line-height: 1.5; }

.article-hero { padding-bottom: 2.5rem; border-bottom: 3px double var(--rule); }
.article-hero .case-label { margin: 0 0 1.25rem; color: var(--blood); font-size: .72rem; }
.article-hero h1 {
  margin: 0;
  font: 700 clamp(2.55rem, 6vw, 5.15rem)/.98 var(--serif);
  letter-spacing: -.035em;
}
.article-lead { margin: 1.5rem 0 0; color: var(--ink-soft); font: 400 clamp(1.12rem, 2.2vw, 1.42rem)/1.55 var(--serif); }
.article-meta { margin-top: 1.5rem; color: var(--muted); font-size: .63rem; }
.reading-note, .source-note {
  margin: 2rem 0;
  padding: 1.1rem 1.2rem;
  background: rgba(255,255,255,.38);
  border-left: 4px solid var(--olive);
}
.reading-note strong, .source-note strong { display: block; margin-bottom: .25rem; font: 700 .68rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.reading-note p, .source-note p { margin: 0; color: var(--ink-soft); font-size: .86rem; }

.article-content { font: 400 1.03rem/1.88 var(--serif); }
.article-content > p:first-child::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  color: var(--blood);
  font: 700 4.4rem/.75 var(--serif);
}
.article-content p { margin: 0 0 1.35rem; }
.article-content h2 {
  margin: 3rem 0 1rem;
  padding-top: .7rem;
  font: 700 clamp(1.55rem, 3vw, 2.15rem)/1.15 var(--serif);
  border-top: 1px solid var(--rule);
}
.article-content h3 { margin: 2rem 0 .7rem; font: 700 1.22rem/1.25 var(--serif); }
.article-content ul, .article-content ol { margin: 0 0 1.5rem; padding-left: 1.35rem; }
.article-content li { margin-bottom: .65rem; padding-left: .2rem; }
.article-content blockquote { margin: 2rem 0; padding: 0 0 0 1.4rem; color: var(--blood-dark); border-left: 3px solid var(--blood); font-size: 1.16rem; font-style: italic; }
.article-content strong { color: var(--ink); }
.destacado, .alerta-emergencia, .bloque-padres, .cierre-serie, .aviso-responsable {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--gold);
}
.alerta-emergencia { border-left-color: var(--blood); }
.aviso-responsable { border-left-color: var(--olive); color: var(--ink-soft); font: 400 .9rem/1.65 var(--sans); }
.destacado p:last-child, .alerta-emergencia p:last-child, .bloque-padres p:last-child, .cierre-serie p:last-child, .aviso-responsable p:last-child { margin-bottom: 0; }
.tabla-senal, .article-content table { width: 100%; margin: 2rem 0; border-collapse: collapse; font: 400 .88rem/1.5 var(--sans); }
.tabla-senal th, .tabla-senal td, .article-content th, .article-content td { padding: .8rem; text-align: left; vertical-align: top; border: 1px solid var(--rule); }
.tabla-senal th, .article-content th { color: #fff; background: var(--ink); }
.cta-bloque {
  margin: 3rem 0;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  color: #f5eee5;
  background: var(--blood-dark);
  border: 0;
}
.cta-bloque h2, .cta-bloque h3 { color: #fff; border: 0; }
.cta-bloque p { color: #e0d5cb; }
.cta-label { color: #d9ba81; font: 700 .65rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.cta-btn, .cta-boton {
  display: inline-flex;
  margin-top: .4rem;
  padding: .85rem 1rem;
  color: var(--blood-dark) !important;
  background: #f1dfb7;
  font: 700 .7rem/1.25 var(--mono);
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
}
.cta-btn:hover, .cta-boton:hover { background: #fff; }
.cta-precio { margin: .7rem 0 0 !important; color: #d8cbbc !important; font: .72rem/1.4 var(--sans); }

.related { margin-top: 3rem; padding-top: 2rem; border-top: 3px double var(--rule); }
.related h2 { margin: 0 0 1.2rem; font: 600 1.55rem/1.2 var(--serif); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.related-card { min-height: 150px; padding: 1.1rem; color: inherit; background: var(--paper-3); text-decoration: none; }
.related-card:hover { background: #fff; }
.related-card small { display: block; margin-bottom: .55rem; color: var(--blood); font: 700 .6rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.related-card strong { font: 600 1rem/1.35 var(--serif); }

.standard-page {
  width: min(820px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.standard-page > header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 3px double var(--rule); }
.standard-page h1 { margin: .6rem 0 0; font: 700 clamp(2.7rem, 7vw, 5.2rem)/.98 var(--serif); letter-spacing: -.035em; }
.standard-page .intro { color: var(--ink-soft); font: 400 1.25rem/1.6 var(--serif); }
.standard-page h2 { margin: 2.7rem 0 .8rem; font: 700 1.65rem/1.2 var(--serif); }
.standard-page h3 { margin: 2rem 0 .5rem; font: 700 1.15rem/1.3 var(--serif); }
.standard-page p, .standard-page li { color: var(--ink-soft); }
.standard-page li { margin-bottom: .6rem; }
.standard-page .info-box { margin: 1.5rem 0; padding: 1.2rem; background: var(--paper-3); border: 1px solid var(--rule); }
.source-list { list-style: none; padding: 0; }
.source-list li { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.method-map { margin: 2rem 0; }
.method-entry { scroll-margin-top: 110px; padding: 1.35rem 0; border-top: 1px solid var(--rule); }
.method-entry h3 { margin-top: 0; }
.method-entry .exp-ref { color: var(--blood); font: 700 .65rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

.site-footer { color: #cfc6b8; background: var(--ink); border-top: 3px double #716657; }
.footer-inner {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}
.footer-brand { color: #eee8de; font: 700 .82rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.footer-copy { margin-top: .5rem; color: #999084; font-size: .72rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; }
.footer-links a { color: #bcb3a8; font-size: .72rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.not-found { min-height: 66vh; display: grid; place-items: center; text-align: center; }
.not-found strong { display: block; color: var(--blood); font: 700 clamp(6rem, 20vw, 12rem)/.8 var(--serif); }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .menu-button { display: block; }
  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 0; border-top: 1px solid #38342e; }
  .site-nav .nav-report { padding: .8rem 0; border-inline: 0; border-bottom: 0; }
  .cover { min-height: auto; grid-template-columns: 1fr; }
  .cover-copy { border-right: 0; }
  .cover-folio { min-height: 280px; }
  .registry-layout { grid-template-columns: 1fr; }
  .registry { border-right: 0; }
  .registry-aside { position: static; border-top: 1px solid var(--rule); }
  .article-shell { grid-template-columns: 1fr; gap: 1.5rem; }
  .article-rail { position: static; display: flex; align-items: center; gap: 1.4rem; }
  .rail-stamp { width: 82px; flex: 0 0 82px; }
  .rail-stamp span { font-size: 1.25rem; }
  .rail-details { margin: 0; padding: 0 0 0 1.4rem; border-top: 0; border-left: 1px solid var(--rule); }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { background-size: 100% 36px; }
  .header-inner, .home-main, .article-shell, .footer-inner { width: min(100% - 2rem, var(--max)); }
  .standard-page { width: min(100% - 2rem, 820px); }
  .header-inner { min-height: 68px; gap: .7rem; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: .76rem; letter-spacing: .1em; }
  .brand-sub { font-size: .5rem; }
  .cover-copy { padding: 3.2rem 1.15rem 3rem; }
  .cover h1 { font-size: clamp(3rem, 17vw, 4.7rem); }
  .cover-folio { padding: 2.2rem 1.15rem; }
  .registry { padding: 3rem 1.15rem; }
  .registry-aside { padding: 2rem 1.15rem; }
  .case-row { grid-template-columns: 42px minmax(0, 1fr) 18px; gap: .55rem; }
  .case-desc { display: none; }
  .article-shell { padding-top: 2rem; }
  .article-hero h1 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .article-content { font-size: 1rem; line-height: 1.78; }
  .article-content h2 { font-size: 1.55rem; }
  .tabla-senal, .article-content table { display: block; overflow-x: auto; }
  .footer-inner { grid-template-columns: 1fr; align-items: start; }
  .footer-links { justify-content: flex-start; }
}

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