/* ─────────────────────────────────────────────────────────────
   Mi Traspaso Ya — Blog
   Tokens tomados de src/index.css para que el blog y la app
   se vean como el mismo producto. Los ratios de contraste
   anotados allí ya están verificados; no cambiar a ojo.
   ───────────────────────────────────────────────────────────── */

:root {
  --navy:        #0D1B2A;
  --emerald:     #17C398;
  --lime:        #7ED957;
  --deep-teal:   #114B5F;

  --bg:          #F2F4F7;
  --surface:     #FFFFFF;
  --surface-2:   #E8ECF1;
  --text:        #0D1B2A;   /* 17.39:1 */
  --text-2:      #46536B;   /*  7.75:1 */
  --muted:       #5A6472;   /*  6.00:1 */
  --brand-text:  #0D6E57;   /*  6.20:1 — verde legible como texto */
  --on-brand:    #0D1B2A;
  --border:      #E2E8F0;
  --code-bg:     #E8ECF1;

  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  --font-heading: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-ui:      'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, monospace;
}

html.dark {
  --bg:          #0D1B2A;
  --surface:     #112233;
  --surface-2:   #1A2D42;
  --text:        #F2F4F7;
  --text-2:      #B6C2D1;   /*  8.94:1 */
  --muted:       #9FB0C4;   /*  7.29:1 */
  --brand-text:  #6EE7B7;   /* 10.59:1 */
  --on-brand:    #0D1B2A;
  --border:      #1E3A50;
  --code-bg:     #0A1724;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 68ch; }

a { color: var(--brand-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--emerald); }
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 4px; }

/* ── Barra superior ──────────────────────────────────────── */
.topline { height: 3px; background: linear-gradient(90deg, #114B5F 0%, #17C398 50%, #7ED957 100%); }

/* Cabecera: mismas proporciones que la de la app (Layout.tsx).
   Alto 64px (h-16), fondo surface-container, sombra, isotipo 34px con
   separacion de 12px y bloque de marca en dos lineas. Antes media 62px,
   iba sobre --surface y, sobre todo, usaba .wrap (760px) mientras el
   contenido usa .wrap-wide (1140px): el logo quedaba desalineado
   respecto a las tarjetas. */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: 0 4px 6px -1px rgba(13, 27, 42, .08), 0 2px 4px -2px rgba(13, 27, 42, .06);
  position: sticky; top: 0; z-index: 40;
}
html.dark .site-header { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .35); }
.site-header .wrap-wide {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--text); text-decoration: none; min-width: 0;
}
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 10px; display: block; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--font-heading); font-weight: 900; font-size: 16px;
  letter-spacing: -.02em; line-height: 1.15; white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--brand-text); }
.brand-tag {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--muted); line-height: 1.4;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Mismo escalonado que la app: el eslogan aparece en sm, el wordmark en 375px. */
@media (max-width: 639px) { .brand-tag { display: none; } }
@media (max-width: 374px) { .brand-name { display: none; } }
@media (min-width: 640px) {
  .brand-name { font-size: 18px; }
  .header-actions { gap: 16px; }
}

/* Enlace de salto: primer foco tabulable de la pagina. */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--emerald); color: #0D1B2A; font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: var(--radius-md); text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: #0D1B2A; }
.btn-cta {
  font-family: var(--font-heading); font-weight: 600; font-size: 13.5px;
  background: var(--emerald); color: var(--on-brand);
  padding: 9px 16px; border-radius: var(--radius-md); text-decoration: none;
  transition: background .2s ease;
}
.btn-cta:hover { background: var(--lime); color: var(--on-brand); }
/* Botón de tema — replica ThemeToggle.tsx de la app: redondo, iconos Sun/Moon
   de lucide que se deslizan en vertical con crossfade. Mismo contrato de
   almacenamiento (mtl_theme) y misma clase .dark en <html>. */
.theme-btn {
  position: relative; width: 36px; height: 36px; padding: 8px;
  border-radius: 9999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 1px 2px rgba(13, 27, 42, .06);
  overflow: hidden; cursor: pointer; display: grid; place-items: center;
  transition: transform .2s ease, border-color .2s ease;
}
.theme-btn:hover { transform: scale(1.05); border-color: var(--emerald); }
.theme-btn:active { transform: scale(.95); }
.tt-icon {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--brand-text);
  transition: transform .3s ease, opacity .3s ease;
}
.tt-sun  { transform: translateY(0);     opacity: 1; }
.tt-moon { transform: translateY(30px);  opacity: 0; }
html.dark .tt-sun  { transform: translateY(-30px); opacity: 0; }
html.dark .tt-moon { transform: translateY(0);     opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .theme-btn, .tt-icon { transition: none; }
}

