/* =========================================================
   kitdigital.dev — sistema de diseño
   Paleta tomada del logo: negro tinta + degradado naranja
   (#FF9B00) a rojo (#FF0046). El color se reserva para
   botones y acentos puntuales; los fondos son neutros.
   Contrastes verificados contra WCAG AA.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Tinta: el negro del logo y su escala */
  --ink-950: #141414;
  --ink-900: #1d1d1d;
  --ink-800: #272727;  /* negro exacto del logo */
  --ink-600: #4d4d4d;
  --ink-500: #666666;
  --ink-400: #8a8a8a;

  /* Marca: los dos extremos del degradado del .dev */
  --naranja: #ff9b00;
  --rojo: #ff0046;
  --degradado: linear-gradient(95deg, var(--naranja), var(--rojo));

  /* Rojo corporativo. Blanco encima: 5.88:1, AA a cualquier tamaño.
     --boton no cambia nunca (el botón lleva su propio fondo);
     --accion sí se aclara en modo oscuro, porque ahí es texto. */
  --boton: #c8102e;
  --boton-hover: #a30d25;
  --accion: #c8102e;
  --accion-oscuro: #a30d25;
  --accion-suave: #fdf0f2;
  --naranja-suave: #fff6e6;

  /* Superficies neutras */
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-sunken: #efeff1;
  --surface: #ffffff;
  --surface-alt: #fafafb;
  --border: #e3e3e6;
  --border-strong: #c9c9ce;

  /* Texto — todos verificados sobre --bg y --bg-soft */
  --text: var(--ink-900);        /* 15.3:1 sobre blanco */
  --text-muted: #5a5a5f;         /*  7.0:1 sobre blanco */
  --text-faint: #6e6e73;         /*  5.3:1 sobre blanco */
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #c9c9ce; /*  9.9:1 sobre --ink-900 */

  --exito: #0f7a4a;              /*  4.9:1 sobre blanco */
  --exito-suave: #e8f6ef;
  --aviso: #8a5a00;              /*  5.3:1 sobre blanco */
  --aviso-suave: #fff6e6;

  /* Formas: esquinas vivas. Solo los puntos de la línea de tiempo
     y los distintivos redondos conservan el círculo, por su función. */
  --r-sm: 0;
  --r-md: 2px;
  --r-lg: 3px;
  --r-xl: 4px;
  --r-full: 2px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 20, .06), 0 1px 3px rgba(20, 20, 20, .04);
  --shadow-md: 0 4px 14px rgba(20, 20, 20, .08), 0 2px 4px rgba(20, 20, 20, .04);
  --shadow-lg: 0 18px 44px rgba(20, 20, 20, .12), 0 4px 10px rgba(20, 20, 20, .06);

  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
  --maxw: 1180px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131315;
    --bg-soft: #1a1a1d;
    --bg-sunken: #202024;
    --surface: #1a1a1d;
    --surface-alt: #202024;
    --border: #2e2e33;
    --border-strong: #45454d;

    --text: #f0f0f2;
    --text-muted: #b4b4bb;        /* 9.2:1 sobre --surface */
    --text-faint: #96969e;        /* 6.3:1 sobre --surface */

    /* --boton NO se toca: el botón lleva su propio fondo y el blanco
       encima sigue dando 5.88:1. Pero como texto, #c8102e sobre el
       fondo oscuro cae a 3.16:1, así que aquí se aclara. */
    --accion: #ff5c6e;            /* 6.2:1 sobre --bg */
    --accion-oscuro: #ff8592;
    --accion-suave: #2d1216;
    --naranja-suave: #2b2211;

    --exito: #35c98a;
    --exito-suave: #12291f;
    --aviso: #e0a640;
    --aviso-suave: #2b2211;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .55);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, .65);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 .5em;
  font-weight: 600;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.35rem); }

p { margin: 0 0 1em; }
a { color: var(--accion); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accion-oscuro); }
img, svg { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--accion);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink-900); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--sunken { background: var(--bg-sunken); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 3. Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }

.brand { display: inline-flex; align-items: center; margin-right: auto; flex: none; }
.brand img { height: 28px; width: auto; }
/* En modo oscuro se cambia el fichero por la versión en blanco.
   No se usa un filtro de inversión: convertiría el rojo del .dev
   en cian y destrozaría la marca. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img.brand__logo {
    content: url("../img/logo-blanco.png");
  }
}

.nav { display: flex; align-items: center; gap: .3rem; }
/* :not(.btn) es imprescindible: sin él esta regla gana por especificidad
   al color del botón y el CTA queda con texto gris sobre rojo. */
