/* IA Real Cases — banco de pruebas editorial
   Hoja única del frontal público. Mobile-first.
   Tokens -> base -> cabecera -> piezas -> vistas -> capa del CMS.
   El diseño viene de los mockups aprobados en /mockups; DESIGN.md
   documenta las reglas que no se leen en el código. */

/* ---------- Tokens ---------- */
:root {
  --ground: #f4f1ea;
  --surface: #faf8f3;
  --sunken: #ebe6db;
  --ink: #14171c;
  --ink-2: #4a525d;
  --rule: #dbd5c8;
  --rule-strong: #14171c;
  --accent: #c2371a;
  --accent-ink: #fffaf7;
  --accent-wash: #f6ddd3;
  --ok: #2f6b4f; --ok-soft: #dfe9e0;
  --warn: #8a5a08; --warn-soft: #f0e6cf;
  --alert: #a3231b; --alert-soft: #f3dcd6;
  --info: #22597f; --info-soft: #dbe5ea;
  --term-bg: #12161c;
  --term-ink: #dfe5dd;
  --term-dim: #8b95a1;
  --term-hl: #ff8a5c;
  --term-rule: #2a313b;
  --shadow: 0 1px 1px rgb(20 23 28 / 0.03), 0 14px 30px -18px rgb(20 23 28 / 0.35);

  --f-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --f-body: "IBM Plex Sans", system-ui, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 56px; --row-h: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #12151b; --surface: #191e26; --sunken: #212832;
    --ink: #ece7dd; --ink-2: #aab1bb; --rule: #2b3340; --rule-strong: #ece7dd;
    --accent: #f2603a; --accent-ink: #14171c; --accent-wash: #3a211a;
    --ok: #62c493; --ok-soft: #1c2c29; --warn: #e3b45c; --warn-soft: #2e2a20;
    --alert: #f28c82; --alert-soft: #33232a; --info: #7cc7f0; --info-soft: #1d2b38;
    --term-bg: #0c0f14; --term-ink: #dfe5dd; --term-dim: #8b95a1; --term-hl: #ff8a5c; --term-rule: #222a35;
    --shadow: 0 24px 44px -28px rgb(0 0 0 / 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #12151b; --surface: #191e26; --sunken: #212832;
    --ink: #ece7dd; --ink-2: #aab1bb; --rule: #2b3340; --rule-strong: #ece7dd;
    --accent: #f2603a; --accent-ink: #14171c; --accent-wash: #3a211a;
    --ok: #62c493; --ok-soft: #1c2c29; --warn: #e3b45c; --warn-soft: #2e2a20;
    --alert: #f28c82; --alert-soft: #33232a; --info: #7cc7f0; --info-soft: #1d2b38;
    --term-bg: #0c0f14; --term-ink: #dfe5dd; --term-dim: #8b95a1; --term-hl: #ff8a5c; --term-rule: #222a35;
    --shadow: 0 24px 44px -28px rgb(0 0 0 / 0.9);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  caret-color: var(--accent);
  scrollbar-color: var(--ink-2) var(--sunken);
}
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; font-optical-sizing: auto; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.num, time, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: 0.86em; }
.wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 14px; }
.skip:focus { top: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--ground);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border-radius: 2px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon--go { transform: translateX(3px); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 2px; }
.icon-btn:hover { background: var(--sunken); }

