/* ayudasdeia: informe independiente, estilo ensayo de consumidor */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --papel: #ffffff;
  --gris: #f3f3f0;
  --tinta: #121212;
  --tinta-2: #4b4b47;
  --regla: #d9d8d2;
  --senal: #f5c518;
  --abierta: #17703a;
  --abierta-fondo: #e3f2e8;
  --proxima: #8a5a00;
  --proxima-fondo: #fbf0d6;
  --cerrada: #55595f;
  --cerrada-fondo: #eceef0;
  --enlace: #0b4fb3;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --col: 42rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 1.0625rem/1.65 var(--serif);
  text-rendering: optimizeLegibility;
}
::selection { background: var(--senal); color: var(--tinta); }
a { color: var(--enlace); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--senal); outline-offset: 2px; border-radius: 2px; }

.envoltura { max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }

.saltar { position: absolute; left: -999px; }
.saltar:focus { left: 1rem; top: 1rem; background: var(--senal); color: var(--tinta); padding: .5rem 1rem; z-index: 10; font-family: var(--sans); }

/* Cabecera */
.cabecera { border-top: 6px solid var(--senal); border-bottom: 1px solid var(--tinta); }
.cabecera-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.marca { display: inline-flex; align-items: center; gap: .65rem; color: var(--tinta); text-decoration: none; }
.marca svg { width: 2.2rem; height: 2.2rem; flex: none; }
.marca-nombre { display: block; font-family: var(--sans); font-weight: 800; font-stretch: 118%; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1; }
.marca-lema { display: block; font-family: var(--sans); font-weight: 500; font-stretch: 85%; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-2); margin-top: .3rem; }
.cabecera ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; font-family: var(--sans); font-weight: 600; font-stretch: 90%; font-size: .95rem; }
.cabecera nav a { color: var(--tinta); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.cabecera nav a:hover { border-bottom-color: var(--tinta); }
.cabecera nav a[aria-current] { border-bottom-color: var(--senal); }

/* Cuerpo */
main.envoltura { padding-top: 3rem; padding-bottom: 4rem; }
main > * { max-width: var(--col); }
main > .tabla, main > .veredicto, main > h2, main > .aviso { max-width: none; }

h1, h2, h3 { font-family: var(--sans); color: var(--tinta); text-wrap: balance; }
h1 { font-weight: 800; font-stretch: 112%; font-size: clamp(2rem, 5.2vw, 3.1rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 1rem; max-width: 20ch; }
h1 + p { font-size: 1.25rem; line-height: 1.5; color: var(--tinta-2); margin-bottom: 1.75rem; }
h2 { font-weight: 750; font-stretch: 105%; font-size: 1.55rem; line-height: 1.2; letter-spacing: -.015em; margin: 3.25rem 0 .9rem; padding-top: 1rem; border-top: 3px solid var(--tinta); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
h3 { font-weight: 700; font-size: 1.15rem; margin: 2rem 0 .5rem; }
p, ul, ol { margin: 0 0 1.1rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--tinta-2); }
strong { font-weight: 650; }
blockquote { margin: 1.5rem 0; padding: 0 0 0 1.25rem; border-left: 1px solid var(--tinta); font-style: italic; color: var(--tinta-2); }

/* Fecha de revisión */
.revision { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--sans); font-size: .85rem; font-weight: 600; font-stretch: 90%; color: var(--tinta-2); margin: 0 0 1.25rem; }
.revision svg { width: 1rem; height: 1rem; color: var(--abierta); }

/* Nota de independencia */
.aviso { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; margin: 1.25rem 0 1.75rem; padding: .85rem 1rem; background: var(--gris); border: 1px solid var(--regla); border-radius: 6px; font-family: var(--sans); font-stretch: 95%; font-size: .9rem; line-height: 1.5; font-style: normal; color: var(--tinta); }
.aviso svg { width: 1.1rem; height: 1.1rem; margin-top: .1rem; }
.aviso p { margin: 0; }

/* Veredicto: el panel del ensayo */
.veredicto { position: relative; margin: 2rem 0 2.5rem; border: 2px solid var(--tinta); border-radius: 4px; background: var(--papel); }
.veredicto-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--tinta); color: #fff; padding: .55rem 1rem; font-family: var(--sans); font-weight: 700; font-stretch: 85%; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.veredicto-cabeza span { font-weight: 500; letter-spacing: .02em; text-transform: none; color: #d8d8d2; font-stretch: 95%; }
.veredicto-cuerpo { padding: 1.1rem 9rem .3rem 1.25rem; }
.veredicto-cuerpo > p:first-child { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; line-height: 1.4; margin-bottom: .75rem; }
.veredicto ul { padding-left: 1.1rem; }
.sello { position: absolute; top: 3rem; right: 1.1rem; width: 6.6rem; height: 6.6rem; padding: .6rem; border-radius: 50%; background: var(--senal); color: var(--tinta); display: grid; place-content: center; text-align: center; font-family: var(--sans); line-height: 1.05; transform: rotate(-8deg); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.sello::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(18,18,18,.55); border-radius: 50%; }
.sello b { display: block; font-weight: 800; font-stretch: 80%; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; }
.sello i { display: block; font-style: normal; font-weight: 800; font-size: 1rem; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.sello small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-top: .2rem; }