.nav a:not(.btn) {
  padding: .55rem .8rem; border-radius: var(--r-md);
  color: var(--text-muted); text-decoration: none; font-size: .93rem; font-weight: 500;
  white-space: nowrap;
}
.nav a:not(.btn):hover { background: var(--bg-soft); color: var(--text); }
.nav a:not(.btn)[aria-current="page"] { color: var(--accion); font-weight: 600; }

.nav-toggle {
  display: none; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: var(--r-md); width: 42px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center; color: var(--text);
}

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 74px 0 auto; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem; gap: .25rem;
    box-shadow: var(--shadow-lg); display: none;
  }
  .nav[data-open="true"] { display: flex; }
  /* :not(.btn) también aquí, o el menú desplegable pisa el relleno del botón. */
  .nav a:not(.btn) { padding: .8rem .75rem; font-size: 1rem; }
  .nav .btn { margin-top: .5rem; justify-content: center; }
}

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 8px 15px;
  border: 2px solid transparent;
  border-radius: 0;
  font-family: var(--font); font-size: .95rem; font-weight: 700; line-height: 1.25;
  text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}

/* Rojo corporativo con borde del mismo tono. Blanco encima: 5.88:1. */
.btn--primary,
.btn--solid {
  background-color: var(--boton);
  border-color: var(--boton);
  color: #fff;
}
.btn--primary:hover,
.btn--solid:hover {
  background-color: var(--boton-hover);
  border-color: var(--boton-hover);
  color: #fff;
}

.btn--ghost { background-color: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background-color: var(--bg-soft); color: var(--text); border-color: var(--ink-600); }

.btn--dark { background-color: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.btn--dark:hover { background-color: var(--ink-800); border-color: var(--ink-800); color: #fff; }

.btn--onDark { background-color: #fff; border-color: #fff; color: var(--ink-900); }
.btn--onDark:hover { background-color: var(--bg-sunken); border-color: var(--bg-sunken); color: var(--ink-900); }
.btn--onDarkGhost { background-color: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--onDarkGhost:hover { background-color: rgba(255, 255, 255, .14); color: #fff; border-color: #fff; }

.btn--lg { padding: 12px 22px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 5. Píldoras, etiquetas, acentos ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .8rem; border-radius: var(--r-full);
  font-size: .8rem; font-weight: 600;
  background: var(--accion-suave); color: var(--accion);
  border: 1px solid color-mix(in srgb, var(--accion) 25%, transparent);
}
.pill--exito { background: var(--exito-suave); color: var(--exito); border-color: color-mix(in srgb, var(--exito) 28%, transparent); }
.pill--aviso { background: var(--aviso-suave); color: var(--aviso); border-color: color-mix(in srgb, var(--aviso) 30%, transparent); }
.pill--muted { background: var(--bg-sunken); color: var(--text-muted); border-color: var(--border); }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accion); margin: 0 0 .75rem;
}
.eyebrow--onDark { color: var(--naranja); }

/* Subrayado degradado, el guiño al .dev del logo */
.marca {
  background: var(--degradado);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--rojo);
}
.subrayado {
  background-image: var(--degradado);
  background-repeat: no-repeat;
  background-size: 100% .22em;
  background-position: 0 88%;
  padding-inline: .06em;
}

.lede { font-size: clamp(1.03rem, 1.5vw, 1.16rem); color: var(--text-muted); max-width: 62ch; }
.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- 6. Hero (claro) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: var(--degradado);
}
.hero::after {
  content: ""; position: absolute; right: -14%; top: -30%;
  width: 46rem; height: 46rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, rgba(255, 155, 0, .13), rgba(255, 0, 70, .07) 45%, transparent 68%);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
/* Nota de gratuidad. Tono de aviso administrativo: separada del
   párrafo para que se vea, pero sin gritar. */
.sin-coste {
  margin: 1.5rem 0 0;
  padding: .85rem 1.1rem;
  max-width: 54ch;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--ink-800);
  background-color: var(--bg-soft);
  font-size: .93rem;
  line-height: 1.55;
  color: var(--text);
}
.sin-coste b { font-weight: 700; }
.sin-coste span { color: var(--text-muted); }

.cta .sin-coste {
  margin-inline: auto;
  border-color: rgba(255, 255, 255, .28);
  border-left-color: #fff;
  background-color: rgba(255, 255, 255, .07);
  color: #fff;
  text-align: left;
}
.cta .sin-coste span { color: var(--text-on-dark-muted); }