/* Marcas de estado: forma, no tono */
.mark { --m: 11px; display: inline-block; width: var(--m); height: var(--m); border-radius: 50%; border: 2px solid currentColor; flex: none; vertical-align: -1px; }
.mark--verificado { background: currentColor; }
.mark--en-curso { background: linear-gradient(90deg, currentColor 50%, transparent 50%); color: var(--accent); }
.mark--refutado { border-radius: 0; border: 0; background:
  linear-gradient(45deg, transparent 42%, currentColor 42% 58%, transparent 58%),
  linear-gradient(-45deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.is-live .mark--en-curso { animation: live 1.2s var(--ease) 3; }
@keyframes live { 50% { transform: scale(1.45) rotate(180deg); } }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }

/* Medidor de nivel */
.level { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.level i { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; }
.level i b { width: 4px; background: var(--rule); }
.level i b:nth-child(1) { height: 5px; } .level i b:nth-child(2) { height: 8px; } .level i b:nth-child(3) { height: 11px; }
.level[data-n="1"] b:nth-child(-n+1), .level[data-n="2"] b:nth-child(-n+2), .level[data-n="3"] b { background: var(--ink); }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid var(--rule-strong); }
.site-header__row { display: flex; align-items: center; gap: var(--s-2); height: var(--row-h); }
.brand { display: inline-flex; align-items: baseline; gap: 6px; margin-right: auto; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brand__ia { background: var(--ink); color: var(--ground); padding: 3px 5px 2px; }
.brand:hover .brand__ia { background: var(--accent); color: var(--accent-ink); }
.topics { display: none; }
.topics a { text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 2px; white-space: nowrap; border-bottom: 2px solid transparent; }
.topics a:hover, .topics a[aria-current] { border-bottom-color: var(--accent); }
.search { display: none; position: relative; }
.search input { width: 100%; height: 40px; padding: 0 40px 0 38px; background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; }
.search input::placeholder { color: var(--ink-2); }
.search input:focus { border-color: var(--ink); outline-offset: 0; }
.search .icon { position: absolute; left: 11px; top: 11px; color: var(--ink-2); }
.search kbd { position: absolute; right: 9px; top: 9px; font: 600 0.72rem var(--f-mono); border: 1px solid var(--rule); padding: 2px 6px; color: var(--ink-2); border-radius: 2px; }
.search-row { display: none; padding-bottom: var(--s-3); }
.search-row.is-open { display: block; }
.search-row .search { display: block; }
.search-row kbd { display: none; }
.lang { display: inline-flex; flex: none; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.lang a { display: grid; place-items: center; min-width: 40px; padding-inline: 4px; height: 34px; font-weight: 700; font-size: 0.82rem; text-decoration: none; }
.lang a[aria-current] { background: var(--ink); color: var(--ground); }
.lang a:not([aria-current]):hover { background: var(--accent-wash); }
.header-nl, .theme-btn { display: none; }

@media (max-width: 359px) { .brand { font-size: 1.1rem; } }
@media (min-width: 720px) {
  :root { --header-h: 102px; --row-h: 64px; }
  .search { display: block; flex: 0 1 300px; }
  .search-btn, .menu-btn { display: none; }
  .header-nl { display: inline-flex; min-height: 40px; }
  .theme-btn { display: inline-grid; }
  .topics--strip { display: flex; gap: var(--s-5); overflow-x: auto; padding-block: 6px 8px; border-top: 1px solid var(--rule); scrollbar-width: none; }
}
@media (min-width: 1160px) {
  :root { --header-h: 64px; }
  .topics--strip { display: none; }
  .topics--inline { display: flex; gap: var(--s-4); margin-right: auto; margin-left: var(--s-5); }
  .brand { margin-right: 0; }
  .search { flex: 1 1 170px; min-width: 150px; max-width: 300px; }
  .topics--inline { gap: var(--s-3); min-width: 0; }
  .topics--inline a { font-size: 0.9rem; }
}

/* ---------- Menú móvil ---------- */
.menu { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--ink); overflow-y: auto; }
.menu::backdrop { background: var(--ground); }
.menu[open] { animation: menu-in 0.35s var(--ease); }
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.menu__bar { position: sticky; top: 0; background: var(--ground); border-bottom: 1px solid var(--rule-strong); }
.menu__body { padding: var(--s-4) var(--gutter) var(--s-7); display: grid; gap: var(--s-6); }
.menu .search { display: block; }
.menu .search kbd { display: none; }
.menu h2 { font-size: 0.95rem; font-family: var(--f-body); letter-spacing: 0; color: var(--ink-2); font-weight: 600; margin-bottom: var(--s-2); }
.menu__topics a { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font: 700 1.9rem/1.05 var(--f-display); letter-spacing: -0.015em; }
.menu__topics a span { font: 400 0.8rem var(--f-mono); color: var(--ink-2); }
.menu__types { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.menu__types a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.menu__live a { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; text-decoration: none; line-height: 1.35; }
.menu__foot { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.menu__foot .btn { flex: 1 1 100%; justify-content: center; }
.menu__chan { display: flex; gap: var(--s-4); font-weight: 600; font-size: 0.95rem; }

/* ---------- Encabezados de sección ---------- */
.section { padding-block: var(--s-8); }
/* Banda de fondo a sangre sin sacar la sección de .wrap: la sombra pinta fuera y el recorte la limita en vertical. */
.section--band { background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface); clip-path: inset(0 -100vmax); }
.section + .section:not(.section--band) { padding-top: var(--s-7); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule-strong); }
.section__head h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); }
.section__head p { color: var(--ink-2); max-width: 46ch; font-size: 0.98rem; line-height: 1.45; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

/* ---------- Ilustración del caso ----------
   Decorativa: da aire y enseña la silueta del problema. Los colores son clases para que el
   claro y el oscuro los resuelvan aquí y el SVG del servidor no sepa nada de temas. */
.fig { --fig-line: color-mix(in srgb, var(--rule) 50%, transparent); display: block; aspect-ratio: 800 / 340; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
  background: linear-gradient(var(--fig-line) 1px, transparent 1px) 0 -1px / 100% 28px, linear-gradient(90deg, var(--fig-line) 1px, transparent 1px) -1px 0 / 28px 100%, var(--surface); }
.fig svg { width: 100%; height: 100%; }
.fig .n { fill: var(--rule); } .fig .n2 { fill: color-mix(in srgb, var(--ink-2) 55%, var(--surface)); }
.fig .ok { fill: var(--ok); } .fig .oks { fill: var(--ok-soft); }
.fig .wa { fill: var(--warn); } .fig .was { fill: var(--warn-soft); }
.fig .al { fill: var(--alert); } .fig .als { fill: var(--alert-soft); }
.fig .ac { fill: var(--accent); }
.fig .node { fill: var(--ground); stroke: var(--ink-2); stroke-width: 1.5; }
.fig .sn, .fig .sn2, .fig .sac, .fig .sal { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fig .sn { stroke: var(--rule); } .fig .sn2 { stroke: var(--ink-2); stroke-width: 1.5; }
.fig .sac { stroke: var(--accent); stroke-width: 2.5; } .fig .sal { stroke: var(--alert); }
.fig .bg { fill: var(--surface); }
.fig .dash { stroke-dasharray: 5 5; }
.card__media .fig { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.card:hover .card__media .fig, .card:focus-within .card__media .fig { transform: translateY(-3px); box-shadow: var(--shadow); }
.card--video .card__media .fig { aspect-ratio: 16 / 7; }
.art-fig { padding-top: var(--s-6); }
.art-fig .fig { aspect-ratio: auto; height: clamp(170px, 24vw, 280px); }

/* ---------- Evidencias ---------- */
.ev { margin: 0; background: var(--term-bg); color: var(--term-ink); border: 1px solid var(--term-rule); border-radius: 3px; overflow: hidden; font: 400 0.74rem/1.55 var(--f-mono); }
.ev__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--term-rule); color: var(--term-dim); font-size: 0.75rem; white-space: nowrap; }
.ev__bar span:first-child { overflow: hidden; text-overflow: ellipsis; }
.card--short .ev__bar span:first-child { flex: none; }
.ev__body { padding: 10px 12px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--term-rule) transparent; }
.ev__body div { white-space: pre; }
.ev .p { color: var(--term-dim); } .ev .hl { color: var(--term-hl); font-weight: 600; }
.ev .add { background: rgb(255 122 173 / 0.14); color: #ffc2d8; display: block; }
.ev .del { color: var(--term-dim); text-decoration: line-through; text-decoration-color: rgb(141 156 151 / 0.6); }
.ev--bars .ev__body { display: grid; grid-template-columns: max-content 1fr max-content; gap: 6px 10px; align-items: center; }
.ev--bars .row { display: contents; }
.ev--bars .row > * { white-space: nowrap; }
.ev--bars .row b { height: 9px; background: var(--term-dim); width: calc(var(--v) * 1%); min-width: 2px; font-weight: 400; transform-origin: left; }
.ev--bars .row.hl b { background: var(--term-hl); }
.ev--bars .row.hl > span { color: var(--term-hl); }
.ev--bars .row span:last-child { text-align: right; }
.in-view .ev--bars .row b { animation: grow 0.9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
figcaption.cap { font: 400 0.78rem/1.45 var(--f-mono); color: var(--ink-2); padding-top: 6px; }

/* ---------- Etiqueta de verificación ---------- */
.cal { --cut: 14px; display: inline-block; background: var(--ink); padding: 1px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.22)); }
.cal__in { background: var(--surface); color: var(--ink); clip-path: inherit; min-width: 214px; }
.cal__head { display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); padding: 7px 26px 6px 10px; font: 600 0.92rem/1 var(--f-display); letter-spacing: 0.04em; text-transform: uppercase; }
.cal__head .mark { color: inherit; }
.cal dl { display: grid; grid-template-columns: auto 1fr; font-size: 0.78rem; line-height: 1.3; }
.cal dt, .cal dd { padding: 5px 10px; border-top: 1px solid var(--rule); }
.cal dt { color: var(--ink-2); border-right: 1px solid var(--rule); }
.cal dd { font-family: var(--f-mono); font-size: 0.74rem; font-variant-numeric: tabular-nums; }

