/* ============================================================
   quecome.org · diccionario de alimentación animal
   Sistema de diseño: "Cuaderno de naturalista moderno"
   - Paleta: hueso + tinta azul · verde botella + azafrán
   - Tipografía: Fraunces (display) · Source Serif 4 (prosa) ·
                 Inter (UI/meta)
   - Soporta light/dark · prefers-reduced-motion
   ============================================================ */

/* ----------------------------------------------------------------
   1. Tokens
---------------------------------------------------------------- */

:root {
  /* Paleta (light) - OKLCH para control fino de luminancia y saturación */
  --bg:           oklch(97.8% 0.012 85);    /* hueso cálido, casi papel */
  --bg-soft:      oklch(95% 0.018 80);      /* superficies elevadas */
  --bg-tint:      oklch(92.5% 0.024 78);    /* tarjetas destacadas */
  --bg-deep:      oklch(88% 0.028 75);      /* bordes y separadores */
  --bg-line:      oklch(85% 0.025 75);      /* divisores marcados */

  --ink:          oklch(20% 0.03 230);      /* tinta azul profunda, no negro */
  --ink-soft:     oklch(36% 0.025 230);     /* texto secundario */
  --ink-mute:     oklch(54% 0.018 230);     /* meta y captions */
  --ink-dim:      oklch(68% 0.012 230);     /* placeholder */

  --brand:        oklch(40% 0.085 175);     /* verde botella · brand */
  --brand-strong: oklch(32% 0.075 175);     /* hover / active */
  --brand-soft:   oklch(94% 0.03 175);      /* fondo brand sutil */
  --brand-tint:   oklch(86% 0.045 175);     /* badges brand */

  --accent:       oklch(72% 0.155 78);      /* azafrán · highlight */
  --accent-deep:  oklch(58% 0.16 55);       /* coral-amber · CTA hover */
  --accent-soft:  oklch(94% 0.04 75);       /* fondo amarillo sutil */

  --berry:        oklch(48% 0.16 18);       /* coral oscuro · raro, énfasis */
  --leaf:         oklch(48% 0.12 145);      /* verde hoja · semántico */

  --good:         oklch(50% 0.12 150);
  --warn:         oklch(58% 0.16 60);
  --bad:          oklch(50% 0.18 25);

  /* Tipografía */
  --font-display: "Fraunces", "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-prose:   "Source Serif 4", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --font-ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Escala 1.25 (modular minor third) con clamp fluido */
  --fs-xs:    clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --fs-sm:    clamp(0.86rem, 0.82rem + 0.2vw, 0.94rem);
  --fs-base:  clamp(1rem, 0.96rem + 0.25vw, 1.1rem);
  --fs-md:    clamp(1.12rem, 1.06rem + 0.3vw, 1.25rem);
  --fs-lg:    clamp(1.3rem, 1.18rem + 0.6vw, 1.55rem);
  --fs-xl:    clamp(1.6rem, 1.4rem + 1vw, 2rem);
  --fs-2xl:   clamp(2rem, 1.6rem + 2vw, 2.8rem);
  --fs-3xl:   clamp(2.6rem, 2rem + 3vw, 3.8rem);
  --fs-4xl:   clamp(3rem, 2.2rem + 4.5vw, 5rem);

  /* Ritmo 8pt (excepto el 4 inicial para micro) */
  --s-1:  0.25rem;  /*  4 */
  --s-2:  0.5rem;   /*  8 */
  --s-3:  0.75rem;  /* 12 */
  --s-4:  1rem;     /* 16 */
  --s-5:  1.5rem;   /* 24 */
  --s-6:  2rem;     /* 32 */
  --s-7:  3rem;     /* 48 */
  --s-8:  4rem;     /* 64 */
  --s-9:  6rem;     /* 96 */
  --s-10: 8rem;     /* 128 */

  /* Layout */
  --container-max:   72rem;
  --container-prose: 42rem;
  --container-wide:  84rem;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px oklch(20% 0.03 230 / 0.05);
  --shadow-sm: 0 2px 6px oklch(20% 0.03 230 / 0.06), 0 1px 2px oklch(20% 0.03 230 / 0.04);
  --shadow-md: 0 8px 24px oklch(20% 0.03 230 / 0.08), 0 2px 6px oklch(20% 0.03 230 / 0.04);
  --shadow-lg: 0 18px 50px oklch(20% 0.03 230 / 0.12), 0 4px 12px oklch(20% 0.03 230 / 0.06);

  --ring:        0 0 0 3px oklch(72% 0.155 78 / 0.45);
  --ring-strong: 0 0 0 3px oklch(40% 0.085 175 / 0.55);

  --t-fast:   120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   320ms cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 64px;
  --z-header: 50;
  --z-drawer: 60;
  --z-toast:  80;
}

