/* --- Tipografía, autoalojada ----------------------------------------------
   Archivo es la misma familia con la que está compuesto el libro, y una de las
   alternativas libres a DIN. Autoalojarla quita dos conexiones a Google que
   bloqueaban el renderizado, y de paso deja de enviarles la IP del visitante.
   Archivo es variable: un solo archivo cubre de 400 a 700.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Black";
  src: url("/assets/fonts/archivo-black.woff2") format("woff2");
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   nestorverde.com · sistema de diseño
   Fondo claro editorial, acento verde militar #5F6B46, tipografía Archivo.
   ========================================================================== */

:root {
  --bg:        #0A0A0A;
  --surface:   #141414;
  --surface-2: #1B1B1B;
  --border:    #262626;
  --border-2:  #333333;
  --text:      #F5F5F5;
  --muted:     #A3A3A3;
  --accent:    #5F6B46;   /* verde militar kaki: solo como relleno */
  --accent-on: #FFFFFF;   /* texto encima del relleno de acento */
  --accent-ink:#A3AD80;   /* el acento cuando hace de texto */
  --header-bg: rgba(10, 10, 10, .88);
  --photo:     grayscale(100%) contrast(106%) brightness(.92);
  --cover-shadow: 0 24px 60px rgba(0, 0, 0, .45);

  --maxw:   1180px;
  --measure: 68ch;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(64px, 9vw, 120px);
  --header-h: 64px;

  --radius: 3px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Tema claro: gris muy claro, pensado para leer.
   El verde deja de usarse como texto (sobre claro da 1,05:1, ilegible) y pasa a
   ser solo relleno. Para texto se usa su versión oscura, que mantiene la marca. */
:root[data-theme="claro"] {
  --bg:        #FAFAF8;
  --surface:   #F3F3EF;
  --surface-2: #ECECE6;
  --border:    #E2E2DA;
  --border-2:  #CBCBC0;
  --text:      #14140F;
  --muted:     #57574E;
  --accent:    #5F6B46;
  --accent-on: #FFFFFF;
  --accent-ink:#45502F;
  --header-bg: rgba(250, 250, 248, .9);
  --photo:     grayscale(100%) contrast(104%) brightness(1.02);
  --cover-shadow: 0 18px 44px rgba(20, 20, 15, .14);
  --logo-opacity: .85;
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  padding-top: var(--header-h);  /* deja sitio al header fijo */
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: "Archivo Black", Archivo, system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p, ul, ol { margin: 0 0 1.15em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: inherit; }

strong { font-weight: 600; color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--accent); color: var(--accent-on); }

/* --- Utilidades ----------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); border-top: 1px solid var(--border); }
.section--plain { border-top: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
  flex: none;
}

.h1 { font-size: clamp(2.5rem, 1.25rem + 5.4vw, 5.25rem); letter-spacing: -0.04em; line-height: .95; }
.h2 { font-size: clamp(2rem, 1.35rem + 2.9vw, 3.4rem); letter-spacing: -0.032em; line-height: 1; }
.h3 { font-size: clamp(1.15rem, 1.05rem + 0.55vw, 1.45rem); letter-spacing: -0.022em; }

.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.42vw, 1.375rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: var(--measure);
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.muted { color: var(--muted); }
.mt-l { margin-top: clamp(2rem, 4vw, 3.25rem); }
.mt-m { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.section-head { margin-bottom: clamp(2rem, 4.5vw, 3.5rem); }
@media (min-width: 1000px) {
  .section-head {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 0 clamp(2rem, 4vw, 4rem);
    align-items: start;
  }
  .section-head .eyebrow { margin: .55rem 0 0; }
  .section-head .lead { grid-column: 2; }
}
.section-head .h2 + .lead { margin-top: 1.1rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
  padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* --- Botones y enlaces ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 1rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.btn--primary { background: var(--accent); color: var(--accent-on); }
.btn--primary:hover { background: #6E7A52; }

.btn--ghost { border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); background: var(--surface); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(1.8rem, 3.5vw, 2.5rem);
}

.link {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: border-color .18s var(--ease);
}
.link { opacity: 1; }
.link:hover { border-bottom-width: 2px; padding-bottom: 0; }

.link-arrow { display: inline-flex; align-items: baseline; gap: .45em; }
.link-arrow span[aria-hidden] { transition: transform .18s var(--ease); }
.link-arrow:hover span[aria-hidden] { transform: translateX(3px); }

/* --- Header --------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: .45em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.85rem); }

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { font-weight: 600; }

.nav .btn { padding: .65rem 1.15rem; font-size: .9375rem; color: var(--accent-on); }
.nav .btn:hover { color: var(--accent-on); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  padding: .55rem .9rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .5rem var(--gutter) 1.75rem;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav[hidden] { display: none; }
  .nav a {
    font-size: 1.125rem;
    padding: .95rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav .btn {
    margin-top: 1.5rem;
    border-bottom: 0;
    padding: 1rem 1.6rem;
    font-size: 1rem;
  }
}

/* --- Hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
}

/* El titular ocupa todo el ancho: a este tamaño necesita aire para respirar */
.hero__h1 { max-width: 19ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.hero .lead { margin-top: 0; }
.hero__photo { max-width: 340px; }

.hero__photo {
  position: relative;
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 380px;
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface);
  filter: var(--photo);
}

/* --- Rejillas de tarjetas ------------------------------------------------- */

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.card:hover { border-color: var(--border-2); background: var(--surface-2); }
.card:focus-within { border-color: var(--accent); }

.card p { color: var(--muted); font-size: .9875rem; line-height: 1.6; }
.card .h3 { letter-spacing: -0.015em; }

.card__link {
  margin-top: auto;
  padding-top: .5rem;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline: none; }

.card__tag {
  align-self: flex-start;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: .3rem .55rem;
  line-height: 1;
}

.card__eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__meta {
  font-size: .875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: .85rem;
  margin-top: auto;
}
.card__meta strong { color: var(--text); font-weight: 600; }

/* --- Mandatos ------------------------------------------------------------- */

.mandates {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.mandate { border-top: 2px solid var(--accent); padding-top: 1.35rem; }
.mandate__role {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}
.mandate__role span {
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: .6rem;
  vertical-align: middle;
}
.mandate p { margin-top: .75rem; color: var(--muted); }

/* --- Listas de contenido -------------------------------------------------- */

.list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.list li {
  position: relative;
  padding: 0 0 1rem 1.6rem;
  color: var(--muted);
}
.list li + li { border-top: 1px solid var(--border); padding-top: 1rem; }
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px; height: 7px;
  background: var(--accent);
}
.list li + li::before { top: calc(1rem + 0.68em); }
.list li strong { display: block; color: var(--text); font-weight: 600; margin-bottom: .2rem; }

.block { max-width: var(--measure); }
.block + .block { margin-top: clamp(2.25rem, 4.5vw, 3.25rem); }
.block .h3 { margin-bottom: 1rem; }

/* --- Trayectoria ---------------------------------------------------------- */

.track { border-top: 1px solid var(--border); }

.track__row {
  display: grid;
  gap: .4rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 820px) {
  .track__row { grid-template-columns: 13rem 1fr; align-items: baseline; }
}

.track__sector {
  margin: 0;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  line-height: 1.5;
}

.track__names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
  row-gap: .35rem;
  font-size: clamp(1rem, .96rem + .2vw, 1.15rem);
  line-height: 1.5;
}
.track__names li { white-space: nowrap; }
.track__names li + li::before {
  content: "·";
  color: var(--muted);
  margin: 0 .6em;
}