/* ---------- Tarjetas ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; view-transition-class: card; }
.card[hidden] { display: none; }
.card__media { position: relative; display: block; text-decoration: none; margin-bottom: var(--s-4); }
.card__media .ev { position: relative; }
.card__media .ev__body { height: 140px; overflow: hidden; padding-bottom: 36px; }
.card__media .ev::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: linear-gradient(to bottom, transparent, var(--term-bg) 72%); pointer-events: none; }
.card__media .ev--bars::after { display: none; }
.card__media .ev--bars .ev__body { height: auto; }
.card__media .ev { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.card:hover .card__media .ev, .card:focus-within .card__media .ev { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.badges { position: absolute; left: -1px; bottom: -1px; display: flex; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; font-weight: 700; font-size: 0.78rem; background: var(--surface); color: var(--ink); border: 1px solid var(--ink); white-space: nowrap; }
.badge + .badge { border-left: 0; }
.badge .icon { width: 15px; height: 15px; }
.card__title { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.6rem); line-height: 1.14; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.card__problem { margin-top: var(--s-3); color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 60ch; }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--rule); font-size: 0.84rem; }
.card__meta .id { font-family: var(--f-mono); font-size: 0.76rem; color: var(--ink-2); margin-left: auto; align-self: center; }
.card.is-linked { outline: 2px solid var(--accent); outline-offset: 8px; }

/* Caso principal: mayor escala */
.card--lead .card__title { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.3rem); }
.card--lead .card__media .ev__body { height: 176px; }
/* Actualización: sin imagen, línea de versión */
.card--actualizacion { padding: var(--s-4); border: 1px dashed var(--ink-2); background: transparent; }
.card--actualizacion .badges { position: static; margin-bottom: var(--s-3); }
.card--actualizacion .card__title { font-size: 1.25rem; }
.parent { position: relative; z-index: 1; font-size: 0.86rem; margin-top: var(--s-2); }
/* Vídeo */
.card--video .card__media .ev__body { height: auto; aspect-ratio: 16 / 6.6; }
.play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.play span { display: grid; place-items: center; width: 58px; height: 58px; background: var(--accent); color: var(--accent-ink); border-radius: 50%; transition: transform 0.3s var(--ease); }
.play .icon { fill: currentColor; stroke: none; width: 22px; height: 22px; margin-left: 3px; }
.card:hover .play span { transform: scale(1.1); }
.dur { position: absolute; right: 8px; top: 34px; z-index: 1; background: var(--term-bg); color: var(--term-ink); border: 1px solid var(--term-rule); font: 600 0.72rem var(--f-mono); padding: 2px 6px; }
.card--short .card__media .ev__body { aspect-ratio: 9 / 13; }
/* Dosis breve */
.card--dosis { padding: var(--s-4); background: var(--accent-wash); }
.card--dosis .badges { position: static; margin-bottom: var(--s-3); }
.card--dosis .card__title { font-family: var(--f-body); font-weight: 600; letter-spacing: 0; font-size: 1.12rem; line-height: 1.35; text-wrap: pretty; }
.card--dosis .card__meta { border-top-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.card--dosis .card__meta .id { color: var(--ink); }

/* ---------- Portada: presentación ----------
   Lo primero que se lee es qué es esto y para quién, en una frase y un párrafo. Tamaño de
   titular, no de cartel: tiene que invitar a leer, no impresionar. */
.intro { padding-block: var(--s-7) var(--s-6); }
.intro__title { font-size: clamp(2rem, 1.3rem + 3vw, 3.7rem); line-height: 1.05; letter-spacing: -0.028em; max-width: 17ch; }
.intro__body { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
.intro__lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem); line-height: 1.6; color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }
.intro__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: var(--s-4); border-top: 1px solid var(--rule); font-size: 0.92rem; }
.intro__legend > span:first-child { flex-basis: 100%; color: var(--ink-2); }
@media (min-width: 900px) {
  .intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--s-8); align-items: end; padding-block: var(--s-8) var(--s-7); }
  .intro__body { margin-top: 0; }
}

/* ---------- Portada: caso destacado ----------
   Un caso, no un cartel: rótulo, titular, de qué va, cómo salió y cuánto se tarda en leer. */
.hero { position: relative; }
.hero__grid { display: grid; gap: var(--s-5); padding-top: var(--s-6); border-top: 1px solid var(--rule-strong); }
.hero__kicker { font-size: 0.86rem; font-weight: 600; color: var(--accent); margin-bottom: var(--s-3); }
.hero__title { font-size: clamp(1.8rem, 1.25rem + 2.2vw, 3rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.024em; }
.hero__title a { text-decoration: none; }
.hero__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hero__title em { font-style: italic; font-weight: 500; color: var(--accent); }
.hero__dek { margin-top: var(--s-4); font-size: clamp(1.04rem, 1rem + 0.3vw, 1.18rem); line-height: 1.55; color: var(--ink-2); max-width: 50ch; text-wrap: pretty; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--s-4); font-size: 0.9rem; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero__fig { display: block; }
.hero__fig .fig { box-shadow: var(--shadow); }
.hero__ev .fig, .hero__ev img { transition: transform 0.4s var(--ease); }
.hero__ev a:hover .fig { transform: translateY(-3px); }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: var(--s-7); align-items: center; }
}

/* ---------- Portada: recientes ---------- */
.recent { display: grid; gap: var(--s-8) var(--s-6); position: relative; align-items: start; }
.threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.threads path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 0.7s var(--ease) forwards; }
.threads circle { fill: var(--accent); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (min-width: 720px) {
  .recent { grid-template-columns: repeat(6, 1fr); }
  .recent > .card { grid-column: span 3; }
  .recent > .card--lead { grid-column: span 6; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: var(--s-5); align-items: start; }
  .recent > .card--lead .card__media { grid-row: 1 / 6; margin: 0; }
}
@media (min-width: 1160px) {
  .recent { grid-template-columns: repeat(12, 1fr); }
  .recent > .card { grid-column: span 4; }
}

/* ---------- Series conectadas ---------- */
.serie { display: grid; gap: var(--s-4); padding-block: var(--s-5); border-bottom: 1px solid var(--rule); }
.serie:first-of-type { padding-top: 0; }
.serie h3 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
.serie__about p { color: var(--ink-2); margin-top: var(--s-2); font-size: 0.98rem; line-height: 1.5; max-width: 40ch; }
.serie__about .status { margin-top: var(--s-3); font-size: 0.86rem; }
.track { position: relative; display: grid; gap: 0; }
.track li { position: relative; padding: 0 0 var(--s-4) 28px; }
.track li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -8px; width: 1px; background: var(--ink); }
.track li:last-child::before { display: none; }
.track li:last-child { padding-bottom: 0; }
.track .mark { position: absolute; left: 0; top: 6px; background-color: var(--ground); }
.track .mark--verificado { background: var(--ink); }
.track .mark--next { border-style: dashed; color: var(--ink-2); }
.track a { display: block; text-decoration: none; line-height: 1.3; font-weight: 600; }
.track a:hover { color: var(--accent); }
.track small { display: block; font-size: 0.8rem; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ink-2); margin-bottom: 2px; }
.track .is-next { color: var(--ink-2); font-weight: 400; }
/* El resumen de lo anterior ocupa menos que un paso: no compite con lo que sí se lee. */
.track .is-earlier a { color: var(--ink-2); font-weight: 400; font-size: 0.86rem; }
.track .is-earlier a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .serie { grid-template-columns: minmax(240px, 1fr) 3fr; column-gap: var(--s-7); align-items: start; }
  .track { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-top: 4px; }
  .track a { font-size: 0.94rem; text-wrap: pretty; }
  .track li { padding: 26px var(--s-4) 0 0; }
  .track li::before { left: 8px; right: -8px; top: 5px; bottom: auto; width: auto; height: 1px; }
  .track .mark { top: 0; }
  .track li { transition: transform 0.3s var(--ease); }
  .track li:hover { transform: translateY(-3px); }
}

/* ---------- Banco de pruebas ---------- */
.bench { background: var(--surface); border: 1px solid var(--rule-strong); }
.bench caption { text-align: left; padding: var(--s-3) var(--s-4); font-size: 0.86rem; color: var(--ink-2); border-bottom: 1px solid var(--rule); caption-side: top; }
.bench thead { display: none; }
.bench tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s-4); padding: var(--s-4); border-bottom: 1px solid var(--rule); }
.bench tbody tr:last-child { border-bottom: 0; }
.bench td { padding: 0; font-size: 0.9rem; line-height: 1.4; }
.bench td:nth-child(1) { grid-column: 1 / -1; font: 700 1.2rem/1.1 var(--f-display); }
.bench td:nth-child(1) a { text-decoration: none; } .bench td:nth-child(1) a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.bench td:nth-child(2) { grid-column: 1 / -1; color: var(--ink-2); }
.bench td[data-l]::before { content: attr(data-l); display: block; font-size: 0.74rem; color: var(--ink-2); }
.meter { display: flex; align-items: center; gap: 8px; font: 400 0.78rem var(--f-mono); }
.meter i { flex: 1; max-width: 120px; height: 5px; background: var(--sunken); }
.meter i b { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--ink); }
@media (min-width: 900px) {
  .bench thead { display: table-header-group; }
  .bench tr { display: table-row; padding: 0; }
  .bench th { text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); padding: 10px var(--s-4); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
  .bench td { padding: 14px var(--s-4); border-bottom: 1px solid var(--rule); vertical-align: top; }
  .bench tbody tr:last-child td { border-bottom: 0; }
  .bench td[data-l]::before { display: none; }
  .bench td:nth-child(1) { width: 27%; } .bench td:nth-child(2) { width: 33%; }
  .bench tbody tr { transition: background 0.2s; } .bench tbody tr:hover { background: var(--accent-wash); }
}

