/* ==========================================================================
   QueAyudasMeTocan.es — diseño C «Ventanilla»
   Una guía de servicios bien editada: fichas, datos y pasos.
   Atkinson Hyperlegible Next para leer; Literata solo en titulares.
   Un único gesto propio: la respuesta corta, marcada con rotulador.
   Sin dependencias. Mismas clases que estilos.css.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  --tinta:        #1D2422;
  --texto:        #1D2422;
  --texto-suave:  #414B48;   /* 9,0:1 sobre blanco */
  --texto-tenue:  #5B6663;   /* 6,0:1 sobre blanco */

  --verde:        #1F5A4E;   /* enlaces y acento, 8,0:1 */
  --verde-osc:    #153F37;
  --verde-claro:  #E4EEEA;

  --papel:        #FFFFFF;
  --ficha:        #F2F4F3;
  --linea:        #D5DCD9;   /* filetes decorativos */
  --linea-fuerte: #7A8682;   /* bordes de controles, 3,8:1 */

  --rotulador:    #FFE27A;

  --ok:       #1B6436;  --ok-fondo:  #E4F1E8;
  --ojo:      #7A4A00;  --ojo-fondo: #FBEFD5;
  --no:       #A12A22;  --no-fondo:  #FAE7E4;

  --radio:    4px;
  --radio-sm: 2px;

  --ancho:       1140px;
  --ancho-texto: 43rem;

  --letra:  "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titular: "Literata", Georgia, "Times New Roman", serif;

  --salida:  cubic-bezier(0.23, 1, 0.32, 1);    /* lo que entra */
  --cambio:  cubic-bezier(0.65, 0, 0.35, 1);    /* lo que cambia de estado */
}

/* --- 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--letra);
  font-size: 1.09375rem;              /* 17,5 px */
  line-height: 1.6;
  color: var(--texto);
  background: var(--papel);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--verde);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
a:hover { color: var(--verde-osc); text-decoration-thickness: 2px; }

h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--tinta); }
h1, h2 {
  font-family: var(--titular); font-weight: 600;
  letter-spacing: -.012em; text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.05rem); line-height: 1.1; }
h2 { font-size: clamp(1.42rem, 1.2rem + .9vw, 1.8rem); line-height: 1.2; margin-top: 2.2em; }
h3, h4 { font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.15rem; margin-top: 1.9em; }
p  { margin: 0 0 1.05em; text-wrap: pretty; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
li::marker { color: var(--texto-tenue); }
strong { font-weight: 700; }

/* Foco: filete de tinta dentro de un halo de rotulador. Se ve sobre blanco,
   sobre gris y sobre el verde del boletín. */
:focus-visible {
  outline: 2px solid var(--tinta);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--rotulador);
  border-radius: var(--radio-sm);
}

::selection { background: var(--rotulador); color: var(--tinta); }