.hero__note {
  margin-top: 1.75rem; font-size: .87rem; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: .6rem; max-width: 48ch;
}
.hero__note svg { width: 18px; height: 18px; flex: none; color: var(--exito); margin-top: .18rem; }

.hero__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: clamp(1.5rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-lg);
}
.hero__card h2 { font-size: 1.1rem; margin-bottom: 1.1rem; }

/* ---------- 7. Rejillas y tarjetas ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(1.25rem, 2.5vw, 1.6rem);
  display: flex; flex-direction: column; gap: .6rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card--link:hover { border-color: var(--ink-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; margin-bottom: .35rem;
  background: var(--bg-sunken); color: var(--ink-800);
}
.card--link:hover .card__icon { background: var(--accion-suave); color: var(--accion); }
.card h3 { margin: 0; font-size: 1.06rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .93rem; }
/* Importe arriba y segmentos debajo, en columna. En fila, la píldora
   se pegaba al importe cuando la tarjeta era estrecha y quedaba sucio. */
.card__foot {
  margin-top: auto; padding-top: 1rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
}
.card__foot .pill { align-self: flex-start; }
.card__amount { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; color: var(--text); }
.card__amount small { font-size: .72rem; font-weight: 500; color: var(--text-faint); display: block; }

/* ---------- 8. Segmentos ---------- */
/* Los cinco en una sola fila: con auto-fill quedaban cuatro arriba y
   uno suelto abajo, y parecía que sobraba. En pantallas estrechas
   pasan a tres y luego a dos, siempre repartidos. */
.segmentos-fila { display: grid; gap: var(--gap); grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .segmentos-fila { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .segmentos-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  /* Con dos columnas el quinto quedaría solo en la última fila:
     que ocupe el ancho entero y parezca intencionado. */
  .segmentos-fila > :last-child { grid-column: 1 / -1; }
}

.segment {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.4rem 1.1rem; text-align: center; position: relative; overflow: hidden;
}
.segment::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--degradado);
}
.segment__tag { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin: 0; }
.segment__amount { font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.1rem); font-weight: 700; color: var(--text); margin: .3rem 0 .15rem; }
.segment__range { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---------- 9. Pasos ---------- */
.steps { counter-reset: step; display: grid; gap: 1.25rem; }
.step { position: relative; padding-left: 3.9rem; display: flex; flex-direction: column; gap: .3rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.7rem; height: 2.7rem; border-radius: var(--r-full);
  background: var(--ink-900); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  display: grid; place-items: center;
}
.step h3 { margin: .3rem 0 0; font-size: 1.03rem; }
.step p { margin: 0; color: var(--text-muted); font-size: .93rem; }

/* ---------- 10. Filtros ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  padding: 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 2rem;
  position: sticky; top: 82px; z-index: 20; box-shadow: var(--shadow-sm);
}
.toolbar__label { font-size: .84rem; font-weight: 600; color: var(--text-muted); }
.chip {
  border: 1.5px solid var(--border-strong); background: transparent; color: var(--text-muted);
  padding: .45rem .95rem; border-radius: var(--r-full); font-size: .86rem; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-400); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.toolbar__count { margin-left: auto; font-size: .86rem; color: var(--text-faint); }

.search { flex: 1 1 220px; min-width: 180px; position: relative; }
.search input {
  width: 100%; padding: .55rem .9rem .55rem 2.3rem;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-full);
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: .9rem;
}
.search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }

/* ---------- 11. Formularios ---------- */
.form-field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.15rem; }
.form-field label { font-size: .9rem; font-weight: 600; color: var(--text); }
.form-field .hint { font-size: .82rem; color: var(--text-faint); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: .75rem .9rem;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: .97rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accion); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accion) 20%, transparent);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field .error { font-size: .84rem; color: var(--accion); font-weight: 600; }
.form-field[data-invalid="true"] input,
.form-field[data-invalid="true"] select { border-color: var(--accion); }

.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Rejillas de ancho fijo: con auto-fit, un formulario ancho repartía
   los campos de forma imprevisible y el CP acababa igual de ancho
   que la dirección. Aquí cada campo ocupa lo que le toca. */
.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-grid > * { grid-column: span 12; }
@media (min-width: 720px) {
  .form-grid > .c2 { grid-column: span 2; }
  .form-grid > .c3 { grid-column: span 3; }
  .form-grid > .c4 { grid-column: span 4; }
  .form-grid > .c5 { grid-column: span 5; }
  .form-grid > .c6 { grid-column: span 6; }
  .form-grid > .c7 { grid-column: span 7; }
  .form-grid > .c8 { grid-column: span 8; }
  .form-grid > .c9 { grid-column: span 9; }
}