/* Dark mode (auto, sin toggle) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           oklch(15.5% 0.02 235);
    --bg-soft:      oklch(19% 0.022 235);
    --bg-tint:      oklch(23% 0.025 235);
    --bg-deep:      oklch(28% 0.028 235);
    --bg-line:      oklch(34% 0.028 235);

    --ink:          oklch(96% 0.012 85);
    --ink-soft:     oklch(82% 0.012 85);
    --ink-mute:     oklch(64% 0.014 85);
    --ink-dim:      oklch(50% 0.016 85);

    --brand:        oklch(76% 0.1 175);
    --brand-strong: oklch(85% 0.1 175);
    --brand-soft:   oklch(28% 0.05 175);
    --brand-tint:   oklch(34% 0.06 175);

    --accent:       oklch(82% 0.16 78);
    --accent-deep:  oklch(75% 0.18 60);
    --accent-soft:  oklch(28% 0.06 75);

    --berry:        oklch(72% 0.18 22);
    --leaf:         oklch(75% 0.13 145);

    --shadow-xs: 0 1px 2px oklch(0% 0 0 / 0.4);
    --shadow-sm: 0 2px 6px oklch(0% 0 0 / 0.45), 0 1px 2px oklch(0% 0 0 / 0.35);
    --shadow-md: 0 10px 28px oklch(0% 0 0 / 0.55), 0 2px 6px oklch(0% 0 0 / 0.35);
    --shadow-lg: 0 20px 60px oklch(0% 0 0 / 0.6),  0 4px 12px oklch(0% 0 0 / 0.4);

    --ring:        0 0 0 3px oklch(82% 0.16 78 / 0.5);
    --ring-strong: 0 0 0 3px oklch(76% 0.1 175 / 0.55);
  }
}

/* ----------------------------------------------------------------
   2. Reset moderno
---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt", "onum";
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: clip;
}

/* Patrón de fondo sutil tipo papel - solo light mode */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(oklch(20% 0.03 230 / 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}
@media (prefers-color-scheme: dark) {
  body::before { display: none; }
}

img, picture, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}
svg { fill: currentColor; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: oklch(from var(--brand) l c h / 0.35);
  text-underline-offset: 0.2em;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
a:hover {
  color: var(--brand-strong);
  text-decoration-color: currentColor;
}

:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
  transition: box-shadow var(--t-fast);
}

::selection {
  background: var(--accent);
  color: oklch(20% 0.03 230);
}

hr {
  border: 0;
  height: 1px;
  background: var(--bg-deep);
  margin-block: var(--s-6);
}

/* ----------------------------------------------------------------
   3. Tipografía
---------------------------------------------------------------- */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
h2 { font-size: var(--fs-2xl); font-variation-settings: "opsz" 80, "SOFT" 40; }
h3 { font-size: var(--fs-xl); font-variation-settings: "opsz" 36, "SOFT" 50; }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p { text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

small { font-size: var(--fs-sm); color: var(--ink-mute); }

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-feature-settings: "kern", "liga" 0;
}
code {
  background: var(--bg-soft);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--bg-deep);
}