.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--tinta); color: #fff;
  padding: .8rem 1.1rem; font-weight: 700; text-decoration: none;
}
.saltar:focus { left: 0; color: #fff; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.estrecho   { max-width: calc(var(--ancho-texto) + 40px); }

/* --- 3. Cabecera -------------------------------------------------------- */
.cabecera {
  position: sticky; top: 0; z-index: 100;
  background: var(--papel);
  border-bottom: 1px solid var(--tinta);
}
.cabecera-int { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }

.marca {
  display: inline-flex; align-items: baseline;
  font-family: var(--titular); font-weight: 600; font-size: 1.22rem;
  letter-spacing: -.015em; color: var(--tinta);
  text-decoration: none; white-space: nowrap;
  padding: .45rem 0;
}
.marca:hover { color: var(--tinta); text-decoration: none; }
.marca .m-alt { color: var(--verde); }
/* El punto de la marca es un sello cuadrado de rotulador */
.marca .m-punto {
  width: .42em; height: .42em; margin-left: .14em;
  background: var(--rotulador); box-shadow: inset 0 0 0 1.5px var(--tinta);
  display: inline-block;
}

.nav { margin-left: auto; }
.nav > ul { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a, .nav .desp-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 44px; padding: 0 .75rem;
  font: inherit; font-size: .98rem; color: var(--tinta);
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: .35em;
  border: 0; background: none; cursor: pointer;
}
.nav a:hover, .nav .desp-btn:hover { color: var(--verde); text-decoration-color: currentColor; }
.nav a[aria-current="page"] { color: var(--verde); text-decoration-color: currentColor; font-weight: 700; }

.desp { position: relative; }
.desp-btn svg { width: 12px; height: 12px; transition: transform 180ms var(--cambio); }
.desp-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav .desp-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 270px; margin: 0; padding: .35rem 0; list-style: none;
  background: var(--papel);
  border: 1px solid var(--tinta); border-radius: var(--radio);
  box-shadow: 0 10px 24px -12px rgba(29, 36, 34, .35);
  display: none;
  transform-origin: top left;
}
.nav .desp-menu.abierto {
  display: block;
  opacity: 1; transform: none;
  transition: opacity 160ms var(--salida), transform 160ms var(--salida);
}
@starting-style {
  .nav .desp-menu.abierto { opacity: 0; transform: translateY(-4px) scale(.98); }
}
.nav .desp-menu a {
  display: flex; min-height: 44px; padding: 0 1rem; white-space: nowrap;
}
.nav .desp-menu a:hover { background: var(--ficha); }

.menu-btn {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0;
  place-items: center; color: var(--tinta);
  background: none; border: 1px solid var(--tinta); border-radius: var(--radio);
  cursor: pointer;
  transition: transform 120ms var(--salida);
}
.menu-btn:active { transform: scale(.96); }
.menu-btn svg { width: 22px; height: 22px; display: block; }

/* --- 4. Portada --------------------------------------------------------- */
.hero { padding: 3rem 0 2.8rem; border-bottom: 1px solid var(--linea); }
.hero h1 { max-width: 15ch; margin-bottom: .45em; }
.hero .entradilla {
  font-size: 1.16rem; line-height: 1.55; color: var(--texto-suave);
  max-width: 52ch; margin-bottom: 2rem;
}

/* Situaciones: un casillero de ventanilla, no tarjetas sueltas.
   Las casillas comparten filete, como en un impreso. */
.situaciones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--linea-fuerte);
  border-left: 1px solid var(--linea-fuerte);
  margin-bottom: 1.75rem;
  max-width: 54rem;
}
.sit {
  display: flex; align-items: center; gap: .8rem;
  min-height: 64px; padding: .8rem 1.1rem;
  border-right: 1px solid var(--linea-fuerte);
  border-bottom: 1px solid var(--linea-fuerte);
  color: var(--tinta); font-weight: 700; font-size: 1.05rem; line-height: 1.25;
  text-decoration: none; background: var(--papel);
  transition: background-color 150ms ease, color 150ms ease;
}
.sit:hover { background: var(--ficha); color: var(--verde-osc); text-decoration: none; }
.sit:active { background: var(--verde-claro); }
.sit:focus-visible { position: relative; z-index: 1; border-radius: 0; }
.sit .ico { color: var(--verde); flex: none; line-height: 0; }
.sit .ico svg { width: 26px; height: 26px; }

/* Selector de comunidad: una casilla de formulario */
.selector-ccaa {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  max-width: 54rem;
  padding: .9rem 1.1rem;
  background: var(--ficha);
  border-left: 4px solid var(--verde);
}
.selector-ccaa label { font-weight: 700; font-size: 1rem; }
.selector-ccaa select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 1rem; color: var(--tinta);
  min-height: 48px; min-width: 240px; padding: 0 2.6rem 0 .85rem;
  background: var(--papel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D2422' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 16px;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio);
  cursor: pointer;
}
.selector-ccaa select:hover { border-color: var(--tinta); }
.selector-ccaa .nota { font-size: .92rem; color: var(--texto-suave); flex-basis: 100%; }