/* ---------- Breves ---------- */
.breves { display: grid; align-items: start; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s-4); scrollbar-width: thin; }
.breves > * { scroll-snap-align: start; }
@media (min-width: 1000px) {
  .breves { grid-auto-flow: row; grid-template-columns: repeat(12, 1fr); overflow: visible; margin: 0; padding: 0; gap: var(--s-5); align-items: start; }
  .breves > .card--dosis { grid-column: span 4; }
  .breves > .card--short { grid-column: span 2; }
  .breves > .card--dosis:nth-child(2) { margin-top: var(--s-6); }
}

/* ---------- Comunidad ---------- */
.community { display: grid; gap: var(--s-6); }
.community__pitch h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 2.9rem); }
.community__pitch p { margin-top: var(--s-4); color: var(--ink-2); max-width: 44ch; }
.community__pitch .btn { margin-top: var(--s-5); }
.alt { display: grid; grid-template-columns: 1fr; gap: 6px; padding-block: var(--s-4); border-top: 1px solid var(--rule); }
.alt:last-child { border-bottom: 1px solid var(--rule); }
.alt__on { font-size: 0.86rem; color: var(--ink-2); }
.alt__on a { color: var(--ink); font-weight: 600; }
.alt p { font-size: 1.05rem; line-height: 1.45; text-wrap: pretty; }
.alt__foot { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.84rem; align-items: center; }
.alt__foot .who { color: var(--ink-2); }
@media (min-width: 900px) { .community { grid-template-columns: 5fr 7fr; column-gap: var(--s-8); align-items: start; } .community__pitch { position: sticky; top: calc(var(--header-h) + 32px); } }

/* ---------- Newsletter + pie ---------- */
.nl { margin-top: var(--s-8); background: var(--ink); color: var(--ground); }
.nl__in { display: grid; gap: var(--s-5); padding-block: var(--s-7); }
.nl h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 2.9rem); }
.nl p { color: color-mix(in srgb, var(--ground) 78%, var(--ink)); max-width: 48ch; margin-top: var(--s-3); }
.nl form { display: grid; gap: var(--s-2); align-content: start; }
.nl label { font-size: 0.86rem; font-weight: 600; }
.nl input { height: 50px; padding: 0 14px; background: transparent; border: 1px solid var(--ground); color: var(--ground); border-radius: 2px; }
.nl input::placeholder { color: color-mix(in srgb, var(--ground) 62%, var(--ink)); }
.nl .btn { justify-content: center; min-height: 50px; }
.nl .btn:hover { background: var(--ground); border-color: var(--ground); color: var(--ink); }
.nl small { font-size: 0.8rem; color: color-mix(in srgb, var(--ground) 70%, var(--ink)); }
.nl :focus-visible { outline-color: var(--ground); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 900px) { .nl__in { grid-template-columns: 7fr 5fr; column-gap: var(--s-8); align-items: end; } .nl form { grid-template-columns: 1fr auto; } .nl label, .nl small { grid-column: 1 / -1; } }
.foot { padding-block: var(--s-6); font-size: 0.9rem; }
.foot__in { display: grid; gap: var(--s-5); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px var(--s-5); }
.foot small { color: var(--ink-2); font-size: 0.82rem; }
@media (min-width: 900px) { .foot__in { grid-template-columns: auto 1fr auto; align-items: center; column-gap: var(--s-7); } }

/* ---------- Listado filtrado ---------- */
.list-head { padding-block: var(--s-6) var(--s-5); }
.list-head h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.8rem); font-weight: 600; letter-spacing: -0.005em; }
.list-head p { margin-top: var(--s-3); color: var(--ink-2); max-width: 56ch; }
.filters { border: 1px solid var(--rule-strong); background: var(--surface); }
.filters > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 var(--s-4); font-weight: 700; cursor: pointer; list-style: none; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary .icon { transition: transform 0.3s var(--ease); }
.filters[open] > summary .icon { transform: rotate(180deg); }
.filters__body { padding: 0 var(--s-4) var(--s-4); display: grid; gap: var(--s-4); }
.fgroup { border: 0; padding: 0; margin: 0; min-width: 0; }
.fgroup legend { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.fgroup div { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); background: var(--ground); font-size: 0.88rem; font-weight: 600; border-radius: 2px; transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease); }
.chip .icon { width: 15px; height: 15px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip .n { font: 400 0.72rem var(--f-mono); opacity: 0.75; }
.result-bar { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--s-4); padding-block: var(--s-3); margin-block: var(--s-4) var(--s-5); background: var(--ground); border-bottom: 1px solid var(--rule-strong); font-size: 0.92rem; }
.result-bar output { font-weight: 700; }
.result-bar .active { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.active button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 8px; border: 1px solid var(--accent); background: var(--accent-wash); font-size: 0.8rem; font-weight: 600; border-radius: 2px; }
.active button .icon { width: 13px; height: 13px; }
.result-bar select { width: auto; min-width: 11em; height: 36px; border: 1px solid var(--rule); background: var(--surface); padding: 0 8px; border-radius: 2px; font-size: 0.88rem; }
.link-btn { border: 0; background: none; padding: 0; text-decoration: underline; font-weight: 600; font-size: 0.88rem; min-height: 30px; }
.grid { display: grid; gap: var(--s-7) var(--s-5); position: relative; padding-bottom: var(--s-6); align-items: start; }
.empty { padding: var(--s-7) var(--s-5); border: 1px dashed var(--ink-2); text-align: left; }
.empty h2 { font-size: 1.8rem; } .empty p { margin: var(--s-2) 0 var(--s-4); color: var(--ink-2); max-width: 50ch; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } .grid > .card--lead { grid-column: 1 / -1; } }
@media (min-width: 1100px) {
  .list-layout { display: grid; grid-template-columns: 260px 1fr; column-gap: var(--s-7); align-items: start; }
  .filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100dvh - var(--header-h) - 32px); overflow-y: auto; border-width: 1px 0 0; background: transparent; }
  .filters > summary { padding-inline: 0; pointer-events: none; } .filters > summary .icon { display: none; }
  .filters__body { padding-inline: 0; }
  .result-bar { margin-top: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid > .card--lead { grid-column: span 2; }
}
::view-transition-group(.card) { animation-duration: 0.45s; animation-timing-function: var(--ease); }