/* El domicilio cabe en una línea en pantalla grande. Entre 720 y 1100
   la provincia se quedaba en 171px y truncaba "Santa Cruz de Tenerife",
   así que ahí se parte en dos filas en vez de servirla ilegible. */
@media (min-width: 720px) and (max-width: 1100px) {
  .form-grid--domicilio > .c4 { grid-column: span 8; }
  .form-grid--domicilio > .c2 { grid-column: span 4; }
  .form-grid--domicilio > .c3 { grid-column: span 6; }
}

/* Subtítulo dentro de un paso largo */
.grupo-campos { margin: 2rem 0 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.grupo-campos:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.grupo-campos h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.grupo-campos p { margin: 0; font-size: .9rem; color: var(--text-muted); }

/* ---------- Autodiagnóstico ---------- */
.diagnostico { display: grid; gap: .5rem; }
.diag-fila {
  display: grid; gap: .75rem 1rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  background-color: var(--surface);
}
.diag-fila:nth-child(odd) { background-color: var(--surface-alt); }
.diag-fila[data-invalid="true"] { border-color: var(--boton); }
.diag-fila__area {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 .15rem;
}
.diag-fila__pregunta { margin: 0; font-size: .95rem; font-weight: 500; }
.diag-opciones { display: flex; gap: .4rem; flex-wrap: wrap; }
.diag-opciones label {
  position: relative; cursor: pointer;
}
.diag-opciones input {
  position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.diag-opciones span {
  display: block; min-width: 74px; text-align: center;
  padding: 7px 12px; font-size: .87rem; font-weight: 700; line-height: 1.25;
  border: 2px solid var(--border-strong); background-color: var(--bg); color: var(--text);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.diag-opciones label:hover span { border-color: var(--ink-600); }
.diag-opciones input:checked + span {
  background-color: var(--boton); border-color: var(--boton); color: #fff;
}
.diag-opciones input:focus-visible + span { outline: 3px solid var(--accion); outline-offset: 2px; }
@media (max-width: 600px) {
  .diag-fila { grid-template-columns: 1fr; }
  .diag-opciones span { min-width: 0; }
  .diag-opciones label { flex: 1; }
}

.diag-resultado {
  margin-top: 1.5rem; padding: 1.25rem;
  border: 1px solid var(--border); border-left: 4px solid var(--boton);
  background-color: var(--surface-alt);
}
/* La barra vino de la consulta de bono, que se retiró; ahora la usa
   el resultado del diagnóstico, así que vive aquí. */
.barra { height: 10px; background-color: var(--bg-sunken); overflow: hidden; margin: .6rem 0 .8rem; }
.barra__relleno { height: 100%; background-image: var(--degradado); transition: width .5s ease; }

.diag-resultado h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.diag-resultado p { margin: 0; font-size: .93rem; color: var(--text-muted); }
.diag-nota { font-size: .88rem; color: var(--text-muted); margin: .75rem 0 0; }

.check {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; background: var(--surface); transition: all .15s ease;
}
.check:hover { border-color: var(--ink-400); background: var(--surface-alt); }
.check input { margin-top: .2rem; accent-color: var(--accion); width: 18px; height: 18px; flex: none; }
.check:has(input:checked) { border-color: var(--accion); background: var(--accion-suave); }
.check__body strong { display: block; font-size: .95rem; }
.check__body span { font-size: .84rem; color: var(--text-muted); }
.consent { font-size: .87rem; color: var(--text-muted); }

/* ---------- 12. Asistente ---------- */
.wizard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.wizard__progress { display: flex; background: var(--bg-sunken); border-bottom: 1px solid var(--border); }
/* --text-faint sobre --bg-sunken se queda en 4.42:1, por debajo de AA.
   Sobre este fondo gris hace falta --text-muted. Y nada de opacity en
   el rótulo: rebajaría otra vez el contraste ya justo. */
.wizard__tab {
  flex: 1; padding: .95rem .6rem; text-align: center; font-size: .84rem; font-weight: 600;
  color: var(--text-muted); border-bottom: 3px solid transparent;
}
.wizard__tab[data-state="active"] { color: var(--text); border-bottom-color: var(--accion); background: var(--surface); }
.wizard__tab[data-state="done"] { color: var(--exito); }
.wizard__tab b { display: block; font-size: .71rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wizard__panel { padding: clamp(1.5rem, 4vw, 2.5rem); }
.wizard__panel[hidden] { display: none; }
.wizard__actions { display: flex; gap: .75rem; justify-content: space-between; margin-top: 2rem; flex-wrap: wrap; }

.summary-list { list-style: none; margin: 0 0 1.5rem; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; font-size: .92rem; }
.summary-list li:nth-child(odd) { background: var(--surface-alt); }
.summary-list span { color: var(--text-muted); }
.summary-list b { text-align: right; font-weight: 600; }

/* ---------- 13. Seguimiento ---------- */
.tracker { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .tracker { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.75rem); }
.panel h2 { font-size: 1.18rem; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 1.7rem 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong); z-index: 1;
}
.timeline li[data-state="done"]::before { background: var(--exito); border-color: var(--exito); }
.timeline li[data-state="active"]::before { background: var(--accion); border-color: var(--accion); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accion) 22%, transparent); }
.timeline__title { font-weight: 600; font-size: .97rem; margin: 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.timeline__date { font-size: .82rem; color: var(--text-faint); margin: .1rem 0 .3rem; }
.timeline__note { font-size: .9rem; color: var(--text-muted); margin: 0; }
.timeline li[data-state="pending"] .timeline__title { color: var(--text-faint); font-weight: 500; }

.status-banner {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.1rem 1.25rem; border-radius: var(--r-md); margin-bottom: 1.5rem;
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-left: 4px solid var(--accion);
}
.status-banner__icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink-900); color: #fff; }
.status-banner h3 { margin: 0 0 .2rem; font-size: 1.03rem; }
.status-banner p { margin: 0; font-size: .92rem; color: var(--text-muted); }

.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.docs li { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--r-md); font-size: .9rem; }
.docs li svg { width: 18px; height: 18px; flex: none; }
.docs li[data-ok="true"] svg { color: var(--exito); }
.docs li[data-ok="false"] svg { color: var(--aviso); }
.docs li[data-ok="false"] { color: var(--text-muted); }
.docs li b { margin-left: auto; font-size: .8rem; font-weight: 600; }

