/* Sin Terraza — hoja de estilos única
   Concepto: «azulete» (el añil de la colada) + pinza amarilla.
   Mobile-first. Modo oscuro con prefers-color-scheme. */

/* Fuentes alojadas en el propio servidor (licencia SIL OFL 1.1, ver assets/fonts/OFL-*.txt), subconjunto latino.
   Variables: Bricolage Grotesque (peso 400-800, anchura 75-100 %) y Literata (peso 400-650; óptica automática). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 650; font-display: swap;
  src: url("/assets/fonts/literata-latin.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/literata-italic-latin.woff2") format("woff2"); }

/* Fuentes de reserva con métricas ajustadas (medidas frente a la fuente final) para evitar saltos de maquetación (CLS) */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 91.6%; }
@font-face { font-family: "Bricolage Condensada Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 90%; }
@font-face { font-family: "Literata Fallback"; src: local("Georgia"); size-adjust: 107%; }
@font-face { font-family: "Bricolage Resumen Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 105%; }

:root {
  /* Color */
  --sabana: #f6f8fb;          /* fondo */
  --sabana-2: #eaf0f8;        /* superficies suaves */
  --papel: #ffffff;           /* tarjetas */
  --tinta: #142036;           /* texto principal */
  --tinta-2: #46526a;         /* texto secundario */
  --hilo: #d5ddea;            /* bordes y reglas */
  --azulete: #2d4bd6;         /* acento principal / enlaces */
  --azulete-hondo: #1d33a3;   /* hover */
  --azulete-velo: #e3e8fd;    /* fondos de acento */
  --pinza: #ffce3a;           /* resaltado, CTA Amazon */
  --pinza-hondo: #e9b308;
  --menta: #12805c;           /* a favor */
  --ladrillo: #b4401a;        /* en contra / aviso */
  --sombra: 0 1px 0 rgba(20, 32, 54, .06), 0 8px 24px -12px rgba(20, 32, 54, .18);
  --foco: #1d33a3;            /* anillo de foco: 9,6:1 sobre el fondo */
  --borde-control: #46526a;   /* bordes de campos y botones secundarios: 7,4:1 */
  --borde-amazon: #8a6500;    /* borde del CTA: 4,6:1 sobre el fondo */
  --tactil: 44px;             /* objetivo táctil mínimo */

  /* Tipografía */
  --f-display: "Bricolage Grotesque", "Bricolage Fallback", sans-serif;
  --f-texto: "Literata", "Literata Fallback", Georgia, serif;
  --t-xs: .8125rem;
  --t-s: .9375rem;
  --t-m: 1.0625rem;
  --t-l: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  --t-xxl: clamp(2rem, 1.4rem + 3vw, 3.25rem);

  /* Espacio y forma */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --radio-s: 6px;
  --radio-m: 12px;
  --ancho-texto: 68ch;
  --ancho-sitio: 1180px;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sabana: #0f1626;
    --sabana-2: #162036;
    --papel: #18233a;
    --tinta: #e8edf7;
    --tinta-2: #aab5cb;
    --hilo: #2b3956;
    --azulete: #8ea2ff;
    --azulete-hondo: #b6c3ff;
    --azulete-velo: #1d2a52;
    --pinza: #ffd55a;
    --pinza-hondo: #ffc21f;
    --menta: #4fd1a1;
    --ladrillo: #ff9a72;
    --sombra: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6);
    --foco: #ffd55a;
    --borde-control: #aab5cb;
    --borde-amazon: #ffc21f;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--sabana);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: var(--t-m);
  line-height: 1.68;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--azulete); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--azulete-hondo); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 3px; }
.pie :focus-visible, .skip:focus-visible { outline-color: var(--pinza); }
.tabla-scroll:focus-visible { outline-offset: -3px; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-family: "Bricolage Grotesque", "Bricolage Condensada Fallback", sans-serif; font-size: var(--t-xxl); font-weight: 750; font-variation-settings: "wdth" 90; letter-spacing: -.025em; }
h2 { font-size: var(--t-xl); font-weight: 700; margin-top: var(--s7); margin-bottom: var(--s4); }
h3 { font-size: var(--t-l); font-weight: 650; margin-top: var(--s6); margin-bottom: var(--s3); }
p, ul, ol, dl, table, figure { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 650; }
small { font-size: var(--t-xs); }
hr { border: 0; border-top: 1px solid var(--hilo); margin: var(--s6) 0; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--pinza); color: #142036; padding: var(--s2) var(--s4); z-index: 50;
  font-family: var(--f-display); font-weight: 600;
}
.skip:focus { left: var(--s4); top: var(--s4); }