/* ----------------------------------------------------------------
   4. Layout / Containers
---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container-prose {
  width: 100%;
  max-width: var(--container-prose);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

main { display: block; min-height: 60dvh; }

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.section + .section { border-top: 1px solid var(--bg-deep); }

.section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--bg-deep);
}
.section__heading h2 {
  margin: 0;
  font-size: var(--fs-xl);
  letter-spacing: -0.022em;
}
.section__heading__more {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: color var(--t-fast), gap var(--t-fast);
}
a.section__heading__more::after { content: "→"; transition: transform var(--t-fast); }
a.section__heading__more:hover { color: var(--brand); gap: 0.6rem; }

/* ----------------------------------------------------------------
   5. Skip link
---------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transform: translateY(-110%);
  transition: transform var(--t-base);
}
.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--ring);
}

/* ----------------------------------------------------------------
   6. Header
---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.is-scrolled {
  border-bottom-color: var(--bg-deep);
  background: oklch(from var(--bg) l c h / 0.92);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: var(--header-h);
  padding-block: 0.6rem;
}

/* Marca reutilizable (header + footer) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  line-height: 1;
  font-variation-settings: "opsz" 60, "SOFT" 40;
  transition: color var(--t-fast);
}
.brand:hover { color: var(--brand); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--brand);
  color: oklch(98% 0.012 85);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  font-variation-settings: "opsz" 144;
  flex-shrink: 0;
}
.brand-text { display: inline-flex; align-items: baseline; }
.brand-dot {
  width: 4px; height: 4px;
  background: var(--ink-mute);
  border-radius: 50%;
  margin-inline: 3px;
  align-self: end;
  margin-bottom: 0.3rem;
  opacity: 0.7;
}

.site-header__brand { /* compatibilidad legacy */ }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: var(--s-1);
  align-items: center;
  font-family: var(--font-ui);
}
.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.site-nav a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
}

.site-nav__toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--bg-deep);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.site-nav__toggle:hover { background: var(--bg-soft); }
.site-nav__toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
}
.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after,
.site-nav__toggle-icon span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--t-base), opacity var(--t-fast), top var(--t-base);
}
.site-nav__toggle-icon::before { top: 0; }
.site-nav__toggle-icon span { top: 5px; }
.site-nav__toggle-icon::after { top: 10px; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::before {
  top: 5px; transform: rotate(45deg);
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon span { opacity: 0; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::after {
  top: 5px; transform: rotate(-45deg);
}

@media (max-width: 880px) {
  .site-nav__toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: var(--z-drawer);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem clamp(1rem, 4vw, 2rem) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--bg-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-base), opacity var(--t-base), visibility 0s linear var(--t-base);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--t-base), opacity var(--t-base), visibility 0s;
  }
  .site-nav a {
    padding: 0.95rem 0.75rem;
    font-size: 1.05rem;
    border-radius: 0;
    border-bottom: 1px solid var(--bg-deep);
  }
  .site-nav a:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav, .site-nav__toggle-icon::before, .site-nav__toggle-icon::after, .site-nav__toggle-icon span {
    transition: none;
  }
}

body.has-drawer-open { overflow: hidden; }