/* ---------- 13b. Selector de tramo de plantilla ---------- */
.tramos {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 108px), 1fr));
  margin-bottom: .35rem;
}
.tramo {
  border: 2px solid var(--border-strong); background-color: var(--surface);
  color: var(--text); border-radius: 0; padding: 10px 8px; cursor: pointer;
  font-family: var(--font); text-align: center; line-height: 1.25;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.tramo:hover { border-color: var(--ink-600); }
.tramo strong { display: block; font-size: .95rem; font-weight: 700; }
.tramo span { display: block; font-size: .76rem; color: var(--text-muted); margin-top: .1rem; }
.tramo[aria-pressed="true"] {
  background-color: var(--boton); border-color: var(--boton); color: #fff;
}
.tramo[aria-pressed="true"] span { color: rgba(255, 255, 255, .85); }

/* ---------- 13c. Requisitos informativos (no marcables) ---------- */
.requisitos-fijos {
  list-style: none; margin: 1.25rem 0 0; padding: 1rem 1.15rem;
  border: 1px solid var(--border); border-left: 4px solid var(--boton);
  background-color: var(--surface-alt); display: grid; gap: .6rem;
}
.requisitos-fijos > li:first-child {
  font-weight: 700; font-size: .84rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}
.requisitos-fijos .req { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; }
.requisitos-fijos .req svg { width: 18px; height: 18px; flex: none; color: var(--boton); margin-top: .18rem; }
.requisitos-fijos .req small { display: block; color: var(--text-muted); font-size: .85rem; }

/* ---------- 13b-bis. Buscador con sugerencias ----------
   Se usa una lista propia en vez de <datalist> porque datalist no
   deja ordenar por relevancia, ni limitar el número de resultados,
   ni ignorar los acentos. */
.autocompletar { position: relative; }
.autocompletar__lista {
  position: absolute; inset: calc(100% + 2px) 0 auto;
  z-index: 40; margin: 0; padding: 0; list-style: none;
  background-color: var(--surface);
  border: 2px solid var(--boton);
  box-shadow: var(--shadow-lg);
  max-height: 17rem; overflow-y: auto;
}
.autocompletar__lista[hidden] { display: none; }
.autocompletar__lista li {
  padding: .6rem .9rem; cursor: pointer; font-size: .94rem; line-height: 1.35;
  border-bottom: 1px solid var(--border);
}
.autocompletar__lista li:last-child { border-bottom: 0; }
.autocompletar__lista li:hover,
.autocompletar__lista li[aria-selected="true"] { background-color: var(--accion-suave); }
.autocompletar__lista li b { color: var(--accion); font-weight: 700; }
.autocompletar__lista li small {
  display: block; font-size: .78rem; color: var(--text-muted); margin-top: .1rem;
}
.autocompletar__vacio {
  padding: .7rem .9rem; font-size: .9rem; color: var(--text-muted);
}

/* ---------- 13c-bis. Barra de consulta horizontal ---------- */
.consulta {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--boton);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.consulta h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.consulta > p { color: var(--text-muted); font-size: .93rem; margin-bottom: 1.25rem; }
/* align-items:end alinea el botón con la base de los campos sin
   depender de un margen calculado a ojo, que se rompe al cambiar
   el tamaño de la etiqueta. */
.consulta__barra {
  display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}
.consulta__barra .form-field { margin-bottom: 0; }
@media (max-width: 780px) {
  .consulta__barra { grid-template-columns: 1fr; }
  .consulta__barra .btn { width: 100%; }
}

/* ---------- 13d. Bloque de ayuda desplegable ---------- */
.ayuda {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--boton);
  background-color: var(--surface-alt);
}
.ayuda summary {
  cursor: pointer; list-style: none;
  padding: .85rem 1rem; font-weight: 600; font-size: .93rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  color: var(--accion);
}
.ayuda summary::-webkit-details-marker { display: none; }
.ayuda summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; line-height: 1; flex: none; }
.ayuda[open] summary::after { content: "\2212"; }
.ayuda[open] summary { border-bottom: 1px solid var(--border); }
.ayuda__cuerpo { padding: 1.1rem 1rem 1.25rem; }
.ayuda__cuerpo > p:first-child { margin-top: 0; font-size: .92rem; color: var(--text-muted); }
.ayuda__cuerpo textarea { min-height: 80px; }