/* --- 5. Secciones ------------------------------------------------------- */
.seccion { padding: 3rem 0; }
.seccion-alt { background: var(--ficha); }
.seccion h2 { margin-top: 0; }
.seccion-cab {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem 1.5rem; flex-wrap: wrap;
  border-top: 3px solid var(--tinta);
  padding-top: .85rem; margin-bottom: 1.4rem;
}
.seccion-cab h2 { margin: 0; }
.seccion-cab .enlace-mas {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; font-size: .98rem;
}

/* --- 6. Estados: sellos, no píldoras ------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .12rem .5rem;
  font-size: .84rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
  border: 1.5px solid currentColor; border-radius: var(--radio-sm);
}
.chip::before { content: ""; width: .45em; height: .45em; background: currentColor; flex: none; }
.chip-abierta { color: var(--ok);  background: var(--ok-fondo); }
.chip-pronto  { color: var(--ojo); background: var(--ojo-fondo); }
.chip-cerrada { color: var(--no);  background: var(--no-fondo); }
.chip-cerrada::before { width: .6em; height: 1.5px; }           /* tachado, no punto */
.chip-neutro  { color: var(--texto-suave); background: transparent; border-color: var(--linea-fuerte); }
.chip-neutro::before { display: none; }

/* --- 7. Listados: índice de guía, no rejilla de tarjetas ------------------ */
.rejilla { display: grid; column-gap: 2.25rem; row-gap: 0; }
.rejilla-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.rejilla-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.rejilla-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.tarjeta {
  display: flex; flex-direction: column;
  padding: 1rem 0 1.4rem;
  border-top: 1px solid var(--tinta);
}
a.tarjeta { color: var(--texto); text-decoration: none; }
a.tarjeta:hover { color: var(--texto); text-decoration: none; }
.tarjeta h3 {
  margin: 0 0 .4rem; font-size: 1.12rem; line-height: 1.3;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: .2em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
a.tarjeta:hover h3 { color: var(--verde); text-decoration-color: currentColor; }
.tarjeta p { margin: 0; font-size: .98rem; color: var(--texto-suave); }
.tarjeta .pie {
  margin-top: auto; padding-top: .8rem;
  display: flex; align-items: center; gap: .4rem .75rem; flex-wrap: wrap;
  font-size: .88rem; color: var(--texto-tenue);
}

/* Categorías: icono colgado a la izquierda, como un índice con viñeta propia */
.tarjeta-cat {
  display: grid; grid-template-columns: 2.25rem 1fr; column-gap: .75rem;
  align-content: start;
  border-top-color: var(--linea-fuerte);
}
.tarjeta-cat .ico { grid-row: span 2; color: var(--verde); line-height: 0; padding-top: .1rem; }
.tarjeta-cat .ico svg { width: 28px; height: 28px; }
.tarjeta-cat h3, .tarjeta-cat p { grid-column: 2; }

/* --- 8. Tablas ---------------------------------------------------------- */
.tabla-envoltorio {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--papel);
  border-top: 2px solid var(--tinta);
  border-bottom: 1px solid var(--tinta);
}
table.datos { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.datos th, table.datos td {
  padding: .8rem .9rem .8rem 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--linea);
}
table.datos th:first-child, table.datos td:first-child { padding-left: 0; }
table.datos thead th {
  font-size: .9rem; font-weight: 700; color: var(--texto-suave);
  border-bottom: 1px solid var(--tinta);
  padding-top: .6rem; padding-bottom: .6rem;
}
table.datos tbody tr:last-child td { border-bottom: 0; }
table.datos td:first-child { font-weight: 700; }
.num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* Al cambiar de comunidad, la tabla nueva entra con un fundido corto
   (interacciones.js pone data-recien; en la carga inicial no hay nada). */
#convocatorias[data-recien] .tabla-envoltorio { animation: reordenado 220ms var(--salida); }
#ccaa-aviso[data-recien] { animation: aviso-nuevo 240ms var(--salida); }
@keyframes reordenado { from { opacity: .35; transform: translateY(6px); } }
@keyframes aviso-nuevo { from { background-color: var(--rotulador); } }