/* ── Tipografía editorial ────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5.2vw, 44px); line-height: 1.12; font-weight: 700; margin: 0 0 18px; }
h2 { font-size: clamp(21px, 3.2vw, 27px); line-height: 1.25; font-weight: 700; margin: 48px 0 14px; }
h3 { font-size: 18.5px; font-weight: 600; margin: 32px 0 10px; }
p  { margin: 0 0 20px; }
ul, ol { margin: 0 0 20px; padding-left: 22px; }
li { margin-bottom: 9px; }
strong { font-weight: 600; }

code { font-family: var(--font-mono); font-size: .87em; background: var(--code-bg);
  padding: .14em .4em; border-radius: 5px; color: var(--text-2); }

/* ── Cita de norma ───────────────────────────────────────── */
blockquote.norma {
  margin: 26px 0; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--emerald); border-radius: var(--radius-md);
  font-size: 16px; color: var(--text-2);
}
blockquote.norma p { margin: 0 0 12px; }
blockquote.norma p:last-child { margin: 0; }
blockquote.norma cite {
  display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 12.5px; color: var(--muted); margin-top: 4px;
}

/* ── Aviso ───────────────────────────────────────────────── */
.aviso {
  margin: 26px 0; padding: 18px 20px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--deep-teal); font-size: 15.5px; color: var(--text-2);
}
html.dark .aviso { border-left-color: var(--emerald); }
.aviso p:last-child { margin: 0; }
.aviso .aviso-label {
  display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 7px;
}

/* ── Caja de producto ────────────────────────────────────── */
.producto {
  margin: 40px 0; padding: 26px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--border);
}
.producto h2 { margin: 0 0 12px; font-size: 20px; }
.producto p { font-size: 16px; color: var(--text-2); }
.producto .btn-cta { display: inline-block; margin-top: 6px; font-size: 15px; padding: 11px 20px; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 20px 0 0; }
.faq details { background: var(--surface); }
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 16px;
  font-family: var(--font-heading); list-style: none; display: flex;
  align-items: baseline; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-text); font-size: 19px; font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 20px 18px; color: var(--text-2); font-size: 15.5px; }
.faq details > div p:last-child { margin: 0; }

/* ── Fuentes y descargo ──────────────────────────────────── */
.fuentes { margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border); }
.fuentes h2 { font-size: 17px; margin: 0 0 14px; }
.fuentes ol { font-size: 14.5px; color: var(--text-2); }
.fuentes li { margin-bottom: 11px; }
.fuentes .fecha { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

.descargo {
  margin-top: 30px; padding: 18px 20px; border-radius: var(--radius-md);
  background: var(--surface-2); font-size: 14px; color: var(--muted); line-height: 1.65;
}

/* ── Pie ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--border);
  background: var(--surface); padding: 34px 0;
  font-size: 14px; color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand-text); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .producto { padding: 22px; }
}

/* ── Datos clave (bloque citable por motores de respuesta) ──────────────
   Cada dato es una frase autocontenida con su fuente inmediatamente
   debajo, para que se pueda citar sin arrastrar el resto del artículo. */
.datos-clave {
  margin: 0 0 34px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--emerald); border-radius: var(--radius-lg);
}
.datos-clave h2 {
  margin: 0 0 14px; font-size: 12px; font-family: var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text);
}
.datos-clave dl { margin: 0; display: grid; gap: 14px; }
.datos-clave dt {
  font-weight: 600; font-size: 15.5px; color: var(--text); line-height: 1.55;
}
.datos-clave dd {
  margin: 3px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}

/* ── Seguir leyendo ────────────────────────────────────────────────── */
.relacionados { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border); }
.relacionados h2 { font-size: 17px; margin: 0 0 14px; }
.relacionados ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.relacionados li a {
  display: block; padding: 14px 18px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 15.5px;
  transition: border-color .2s ease, color .2s ease;
}
.relacionados li a:hover { border-color: var(--emerald); color: var(--brand-text); }

/* ── Clústeres del listado ─────────────────────────────────────────── */
.cluster { padding-top: 40px; }
.cluster > h2 {
  margin: 0 0 4px; font-size: 13px; font-family: var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text);
}
.cluster-note { margin: 0 0 4px; color: var(--muted); font-size: 15px; max-width: 60ch; }
.cluster .post-list { padding-top: 18px; }

/* Listas dentro del cuerpo: un poco más de aire entre puntos largos */
.prose ol > li { margin-bottom: 12px; }