/* ---------- Artículo ---------- */
.progress { position: fixed; left: 0; top: var(--header-h); z-index: 49; height: 3px; width: 100%; background: transparent; pointer-events: none; }
.progress b { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.86rem; color: var(--ink-2); padding-top: var(--s-5); }
.crumbs a { color: var(--ink); font-weight: 600; }
.art-head { padding-block: var(--s-4) var(--s-6); border-bottom: 1px solid var(--rule-strong); display: grid; gap: var(--s-5); }
.art-head h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 4.2rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.026em; }
.art-head .dek { font-size: clamp(1.12rem, 2.6vw, 1.4rem); line-height: 1.45; max-width: 58ch; text-wrap: pretty; }
.art-head .byline { font-size: 0.88rem; color: var(--ink-2); }
.art-head .cal { justify-self: start; }
.art-head .cal__in { min-width: 260px; }
@media (min-width: 900px) {
  .art-head { grid-template-columns: 1fr auto; column-gap: var(--s-7); align-items: end; }
  .art-head h1 { grid-column: 1 / -1; max-width: 26ch; }
  .art-head .cal { grid-column: 2; grid-row: 2; align-self: start; transform: rotate(2.5deg); margin-top: -4px; }
}
.art-layout { display: grid; padding-top: var(--s-6); }
.toc { display: none; }
.prose { min-width: 0; max-width: 70ch; font-size: clamp(1.0625rem, 1.2vw + 0.9rem, 1.17rem); line-height: 1.68; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.55rem, 1.1rem + 1.8vw, 2.2rem); margin-top: 2.2em; padding-top: var(--s-4); border-top: 1px solid var(--rule-strong); }
.prose h3 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose p, .prose li { text-wrap: pretty; }
.prose strong { font-weight: 700; }
.prose :not(pre) > code { font: 400 0.86em var(--f-mono); background: var(--sunken); padding: 1px 5px; border-radius: 2px; overflow-wrap: anywhere; }
.prose ul.dots li { position: relative; padding-left: 1.3em; margin-top: 0.5em; }
.prose ul.dots li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 7px; height: 7px; border: 2px solid var(--ink); border-radius: 50%; }
.tldr { background: var(--surface); border: 1px solid var(--rule-strong); padding: var(--s-4) var(--s-5); }
.tldr li { display: grid; grid-template-columns: 5.6em 1fr; gap: 12px; padding-block: 8px; border-top: 1px solid var(--rule); font-size: 0.98em; line-height: 1.45; }
.tldr li:first-child { border-top: 0; }
@media (max-width: 519px) { .tldr { padding-inline: var(--s-4); } .tldr li { grid-template-columns: 1fr; gap: 2px; } }
.tldr b { font-weight: 700; }
/* Ficha del laboratorio */
.spec { border: 1px solid var(--rule-strong); background: var(--surface); font-size: 0.92em; }
.spec div { display: grid; grid-template-columns: 1fr; padding: 9px var(--s-4); border-top: 1px solid var(--rule); }
.spec div:first-child { border-top: 0; }
.spec dt { color: var(--ink-2); font-size: 0.86em; }
.spec dd { font-family: var(--f-mono); font-size: 0.84em; overflow-wrap: anywhere; }
@media (min-width: 560px) { .spec div { grid-template-columns: 11em 1fr; gap: var(--s-4); align-items: baseline; } }
/* Proceso */
.steps { counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 var(--s-5) 44px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: var(--ground); font: 700 0.95rem var(--f-display); border-radius: 50%; }
.steps > li::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 1px; background: var(--rule-strong); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin-top: 0; font-size: 1.3rem; padding-top: 2px; }
.steps p { margin-top: 0.5em; }
.steps .t { font: 400 0.76rem var(--f-mono); color: var(--ink-2); display: block; margin-top: 4px; }
/* Bloques de código y prompt */
.block { border-radius: 3px; overflow: hidden; border: 1px solid var(--term-rule); margin-inline: calc(var(--gutter) * -0.5); }
.block__bar { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; min-height: 40px; background: var(--term-bg); color: var(--term-dim); border-bottom: 1px solid var(--term-rule); font: 400 0.74rem var(--f-mono); }
.block__bar span { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block__bar button { min-height: 32px; padding: 0 9px; white-space: nowrap; flex: none; border: 1px solid var(--term-rule); background: none; color: var(--term-ink); font: 600 0.72rem var(--f-body); border-radius: 2px; }
.block__bar button:hover { border-color: var(--term-hl); color: var(--term-hl); }
.block pre { margin: 0; padding: 14px 16px; background: var(--term-bg); color: var(--term-ink); font: 400 clamp(0.74rem, 2.4vw, 0.86rem)/1.6 var(--f-mono); overflow-x: auto; tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--term-rule) transparent; }
.block.is-wrapped pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.block pre .p { color: var(--term-dim); } .block pre .hl { color: var(--term-hl); font-weight: 600; }
.block--prompt { border-color: var(--rule-strong); }
.block--prompt .block__bar { background: var(--accent-wash); color: var(--ink); border-bottom-color: var(--rule-strong); font-family: var(--f-body); font-weight: 700; font-size: 0.84rem; }
.block--prompt .block__bar button { border-color: var(--ink); color: var(--ink); }
.block--prompt .block__bar button:hover { background: var(--ink); color: var(--ground); }
.block--prompt pre { background: var(--surface); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(0.8rem, 2.4vw, 0.9rem); scrollbar-color: var(--rule) transparent; }
.block--prompt pre mark { background: var(--accent-wash); color: inherit; padding: 1px 2px; }
@media (min-width: 720px) { .block { margin-inline: 0; } }
.prose figure { margin-inline: 0; }
.prose figure .ev { font-size: clamp(0.7rem, 2.2vw, 0.84rem); }
/* Tabla comparativa */
.cmp { border: 1px solid var(--rule-strong); background: var(--surface); font-size: 0.9em; }
.cmp thead { display: none; }
.cmp tr { display: block; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--rule); }
.cmp tbody tr:first-child { border-top: 0; }
.cmp th[scope="row"] { display: block; text-align: left; font-weight: 700; margin-bottom: 4px; }
.cmp td { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-family: var(--f-mono); font-size: 0.86em; }
.cmp td::before { content: attr(data-l); font-family: var(--f-body); color: var(--ink-2); }
.cmp td.delta { color: var(--accent); font-weight: 600; }
@media (min-width: 640px) {
  .cmp thead { display: table-header-group; } .cmp tr { display: table-row; padding: 0; }
  .cmp th, .cmp td { display: table-cell; padding: 10px var(--s-4); text-align: right; border-top: 1px solid var(--rule); }
  .cmp thead th { font-size: 0.84em; color: var(--ink-2); font-weight: 600; border-top: 0; border-bottom: 1px solid var(--rule-strong); }
  .cmp th:first-child { text-align: left; } .cmp th[scope="row"] { font-weight: 600; margin: 0; }
  .cmp td::before { display: none; }
}
/* Resultado, llamadas integradas, notas al margen */
.verdict { background: var(--accent); color: var(--accent-ink); padding: var(--s-5); }
.verdict h3 { margin: 0; font-size: clamp(1.6rem, 4.4vw, 2.2rem); }
.verdict p { margin-top: var(--s-3); }
.verdict ::selection { background: var(--accent-ink); color: var(--accent); }
.note { font-size: 0.9rem; line-height: 1.45; padding: var(--s-3) 0 var(--s-3) var(--s-4); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink-2); position: relative; }
.note::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.note b { color: var(--ink); }
.inline-call { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-3); border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font-size: 0.95rem; line-height: 1.35; transition: border-color 0.2s; }
.inline-call:hover { border-color: var(--ink); }
.inline-call .thumb { position: relative; width: 96px; aspect-ratio: 16/10; background: var(--term-bg); display: grid; place-items: center; border-radius: 2px; }
.inline-call .thumb span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.inline-call .thumb .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; margin-left: 2px; }
.inline-call small { display: block; color: var(--ink-2); font-size: 0.82rem; margin-top: 2px; }
.inline-call--res .thumb { background: var(--sunken); color: var(--ink); } .inline-call--res .thumb .icon { fill: none; stroke: currentColor; width: 24px; height: 24px; margin: 0; }
.changelog li { display: grid; grid-template-columns: 4.2em 7.4em 1fr; gap: 10px; padding-block: 8px; border-top: 1px solid var(--rule); font-size: 0.92em; line-height: 1.4; }
.changelog li > :nth-child(-n+2) { font-family: var(--f-mono); font-size: 0.84em; padding-top: 2px; }
@media (max-width: 480px) { .changelog li { grid-template-columns: 4.2em 1fr; } .changelog li > :nth-child(3) { grid-column: 1 / -1; } }
.nl-inline { display: grid; gap: var(--s-3); padding: var(--s-4) 0; border-block: 1px solid var(--rule-strong); }
.nl-inline p { font-size: 0.98em; }
.nl-inline form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-inline input { flex: 1 1 200px; height: 44px; padding: 0 12px; border: 1px solid var(--ink); background: var(--surface); border-radius: 2px; }