/* --- 9. Artículo -------------------------------------------------------- */
.articulo { padding: 2rem 0 3rem; }

.migas { font-size: .92rem; color: var(--texto-tenue); margin-bottom: 1.1rem; }
.migas a { color: var(--texto-suave); }
.migas span { margin: 0 .3rem; color: var(--linea-fuerte); }

.art-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem;
  font-size: .95rem; color: var(--texto-suave);
  padding: .7rem 0; margin-bottom: 1.75rem;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}
.art-meta .autor { font-weight: 700; color: var(--tinta); }
.art-meta time { font-weight: 700; color: var(--tinta); }

/* La respuesta corta: el único gesto llamativo del sitio.
   El párrafo pasa a línea para que el rotulador siga el texto renglón a renglón. */
.respuesta { margin: 0 0 2rem; font-size: 1.2rem; line-height: 1.7; }
.respuesta p {
  display: inline; margin: 0;
  background: var(--rotulador);
  padding: .08em .18em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.respuesta p + p::before { content: "\A\A"; white-space: pre; }
.respuesta strong { color: var(--tinta); }

.aviso {
  margin: 1.75rem 0; padding: 1rem 1.2rem;
  font-size: 1rem;
  background: var(--ficha);
  border-left: 4px solid var(--texto-tenue);
}
.aviso-ok  { background: var(--ok-fondo);  border-left-color: var(--ok); }
.aviso-ojo { background: var(--ojo-fondo); border-left-color: var(--ojo); }
.aviso strong { display: block; margin-bottom: .25rem; font-size: 1.04rem; }
.aviso p:last-child { margin-bottom: 0; }

/* El artículo se lee como capítulos de una guía */
.articulo h2 { border-top: 1px solid var(--linea); padding-top: .8em; margin-top: 2em; }

.lista-check { list-style: none; padding-left: 0; }
.lista-check li { position: relative; padding-left: 2rem; margin-bottom: .6rem; }
.lista-check li::before {
  content: ""; position: absolute; left: .35rem; top: .28em;
  width: .42em; height: .8em;
  border: solid var(--ok); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Pasos: la cifra cuelga en el margen, en el tipo de los titulares */
.pasos { counter-reset: paso; list-style: none; padding-left: 0; }
.pasos > li {
  position: relative; counter-increment: paso;
  padding: .15rem 0 .9rem 3rem; margin-bottom: .9rem;
  border-bottom: 1px solid var(--linea);
}
.pasos > li:last-child { border-bottom: 0; }
.pasos > li::before {
  content: counter(paso);
  position: absolute; left: 0; top: -.15rem;
  font-family: var(--titular); font-weight: 600;
  font-size: 1.9rem; line-height: 1; color: var(--verde);
  font-variant-numeric: lining-nums;
}

.fuente-oficial {
  margin-top: 2.5rem; padding-top: 1rem;
  font-size: .95rem; color: var(--texto-suave);
  border-top: 2px solid var(--tinta);
}

/* Huecos publicitarios
   - Con un bloque de AdSense dentro: se reserva el alto de un anuncio adaptable
     (300×250 / 336×280) para que el texto no salte cuando carga, y se rotula
     «Publicidad» para que nadie lo confunda con el contenido.
   - Vacíos: no se muestran en la web publicada. En local (interacciones.js pone
     data-anuncios en <html>) se ven como una trama, para saber dónde caen.
   - Si Google no tiene anuncio que servir, el hueco se pliega. */
.anuncio {
  display: block; position: relative;
  min-height: 280px; margin: 2.75rem 0;
  padding-top: 1.5rem;
  font-size: .82rem; color: var(--texto-tenue);
  border-top: 1px solid var(--linea);
  text-align: center;
}
.anuncio::before {
  content: "Publicidad";
  position: absolute; top: .3rem; left: 0;
  font-size: .78rem; color: var(--texto-tenue);
}
.anuncio:not(:has(ins, iframe)) { display: none; }
.anuncio:has(ins[data-ad-status="unfilled"]) { display: none; }

html[data-anuncios="previsualizar"] .anuncio:not(:has(ins, iframe)) {
  display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, var(--ficha) 0 8px, #EBEEED 8px 16px);
  background-clip: content-box;
}

/* Arriba, bajo el menú: franja de 90 px, solo en ordenador (≥ 1024 px).
   En el móvil empujaría el titular y la respuesta fuera de la primera pantalla. */
.anuncio-arriba {
  max-width: 970px; min-height: calc(90px + 1.5rem);
  margin: 1.25rem auto 0; border-top: 0;
}
@media (max-width: 1023.98px) {
  .anuncio-arriba, .anuncio-arriba ins { display: none !important; }
}

/* Laterales: dos columnas de 160×600 que acompañan al lector al bajar, a ambos
   lados del contenido. Solo desde 1.280 px; por debajo no caben sin estrechar
   demasiado la lectura. Van dentro de <main>, así que nunca pisan el pie. */
main#principal { position: relative; }
.anuncios-laterales { display: none; }
@media (max-width: 1279.98px) {
  .anuncios-laterales, .anuncio-lateral, .anuncio-lateral ins { display: none !important; }
}
@media (min-width: 1280px) {
  /* Con laterales activos, el contenido cede sitio: 160 px + 32 px de aire por lado */
  /* (se aplica al body para que cabecera y pie se alineen con el contenido) */
  body:has(> main#principal .anuncio-lateral :is(ins, iframe)),
  html[data-anuncios="previsualizar"] body:has(> main#principal .anuncios-laterales) {
    --ancho: min(1140px, calc(100vw - 2 * (160px + 32px) - 40px));
  }
  .anuncios-laterales:has(ins, iframe),
  html[data-anuncios="previsualizar"] .anuncios-laterales {
    display: grid;
    grid-template-columns: 160px var(--ancho) 160px;
    justify-content: center; column-gap: 32px;
    position: absolute; inset: 0;
    pointer-events: none;
  }
  .anuncio-lateral {
    grid-row: 1; align-self: start;
    position: sticky; top: 88px;
    width: 160px; min-height: calc(600px + 1.5rem);
    margin: 1.25rem 0 0; border-top: 0;
    pointer-events: auto;
  }
  .anuncio-lateral + .anuncio-lateral { grid-column: 3; }
}

/* --- 10. Boletín -------------------------------------------------------- */
.boletin {
  background: var(--verde); color: #fff;
  padding: 2rem 1.9rem 1.7rem;
  border-radius: var(--radio);
}
.boletin h2 { color: #fff; margin: 0 0 .5rem; }
.boletin p  { color: #DCEAE5; max-width: 54ch; }
.boletin form { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.3rem; max-width: 36rem; }
.boletin input[type="email"] {
  flex: 1 1 240px; min-height: 50px; padding: 0 .95rem;
  font: inherit; font-size: 1.02rem; color: var(--tinta);
  background: #fff; border: 0; border-radius: var(--radio);
}
.boletin .letra-pequena { font-size: .88rem; color: #C9DDD6; margin: 1rem 0 0; }
.boletin .letra-pequena a { color: #fff; }

/* --- 11. Botones -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: 0 1.3rem;
  font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2;
  color: #fff; background: var(--verde);
  border: 1.5px solid var(--verde); border-radius: var(--radio);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease,
              transform 120ms var(--salida);
}
.btn:hover { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-claro { background: #fff; color: var(--verde-osc); border-color: #fff; }
.btn-claro:hover { background: var(--rotulador); color: var(--tinta); border-color: var(--rotulador); }
.btn-linea { background: transparent; color: var(--verde); border-color: var(--verde); }
.btn-linea:hover { background: var(--verde-claro); color: var(--verde-osc); }

/* --- 12. Formularios ---------------------------------------------------- */
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-weight: 700; margin-bottom: .35rem; }
.campo input, .campo textarea, .campo select {
  width: 100%; min-height: 48px; padding: .6rem .85rem;
  font: inherit; font-size: 1.02rem; color: var(--tinta);
  background: #fff; border: 1px solid var(--linea-fuerte); border-radius: var(--radio);
  transition: border-color 150ms ease;
}
.campo input:hover, .campo textarea:hover, .campo select:hover { border-color: var(--tinta); }
.campo input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--verde); flex: none; }
.campo textarea { min-height: 160px; resize: vertical; }
.campo select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 2.6rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D2422' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 16px;
}
.campo .ayuda { font-size: .92rem; color: var(--texto-tenue); margin: .35rem 0 0; }

/* --- 13. Buscador ------------------------------------------------------- */
.buscador { position: relative; margin-bottom: 1.6rem; max-width: 42rem; }
.buscador input {
  width: 100%; min-height: 54px; padding: 0 1rem 0 2.9rem;
  font: inherit; font-size: 1.06rem; color: var(--tinta);
  border: 1.5px solid var(--tinta); border-radius: var(--radio);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D2422' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E") no-repeat .9rem center / 20px;
}
.buscador input::placeholder { color: var(--texto-tenue); opacity: 1; }
.sin-resultados { color: var(--texto-suave); padding: 1rem 0 1.5rem; }

/* --- 14. Pie ------------------------------------------------------------ */
.pie-pagina {
  margin-top: 3rem; padding: 2.5rem 0 1.8rem;
  background: var(--ficha); border-top: 3px solid var(--tinta);
  font-size: .98rem;
}
.descargo {
  max-width: 62rem; margin-bottom: 2rem; padding: 0 0 0 1rem;
  border-left: 4px solid var(--tinta);
  font-size: .98rem; color: var(--texto-suave);
}
.descargo strong { color: var(--tinta); }

.pie-rejilla {
  display: grid; gap: 2rem;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  margin-bottom: 2rem;
}
.pie-pagina h4 { font-size: 1rem; margin: 0 0 .4rem; }
.pie-pagina ul { list-style: none; padding: 0; margin: 0; }
.pie-pagina li { margin: 0; }
.pie-pagina li a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--tinta); text-decoration: none;
}
.pie-pagina li a:hover { color: var(--verde); text-decoration: underline; }
.pie-desc { color: var(--texto-suave); max-width: 34ch; margin: .6rem 0 0; }

.pie-legal {
  display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; justify-content: space-between;
  padding-top: 1.2rem; border-top: 1px solid var(--linea-fuerte);
  font-size: .92rem; color: var(--texto-suave);
}
.pie-legal a { color: var(--texto-suave); display: inline-flex; align-items: center; min-height: 44px; }

/* --- 15. Aviso de cookies ------------------------------------------------ */
.cookies {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  max-width: 560px; margin: 0 auto; padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1.5px solid var(--tinta); border-radius: var(--radio);
  box-shadow: 0 12px 28px -14px rgba(29, 36, 34, .45);
}
.cookies[hidden] { display: none; }
.cookies h4 { font-size: 1.06rem; margin: 0 0 .35rem; }
.cookies p { font-size: .95rem; color: var(--texto-suave); margin-bottom: 1rem; }
.cookies .acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookies .btn { min-height: 44px; padding: 0 1rem; font-size: .96rem; }

/* --- 16. Pantallas medianas y móvil -------------------------------------- */
@media (max-width: 900px) {
  .pie-rejilla { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  body { font-size: 1.0625rem; }            /* 17 px */
  .menu-btn { display: grid; }

  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100dvh - 64px); overflow-y: auto;
    padding: .4rem 20px 1rem;
    background: var(--papel);
    border-bottom: 1px solid var(--tinta);
    box-shadow: 0 14px 24px -16px rgba(29, 36, 34, .4);
  }
  .nav.abierto {
    display: block;
    opacity: 1; transform: none;
    transition: opacity 180ms var(--salida), transform 180ms var(--salida);
  }
  @starting-style {
    .nav.abierto { opacity: 0; transform: translateY(-6px); }
  }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--linea); }
  .nav > ul > li:last-child { border-bottom: 0; }
  .nav a, .nav .desp-btn {
    width: 100%; min-height: 50px; padding: 0 .25rem;
    justify-content: space-between; font-size: 1.06rem;
  }
  .nav .desp-menu {
    position: static; min-width: 0;
    margin: 0 0 .6rem; padding: 0 0 0 .9rem;
    border: 0; border-left: 2px solid var(--verde); border-radius: 0;
    box-shadow: none;
  }
  .nav .desp-menu a { padding: 0 .25rem; min-height: 46px; }

  .hero { padding: 2rem 0 2.2rem; }
  .hero .entradilla { font-size: 1.08rem; margin-bottom: 1.6rem; }
  .situaciones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sit { min-height: 60px; padding: .7rem .8rem; gap: .6rem; font-size: 1rem; }
  .selector-ccaa select { min-width: 0; width: 100%; }

  .seccion { padding: 2.3rem 0; }
  .boletin { padding: 1.5rem 1.25rem; }
  .pie-rejilla { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .pie-rejilla > div:first-child { grid-column: 1 / -1; }

  .respuesta { font-size: 1.12rem; }

  /* Tablas en el móvil: algo más compactas para que «20 meses» o «1.260,00 €» no se partan */
  table.datos { font-size: .94rem; }
  table.datos th, table.datos td { padding-right: .55rem; }
  table.datos td { hyphens: manual; }
  table.datos th:first-child, table.datos td:first-child { min-width: 6.4em; }  /* «De 25 a 49» en una línea */
  .pasos > li { padding-left: 2.5rem; }

  /* Convocatorias en el móvil: cada fila, una ficha legible sin desplazarse de lado */
  #convocatorias .tabla-envoltorio { overflow: visible; }
  #convocatorias table.datos thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #convocatorias table.datos tr {
    display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem;
    padding: .85rem 0; border-bottom: 1px solid var(--linea);
  }
  #convocatorias table.datos tr:last-child { border-bottom: 0; }
  #convocatorias table.datos td { display: block; padding: 0; border: 0; }
  #convocatorias table.datos td:nth-child(1) { grid-column: 1 / -1; font-size: 1.05rem; }
  #convocatorias table.datos td:nth-child(2) { color: var(--texto-suave); }
  #convocatorias table.datos td:nth-child(3) { grid-column: 1; font-size: .95rem; }
  #convocatorias table.datos td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
  #convocatorias table.datos td:nth-child(5) { grid-column: 1 / -1; }
  #convocatorias table.datos td:nth-child(5) a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 420px) {
  .situaciones { grid-template-columns: 1fr 1fr; }
  .sit .ico svg { width: 22px; height: 22px; }
}