/* ----------------------------------------------------------------
   7. Hero (home)
---------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -5% auto auto;
  width: min(60vw, 36rem);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 70% 30%, oklch(from var(--accent) l c h / 0.22), transparent 60%),
    radial-gradient(circle at 30% 70%, oklch(from var(--brand) l c h / 0.18), transparent 65%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--bg-deep), transparent);
}
@media (prefers-color-scheme: dark) {
  .hero::before {
    background:
      radial-gradient(circle at 70% 30%, oklch(from var(--accent) l c h / 0.18), transparent 60%),
      radial-gradient(circle at 30% 70%, oklch(from var(--brand) l c h / 0.18), transparent 65%);
  }
}

.hero__eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.hero__eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--brand);
}

.hero__title {
  margin: 0 0 var(--s-4);
  max-width: 18ch;
  font-size: var(--fs-4xl);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 25;
}
.hero__title em {
  font-style: italic;
  color: var(--brand);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 var(--s-6);
  line-height: 1.55;
}

.hero__count {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.05rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  margin-bottom: var(--s-5);
}
.hero__count strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 700;
  font-variation-settings: "opsz" 80;
}
.hero__count span:first-of-type::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  margin-right: 0.55rem;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero__count span:first-of-type::before { animation: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.hero__search {
  max-width: 38rem;
  display: flex;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.hero__search:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-md), var(--ring-strong);
}
.hero__search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-prose);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  padding: 0.55rem 0;
  min-height: 44px;
}
.hero__search input::placeholder { color: var(--ink-dim); }
.hero__search button {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  min-height: 44px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.hero__search button:hover { background: var(--brand); }
.hero__search button:active { transform: scale(0.97); }

/* ----------------------------------------------------------------
   8. Taxonomías (clases)
---------------------------------------------------------------- */

.taxonomia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--s-4);
}
.taxonomia-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), background var(--t-base);
}
.taxonomia-item::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.taxonomia-item:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: var(--bg);
}
.taxonomia-item:hover::before { transform: scaleX(1); }
.taxonomia-item__num {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.taxonomia-item__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 60;
}
.taxonomia-item__meta {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  line-height: 1.45;
}

/* ----------------------------------------------------------------
   9. Featured grid (editorial asimétrico)
---------------------------------------------------------------- */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--s-4);
}
@media (max-width: 880px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .featured-grid { grid-template-columns: 1fr; }
}
.featured-grid > a:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
@media (max-width: 880px) {
  .featured-grid > a:first-child { grid-column: 1 / -1; grid-row: auto; }
}

.featured {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.featured:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.featured__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-tint);
}
.featured__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.featured:hover .featured__img img { transform: scale(1.04); }

.featured__body {
  padding: 1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.featured__cat {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
  font-weight: 600;
}
.featured__title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  font-size: var(--fs-md);
  letter-spacing: -0.018em;
  color: var(--ink);
  font-variation-settings: "opsz" 60;
}
.featured-grid > a:first-child .featured__title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-variation-settings: "opsz" 120;
}
.featured-grid > a:first-child .featured__img { aspect-ratio: 4/3; }

@media (prefers-reduced-motion: reduce) {
  .featured, .featured__img img { transition: none; }
  .featured:hover { transform: none; }
  .featured:hover .featured__img img { transform: none; }
}

/* ----------------------------------------------------------------
   10. Habitats (lista numerada editorial)
---------------------------------------------------------------- */

.habitats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--bg-deep);
  border-left: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  overflow: hidden;
  counter-reset: habitat;
  background: var(--bg-soft);
}
.habitat {
  counter-increment: habitat;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.3rem 1.2rem;
  border-right: 1px solid var(--bg-deep);
  border-bottom: 1px solid var(--bg-deep);
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: background var(--t-fast), color var(--t-fast);
}
.habitat:hover {
  background: var(--bg);
  color: var(--brand);
}
.habitat::before {
  content: counter(habitat, decimal-leading-zero);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  min-width: 1.6rem;
}
.habitat__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* ----------------------------------------------------------------
   11. Comparativas / rankings
---------------------------------------------------------------- */