/* Continuación */
.next { padding-block: var(--s-8) 0; }
.chain { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.chain a { display: block; padding: var(--s-4); border: 1px solid var(--rule-strong); text-decoration: none; background: var(--surface); transition: background 0.2s, color 0.2s; }
.chain a:hover { background: var(--ink); color: var(--ground); }
.chain small { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 600; margin-bottom: 6px; }
.chain strong { font: 700 1.35rem/1.08 var(--f-display); display: block; }
.chain .here { border-style: dashed; background: transparent; }
@media (min-width: 900px) {
  .chain { grid-template-columns: 1fr 1fr 1fr; gap: 0; position: relative; }
  .chain > * + * { margin-left: -1px; }
}

/* Índice: escritorio fijo, móvil en barra inferior */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 48; display: flex; align-items: center; gap: var(--s-3); padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--rule-strong); font-size: 0.86rem; }
.dock .status { margin-right: auto; }
.dock .pct { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.dock .btn { min-height: 40px; padding: 0 10px; font-size: 0.86rem; }
@media (max-width: 459px) { .dock { gap: var(--s-2); } .dock .pct { display: none; } }
.sheet-toc { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-top: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); max-height: 78dvh; }
.sheet-toc::backdrop { background: rgb(8 12 11 / 0.55); }
.sheet-toc[open] { animation: sheet-in 0.35s var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-toc header { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px var(--gutter); border-bottom: 1px solid var(--rule); font-weight: 700; position: sticky; top: 0; background: var(--surface); }
.sheet-toc ol { padding: var(--s-2) var(--gutter) var(--s-5); }
.sheet-toc a, .toc a { display: block; text-decoration: none; }
.sheet-toc a { padding: 11px 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.sheet-toc a[aria-current], .toc a[aria-current] { color: var(--accent); }
body.has-dock { padding-bottom: 64px; }
@media (min-width: 1100px) {
  .dock { display: none; } body.has-dock { padding-bottom: 0; }
  .art-layout { grid-template-columns: 200px minmax(0, 70ch) 1fr; column-gap: var(--s-7); }
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; font-size: 0.86rem; }
  .toc p { font-weight: 700; margin-bottom: var(--s-2); }
  .toc ol { border-left: 1px solid var(--rule); }
  .toc a { padding: 5px 0 5px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); line-height: 1.3; transition: color 0.2s, border-color 0.2s; }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current] { border-left-color: var(--accent); font-weight: 600; }
  .toc__state { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--rule); display: grid; gap: 4px; color: var(--ink-2); }
  .toc__state .status { color: var(--ink); }
}
@media (min-width: 1360px) {
  /* El aparato crítico cuelga del margen derecho, dentro de la tercera pista de la rejilla */
  .art-layout { grid-template-columns: 180px minmax(0, 66ch) 300px; column-gap: var(--s-6); }
  .prose .note, .prose .inline-call, .prose .files { float: right; clear: right; width: 300px; margin: 0.3em calc(-300px - var(--s-6)) var(--s-4) 0; }
  .prose .inline-call { grid-template-columns: 1fr; }
  .prose .inline-call .thumb { width: 100%; }
}


/* ---------- Anotaciones sobre la evidencia ---------- */
.anno-group { position: relative; white-space: normal; }
.anno { display: block; margin: 5px 0 8px; padding-top: 5px; border-top: 1.5px solid var(--term-hl); color: var(--term-hl); font: 600 0.82rem/1.3 var(--f-body); white-space: normal; max-width: 34ch; }
@media (min-width: 720px) {
  .anno { position: absolute; right: 0; top: 0; bottom: 0; width: 13.5em; margin: 0; padding: 0 0 0 10px; border-top: 0; border-left: 1.5px solid var(--term-hl); display: flex; align-items: center; }
}
/* Captura de panel: evidencia no textual */
.shot { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; }
.shot__bar { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 0.8rem; color: var(--ink-2); }
.shot__plot { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 170px; padding: 16px 12px 0; }
.shot__plot i { flex: 1; height: calc(var(--v) * 1%); background: var(--ink-2); min-height: 2px; transform-origin: bottom; }
.shot__plot i.hot { background: var(--accent); }
.in-view .shot__plot i { animation: rise 0.9s var(--ease) both; }
@keyframes rise { from { transform: scaleY(0); } }
.shot__limit { position: absolute; left: 12px; right: 12px; top: calc(16px + (170px - 16px) * 0.2); border-top: 1px dashed var(--ink); font-size: 0.76rem; line-height: 1; padding-top: 4px; color: var(--ink); }
.shot__note { position: absolute; right: 12px; top: 44%; max-width: 15em; padding: 6px 8px; background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent); font: 600 0.8rem/1.3 var(--f-body); }
.shot__axis { display: flex; justify-content: space-between; padding: 6px 12px 10px; font: 400 0.74rem var(--f-mono); color: var(--ink-2); }
/* Material descargable */
.files { border: 1px solid var(--rule); background: var(--surface); padding: var(--s-3) var(--s-4) var(--s-4); font-size: 0.92rem; line-height: 1.4; }
.files small { color: var(--ink-2); }
.files ul { margin: var(--s-2) 0 var(--s-3); }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--rule); font: 400 0.8rem var(--f-mono); margin: 0; }
.files .btn { min-height: 40px; width: 100%; justify-content: center; }
/* Short: fotograma vertical con rótulo */
.short-hook { font: 600 clamp(1.25rem, 13cqw, 2.3rem)/1.02 var(--f-display); letter-spacing: -0.01em; color: var(--term-ink); white-space: normal; margin: 0 0 16px; text-wrap: balance; }
/* El fotograma conserva proporción vertical y reserva una banda inferior para el control */
.card--short .card__media { container-type: inline-size; max-width: 260px; }
.card--short .card__media .ev__body { display: flex; flex-direction: column; justify-content: flex-start; padding: 16px 14px 112px; }
@container (max-width: 225px) { .card--short .ev__body div { display: none; } }
.card--short .play { place-items: end center; padding-bottom: 46px; }
.card--short .play span { width: 46px; height: 46px; }


/* ---------- Publicidad ---------- */
/* El hueco se declara con su altura puesta aunque llegue vacío: así la página no da un
   salto cuando el anuncio aparece tarde, que es el defecto que más molesta al leer.
   Y va siempre rotulado, porque un anuncio que se confunde con un caso se lleva por
   delante lo único que esta publicación tiene que vender. */