/* --- 17. Movimiento reducido ----------------------------------------------
   Fuera desplazamientos y escalas; se conservan los cambios de color,
   que ayudan a entender qué es pulsable. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .btn:active, .menu-btn:active { transform: none; }
  .desp-btn[aria-expanded="true"] svg { transition: none; }
  .nav.abierto, .nav .desp-menu.abierto { transition: opacity 120ms ease; transform: none; }
  @starting-style {
    .nav.abierto, .nav .desp-menu.abierto { transform: none; }
  }
}

/* --- 18. Hover solo donde hay ratón -------------------------------------- */
@media (hover: none) {
  .sit:hover { background: var(--papel); color: var(--tinta); }
  a.tarjeta:hover h3 { color: var(--tinta); text-decoration-color: transparent; }
  .nav a:hover, .nav .desp-btn:hover { color: var(--tinta); text-decoration-color: transparent; }
}

@media print {
  .cabecera, .pie-pagina, .cookies, .anuncio, .boletin { display: none !important; }
  body { font-size: 11.5pt; }
  .respuesta p { background: none; text-decoration: underline 3px var(--rotulador); }
}

/* Si la página termina en una franja gris, el pie se apoya en ella sin hueco blanco */
main:has(> .seccion-alt:last-child) + .pie-pagina { margin-top: 0; }