.comparativas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .comparativas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .comparativas-grid { grid-template-columns: repeat(3, 1fr); }
}
.comparativa-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--t-base), border-color var(--t-base), background var(--t-base);
}
.comparativa-card::after {
  content: "";
  position: absolute;
  top: 1.5rem; right: 1.4rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--bg-deep);
  background:
    linear-gradient(45deg, transparent 47%, currentColor 47%, currentColor 53%, transparent 53%),
    linear-gradient(135deg, transparent 47%, currentColor 47%, currentColor 53%, transparent 53%);
  background-size: 50% 50%;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--ink-mute);
  opacity: 0.4;
  transition: transform var(--t-base), opacity var(--t-base), color var(--t-base);
}
.comparativa-card:hover {
  background: var(--bg);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.comparativa-card:hover::after {
  opacity: 1;
  color: var(--brand);
  transform: translate(2px, -2px);
}
.comparativa-card__kicker {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.comparativa-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0;
  padding-right: 2.5rem;
  font-variation-settings: "opsz" 36;
}
.comparativa-card__cta {
  margin-top: auto;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------
   12. Guías (cards)
---------------------------------------------------------------- */

.guias-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .guias-grid { grid-template-columns: repeat(2, 1fr); }
}
.guia-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.8rem 1.6rem 1.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), background var(--t-base);
}
.guia-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-base);
}
.guia-card:hover {
  background: var(--bg);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.guia-card:hover::before { transform: scaleY(1); }
.guia-card__kicker {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.guia-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0;
  font-variation-settings: "opsz" 60;
}
.guia-card__meta {
  margin: 0.2rem 0 0.8rem;
  font-size: var(--fs-base);
  color: var(--ink-soft);
  line-height: 1.5;
}
.guia-card__cta {
  margin-top: auto;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.guia-card:hover .guia-card__cta { color: var(--brand); }

/* ----------------------------------------------------------------
   13. Post / artículo
---------------------------------------------------------------- */

.post-header {
  padding-block: clamp(2rem, 5vw, 3.5rem) var(--s-5);
}
.breadcrumb {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  letter-spacing: 0.01em;
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb__sep {
  color: var(--ink-dim);
  font-weight: 400;
}

.post-title {
  margin: 0 0 var(--s-3);
  max-width: 24ch;
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.post-meta {
  font-family: var(--font-ui);
  color: var(--ink-mute);
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--s-2);
}
.post-meta__tag {
  display: inline-flex;
  align-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.post-hero {
  margin: var(--s-5) 0 var(--s-7);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.post-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.post-content {
  max-width: var(--container-prose);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--ink-soft);
}
.post-content > * + * { margin-top: var(--s-4); }

.post-content h2 {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--bg-deep);
  font-size: var(--fs-2xl);
  letter-spacing: -0.025em;
  color: var(--ink);
  position: relative;
}
.post-content h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 3rem;
  height: 1px;
  background: var(--brand);
}
.post-content h3 {
  margin-top: var(--s-6);
  font-size: var(--fs-xl);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.post-content h4 {
  margin-top: var(--s-5);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink);
  letter-spacing: -0.005em;
}

.post-content p { color: var(--ink); }
.post-content p strong { color: var(--ink); font-weight: 600; }

.post-content ul, .post-content ol {
  padding-left: 1.6rem;
  color: var(--ink);
}
.post-content li { margin-top: 0.4rem; }
.post-content li::marker { color: var(--brand); }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--s-6);
  font-size: 0.95rem;
  font-family: var(--font-ui);
}
.post-content th, .post-content td {
  border-bottom: 1px solid var(--bg-deep);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}
.post-content th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-soft);
  color: var(--ink-mute);
  border-bottom-color: var(--bg-line);
}
.post-content tr:hover td { background: var(--bg-soft); }

.post-content blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.4rem 1.4rem;
  margin: var(--s-6) 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  font-variation-settings: "opsz" 60, "SOFT" 60;
}

.post-content figure {
  margin: var(--s-6) 0;
}
.post-content figcaption {
  margin-top: var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  text-align: center;
}

.post-content a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: oklch(from var(--brand) l c h / 0.4);
}
.post-content a:hover {
  color: var(--brand-strong);
  text-decoration-color: currentColor;
}

/* Drop cap inicial */
.post-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.4rem;
  float: left;
  line-height: 0.85;
  padding: 0.45rem 0.6rem 0 0;
  color: var(--brand);
  font-variation-settings: "opsz" 144, "SOFT" 25;
}