.ad { margin-block: var(--s-7); }
.ad__label {
  display: block; margin-bottom: 6px;
  font: 600 0.68rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.ad__box {
  display: grid; place-items: center; overflow: hidden;
  background: var(--sunken); border: 1px solid var(--rule);
}
.ad__box > * { max-width: 100%; }
.ad__hint { font: 400 0.76rem/1.5 var(--f-mono); color: var(--ink-2); text-align: center; }

/* Ancho. En móvil se queda en el rectángulo de 300, que es lo que cabe. */
.ad--banner .ad__box { min-height: 250px; }
.ad--rectangulo .ad__box { min-height: 250px; max-width: 300px; }
.ad--margen { display: none; }

/* Dentro del relato, el hueco se separa del texto con las mismas reglas que una sección:
   nunca pegado a un párrafo, para que no se lea como parte de la idea anterior. */
.prose > .ad { margin-block: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--rule); }

@media (min-width: 720px) {
  .ad--banner .ad__box { min-height: 250px; }
}
@media (min-width: 1360px) {
  /* En pantalla ancha el margen derecho ya existía para las notas. El anuncio vive ahí:
     fuera de la columna de lectura, y pegajoso mientras dura el artículo. */
  /* Los tres hijos de la rejilla llevan posición explícita: con el anuncio en medio del
     orden del marcado, la colocación automática mandaba el artículo a una segunda fila. */
  .art-layout > .toc { grid-column: 1; grid-row: 1; }
  .art-layout > .prose { grid-column: 2; grid-row: 1; }
  .ad--margen { display: block; grid-column: 3; grid-row: 1; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); margin-top: 0; }
  .ad--margen .ad__box { width: 300px; min-height: 600px; }
}

/* ====================================================================
   Capa del CMS
   Lo de arriba es el sistema de diseño. Lo de aquí abajo viste lo que
   emiten los componentes del gestor: bloques del editor, comentarios,
   formularios, paginación y las páginas auxiliares (búsqueda, archivo,
   categoría, etiqueta, estática, error). Mismo vocabulario, mismas
   fichas: nada de un segundo lenguaje visual.
   ==================================================================== */

/* ---------- Bloques del editor dentro del artículo ---------- */
.prose .block-text > * + * { margin-top: 1.15em; }
.prose .block-text ul, .prose .block-text ol { margin: 0; }
.prose .block-text ul li { position: relative; padding-left: 1.3em; margin-top: 0.5em; }
.prose .block-text ul li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 7px; height: 7px; border: 2px solid var(--ink); border-radius: 50%; }
.prose .block-text ol { counter-reset: n; }
.prose .block-text ol li { counter-increment: n; position: relative; padding-left: 1.9em; margin-top: 0.5em; }
.prose .block-text ol li::before { content: counter(n) "."; position: absolute; left: 0; font-family: var(--f-mono); font-size: 0.84em; color: var(--ink-2); }
.prose .block-text a { text-decoration-color: var(--accent); }

.prose .block-heading { scroll-margin-top: calc(var(--header-h) + 24px); }
.heading-anchor { opacity: 0; margin-left: 0.35em; text-decoration: none; color: var(--ink-2); font-size: 0.7em; }
.heading-anchor::before { content: "#"; }
.block-heading:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }

/* El bloque de código emite la caja `.block` del sistema; aquí sólo lo que le falta. */
.prose .block-code code { font: inherit; background: none; padding: 0; }

/* Llamada de atención: la usa «Límites» y los avisos del caso */
.block-callout { padding: var(--s-4); border: 1px solid var(--rule-strong); background: var(--surface); }
.block-callout .callout-title { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.block-callout .callout-icon { flex: none; }
.block-callout .callout-content { margin-top: var(--s-2); font-size: 0.96em; line-height: 1.5; }
.block-callout .callout-content > * + * { margin-top: 0.7em; }
.callout-warning, .callout-error, .callout-danger { border-color: var(--accent); background: var(--accent-wash); }
.callout-success, .callout-tip { border-left: 4px solid var(--ink); }

.block-quote { margin: 0; padding-left: var(--s-4); border-left: 3px solid var(--accent); font-size: 1.1em; line-height: 1.5; }
.block-quote p { text-wrap: pretty; }
.quote-attribution { display: block; margin-top: var(--s-2); font-size: 0.84rem; color: var(--ink-2); font-style: normal; }

.block-table-wrapper { overflow-x: auto; scrollbar-width: thin; }
.block-table { border: 1px solid var(--rule-strong); background: var(--surface); font-size: 0.9em; }
.block-table th, .block-table td { padding: 10px var(--s-4); text-align: left; border-top: 1px solid var(--rule); }
.block-table thead th { font-size: 0.84em; color: var(--ink-2); font-weight: 600; border-top: 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.block-table td { font-family: var(--f-mono); font-size: 0.86em; }
.block-table td:first-child { font-family: var(--f-body); font-size: 1em; }

.block-separator { border: 0; border-top: 1px solid var(--rule-strong); margin-block: var(--s-6); }
.prose figure.block-image, .prose .block-video, .prose .block-embed { margin-inline: 0; }
.prose .block-image img { width: 100%; height: auto; border: 1px solid var(--rule); background: var(--sunken); }
.prose .block-image figcaption, .video-caption, .embed-caption { font: 400 0.78rem/1.45 var(--f-mono); color: var(--ink-2); padding-top: 6px; }
.video-responsive, .embed-responsive { position: relative; aspect-ratio: 16 / 9; background: var(--term-bg); }
.video-responsive iframe, .embed-responsive iframe, .embed-content iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.block-accordion { border: 1px solid var(--rule-strong); background: var(--surface); }
.accordion-item + .accordion-item { border-top: 1px solid var(--rule); }
.accordion-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 var(--s-4); font-weight: 700; cursor: pointer; list-style: none; }
.accordion-title::-webkit-details-marker { display: none; }
.accordion-content { padding: 0 var(--s-4) var(--s-4); font-size: 0.96em; line-height: 1.5; }

.block-columns { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .block-columns { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-3); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; border: 1px solid var(--rule); }
.block-unknown { padding: var(--s-3); border: 1px dashed var(--accent); color: var(--accent); font: 400 0.84rem var(--f-mono); }

/* ---------- Marcador de posición de imagen ---------- */
.cv-ph { background: var(--sunken); border: 1px solid var(--rule); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.cv-ph--img { aspect-ratio: auto; border: 0; background: var(--sunken); width: 100%; height: auto; object-fit: cover; }
.cv-ph__lbl { font: 400 0.78rem var(--f-mono); color: var(--ink-2); }

/* ---------- Comentarios y alternativas de la comunidad ---------- */
.comments-section { padding-block: var(--s-7) 0; max-width: 70ch; }
.comments-title { font-size: clamp(1.6rem, 4.4vw, 2.2rem); padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule-strong); }
.comments-count { font: 400 0.9rem var(--f-mono); color: var(--ink-2); }
.comments-empty { padding-block: var(--s-4); color: var(--ink-2); }
.comments-wrapper { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.comments-wrapper article { padding-block: var(--s-4); border-top: 1px solid var(--rule); }
.comment-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.86rem; }
.comment-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--ink); color: var(--ground); font: 700 0.8rem var(--f-display); }
.comment-badge-author { background: var(--accent); color: var(--accent-ink); padding: 1px 7px; font-size: 0.74rem; font-weight: 700; }
.comment-header time { color: var(--ink-2); margin-left: auto; font-size: 0.8rem; }
.comment-body { margin-top: var(--s-2); line-height: 1.55; text-wrap: pretty; }
.comment-replies { margin-top: var(--s-4); padding-left: var(--s-4); border-left: 1px solid var(--rule); display: grid; gap: var(--s-3); }