.envoltorio { width: min(100% - 2 * var(--gutter), var(--ancho-sitio)); margin-inline: auto; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--sabana) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--hilo);
}
.cabecera .envoltorio { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 60px; }
.marca {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em;
  color: var(--tinta); text-decoration: none;
}
.marca:hover { color: var(--tinta); }
.cabecera .marca, .pie .marca { min-height: var(--tactil); }
.marca svg { width: 26px; height: 26px; }
.menu { position: relative; font-family: var(--f-display); }
.menu summary {
  list-style: none; cursor: pointer; padding: .4rem .8rem; border: 1px solid var(--hilo);
  border-radius: 999px; font-weight: 600; font-size: var(--t-s); color: var(--tinta);
  min-height: var(--tactil); display: flex; align-items: center; border-color: var(--borde-control);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--azulete-velo); }
.menu ul {
  position: absolute; right: 0; top: calc(100% + .5rem); margin: 0; padding: var(--s2);
  list-style: none; background: var(--papel); border: 1px solid var(--hilo); border-radius: var(--radio-m);
  box-shadow: var(--sombra); min-width: 240px;
}
.menu li + li { margin-top: 0; }
.menu a { display: flex; align-items: center; min-height: var(--tactil); padding: .4rem .75rem; border-radius: var(--radio-s); color: var(--tinta); text-decoration: none; font-weight: 550; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--azulete-velo); color: var(--azulete-hondo); }
.nav-lineal { display: none; }
@media (min-width: 900px) {
  .menu { display: none; }
  .nav-lineal { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; font-family: var(--f-display); }
  .nav-lineal li + li { margin-top: 0; }
  .nav-lineal a { display: block; padding: .45rem .7rem; border-radius: var(--radio-s); color: var(--tinta); text-decoration: none; font-weight: 550; font-size: var(--t-s); }
  .nav-lineal a:hover, .nav-lineal a[aria-current="page"] { background: var(--azulete-velo); color: var(--azulete-hondo); }
}

/* ---------- Migas ---------- */
.migas { font-family: var(--f-display); font-size: var(--t-xs); color: var(--tinta-2); margin: var(--s3) 0 var(--s1); }
.migas ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: nowrap; gap: .25rem; white-space: nowrap; overflow: hidden; }
.migas li { flex: none; }
.migas li:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; line-height: var(--tactil); }
.migas li + li { margin-top: 0; }
.migas li { display: flex; align-items: center; min-height: var(--tactil); }
.migas li + li::before { content: "/"; content: "/" / ""; margin-right: .3rem; color: var(--tinta-2); }
.migas a { color: var(--tinta-2); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tactil); }
.migas a:hover { color: var(--azulete); text-decoration: underline; }

/* ---------- Cabecera de artículo ---------- */
.cab-articulo { padding-bottom: var(--s5); border-bottom: 1px solid var(--hilo); margin-bottom: var(--s5); }
.cab-articulo h1 { max-width: 22ch; }
.entradilla { font-size: var(--t-l); line-height: 1.55; color: var(--tinta-2); max-width: 60ch; margin-top: var(--s4); }
.firma {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; margin-top: var(--s4);
  font-family: var(--f-display); font-size: var(--t-s); color: var(--tinta-2);
}
.firma .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--azulete-velo);
  display: grid; place-items: center; color: var(--azulete-hondo); font-weight: 700;
}
.firma strong { color: var(--tinta); }

.aviso-afiliados {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--sabana-2); border-left: 4px solid var(--pinza);
  padding: var(--s3) var(--s4); border-radius: 0 var(--radio-s) var(--radio-s) 0;
  font-family: var(--f-display); font-size: var(--t-s); line-height: 1.5; color: var(--tinta-2); margin-bottom: var(--s5);
}
.aviso-afiliados svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.aviso-afiliados a { color: inherit; }