/* --- Ecosistema ----------------------------------------------------------- */

.ecosystem {
  border-top: 1px solid var(--border);
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  font-size: .875rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* --- Contacto ------------------------------------------------------------- */

.bigmail {
  display: inline-block;
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 0.9rem + 3.4vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  transition: border-color .2s var(--ease);
}
.bigmail:hover { border-bottom-width: 3px; }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}
.contact-links dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.contact-links dd { margin: 0; }

/* --- CTA final ------------------------------------------------------------ */

.cta { border-top: 1px solid var(--border); background: var(--surface); }
.cta__inner { padding-block: var(--section); }
.cta .h2 { max-width: 20ch; }
.cta p { margin-top: 1.2rem; max-width: var(--measure); color: var(--muted); }

/* --- Artículo / caso ------------------------------------------------------ */

.page-head { padding-block: clamp(2.25rem, 5vw, 4.5rem) 0; }
.page-head .lead { margin-top: clamp(1.3rem, 2.5vw, 1.9rem); }

.meta-line {
  margin-top: 1.5rem;
  font-size: .9375rem;
  color: var(--muted);
}
.meta-line strong { color: var(--text); font-weight: 600; }

.article { max-width: var(--measure); }
.article h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: .9rem;
}
.article h2:first-child { margin-top: 0; }
.article p { color: var(--muted); }
.article ul { padding-left: 1.2rem; color: var(--muted); }
.article li { margin-bottom: .5rem; }

/* --- Footer --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  font-size: .9375rem;
  color: var(--muted);
}
.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.footer__name { font-weight: 900; font-size: 1.25rem; color: var(--text); letter-spacing: -0.015em; }
.footer__name + p { margin-top: .5rem; max-width: 32ch; }
.footer__about { color: var(--text); border-bottom: 1px solid var(--border-2); padding-bottom: 1px; }
.footer__about:hover { color: var(--accent-ink); }
.footer h2 {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9rem;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: .5rem; }
.footer a { color: var(--muted); text-decoration: none; transition: color .18s var(--ease); }
.footer a:hover { color: var(--accent-ink); }
.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
}

/* --- 404 ------------------------------------------------------------------ */