/* ----------------------------------------------------------------
   14. Ficha rápida
---------------------------------------------------------------- */

.ficha {
  margin: var(--s-6) 0 var(--s-7);
  padding: 1.5rem 1.7rem 1.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.ficha::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--brand), var(--accent));
}
.ficha__title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed var(--bg-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ficha__title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><rect width='8' height='4' x='8' y='2' rx='1' ry='1'/><path d='M9 12h6'/><path d='M9 16h6'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  color: var(--brand);
  opacity: 0.85;
}
.ficha__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem 1.8rem;
}
@media (min-width: 560px) {
  .ficha__list { grid-template-columns: 1fr 1fr; }
  .ficha__row--wide { grid-column: 1 / -1; }
}
.ficha__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding-block: 0.2rem;
}
.ficha__row dt {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.ficha__row dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36;
}
.ficha__row--wide dd {
  font-weight: 400;
  font-family: var(--font-prose);
  font-size: 0.98rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------
   15. FAQ
---------------------------------------------------------------- */

.faq {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--bg-deep);
}
.faq h2 { margin: 0 0 var(--s-4); }
.faq__item {
  border-bottom: 1px solid var(--bg-deep);
  padding-block: var(--s-4);
}
.faq__item:last-child { border-bottom: 0; }
.faq__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.faq__item p { margin: 0; color: var(--ink); }

/* ----------------------------------------------------------------
   16. Related posts
---------------------------------------------------------------- */

.related {
  margin: var(--s-8) 0 var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--bg-deep);
}
.related h2 {
  margin: 0 0 var(--s-5);
  font-size: var(--fs-xl);
  letter-spacing: -0.022em;
}
.related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .related__grid { grid-template-columns: repeat(2, 1fr); }
}
.related__card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.related__card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.related__thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-tint);
}
.related__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.related__card:hover .related__thumb img { transform: scale(1.04); }
.related__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.3rem 0.7rem;
  background: oklch(from var(--ink) l c h / 0.85);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.related__body {
  padding: 1rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.related__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}
.related__cta {
  margin-top: auto;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--t-fast), gap var(--t-fast);
}
.related__card:hover .related__cta {
  color: var(--brand);
  gap: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  .related__card, .related__thumb img { transition: none; }
  .related__card:hover { transform: none; }
  .related__card:hover .related__thumb img { transform: none; }
}

/* ----------------------------------------------------------------
   17. A-Z index
---------------------------------------------------------------- */

.az-index {
  columns: 3 18rem;
  column-gap: var(--s-6);
  margin-top: var(--s-4);
}
.az-index__group {
  break-inside: avoid;
  margin-bottom: var(--s-6);
  padding-bottom: 0.5rem;
}
.az-index__letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--brand);
  border-bottom: 2px solid var(--bg-deep);
  padding-bottom: 0.1rem;
  margin-bottom: 0.6rem;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.az-index__letter::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bg-deep);
  align-self: end;
  margin-bottom: 0.4rem;
}
.az-index__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.az-index__list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  display: block;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: background var(--t-fast), color var(--t-fast);
}
.az-index__list a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}

/* ----------------------------------------------------------------
   18. Ad slot
---------------------------------------------------------------- */

.ad-wrapper {
  margin: var(--s-6) 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px dashed var(--bg-deep);
  border-radius: var(--radius);
  color: var(--ink-mute);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .ad-wrapper { min-height: 250px; }
}
.ad-wrapper ins { display: block; width: 100%; }

/* ----------------------------------------------------------------
   19. Pillar header
---------------------------------------------------------------- */

.pillar-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--bg-deep);
}

/* ----------------------------------------------------------------
   20. Footer
---------------------------------------------------------------- */