/* ---------- 15. Tabla ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .93rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-sunken); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }
td.num { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }

/* ---------- 16. Acordeón ---------- */
.faq { display: grid; gap: .7rem; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 1.25rem; }
.faq details[open] { border-color: var(--ink-400); }
.faq summary {
  cursor: pointer; padding: 1.1rem 0; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accion); font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.1rem; margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------- 17. Avisos ---------- */
.notice {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1rem 1.25rem; border-radius: var(--r-md);
  background: var(--aviso-suave); border: 1px solid color-mix(in srgb, var(--aviso) 30%, transparent);
  color: var(--text); font-size: .92rem;
}
.notice svg { width: 20px; height: 20px; flex: none; color: var(--aviso); margin-top: .15rem; }
.notice p { margin: 0; }
.notice p + p { margin-top: .4rem; }
.notice--info { background: var(--bg-sunken); border-color: var(--border-strong); }
.notice--info svg { color: var(--ink-600); }
.notice--exito { background: var(--exito-suave); border-color: color-mix(in srgb, var(--exito) 30%, transparent); }
.notice--exito svg { color: var(--exito); }

/* ---------- 18. CTA ---------- */
.cta {
  background: var(--ink-900); color: #fff; border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.25rem); text-align: center; position: relative; overflow: hidden;
}
.cta::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--degradado); }
.cta h2 { color: #fff; }
.cta p { color: var(--text-on-dark-muted); max-width: 55ch; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; margin-top: 1.75rem; }

/* ---------- 18b. Hueco de imagen pendiente ----------
   Marcador gris para las fotos e ilustraciones que faltan.
   Al sustituirlo, se cambia el <figure> entero por un <img>
   con las medidas que indica la etiqueta. */
.imagen-pendiente {
  margin: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .5rem;
  text-align: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  background-color: var(--bg-sunken);
  border: 2px dashed var(--border-strong);
  color: var(--text-muted);
  overflow: hidden;
}
.imagen-pendiente svg { width: 30px; height: 30px; color: var(--text-muted); }
/* --text-faint sobre este gris se queda en 4.29:1, por debajo de AA.
   Sobre --bg-sunken hace falta --text-muted, que da 5.98:1. */
.imagen-pendiente b {
  font-size: .74rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted);
}
.imagen-pendiente p {
  margin: 0; max-width: 48ch; font-size: .93rem; line-height: 1.5; color: var(--text-muted);
}
.imagen-pendiente code {
  font-size: .78rem; color: var(--text-muted);
  background-color: var(--surface); padding: .15rem .45rem;
  border: 1px solid var(--border);
}
.imagen-pendiente--ancha { aspect-ratio: 21 / 8; }
.imagen-pendiente--media { aspect-ratio: 16 / 9; }
.imagen-pendiente--alta  { aspect-ratio: 4 / 3; }
.imagen-pendiente--cuadrada { aspect-ratio: 1 / 1; }
/* En móvil las proporciones muy apaisadas dejan una tira ilegible */
@media (max-width: 620px) {
  .imagen-pendiente--ancha { aspect-ratio: 3 / 2; }
}