.center-page {
  min-height: calc(100dvh - var(--header-h) - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 10vw, 8rem);
}

/* --- Fade-in -------------------------------------------------------------- */

/* Sin JS el contenido se muestra siempre: la ocultación la activa la clase .js */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

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

@media print {
  .header, .nav-toggle, .cta { display: none; }
  body { background: #fff; color: #000; }
}

/* --- Página del libro ----------------------------------------------------- */

.book-hero {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .book-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}

.book-cover {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 400px;
  justify-self: center;
  box-shadow: var(--cover-shadow);
}
.book-cover img { width: 100%; height: auto; }

/* Índice de bloques */
.toc {
  list-style: none;
  counter-reset: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  max-width: 44rem;
}
.toc li {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--border);
}
.toc__n {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: .8125rem;
  letter-spacing: .04em;
  color: var(--accent-ink);
}
.toc__t { font-weight: 600; font-size: 1.0625rem; }
.toc__c { font-size: .8125rem; color: var(--muted); white-space: nowrap; }

/* Reglas negras */
.rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: clamp(1rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.rules li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.9rem);
}
.rules__q {
  font-size: 1.0625rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.rules__s {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pullquote {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-block: 1.75rem;
}

/* Ficha del libro */
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--border); max-width: 34rem; }
.facts > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.facts dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .2rem;
}
.facts dd { margin: 0; }
@media (max-width: 520px) {
  .facts > div { grid-template-columns: 1fr; gap: .25rem; }
}

.hero__note {
  margin-top: 1.25rem;
  font-size: .9375rem;
  color: var(--muted);
}

/* --- Situaciones ---------------------------------------------------------- */

.idx { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.idx ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.idx li { border-bottom: 1px solid var(--border); }
.idx a {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  transition: color .18s var(--ease);
}
.idx a:hover { color: var(--accent-ink); }
.idx__n { color: var(--accent-ink); font-size: .8125rem; letter-spacing: .04em; min-width: 1.9rem; }

.sit {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.sit:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.sit__n {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 .9rem;
}
.sit .h2 { max-width: 20ch; margin-bottom: 1.75rem; }
.sit .article h2:first-child { margin-top: 0; }
.sit__regla {
  max-width: var(--measure);
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1.5;
}
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .75rem; padding-left: .3rem; }

.sit .article h3 {
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  margin-top: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: .85rem;
}
.sit .article h3:first-child { margin-top: 0; }

/* --- Las 37 reglas -------------------------------------------------------- */
/* Más carácter tipográfico que el resto del sitio, pero la medida de lectura
   y el contraste mandan: esto se va a leer entero desde el móvil. */

.reglas-head {
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}

.reglas-h1 {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 1.1rem + 7vw, 6.5rem);
  line-height: .92;
  letter-spacing: -0.045em;
  margin: 0 0 clamp(1.4rem, 3vw, 2rem);
  text-wrap: balance;
}
.reglas-h1 em {
  font-style: normal;
  color: var(--accent-ink);
}

.reglas-wrap { padding-block: clamp(2rem, 5vw, 4rem) 0; }

.bloque {
  display: grid;
  gap: 0 clamp(2rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 900px) {
  /* Columna de título fija a la izquierda: la lectura no se ensancha. */
  .bloque { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
  .bloque__t { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.bloque__t {
  margin: 0 0 1.5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  line-height: 1.6;
}

.reglas { list-style: none; margin: 0; padding: 0; }

.regla {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 1rem;
  padding-block: clamp(1.5rem, 3vw, 2rem);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.regla + .regla { border-top: 1px solid var(--border); }

.regla__n {
  grid-row: span 2;
  margin: 0;
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--border-2);
  font-variant-numeric: tabular-nums;
  transition: color .2s var(--ease);
}
.regla:hover .regla__n, .regla:target .regla__n { color: var(--accent); }

.regla__t {
  margin: 0 0 .5rem;
  font-size: clamp(1.1rem, 1.02rem + .45vw, 1.4rem);
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.regla__x {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.6;
}
.regla:target .regla__t { color: var(--accent-ink); }

@media (max-width: 560px) {
  .regla { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0 .75rem; }
  .regla__n { font-size: 1.35rem; padding-top: .15rem; }
}

/* Numeración de las tarjetas de formato, como grafismo de fondo */
.card--num::before {
  content: attr(data-n);
  position: absolute;
  top: clamp(1.1rem, 2.4vw, 1.5rem);
  right: clamp(1.1rem, 2.4vw, 1.5rem);
  font-family: "Archivo Black", Archivo, sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--border-2);
  font-variant-numeric: tabular-nums;
  transition: color .2s var(--ease);
  pointer-events: none;
}
.card--num:hover::before { color: var(--accent); }
.card--num .h3 { padding-right: 3rem; }