.site-footer {
  margin-top: var(--s-9);
  padding: var(--s-7) 0 var(--s-5);
  background: var(--bg-soft);
  border-top: 1px solid var(--bg-deep);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.site-footer__brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--s-3);
}
.site-footer p { color: var(--ink-soft); margin: 0; line-height: 1.6; max-width: 36ch; }

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}
.site-footer a:hover { color: var(--brand); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--s-7) var(--s-6);
  margin-bottom: var(--s-6);
}
@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
  .site-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__col-title {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--bg-deep);
}
.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.site-footer__links a { font-size: var(--fs-sm); }

.site-footer__bottom {
  padding-top: var(--s-4);
  border-top: 1px solid var(--bg-deep);
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-family: var(--font-ui);
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ----------------------------------------------------------------
   21. Lede + utilidades
---------------------------------------------------------------- */

.lede {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 42rem;
  line-height: 1.55;
  font-family: var(--font-prose);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Botón base reutilizable */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  min-height: 44px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--brand); color: var(--bg); }
.btn--ghost { color: var(--ink); border-color: var(--bg-deep); background: transparent; }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink); }

/* ----------------------------------------------------------------
   22. 404
---------------------------------------------------------------- */

.error-404 {
  text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 6vw, 5rem);
}
.error-404__code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 0.85;
  margin: 0 0 var(--s-3);
  color: var(--brand);
  letter-spacing: -0.05em;
  font-variation-settings: "opsz" 144, "SOFT" 25;
}
.error-404__title { font-size: var(--fs-2xl); margin: 0 0 var(--s-3); }
.error-404 .lede { margin: 0 auto var(--s-6); max-width: 36rem; }
.error-404__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: var(--s-6) auto 0;
  max-width: 32rem;
  text-align: center;
}
.error-404__links a {
  display: block;
  padding: 0.7rem 0.9rem;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.error-404__links a:hover {
  background: var(--bg);
  border-color: var(--brand);
  color: var(--brand);
}

/* ----------------------------------------------------------------
   23. Páginas legales (estructura simple)
---------------------------------------------------------------- */

.legal-page {
  padding-block: var(--s-7) var(--s-8);
}
.legal-page h1 {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-2xl);
  letter-spacing: -0.025em;
}
.legal-page h2 {
  margin: var(--s-6) 0 var(--s-3);
  font-size: var(--fs-xl);
  padding-top: var(--s-4);
  border-top: 1px solid var(--bg-deep);
  letter-spacing: -0.018em;
}
.legal-page h3 {
  margin: var(--s-5) 0 var(--s-2);
  font-size: var(--fs-lg);
}
.legal-page p, .legal-page ul, .legal-page ol {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.legal-page p + p { margin-top: var(--s-3); }
.legal-page ul, .legal-page ol { margin: var(--s-3) 0 var(--s-3) 1.5rem; }
.legal-page li { margin-top: 0.4rem; }
.legal-page strong { color: var(--ink); }

.legal-page__updated {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-soft);
  border: 1px solid var(--bg-deep);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--s-5);
}

/* ----------------------------------------------------------------
   23b. Pillar children (índice completo de fichas de la clase)
---------------------------------------------------------------- */

.pillar-children {
  margin: var(--s-8) auto var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--bg-deep);
}
.pillar-children__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--ink);
  margin: 0 0 var(--s-5);
}
.pillar-children__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--s-1) var(--s-4);
}
.pillar-children__item { margin: 0; }
.pillar-children__item a {
  display: block;
  padding: var(--s-2) var(--s-3);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}
.pillar-children__item a:hover,
.pillar-children__item a:focus-visible {
  background: var(--bg-soft);
  color: var(--brand-strong);
}

/* ----------------------------------------------------------------
   24. Print
---------------------------------------------------------------- */


.trust-block {
  max-width: var(--container-prose);
  margin: var(--s-6) auto var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.trust-block p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  line-height: 1.5;
}
.trust-block a { color: var(--brand-strong); }

@media print {
  .site-header, .site-footer, .ad-wrapper, .related, .site-nav { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  body::before { display: none; }
  a { color: inherit; text-decoration: underline; }
  .post-content > p:first-of-type::first-letter { color: inherit; }
}