/* ---------- Formularios ---------- */
.comment-form-wrapper, .cp-form { margin-top: var(--s-6); padding: var(--s-5); border: 1px solid var(--rule-strong); background: var(--surface); }
.comment-form, .cp-form-body { display: grid; gap: var(--s-3); }
.form-row { display: grid; gap: var(--s-3); }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group, .cp-field { display: grid; gap: 5px; }
label, .cp-label, .cv-bl__f-label { font-size: 0.86rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea, select {
  min-height: 44px; padding: 10px 12px; background: var(--ground); border: 1px solid var(--rule);
  border-radius: 2px; width: 100%;
}
textarea, .cp-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
/* El buscador tiene su propia caja: la regla general de formularios le quitaba el hueco de
   la lupa y el icono acababa encima del texto. */
.search input[type="search"] { height: 40px; min-height: 40px; padding: 0 40px 0 38px; }
.menu .search input[type="search"], .search-row .search input[type="search"] { padding-right: 14px; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: var(--ink-2); }
.btn-submit, .cp-submit { align-self: start; }
.cp-form-note, .cp-form-footer { font-size: 0.82rem; color: var(--ink-2); }
.cp-form-ok { padding: var(--s-4); border: 1px solid var(--accent); background: var(--accent-wash); }
.cp-form-ok-title { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
.cp-form-ok-sub { font-size: 0.92rem; margin-top: 4px; }
.news__ok { padding: var(--s-3) var(--s-4); border: 1px solid var(--ground); font-size: 0.9rem; }

/* ---------- Paginación ---------- */
.cv-bl__pag { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding-block: var(--s-7); }
.cv-bl__pag a, .cv-bl__pag-n, .cv-bl__pag-arr { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 10px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.92rem; }
.cv-bl__pag a:hover { border-color: var(--ink); }
.cv-bl__pag .is-on, .cv-bl__pag [aria-current] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.cv-bl__pag-gap { border: 0; background: none; color: var(--ink-2); min-width: 24px; }

/* ---------- Páginas auxiliares ---------- */
.cv-pg__container, .cv-b, .cv-po-shell, .cv-tag-page { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.cv-pg__head, .cv-sr__top, .cv-tag__top, .list-head { padding-block: var(--s-6) var(--s-5); border-bottom: 1px solid var(--rule-strong); }
.cv-pg__title, .cv-tag__h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.6rem); font-weight: 600; letter-spacing: -0.005em; }
.cv-pg__deck, .cv-tag__lede { margin-top: var(--s-3); color: var(--ink-2); max-width: 56ch; font-size: 1.05rem; line-height: 1.5; }
.cv-pg__meta, .cv-sr__meta, .cv-tag__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--s-3); font-size: 0.88rem; color: var(--ink-2); }
.cv-pg__body { padding-block: var(--s-6); }
.cv-pg__empty, .cv-sr__empty { padding: var(--s-7) 0; color: var(--ink-2); }

.cv-bl__grid, .cv-b__triple-grid, .cv-tag__cards, .rel { display: grid; gap: var(--s-7) var(--s-5); align-items: start; padding-block: var(--s-5); }
@media (min-width: 640px) { .cv-bl__grid, .cv-b__triple-grid, .cv-tag__cards, .rel { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .cv-bl__grid, .cv-b__triple-grid, .cv-tag__cards, .rel { grid-template-columns: repeat(3, 1fr); } }

.cv-bl__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--s-4); padding-block: var(--s-4); }
.cv-bl__filter { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); background: var(--ground); font-size: 0.88rem; font-weight: 600; text-decoration: none; border-radius: 2px; }
.cv-bl__filter:hover { border-color: var(--ink); }
.cv-bl__filter.is-on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.cv-bl__count { font: 400 0.86rem var(--f-mono); color: var(--ink-2); }

/* Archivo: filas */
.cv-ar__rows { border-top: 1px solid var(--rule-strong); }
.cv-ar__row { display: grid; gap: 4px var(--s-5); padding-block: var(--s-4); border-bottom: 1px solid var(--rule); }
.cv-ar__row-title { font: 700 1.25rem/1.1 var(--f-display); }
.cv-ar__row-title a { text-decoration: none; }
.cv-ar__row-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.cv-ar__row-excerpt { color: var(--ink-2); font-size: 0.96rem; line-height: 1.45; max-width: 60ch; }
.cv-ar__row-body { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.84rem; color: var(--ink-2); }
@media (min-width: 860px) { .cv-ar__row { grid-template-columns: 1fr 12em; align-items: baseline; } .cv-ar__row-body { justify-content: flex-end; } }

/* Búsqueda */
.cv-sr__box { display: flex; gap: 8px; flex-wrap: wrap; padding-block: var(--s-4); }
.cv-sr__input { flex: 1 1 260px; }
.cv-sr__results { display: grid; gap: var(--s-4); padding-block: var(--s-4); }
.cv-sr__item { padding-block: var(--s-4); border-top: 1px solid var(--rule); }
.cv-sr__item-title { font: 700 1.3rem/1.1 var(--f-display); }
.cv-sr__item-title a { text-decoration: none; }
.cv-sr__item-snippet { margin-top: 6px; color: var(--ink-2); line-height: 1.5; max-width: 62ch; }
.cv-sr__item-meta { margin-top: 6px; font-size: 0.82rem; color: var(--ink-2); }
.cv-sr__clear { margin-left: 8px; }

/* Etiquetas */
.cv-tg__cloud, .cv-tag__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-block: var(--s-5); }
.cv-tg__tag, .cv-tag__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font: 400 0.86rem var(--f-mono); }
.cv-tg__tag:hover, .cv-tag__chip:hover { border-color: var(--accent); color: var(--accent); }
.cv-tg__tag .n, .cv-tag__chip .n { color: var(--ink-2); font-size: 0.78rem; }
.cv-tag__stat { font: 400 0.86rem var(--f-mono); color: var(--ink-2); }
.cv-tag__prose { max-width: 62ch; line-height: 1.6; }

/* Artículo anterior y siguiente */
.cv-po__pn { display: grid; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--rule-strong); }
@media (min-width: 720px) { .cv-po__pn { grid-template-columns: 1fr 1fr; gap: var(--s-5); } .cv-po__pn-next { text-align: right; } }
.cv-po__pn a { display: block; padding: var(--s-4); border: 1px solid var(--rule); background: var(--surface); text-decoration: none; transition: background 0.2s, color 0.2s; }
.cv-po__pn a:hover { background: var(--ink); color: var(--ground); }
.cv-po__pn-lbl { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.cv-po__pn a:hover .cv-po__pn-lbl { color: inherit; }
.cv-po__pn-t { font: 700 1.15rem/1.15 var(--f-display); display: block; margin-top: 4px; }
.cv-po__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-6); }
.cv-po__tags a { font: 400 0.8rem var(--f-mono); padding: 5px 9px; border: 1px solid var(--rule); text-decoration: none; }
.cv-po__tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Compartir */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--s-5); font-size: 0.86rem; }
.share-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); text-decoration: none; }
.share-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--ground); }

/* Error y no encontrado */
.error-page { display: grid; gap: var(--s-4); padding-block: var(--s-9); text-align: left; }
.error-code { font: 600 clamp(5rem, 22vw, 11rem)/0.85 var(--f-display); color: var(--accent); }
.error-content p { color: var(--ink-2); max-width: 46ch; }
.error-links { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }

/* La utilidad de ocultar visualmente que ya usaban las páginas heredadas */
.cv-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