/* ---------- Maquetación de artículo ---------- */
.rejilla { display: grid; gap: var(--s6); padding-bottom: var(--s8); }
.prosa { min-width: 0; max-width: var(--ancho-texto); }
.prosa > p, .prosa > ul, .prosa > ol { max-width: 66ch; }
.prosa h2 { scroll-margin-top: 5rem; }
.prosa h2::before {
  content: ""; display: block; width: 2.25rem; height: 4px; border-radius: 4px;
  background: var(--azulete); margin-bottom: var(--s3);
}
.indice { display: none; }
@media (min-width: 1040px) {
  .rejilla { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
  .indice {
    display: block; position: sticky; top: 5rem; font-family: var(--f-display); font-size: var(--t-s);
    border-left: 2px solid var(--hilo); padding-left: var(--s4);
  }
  .indice p { font-weight: 700; margin-bottom: var(--s2); }
  .indice ol { list-style: none; padding: 0; margin: 0; }
  .indice li + li { margin-top: .4rem; }
  .indice a { color: var(--tinta-2); text-decoration: none; line-height: 1.35; display: block; }
  .indice a:hover { color: var(--azulete); }
}
.indice-movil {
  font-family: var(--f-display); font-size: var(--t-s); border: 1px solid var(--hilo);
  border-radius: var(--radio-m); padding: var(--s3) var(--s4); margin-bottom: var(--s5); background: var(--papel);
}
.indice-movil summary { cursor: pointer; font-weight: 650; min-height: var(--tactil); display: flex; align-items: center; }
.indice-movil a { display: flex; align-items: center; min-height: var(--tactil); }
.indice-movil li + li { margin-top: 0; }
.indice-movil ol { margin: var(--s3) 0 0; padding-left: 1.1rem; }
@media (min-width: 1040px) { .indice-movil { display: none; } }

/* ---------- Respuesta rápida ---------- */
.veredicto {
  background: var(--papel); border: 1px solid var(--hilo); border-radius: var(--radio-m);
  padding: var(--s5); margin: var(--s5) 0; box-shadow: var(--sombra);
}
.veredicto h2 { margin-top: 0; font-size: var(--t-l); }
.veredicto h2::before { display: none; }
.veredicto ul { margin-bottom: 0; }

/* ---------- Ficha de producto: etiqueta de lavado ---------- */
.etiqueta {
  position: relative; background: var(--papel); border: 1px solid var(--hilo);
  border-radius: var(--radio-m); margin: var(--s6) 0; box-shadow: var(--sombra); overflow: hidden;
}
.etiqueta::before { /* el ojal de la etiqueta */
  content: ""; position: absolute; top: 18px; right: 18px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--hilo); background: var(--sabana);
}
.etiqueta__cab > div, .specs dd { min-width: 0; overflow-wrap: break-word; }
.etiqueta__cab { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--s4); padding: var(--s5) var(--s5) var(--s4); align-items: start; }
.etiqueta__foto {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff;
  border: 1px solid var(--hilo); border-radius: var(--radio-s);
}
@media (min-width: 620px) { .etiqueta__cab { grid-template-columns: 168px minmax(0, 1fr); gap: var(--s5); } }
.etiqueta__puesto {
  display: inline-block; font-family: var(--f-display); font-size: var(--t-xs); font-weight: 650;
  background: var(--pinza); color: #142036; padding: .1rem .55rem; border-radius: 999px; margin-bottom: .35rem;
}
.etiqueta h2, .etiqueta h3 { margin: 0; font-size: var(--t-l); padding-right: 2rem; }
.etiqueta h2::before { display: none; }
.etiqueta__tipo { font-family: var(--f-display); font-size: var(--t-s); color: var(--tinta-2); margin: .2rem 0 0; }
.etiqueta__cuerpo { padding: 0 var(--s5) var(--s5); }
.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hilo);
  border: 1px solid var(--hilo); border-radius: var(--radio-s); overflow: hidden; margin: 0 0 var(--s4);
  font-family: var(--f-display);
}
.specs div { background: var(--sabana); padding: .55rem .7rem; }
.specs dt { font-size: var(--t-xs); color: var(--tinta-2); }
.specs dd { margin: 0; font-weight: 650; font-size: var(--t-s); }
@media (min-width: 620px) { .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pros-contras { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
@media (min-width: 620px) { .pros-contras { grid-template-columns: 1fr 1fr; } }
.pros-contras h3, .pros-contras h4 { margin-top: 0; font-size: var(--t-s); margin-bottom: var(--s2); display: flex; align-items: center; gap: .4rem; }
.pros-contras ul { list-style: none; padding: 0; margin: 0; font-size: var(--t-s); line-height: 1.5; }
.pros-contras li { padding-left: 1.4rem; position: relative; }
.pros-contras .a-favor li::before { content: "+"; content: "+" / ""; position: absolute; left: 0; color: var(--menta); font-weight: 800; font-family: var(--f-display); }
.pros-contras .en-contra li::before { content: "−"; content: "−" / ""; position: absolute; left: 0; color: var(--ladrillo); font-weight: 800; font-family: var(--f-display); }
.para-quien { font-size: var(--t-s); background: var(--azulete-velo); border-radius: var(--radio-s); padding: var(--s3) var(--s4); }
.etiqueta__pie {
  display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--hilo); padding: var(--s4) var(--s5); background: var(--sabana-2);
}
.fuente { font-family: var(--f-display); font-size: var(--t-xs); color: var(--tinta-2); }
.fuente a { color: inherit; display: inline-block; padding: .35rem 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-s); line-height: 1.2;
  padding: .8rem 1.15rem; border-radius: 999px; text-decoration: none; border: 2px solid transparent;
  min-height: var(--tactil); cursor: pointer; position: relative;
}
.btn-amazon { background: var(--pinza); color: #142036; border-color: var(--borde-amazon); }
.btn-amazon:hover { background: var(--pinza-hondo); color: #142036; }
.btn-amazon svg { width: 18px; height: 18px; }
.btn-sec { background: transparent; color: var(--tinta); border-color: var(--borde-control); }
.btn-sec:hover { border-color: var(--azulete); color: var(--azulete); }

/* ---------- Tablas comparativas ---------- */
.tabla-scroll {
  position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--s5) 0;
  border: 1px solid var(--hilo); border-radius: var(--radio-m); background: var(--papel);
  background-image: linear-gradient(to right, var(--papel) 30%, transparent), linear-gradient(to left, var(--papel) 30%, transparent),
    linear-gradient(to right, rgba(20,32,54,.12), transparent), linear-gradient(to left, rgba(20,32,54,.12), transparent);
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
table { border-collapse: collapse; width: 100%; font-family: var(--f-display); font-size: var(--t-s); }
caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 650; color: var(--tinta-2); caption-side: top; }
th, td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--hilo); vertical-align: top; }
thead th { background: var(--sabana-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.tabla-comparativa { min-width: 640px; }
.tabla-comparativa th[scope="row"] {
  position: sticky; left: 0; background: var(--papel); z-index: 1; min-width: 150px; max-width: 190px;
  box-shadow: 1px 0 0 var(--hilo);
}
.tabla-comparativa thead th:first-child { position: sticky; left: 0; z-index: 2; }
.tabla-comparativa th[scope="row"] a { display: inline-block; padding: .3rem 0; }
.tabla-comparativa td .btn { min-height: var(--tactil); padding: .5rem .8rem; font-size: var(--t-xs); white-space: nowrap; }
.nota-tabla { font-family: var(--f-display); font-size: var(--t-xs); color: var(--tinta-2); margin-top: calc(-1 * var(--s3)); }

/* ---------- Avisos y cajas ---------- */
.caja {
  border-radius: var(--radio-m); padding: var(--s4) var(--s5); margin: var(--s5) 0;
  background: var(--azulete-velo); border: 1px solid color-mix(in srgb, var(--azulete) 25%, transparent);
}
.caja > :last-child { margin-bottom: 0; }
.caja p:first-child strong:first-child { font-family: var(--f-display); }
.caja--ojo { background: color-mix(in srgb, var(--ladrillo) 9%, var(--papel)); border-color: color-mix(in srgb, var(--ladrillo) 35%, transparent); }
.caja--cuenta { background: var(--papel); border: 1px solid var(--hilo); font-family: var(--f-display); font-size: var(--t-s); }

/* ---------- Calculadora ---------- */
.calculadora {
  background: var(--papel); border: 2px solid var(--azulete); border-radius: var(--radio-m);
  padding: var(--s5); margin: var(--s5) 0; font-family: var(--f-display);
}
.calculadora h2 { margin-top: 0; }
.calculadora h2::before { display: none; }
.calc-campos { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: var(--s4); }
.calc-campos label { display: grid; gap: .3rem; font-size: var(--t-s); font-weight: 600; }
.calc-campos input {
  font: inherit; font-size: var(--t-m); padding: .6rem .7rem; border: 1px solid var(--borde-control); min-height: var(--tactil); border-radius: var(--radio-s);
  background: var(--sabana); color: var(--tinta); width: 100%;
}
.calc-resultado { font-size: var(--t-l); font-weight: 700; margin: 0; }
.calc-resultado output { color: var(--azulete); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--hilo); padding: var(--s1) 0; }
.faq summary {
  cursor: pointer; font-family: var(--f-display); font-weight: 650; font-size: var(--t-m);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: var(--tactil);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; font-weight: 800; color: var(--azulete); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: var(--s2) 0 var(--s3); }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- Enlaces relacionados ---------- */
.relacionados { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--hilo); }
.relacionados h2 { margin-top: 0; font-size: var(--t-l); }
.relacionados h2::before { display: none; }
.lista-pinzas { list-style: none; padding: 0; display: grid; gap: var(--s3); }
@media (min-width: 620px) { .lista-pinzas { grid-template-columns: 1fr 1fr; } }
.lista-pinzas li { margin: 0; }
.lista-pinzas a {
  display: block; min-height: var(--tactil); padding: var(--s3) var(--s4) var(--s3) 2.4rem; position: relative; text-decoration: none;
  font-family: var(--f-display); font-weight: 600; color: var(--tinta); border-radius: var(--radio-s);
  background: var(--papel); border: 1px solid var(--hilo); line-height: 1.35;
}
.lista-pinzas a::before { /* pinza */
  content: ""; position: absolute; left: .9rem; top: .85rem; width: 8px; height: 18px; border-radius: 3px;
  background: var(--pinza); box-shadow: 0 0 0 1px var(--pinza-hondo);
}
.lista-pinzas a:hover { border-color: var(--azulete); color: var(--azulete-hondo); }
.lista-pinzas small { display: block; color: var(--tinta-2); font-weight: 450; margin-top: .15rem; font-size: var(--t-xs); }