/* ── Figuras: capturas y diagramas ─────────────────────────────────────
   Las capturas son de la app real; los diagramas son SVG inline para que
   respondan al tema y no pesen. Ambos van en <figure> con pie visible. */
.figura { margin: 34px 0; }
.figura img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.figura figcaption {
  margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.55;
}
.figura-svg .svg-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 18px; overflow-x: auto;
}
.figura-svg svg { display: block; width: 100%; height: auto; min-width: 460px; }

/* Colores del diagrama, tomados de los tokens para que sigan al tema */
.dg-bg      { fill: var(--surface); }
.dg-box     { fill: var(--surface-2); stroke: var(--border); }
.dg-key     { fill: rgba(23,195,152,.14); stroke: var(--emerald); }
.dg-line    { stroke: var(--border); }
.dg-accent  { stroke: var(--emerald); }
.dg-label   { fill: var(--text-2); font-family: var(--font-ui); font-size: 11px; }
.dg-title   { fill: var(--text); font-family: var(--font-heading); font-size: 12.5px; font-weight: 600; }
.dg-num     { fill: var(--brand-text); font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; }
.dg-muted   { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; }


/* ═══════════════════════════════════════════════════════════════════════
   REDISEÑO — banda oscura de entrada, chips por tema, barra lateral fija
   ═══════════════════════════════════════════════════════════════════════ */

/* Mismo contenedor que la app: max-w-7xl (1280px) con px-4 / sm:px-6 / lg:px-8.
   Antes era 1140/24px y la cabecera del blog arrancaba ~24px mas adentro que
   la de la landing. */
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px)  { .wrap-wide { padding: 0 24px; } }
@media (min-width: 1024px) { .wrap-wide { padding: 0 32px; } }