/* ---------- 19. Logos oficiales ---------- */
.oficiales {
  background: #fff;
  border-block: 1px solid var(--border);
  padding-block: 1.5rem;
}
.oficiales p {
  text-align: center; font-size: .78rem; color: #5a5a5f; margin: 0 0 1rem;
  letter-spacing: .02em;
}
/* Los logos van en una sola imagen y no pueden reflujar. Encogida a
   un móvil, el texto de los organismos queda en 2px. Antes que servirla
   ilegible, se le da ancho mínimo y que ruede dentro de su caja. */
.oficiales__tira { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.oficiales img {
  width: 100%; min-width: 620px; max-width: 940px;
  margin-inline: auto; height: auto;
}

/* ---------- 20. Pie ---------- */
.site-footer { background: var(--ink-950); color: var(--text-on-dark-muted); padding-block: clamp(2.5rem, 6vw, 3.5rem) 1.75rem; }
.site-footer a { color: var(--text-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer__grid h2.footer__tit,
.footer__grid h4 { color: #fff; font-size: .84rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .91rem; }
.footer__brand p { font-size: .91rem; max-width: 34ch; }
.footer__brand img { height: 26px; width: auto; margin-bottom: 1rem; }
.footer__legal {
  margin-top: 2.25rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  font-size: .81rem; color: #a8a8b0;
}

/* ---------- 21. Utilidades ---------- */
.stack > * + * { margin-top: 1rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

/* =========================================================
   Páginas de contenido: sectores y guías
   ========================================================= */

.container--estrecho { max-width: 760px; }

/* Migas de pan */
.migas {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-muted);
}
.migas a { color: var(--text-muted); }
.migas a:hover { color: var(--accion); }
.migas__sep { margin: 0 .5rem; color: var(--text-faint); }
.migas [aria-current] { color: var(--ink-600); font-weight: 600; }

/* Entradilla: el párrafo destacado bajo el h1 */
.entradilla {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-600);
}

/* Cuerpo de artículo: es texto largo, necesita respirar */
.articulo__cuerpo { font-size: 1.03rem; line-height: 1.75; }
.articulo__cuerpo h2 { margin: 2.4rem 0 .9rem; font-size: 1.45rem; }
.articulo__cuerpo h3 { margin: 1.8rem 0 .6rem; font-size: 1.12rem; }
.articulo__cuerpo p { margin: 0 0 1.1rem; }
.articulo__cuerpo > .notice { margin: 1.6rem 0; }

.articulo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 0 0 .9rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.etiqueta {
  padding: 3px 9px;
  background-color: var(--accion-suave);
  color: var(--accion);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
}

blockquote {
  margin: 1.6rem 0;
  padding: .3rem 0 .3rem 1.2rem;
  border-left: 3px solid var(--accion);
  color: var(--ink-600);
  font-style: italic;
}
blockquote p { margin: 0; }

.lista { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.lista li { margin-bottom: .6rem; }

.nota {
  margin-top: .9rem;
  font-size: .87rem;
  color: var(--text-muted);
}

/* Tablas de contenido: han de poder desplazarse en móvil */
.tabla-simple { overflow-x: auto; margin: 1.4rem 0; }
.tabla-simple table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla-simple th,
.tabla-simple td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
.tabla-simple thead th {
  background-color: var(--bg-sunken);
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.tabla-simple td.num { text-align: right; font-weight: 700; white-space: nowrap; }

.card__mas {
  display: inline-block;
  margin-top: .7rem;
  color: var(--accion);
  font-weight: 700;
  font-size: .9rem;
}
.card--link:hover .card__mas { text-decoration: underline; }

/* =========================================================
   Formulario corto de captación
   ========================================================= */

.form-corto { display: grid; gap: 1rem; }
.form-corto__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-corto__fila { grid-template-columns: 1fr; } }

.campo { display: grid; gap: .35rem; }
.campo label { font-size: .88rem; font-weight: 600; }
.campo input,
.campo textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background-color: var(--surface);
  color: inherit;
  font: inherit;
}
.campo input:focus,
.campo textarea:focus { outline: 2px solid var(--accion); outline-offset: 1px; }
.campo textarea { resize: vertical; }
.opcional { font-weight: 400; color: var(--text-muted); }

.campo-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.campo-check input { margin-top: .2rem; }

/* Trampa antibots: fuera de la vista pero accesible al robot */
.tarro-miel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-corto__nota {
  margin: 0;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

.form-corto__aviso {
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--exito);
  background-color: var(--exito-suave);
  font-size: .93rem;
}
.form-corto__aviso[data-tono="error"] {
  border-left-color: var(--aviso);
  background-color: var(--aviso-suave);
}

.btn--grande { padding: 12px 22px; font-size: 1.02rem; }

/* El pie usa h2 por jerarquía correcta, pero debe verse como antes */
.footer__tit { font-family: inherit; font-weight: 700; margin-top: 0; }

/* =========================================================
   Imágenes y bloques comparativos
   ========================================================= */

.figura {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}
.figura--ancha { margin: 1.6rem 0; }

/* Hueco de imagen pendiente: dice qué falta en vez de dejar un
   agujero. Solo se ve mientras no esté la foto. */
.imagen-pendiente {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem;
  margin: 1.6rem 0;
  background-color: var(--bg-sunken);
  border: 2px dashed var(--border-strong);
  text-align: center;
  color: var(--text-muted);
}
.imagen-pendiente__medidas {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-600);
}
.imagen-pendiente__que {
  max-width: 46ch;
  font-size: .9rem;
  line-height: 1.5;
}
.imagen-pendiente code {
  font-size: .76rem;
  color: var(--text-faint);
  word-break: break-all;
}

/* Comparativa: hacerlo por tu cuenta frente a hacerlo con nosotros */
.comparativa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 720px) { .comparativa { grid-template-columns: 1fr; } }

.comparativa__col {
  padding: 1.5rem 1.6rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
}
.comparativa__col--nuestra { border-color: var(--accion); border-width: 2px; }
.comparativa__col h3 { margin: 0 0 1rem; font-size: 1.08rem; }

.lista-cruz,
.lista-visto { margin: 0; padding: 0; list-style: none; }
.lista-cruz li,
.lista-visto li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .75rem;
  font-size: .93rem;
  line-height: 1.55;
}
.lista-cruz li::before,
.lista-visto li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
/* El símbolo es decorativo; el texto ya dice lo que hay que saber */
.lista-cruz li::before { content: "✕"; color: var(--aviso); }
.lista-visto li::before { content: "✓"; color: var(--exito); }