.veredicto dl { margin: 0 0 1rem; display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; border-top: 1px solid var(--regla); }
.veredicto dt, .veredicto dd { padding: .5rem 0; border-bottom: 1px solid var(--regla); margin: 0; }
.veredicto dt { font-family: var(--sans); font-stretch: 90%; font-weight: 600; font-size: .88rem; color: var(--tinta-2); padding-right: 1rem; }
.veredicto dd { font-family: var(--sans); font-weight: 600; font-size: .98rem; line-height: 1.45; }
.veredicto dd .estado { margin-right: .4rem; }

/* Estados */
.estado { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem .12rem .4rem; border-radius: 3px; font-family: var(--sans); font-weight: 700; font-stretch: 85%; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; vertical-align: .1em; }
.estado svg { width: .85rem; height: .85rem; flex: none; }
.estado-abierta { background: var(--abierta-fondo); color: var(--abierta); }
.estado-proxima, .estado-confirmar { background: var(--proxima-fondo); color: var(--proxima); }
.estado-cerrada { background: var(--cerrada-fondo); color: var(--cerrada); }

/* Tablas comparativas */
.tabla { overflow-x: auto; margin: 1rem 0 2rem; border: 1px solid var(--tinta); border-radius: 4px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .9rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
th { background: var(--tinta); color: #fff; text-align: left; font-weight: 700; font-stretch: 85%; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; padding: .6rem .8rem; white-space: nowrap; }
td { padding: .75rem .8rem; vertical-align: top; border-bottom: 1px solid var(--regla); }
tbody tr:nth-child(even) td { background: #fafaf8; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; font-stretch: 95%; }
.tabla-densa td:nth-child(3) { min-width: 15rem; }
.tabla-densa td:nth-child(4) { min-width: 9rem; }
td a { font-weight: 600; }

/* Pasos numerados */
main ol { counter-reset: paso; list-style: none; padding: 0; }
main ol > li { counter-increment: paso; position: relative; padding-left: 2.6rem; margin-bottom: .9rem; }
main ol > li::before { content: counter(paso); position: absolute; left: 0; top: .1rem; width: 1.75rem; height: 1.75rem; border: 2px solid var(--tinta); border-radius: 50%; display: grid; place-content: center; font-family: var(--sans); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Enlace a la siguiente página */
.siguiente { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--tinta); text-decoration: none; border-bottom: 2px solid var(--senal); padding-bottom: .1rem; }
.siguiente:hover { border-bottom-color: var(--tinta); }
.siguiente svg { width: 1rem; height: 1rem; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.siguiente:hover svg { transform: translateX(3px); }

/* Preguntas frecuentes */
details { border-bottom: 1px solid var(--regla); }
h2 + details { border-top: 1px solid var(--regla); }
details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; font-family: var(--sans); font-weight: 650; font-size: 1.02rem; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ""; flex: none; width: .6rem; height: .6rem; margin: .35rem .2rem 0 0; border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: rotate(45deg); transition: transform .25s cubic-bezier(.2,.7,.2,1); }
details[open] summary::after { transform: rotate(-135deg); margin-top: .65rem; }
details p { margin: 0 0 1rem; }

/* Pie */
.pie { background: var(--tinta); color: #d8d8d2; padding: 2.5rem 0 3rem; font-family: var(--sans); font-size: .9rem; }
.pie-fila { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
.pie .marca { color: #fff; }
.pie .marca-lema { color: #b9b9b3; }
.pie-aviso { margin: 1rem 0 0; max-width: 34rem; line-height: 1.55; }
.pie-enlaces { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.pie a { color: #fff; }
.pie-revision { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid #3a3a38; color: #b9b9b3; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .veredicto-cuerpo { padding: 1.1rem 1.1rem .3rem; }

  .veredicto-cabeza span { display: none; }
  .sello { top: -1.1rem; right: -.5rem; width: 5.8rem; height: 5.8rem; padding: .5rem; }
  .sello b { font-size: .64rem; font-stretch: 70%; letter-spacing: .02em; } .sello i { font-size: .85rem; } .sello small { font-size: .62rem; }
  .veredicto-cuerpo > p:first-child, .veredicto-cuerpo > ul:first-child > li:first-child { padding-right: 4.6rem; }
  .veredicto dl { grid-template-columns: 1fr; }
  .veredicto dt { border-bottom: 0; padding-bottom: 0; }
  .pie-fila { grid-template-columns: 1fr; }
  .cabecera ul { gap: .25rem 1rem; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Tablas en móvil */
@media (max-width: 640px) {
  .tabla table, .tabla tbody, .tabla tr, .tabla td { display: block; width: 100%; }
  .tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabla td { min-width: 0 !important; padding: .1rem 0; border: 0; background: transparent !important; }
  .tabla td::before { content: attr(data-label); display: block; font-weight: 700; font-stretch: 85%; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-2); }
  /* tablas sencillas: filas con regla fina */
  .tabla:not(.tabla-densa) { border: 0; border-top: 2px solid var(--tinta); border-radius: 0; overflow: visible; }
  .tabla:not(.tabla-densa) tr { padding: .7rem 0; border-bottom: 1px solid var(--regla); }
  .tabla:not(.tabla-densa):not(.tabla-dos) td:first-child::before { display: none; }
  .tabla-dos td:first-child::before { display: inline; margin-right: .4rem; }
  .tabla.tabla-ficha:not(.x) td:not(.x)::before { display: none; }
  .tabla-ficha td:first-child { font-weight: 700; padding-bottom: 0; }
  .tabla td:empty { display: none; }
  .tabla:not(.tabla-densa) td:first-child { font-size: 1rem; margin-bottom: .2rem; }
  .tabla:not(.tabla-densa) td:not(:first-child)::before { display: inline; margin-right: .4rem; }
  /* tablas densas: una ficha por fila */
  .tabla-densa { border: 0; overflow: visible; }
  .tabla-densa tr { border: 1px solid var(--tinta); border-radius: 4px; margin-bottom: .9rem; overflow: hidden; }
  .tabla-densa td { padding: .5rem .8rem; border-bottom: 1px solid var(--regla); }
  .tabla-densa td:first-child { background: var(--tinta) !important; color: #fff; }
  .tabla-densa td:first-child::before { color: #b9b9b3; }
  .tabla-densa td:last-child { border-bottom: 0; }
}