/* ── Banda de entrada ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(165deg, #0D1B2A 0%, #114B5F 100%);
  color: #F2F4F7;
  padding: 60px 0 56px;
  position: relative;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #114B5F 0%, #17C398 50%, #7ED957 100%);
}
.hero h1 {
  font-size: clamp(32px, 5.4vw, 54px); line-height: 1.08; font-weight: 700;
  letter-spacing: -.03em; margin: 0 0 18px; color: #FFFFFF; max-width: 20ch;
}
.hero-article h1 { max-width: 22ch; }
.hero .eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #7ED957; margin: 0 0 16px;
}
.hero-lede { font-size: 18.5px; line-height: 1.6; color: #C4D2DE; max-width: 62ch; margin: 0; }
.hero-top { margin: 0 0 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-top a { color: #9FB6C6; text-decoration: none; font-size: 14px; }
.hero-top a:hover { color: #7ED957; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 26px;
  padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-family: var(--font-mono); font-size: 12.5px; color: #9FB6C6;
}
.hero-meta .verified-badge {
  background: rgba(23,195,152,.16); color: #7EE7C0;
  padding: 3px 11px; border-radius: 999px; font-weight: 600;
}
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 36px; margin: 30px 0 0; padding: 0; }
.hero-stats li { font-size: 13px; color: #9FB6C6; font-family: var(--font-mono); }
.hero-stats strong {
  display: block; font-family: var(--font-heading); font-size: 30px;
  font-weight: 700; color: #FFFFFF; letter-spacing: -.02em;
}

/* ── Chips por tema ───────────────────────────────────────────────── */
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.1); color: #E9EEF3;
}
.post-card .chip { background: var(--c-bg); color: var(--c-fg); }
.chip-c0 { --c-bg: rgba(23,195,152,.14);  --c-fg: #0D6E57; }
.chip-c1 { --c-bg: rgba(214,90,70,.14);   --c-fg: #A6392A; }
.chip-c2 { --c-bg: rgba(17,75,95,.13);    --c-fg: #114B5F; }
.chip-c3 { --c-bg: rgba(63,98,199,.13);   --c-fg: #33499E; }
.chip-c4 { --c-bg: rgba(184,124,10,.15);  --c-fg: #8A5B06; }
.chip-c5 { --c-bg: rgba(124,77,196,.13);  --c-fg: #5E37A0; }
.chip-c6 { --c-bg: rgba(20,132,150,.13);  --c-fg: #0E6E7D; }
.chip-c7 { --c-bg: rgba(126,217,87,.20);  --c-fg: #3F7A1E; }
/* En oscuro se conserva el color por tema: es información, no adorno. */
html.dark .chip-c0 { --c-bg: rgba(23,195,152,.18);  --c-fg: #6EE7B7; }
html.dark .chip-c1 { --c-bg: rgba(240,132,118,.18); --c-fg: #F0A99E; }
html.dark .chip-c2 { --c-bg: rgba(95,208,196,.16);  --c-fg: #7FD4C8; }
html.dark .chip-c3 { --c-bg: rgba(122,152,240,.16); --c-fg: #A3B6F2; }
html.dark .chip-c4 { --c-bg: rgba(227,166,63,.18);  --c-fg: #E8BE79; }
html.dark .chip-c5 { --c-bg: rgba(168,132,232,.16); --c-fg: #C0A6EE; }
html.dark .chip-c6 { --c-bg: rgba(90,197,214,.16);  --c-fg: #86D2DE; }
html.dark .chip-c7 { --c-bg: rgba(126,217,87,.18);  --c-fg: #A8E585; }

/* ── Tarjetas ─────────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.destacadas { padding-top: 48px; }
.todas { padding-top: 52px; padding-bottom: 20px; }

.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.post-list-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-list-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
  border-color: var(--emerald); transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(13,27,42,.09);
}
html.dark .post-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.post-card .chip { align-self: flex-start; }
.post-card h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.post-card-lg h3 { font-size: 21px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card:hover h3 a { color: var(--brand-text); }
.post-card p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.post-card .card-meta {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.card-go { color: var(--brand-text); font-weight: 700; }

/* Fila de controles: filtro por tema a la izquierda, orden a la derecha.
   Son dos dimensiones distintas y no deben parecer el mismo control. */
.lista-controles {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  align-items: flex-start; justify-content: space-between; margin-bottom: 24px;
}
.chips-filtro { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.orden { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.orden-lbl {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
.orden-btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  padding: 7px 13px; border-radius: var(--radius-md); cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  transition: all .18s ease;
}
.orden-btn:hover { border-color: var(--emerald); color: var(--brand-text); }
.orden-btn.is-on {
  background: var(--surface); border-color: var(--emerald);
  color: var(--brand-text); font-weight: 600;
}
@media (max-width: 680px) {
  .lista-controles { flex-direction: column; }
  .orden { flex-wrap: wrap; }
}
.chip-f {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: all .18s ease;
}
.chip-f:hover { border-color: var(--emerald); color: var(--brand-text); }
.chip-f.is-on { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
html.dark .chip-f.is-on { background: var(--emerald); border-color: var(--emerald); color: #0D1B2A; }
.sin-resultados { color: var(--muted); font-size: 15px; padding: 20px 0; }

/* ── Artículo a dos columnas ──────────────────────────────────────── */
.article-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px; align-items: start; padding-top: 48px; padding-bottom: 24px;
}
.article-main { max-width: 68ch; }
.article-main > h2:first-child, .article-main > p:first-child { margin-top: 0; }
.aside-sticky { position: sticky; top: 80px; display: grid; gap: 16px; }

.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.side-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-text); font-weight: 700; margin: 0 0 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc li { font-size: 14px; line-height: 1.45; }
.toc li a {
  color: var(--text-2); text-decoration: none; display: block;
  padding: 6px 10px; border-left: 2px solid var(--border); border-radius: 0 6px 6px 0;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.toc li a:hover { color: var(--brand-text); border-left-color: var(--emerald); background: var(--surface-2); }

.side-card.datos-clave { border-left: 3px solid var(--emerald); }
.datos-clave dl { margin: 0; display: grid; gap: 13px; }
.datos-clave dt { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.datos-clave dd { margin: 3px 0 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

.side-card.cta { background: var(--surface-2); }
.side-card.cta p { font-size: 13.5px; color: var(--text-2); margin: 0 0 14px; line-height: 1.55; }
.side-card.cta .btn-cta { display: inline-block; font-size: 13.5px; }

.rel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rel li a { font-size: 14px; color: var(--text-2); text-decoration: none; line-height: 1.4; display: block; }
.rel li a:hover { color: var(--brand-text); }

@media (max-width: 1000px) {
  .article-grid { grid-template-columns: 1fr; gap: 36px; }
  .aside-sticky { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .post-list-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .hero { padding: 40px 0 36px; }
  .hero-stats { gap: 22px; }
  .post-list-2, .post-list-3 { grid-template-columns: 1fr; }
  .aside-sticky { grid-template-columns: 1fr; }
  .wrap-wide { padding: 0 18px; }
}


/* La tarjeta entera es clickable: antes solo lo era el titulo, y el
   "Leer →" parecia un enlace sin serlo. */
.post-card { position: relative; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card h3 a:focus-visible { outline: none; }
.post-card:has(h3 a:focus-visible) { outline: 2px solid var(--emerald); outline-offset: 3px; }

/* section-label pasa de <p> a <h2>: se conserva el aspecto de rotulo. */
h2.section-label { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card:hover { transform: none; }
}