/* =========================================================
   Popup de "hablar con un asesor"
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }

.modal__fondo {
  position: absolute;
  inset: 0;
  background-color: rgba(20, 20, 20, .55);
}

.modal__caja {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.9rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.modal__caja h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.modal__caja > p { margin: 0 0 1.3rem; color: var(--text-muted); font-size: .93rem; }
.modal__caja form { display: grid; gap: .9rem; }

.modal__cerrar {
  position: absolute;
  top: .35rem;
  right: .45rem;
  /* 44px es el objetivo tactil comodo en movil */
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal__cerrar:hover { color: var(--ink-600); }

.modal__caja select {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background-color: var(--surface);
  color: inherit;
  font: inherit;
}
.modal__caja select:focus,
.modal__caja input:focus { outline: 2px solid var(--accion); outline-offset: 1px; }

.modal__pie-nota {
  margin: 0;
  font-size: .84rem;
  color: var(--text-muted);
  text-align: center;
}

.modal__aviso {
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--exito);
  background-color: var(--exito-suave);
  font-size: .93rem;
}
.modal__aviso[data-tono="error"] {
  border-left-color: var(--aviso);
  background-color: var(--aviso-suave);
}

/* =========================================================
   Lista de espera
   ========================================================= */

/* Tira superior. Sobria: el argumento es el dato (va por orden de
   llegada), no el griterío. */
.tira-espera {
  background-color: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.tira-espera__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: .9rem;
}
.tira-espera p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.5;
  max-width: 62ch;
}
.tira-espera .btn { flex: none; }

@media (max-width: 640px) {
  .tira-espera__inner { flex-direction: column; align-items: flex-start; }
  /* Ancho completo y 44px de alto: es el objetivo tactil comodo */
  .tira-espera .btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.form-espera { display: grid; gap: 1rem; }

/* Listas de enlaces separados por puntos: provincias por comunidad */
.enlaces-sueltos { margin: 0; line-height: 2; font-size: .95rem; }
.enlaces-sueltos a { white-space: nowrap; }

.grupo-provincias {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.grupo-provincias:last-child { border-bottom: 0; }
.grupo-provincias h3 {
  margin: 0 0 .4rem;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