/* ---------- Autor ---------- */
.caja-autor {
  display: grid; grid-template-columns: 56px 1fr; gap: var(--s4); align-items: start;
  margin-top: var(--s7); padding: var(--s5); border-radius: var(--radio-m); background: var(--sabana-2);
  font-size: var(--t-s); line-height: 1.6;
}
.caja-autor .avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--azulete); color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem;
}
.caja-autor p { margin-bottom: var(--s2); }
@media (prefers-color-scheme: dark) { .caja-autor .avatar { color: #0f1626; } }
.caja-autor p:first-child { font-family: var(--f-display); font-weight: 700; color: var(--tinta); }

/* ---------- Figuras SVG ---------- */
.figura { margin: var(--s5) 0; }
.figura svg, .figura img { width: 100%; border-radius: var(--radio-m); background: var(--sabana-2); }
.figura figcaption { font-family: var(--f-display); font-size: var(--t-xs); color: var(--tinta-2); margin-top: var(--s2); }

/* ---------- Home: la cuerda ---------- */
.portada { padding: var(--s6) 0 var(--s5); }
.portada h1 { max-width: 15ch; font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.4rem); line-height: 1.02; }
.portada .entradilla { margin-bottom: var(--s5); }
.cuerda { position: relative; margin: var(--s6) 0 var(--s4); padding-top: 22px; overflow-x: clip; overflow-y: visible; }
.cuerda::before { /* el hilo, con su comba */
  content: ""; position: absolute; left: -2%; right: -2%; top: 0; height: 40px;
  border-top: 2px solid var(--tinta-2); border-radius: 50% / 40px 40px 0 0; transform: scaleY(-1); opacity: .55;
}
.cuerda ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); }
.cuerda li { margin: 0; }
.prenda {
  position: relative; display: block; text-decoration: none; color: var(--tinta);
  background: var(--papel); border: 1px solid var(--hilo); border-radius: 4px 4px var(--radio-m) var(--radio-m);
  padding: var(--s5) var(--s5) var(--s4); box-shadow: var(--sombra); transform-origin: 50% -22px;
}
.prenda::before, .prenda::after { /* dos pinzas */
  content: ""; position: absolute; top: -16px; width: 10px; height: 26px; border-radius: 3px;
  background: var(--pinza); box-shadow: 0 0 0 1px var(--pinza-hondo);
}
.prenda::before { left: 22px; }
.prenda::after { right: 22px; }
.prenda h2 { font-size: var(--t-l); margin: 0 0 .35rem; }
.prenda h2::before { display: none; }
.prenda p { font-size: var(--t-s); color: var(--tinta-2); margin: 0; line-height: 1.5; }
.prenda svg { width: 56px; height: 56px; margin-bottom: var(--s3); }
.prenda:hover { border-color: var(--azulete); color: var(--tinta); }
.prenda:hover h2 { color: var(--azulete-hondo); }
@media (min-width: 760px) {
  .cuerda ul { grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
  .cuerda li:nth-child(2) .prenda { margin-top: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .prenda { animation: vaiven 1.1s cubic-bezier(.3, .7, .4, 1) both; }
  .cuerda li:nth-child(2) .prenda { animation-delay: .12s; }
  .cuerda li:nth-child(3) .prenda { animation-delay: .24s; }
  @keyframes vaiven {
    0% { transform: rotate(-3deg); }
    45% { transform: rotate(1.6deg); }
    70% { transform: rotate(-.6deg); }
    100% { transform: rotate(0); }
  }
}

.bloque { padding: var(--s7) 0; border-top: 1px solid var(--hilo); }
.bloque h2 { margin-top: 0; }
.bloque h2::before { display: none; }
.dos-col { display: grid; gap: var(--s6); }
@media (min-width: 860px) { .dos-col { grid-template-columns: 1fr 1fr; } }
.lista-pasos { counter-reset: paso; list-style: none; padding: 0; }
.lista-pasos li { counter-increment: paso; position: relative; padding-left: 2.6rem; margin-bottom: var(--s4); }
.lista-pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: .1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--azulete); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: var(--t-s);
}
@media (prefers-color-scheme: dark) { .lista-pasos li::before { color: #0f1626; } }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #c9d2e3; padding: var(--s7) 0 var(--s6); font-family: var(--f-display); font-size: var(--t-s); }
@media (prefers-color-scheme: dark) { .pie { background: #0a101d; } }
.pie a { color: #ffffff; text-decoration: none; }
.pie a:hover { text-decoration: underline; color: var(--pinza); }
.pie .marca { color: #fff; margin-bottom: var(--s3); }
.pie-rejilla { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .pie-rejilla { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pie h2 { font-size: var(--t-s); color: #fff; margin: 0 0 var(--s3); }
.pie h2::before { display: none; }
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li + li { margin-top: 0; }
.pie li a { display: inline-flex; align-items: center; min-height: var(--tactil); }
.pie-legal { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(255,255,255,.14); font-size: var(--t-xs); line-height: 1.6; }
.btn-enlace { background: none; border: 0; padding: .6rem 0; min-height: var(--tactil); font: inherit; color: #fff; cursor: pointer; text-decoration: underline; }

/* ---------- Banner de cookies ---------- */
.cookies {
  position: fixed; inset: auto var(--gutter) var(--gutter) var(--gutter); z-index: 60; max-width: 560px; margin-inline: auto;
  background: var(--papel); color: var(--tinta); border: 1px solid var(--hilo); border-radius: var(--radio-m);
  box-shadow: 0 18px 48px -12px rgba(20, 32, 54, .45); padding: var(--s5); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: var(--t-s); line-height: 1.5;
}
.cookies[hidden] { display: none; }
.cookies h2, .cookies .btn { font-family: inherit; }
.cookies h2 { font-size: var(--t-m); margin: 0 0 var(--s2); }
.cookies h2::before { display: none; }
.cookies-botones { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.cookies-botones .btn { flex: 1 1 auto; min-height: var(--tactil); padding: .55rem 1rem; }
.btn-primario { background: var(--azulete); color: #fff; }
.btn-primario:hover { background: var(--azulete-hondo); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primario, .btn-primario:hover { color: #0f1626; } }

/* ---------- 404 ---------- */
.error-404 { padding: var(--s8) 0; text-align: left; }
.error-404 svg { width: min(320px, 80%); margin-bottom: var(--s5); }

/* ---------- Utilidades ---------- */
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.legal .prosa h2 { font-size: var(--t-l); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .cabecera, .pie, .cookies, .indice, .indice-movil, .btn-amazon { display: none !important; }
}
.caja-autor--portada { margin-bottom: var(--s7); }

/* ===== Diseño C · Editorial (con la cuerda de D en la home y costura en las fichas) ===== */
:root {
  --banda: #eef2fb;
  --banda-fuerte: #2d4bd6;
  --costura: #b9c6e4;
  --f-titular: "Literata", "Literata Fallback", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --banda: #162036; --banda-fuerte: #1d2a6b; --costura: #3a4a6e; }
}

/* ---------- Titulares editoriales en serif ---------- */
h1, .prosa h2, .etiqueta h3, .bloque h2 { font-family: var(--f-titular); font-weight: 650; letter-spacing: -.015em; font-variation-settings: normal; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.06; }
.prosa h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); border-top: 1px solid var(--hilo); padding-top: var(--s5); }
.prosa h2::before { display: none; }
.prosa > .relacionados h2, .caja-autor h2 { border: 0; padding: 0; }

/* ---------- Cabecera de página en banda azul (la misma de la home) ---------- */
main.envoltorio > .migas, main.envoltorio > .cab-articulo {
  background: var(--banda-fuerte); box-shadow: 0 0 0 100vmax var(--banda-fuerte); clip-path: inset(0 -100vmax);
}
main.envoltorio > .migas { margin: 0; padding-top: var(--s3); }
main.envoltorio > .migas, main.envoltorio > .migas a, main.envoltorio > .migas li + li::before { color: #e3e8fd; }
main.envoltorio > .migas a:hover { color: #fff; }
.cab-articulo h1, .cab-articulo .firma, .cab-articulo .firma strong { color: #fff; }
.cab-articulo .entradilla { color: #e3e8fd; }
.cab-articulo .cab-texto a { color: #fff; }
.cab-articulo .firma .avatar { background: #fff; color: #1d33a3; }
main.envoltorio > .migas :focus-visible, .cab-articulo .cab-texto :focus-visible { outline-color: var(--pinza); }
.cab-articulo { border-bottom: 0; padding: var(--s3) 0 var(--s7); margin-bottom: var(--s6); }
.cab-articulo h1 { max-width: 20ch; }
.cab-articulo--resumen { display: grid; gap: var(--s6); align-items: end; }
@media (min-width: 1040px) { .cab-articulo--resumen { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }

/* Resumen rápido como ranking numerado */
.cab-articulo .veredicto {
  margin: 0; border: 0; border-radius: 16px; background: var(--papel);
  box-shadow: 0 1px 0 rgba(20, 32, 54, .06), 0 18px 40px -24px rgba(20, 32, 54, .35);
}
.cab-articulo .veredicto h2 { font-family: var(--f-display); font-size: var(--t-m); margin: 0 0 var(--s3); }
.cab-articulo .veredicto ul { list-style: none; padding: 0; counter-reset: res; font-family: "Bricolage Grotesque", "Bricolage Resumen Fallback", sans-serif; font-size: var(--t-s); line-height: 1.45; }
.cab-articulo .veredicto li { counter-increment: res; position: relative; padding-left: 2.6rem; margin: 0 0 var(--s3); }
.cab-articulo .veredicto li::before {
  content: counter(res); content: counter(res) / ""; position: absolute; left: 0; top: -.1rem;
  font-size: 1.75rem; line-height: 1; font-weight: 800; color: var(--azulete);
}

/* Aviso de afiliados más discreto (sigue arriba del todo) */
.aviso-afiliados { background: none; border-left: 0; padding: 0; }

/* ---------- Fichas: horizontales, foto grande, costura y ojal (de D) ---------- */
.etiqueta { border-radius: 20px; outline: 2px dashed var(--costura); outline-offset: -10px; }
.etiqueta::before { left: 50%; right: auto; margin-left: -7px; top: 14px; }
.etiqueta h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.2; padding-right: 0; }
.prosa--ranking { counter-reset: puesto; }
.prosa--ranking .etiqueta { counter-increment: puesto; }
.prosa--ranking .etiqueta__cab > div::before {
  content: counter(puesto); content: counter(puesto) / ""; display: block; margin-bottom: var(--s2);
  font-family: var(--f-display); font-size: 3.25rem; line-height: .9; font-weight: 800;
  color: var(--azulete-velo); -webkit-text-stroke: 2px var(--azulete);
}
.etiqueta__puesto { background: var(--tinta); color: var(--pinza); }
@media (prefers-color-scheme: dark) { .etiqueta__puesto { background: var(--pinza); color: #142036; } }
.etiqueta__pie .btn-amazon { flex: 1 1 100%; border-radius: 12px; min-height: 52px; font-size: var(--t-m); }

@media (min-width: 860px) {
  .etiqueta {
    display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: var(--s6); padding: var(--s7) var(--s6) var(--s6);
    grid-template-areas: "foto titulo" "foto cuerpo" "cta cuerpo" "fuente cuerpo";
    grid-template-rows: auto auto auto 1fr;
  }
  .etiqueta__cab, .etiqueta__pie { display: contents; }
  .etiqueta__foto { grid-area: foto; border-radius: 14px; }
  .etiqueta__cab > div { grid-area: titulo; margin-bottom: var(--s4); }
  .etiqueta__cuerpo { grid-area: cuerpo; padding: 0; }
  .etiqueta__pie .btn-amazon { grid-area: cta; margin-top: var(--s4); align-self: start; }
  .etiqueta__pie .fuente { grid-area: fuente; text-align: center; margin-top: var(--s2); }
}

/* Especificaciones en píldoras */
.specs { display: flex; flex-wrap: wrap; gap: var(--s2); background: none; border: 0; border-radius: 0; overflow: visible; }
.specs div { background: var(--azulete-velo); border-radius: 999px; padding: .4rem .95rem; display: inline-flex; gap: .45rem; align-items: baseline; }
.specs dt { font-size: var(--t-xs); }
.specs dd { font-size: var(--t-s); }

/* Pros y contras con ✓ y ✕ */
.pros-contras .a-favor li::before { content: "✓"; content: "✓" / ""; }
.pros-contras .en-contra li::before { content: "✕"; content: "✕" / ""; }
.para-quien { background: none; padding: var(--s3) 0 0; border-top: 1px solid var(--hilo); border-radius: 0; }

/* ---------- Tablas: cabecera oscura, filas alternas, elección destacada ---------- */
.tabla-scroll { border-radius: 16px; }
.tabla-comparativa thead th { background: var(--tinta); color: var(--papel); }
.tabla-comparativa tbody tr:nth-child(even) > * { background: var(--sabana); }
.prosa--ranking .tabla-comparativa tbody tr:first-child > * { background: var(--azulete-velo); }
.prosa--ranking .tabla-comparativa tbody tr:first-child th[scope="row"] a::after {
  content: "Nuestra elección"; content: "Nuestra elección" / ""; display: inline-block; margin-left: .4rem;
  font-size: 11px; font-weight: 700; background: var(--pinza); color: #142036; padding: 1px 8px; border-radius: 999px;
}

/* ---------- Home: la cuerda de D, en banda azul ---------- */
main > .envoltorio > .migas, .portada {
  background: var(--banda-fuerte); box-shadow: 0 0 0 100vmax var(--banda-fuerte); clip-path: inset(0 -100vmax);
}
main > .envoltorio > .migas { margin: 0; padding-top: var(--s3); color: #e3e8fd; }
.portada { color: #fff; padding-bottom: var(--s7); }
.portada h1, .portada .firma, .portada .firma strong { color: #fff; }
.portada .entradilla { color: #e3e8fd; }
.portada .firma .avatar { background: #fff; color: #1d33a3; }
.cuerda::before { border-top-color: #fff; opacity: .8; }
.prenda { background: #fff; color: #142036; border-color: transparent; }
.prenda h2 { color: #142036; }
.prenda p { color: #46526a; }
.portada :focus-visible, main > .envoltorio > .migas :focus-visible { outline-color: var(--pinza); }

/* Fichas y tablas a todo el ancho de la columna; el texto corrido sigue a ancho de lectura */
@media (min-width: 860px) {
  .prosa { max-width: none; }
  .prosa > h2, .prosa > h3, .prosa > .caja, .prosa > .faq, .prosa > .aviso-afiliados { max-width: 72ch; }
  .etiqueta { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (min-width: 860px) { .etiqueta__pie .btn-amazon { font-size: var(--t-s); white-space: nowrap; padding-inline: .8rem; } }

/* Móvil: el botón de compra sube justo debajo del título (orden visual; el HTML no cambia) */
@media (max-width: 859px) {
  .etiqueta { display: flex; flex-direction: column; }
  .etiqueta__cab { order: 0; }
  .etiqueta__pie { order: 1; border-top: 0; background: none; padding-top: 0; }
  .etiqueta__cuerpo { order: 2; }
  .etiqueta__pie .fuente { order: 2; }
}

/* Firma personal en «Sobre nosotros» */
.firma-personal { font-family: var(--f-titular, var(--f-texto)); font-style: italic; font-size: var(--t-l); margin-top: var(--s5); }
.firma-personal::before { content: "— "; content: "— " / ""; }

/* ---------- Compartir ---------- */
.compartir { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--hilo); font-family: var(--f-display); }
.compartir__titulo { font-weight: 700; font-size: var(--t-m); margin: 0 0 var(--s3); }
.compartir__lista { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.compartir__lista li { margin: 0; }
.btn-compartir {
  display: inline-flex; align-items: center; gap: .45rem; min-height: var(--tactil); padding: .45rem 1rem;
  border: 1px solid var(--borde-control); border-radius: 999px; background: var(--papel); color: var(--tinta);
  font: inherit; font-size: var(--t-s); font-weight: 600; text-decoration: none; cursor: pointer; position: relative;
}
.btn-compartir:hover { border-color: var(--azulete); color: var(--azulete-hondo); }
.btn-compartir svg { flex: none; }
.compartir__aviso { min-height: 1.5em; margin: var(--s2) 0 0; font-size: var(--t-s); color: var(--menta); }
@media print { .compartir { display: none; } }

/* ---------- Tablas en móvil y tableta: una ficha por fila, sin scroll horizontal ----------
   build.py marca con .tabla-apilar las tablas de 3+ columnas y pone a cada celda data-label con su columna. */
@media (max-width: 859px) {
  .tabla-scroll:has(> .tabla-apilar) { overflow: visible; border: 0; border-radius: 0; background: none; }
  .tabla-apilar { min-width: 0; }
  .tabla-apilar, .tabla-apilar caption, .tabla-apilar tbody, .tabla-apilar tr { display: block; }
  .tabla-apilar caption { padding: 0 0 var(--s3); }
  .tabla-apilar thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tabla-apilar tr {
    background: var(--papel); border: 1px solid var(--hilo); border-radius: var(--radio-m);
    margin-bottom: var(--s3); overflow: hidden;
  }
  .tabla-apilar tbody tr:nth-child(n) > * {
    display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: .75rem;
    padding: .55rem var(--s4); border-bottom: 1px solid var(--hilo); background: none;
  }
  .tabla-apilar tbody tr:nth-child(n) > :first-child {
    display: block; position: static; min-width: 0; max-width: none; box-shadow: none;
    background: var(--sabana-2); font-size: var(--t-m); font-weight: 700;
  }
  .tabla-apilar tbody tr:nth-child(n) > :last-child { border-bottom: 0; }
  .tabla-apilar td::before { content: attr(data-label); color: var(--tinta-2); font-size: var(--t-xs); font-weight: 600; padding-top: .1rem; }
  /* Celda del botón de Amazon: sin etiqueta y botón a todo el ancho */
  .tabla-apilar tbody tr:nth-child(n) > td:has(> .btn) { display: block; }
  .tabla-apilar td:has(> .btn)::before { display: none; }
  .tabla-apilar td .btn { width: 100%; font-size: var(--t-s); }
  .prosa--ranking .tabla-apilar tbody tr:first-child { border-color: var(--azulete); }
}

/* Escritorio: las tablas anchas caben en la columna (cabeceras en dos líneas, celdas más compactas) */
@media (min-width: 860px) {
  .tabla-comparativa { min-width: 0; }
  .tabla-comparativa thead th { white-space: normal; hyphens: auto; }
  .tabla-comparativa th, .tabla-comparativa td { padding: .6rem .55rem; }
  .tabla-comparativa th[scope="row"] { min-width: 0; width: 9.5rem; }
  .tabla-comparativa td .btn { white-space: normal; padding: .45rem .6rem; }
}
