/* =============================================================================
   HagoMiCV — styles.css
   1 Tokens · 2 Reset · 3 Utilidades · 4 Botones · 5 Cabecera y hero
   6 La herramienta (editor + vista previa) · 7 Diseño del CV · 8 Modales y avisos
   9 Anuncios · 10 Secciones de contenido · 11 Pie · 12 Responsive · 13 Reduced motion
   ============================================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  color-scheme: light dark;

  --bg:          #f4f6f8;
  --bg-2:        #eceff3;
  --superficie:  #ffffff;
  --superficie-2:#f7f9fb;
  --tinta:       #131a22;
  --tinta-2:     #3b4654;
  --apagado:     #6b7787;
  --linea:       #dfe4ea;
  --linea-fuerte:#c8d0da;

  --acento:      #1e4f8a;
  --acento-ink:  #ffffff;
  --acento-suave:#e8f0f9;
  --rojo:        #b3261e;
  --rojo-suave:  #fdeceb;
  --verde:       #147d5c;

  /* Lo pone main.js con el color de acento elegido para el CV */
  --acento-cv:   #1e4f8a;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;

  --r:   12px;
  --r-s: 8px;
  --r-l: 18px;

  --sombra-s: 0 1px 2px rgba(19,26,34,.06), 0 1px 3px rgba(19,26,34,.05);
  --sombra-m: 0 4px 12px rgba(19,26,34,.07), 0 10px 28px rgba(19,26,34,.06);
  --sombra-l: 0 18px 44px rgba(19,26,34,.16);

  --gutter: clamp(1rem, 4vw, 2rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #12161c;
    --bg-2:        #171d25;
    --superficie:  #1b222b;
    --superficie-2:#212a35;
    --tinta:       #eef2f7;
    --tinta-2:     #c3ccd8;
    --apagado:     #93a0b0;
    --linea:       #2c3642;
    --linea-fuerte:#3c4854;
    --acento:      #6fa8e6;
    --acento-ink:  #0d1620;
    --acento-suave:#1d2c3d;
    --rojo:        #ef8a83;
    --rojo-suave:  #33201f;
    --verde:       #4ec39a;
    --sombra-l: 0 18px 44px rgba(0,0,0,.5);
  }
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;             /* clip, no hidden: hidden rompe position:sticky */
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--tinta);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 700; }
::selection { background: var(--acento); color: #fff; }

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .6rem 1rem; background: var(--superficie); color: var(--tinta);
  border-radius: var(--r-s); box-shadow: var(--sombra-m); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.contenedor { width: 100%; max-width: 1260px; margin-inline: auto; padding-inline: var(--gutter); }
.contenedor--medio { max-width: 780px; }

.nota {
  margin-top: .7rem; font-size: .84rem; line-height: 1.5; color: var(--apagado);
  background: var(--superficie-2); border: 1px solid var(--linea);
  border-radius: var(--r-s); padding: .55rem .7rem;
}
.nota--tip { border-color: var(--linea-fuerte); background: var(--acento-suave); color: var(--tinta-2); }

.aviso {
  margin-top: .6rem; font-size: .86rem; line-height: 1.5;
  color: var(--tinta-2); background: var(--superficie-2);
  border: 1px solid var(--linea-fuerte); border-left: 3px solid var(--acento);
  border-radius: var(--r-s); padding: .6rem .75rem;
}
.aviso--fuerte { background: var(--rojo-suave); border-left-color: var(--rojo); }

.lista { margin: .8rem 0 1.2rem; padding-left: 1.15rem; }
.lista li { margin-bottom: .5rem; }

.cargando { color: var(--apagado); font-size: .9rem; padding: 1rem 0; }

/* =============================================================
   4. Botones
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.05rem; border-radius: var(--r-s);
  font-weight: 600; font-size: .93rem; line-height: 1.2;
  border: 1px solid transparent; text-decoration: none;
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out),
              color .18s var(--ease-out), transform .18s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--primario { background: var(--acento); color: #fff; box-shadow: var(--sombra-s); }
.btn--primario:hover { background: color-mix(in srgb, var(--acento) 86%, #000); }
@media (prefers-color-scheme: dark) {
  .btn--primario { color: var(--acento-ink); }
  .btn--primario:hover { background: color-mix(in srgb, var(--acento) 86%, #fff); }
}
.btn--fantasma {
  background: var(--superficie); color: var(--tinta-2); border-color: var(--linea-fuerte);
}
.btn--fantasma:hover { border-color: var(--acento); color: var(--acento); }
.btn--texto { background: none; padding-inline: .4rem; color: var(--apagado); font-weight: 500; }
.btn--texto:hover { color: var(--tinta); text-decoration: underline; }
.btn--rojo { color: var(--rojo); }
.btn--rojo:hover { color: var(--rojo); }
.btn--rojo-solido { background: var(--rojo); color: #fff; }
.btn--peque { padding: .42rem .75rem; font-size: .84rem; }
.btn--grande { padding: .85rem 1.3rem; font-size: 1.02rem; }
.btn--ancho { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  color: var(--apagado); border: 1px solid transparent;
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.mini svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mini:hover { background: var(--bg-2); color: var(--tinta); }
.mini--rojo:hover { background: var(--rojo-suave); color: var(--rojo); }
.mini[disabled] { opacity: .28; cursor: default; }
.mini[disabled]:hover { background: none; color: var(--apagado); }

/* =============================================================
   5. Cabecera y hero
   ============================================================= */
.cab {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.cab__in {
  max-width: 1260px; margin-inline: auto; padding: .6rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marca { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--tinta); }
.marca__icono { width: 26px; height: 26px; color: var(--acento); }
.marca__txt { font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; }
.marca__txt strong { font-weight: 800; color: var(--acento); }
.cab__nav { display: flex; gap: 1.1rem; font-size: .9rem; }
.cab__nav a { color: var(--tinta-2); text-decoration: none; }
.cab__nav a:hover { color: var(--acento); }

.hero { padding: clamp(1.6rem, 4vw, 2.8rem) 0 1.2rem; text-align: center; }
.hero__sub {
  margin: .8rem auto 0; max-width: 46rem; font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--tinta-2);
}
.privacidad-badge {
  display: inline-flex; align-items: flex-start; gap: .55rem; text-align: left;
  margin-top: 1.1rem; padding: .6rem .9rem; max-width: 44rem;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: 999px; box-shadow: var(--sombra-s);
  font-size: .87rem; color: var(--tinta-2); line-height: 1.45;
}
.privacidad-badge svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--verde); margin-top: .1rem; }

/* =============================================================
   6. La herramienta
   ============================================================= */
.app { padding-bottom: 1.6rem; }
.app__grid { display: grid; gap: 1.1rem; align-items: start; }

.panel {
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--r-l); box-shadow: var(--sombra-m);
  padding: clamp(.9rem, 2.4vw, 1.3rem);
}
.panel__cab { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.panel__tit { font-size: 1.15rem; }

.guardado {
  display: flex; align-items: center; gap: .45rem;
  margin-top: .5rem; font-size: .8rem; color: var(--apagado);
}
.guardado__punto {
  width: 7px; height: 7px; border-radius: 50%; background: var(--verde); flex: 0 0 auto;
}
.guardado .is-error { color: var(--rojo); }

/* ---- Bloques del editor (acordeón) ---- */
.editor { margin-top: .9rem; display: grid; gap: .5rem; }

.bloque { border: 1px solid var(--linea); border-radius: var(--r); background: var(--superficie); }
.bloque.is-oculto { opacity: .62; }
.bloque__cab {
  display: flex; align-items: center; justify-content: space-between; gap: .3rem;
  padding: .2rem .35rem .2rem 0; font-size: 1rem; font-family: var(--sans);
}
.bloque__toggle {
  flex: 1 1 auto; display: flex; align-items: center; gap: .45rem;
  padding: .62rem .3rem .62rem .55rem; text-align: left;
  font-weight: 600; font-size: .95rem; color: var(--tinta); border-radius: var(--r);
}
.bloque__flecha {
  width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--apagado);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s var(--ease-out);
}
.bloque.is-abierto .bloque__flecha { transform: rotate(90deg); }
.bloque__aviso {
  font-style: normal; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--apagado);
  background: var(--bg-2); border-radius: 999px; padding: .1rem .45rem;
}
.bloque__bts { display: flex; gap: .12rem; flex: 0 0 auto; }
.bloque__cuerpo { display: none; padding: .1rem .7rem .85rem; }
.bloque.is-abierto .bloque__cuerpo { display: block; }

/* ---- Campos ---- */
.campo { display: grid; gap: .22rem; margin-bottom: .6rem; }
.campo__et { font-size: .76rem; font-weight: 600; color: var(--apagado); letter-spacing: .01em; }
.campo__ayuda { font-size: .76rem; color: var(--apagado); line-height: 1.4; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"],
.campo select, .campo textarea {
  width: 100%; padding: .5rem .6rem;
  background: var(--superficie-2); color: var(--tinta);
  border: 1px solid var(--linea-fuerte); border-radius: var(--r-s);
  font-size: .92rem; line-height: 1.45;
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out);
}
.campo textarea { resize: vertical; min-height: 5rem; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--acento); background: var(--superficie);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 16%, transparent);
}
.campo input[disabled] { opacity: .6; }
.campo--check {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem;
  font-size: .87rem; color: var(--tinta-2); cursor: pointer;
}
.campo--check input { width: 17px; height: 17px; accent-color: var(--acento); flex: 0 0 auto; }
.campo.is-apagado { opacity: .55; }

.entrada { border: 1px solid var(--linea); border-radius: var(--r-s); margin-bottom: .55rem; background: var(--superficie-2); }
.entrada__cab {
  display: flex; align-items: center; gap: .45rem;
  padding: .4rem .45rem .4rem .55rem; border-bottom: 1px solid var(--linea);
}
.entrada__num {
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%;
  background: var(--bg-2); color: var(--apagado);
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.entrada__tit {
  flex: 1 1 auto; min-width: 0; font-size: .87rem; font-weight: 600; color: var(--tinta);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entrada__tit em { font-style: normal; font-weight: 400; color: var(--apagado); }
.entrada__bts { display: flex; gap: .1rem; flex: 0 0 auto; }
.entrada__campos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem;
  padding: .7rem .6rem .1rem;
}
.entrada__campos > .campo { grid-column: 1 / -1; }
.entrada__campos > .campo--mitad { grid-column: auto; }

/* ---- Foto ---- */
.foto { display: flex; gap: .9rem; align-items: flex-start; margin-top: .3rem; }
.foto__previa {
  width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--linea-fuerte);
  display: flex; align-items: center; justify-content: center;
}
.foto__previa img { width: 100%; height: 100%; object-fit: cover; }
.foto__previa svg { width: 34px; height: 34px; fill: none; stroke: var(--apagado); stroke-width: 1.6; stroke-linecap: round; }
.foto__acciones { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.foto__acciones .campo--check { width: 100%; margin: .1rem 0 0; }
.foto__acciones .campo__ayuda { width: 100%; margin: 0; }

/* ---- Borrador ---- */
.borrador {
  margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--linea-fuerte);
}
.borrador__tit { font-size: .95rem; }
.borrador__txt { font-size: .84rem; color: var(--apagado); margin: .25rem 0 .6rem; }
.borrador__bts { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

/* =============================================================
   7. Panel de diseño y vista previa
   ============================================================= */
.diseno {
  border: 1px solid var(--linea); border-radius: var(--r);
  padding: .7rem .8rem .8rem; background: var(--superficie-2); margin-bottom: .9rem;
}
.diseno__fila { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.diseno__fila + .diseno__fila { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--linea); }
.diseno__et {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--apagado);
}
.diseno__select { display: flex; align-items: center; gap: .4rem; }
.diseno__select select {
  padding: .35rem .5rem; font-size: .85rem;
  background: var(--superficie); color: var(--tinta);
  border: 1px solid var(--linea-fuerte); border-radius: var(--r-s);
}

.plantillas { display: flex; gap: .5rem; flex: 1 1 100%; }
.plantilla {
  flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: .3rem;
  padding: .5rem .35rem; border-radius: var(--r-s);
  border: 1.5px solid var(--linea-fuerte); background: var(--superficie);
  color: var(--acento-cv);
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.plantilla__mini { width: 40px; height: 53px; fill: currentColor; }
.plantilla__mini rect[fill="#fff"] { fill: var(--superficie); }
.plantilla__nombre { font-size: .76rem; font-weight: 600; color: var(--tinta-2); text-align: center; line-height: 1.2; }
.plantilla:hover { border-color: var(--acento-cv); }
.plantilla.is-activo {
  border-color: var(--acento-cv);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento-cv) 18%, transparent);
}
.plantilla.is-activo .plantilla__nombre { color: var(--tinta); }

.acentos { display: flex; gap: .3rem; align-items: center; }
.acento {
  width: 24px; height: 24px; border-radius: 50%; background: var(--c);
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  transition: transform .15s var(--ease-out);
}
.acento:hover { transform: scale(1.12); }
.acento.is-activo { border-color: var(--tinta); }
.acento--libre {
  position: relative; overflow: hidden; padding: 0; cursor: pointer;
  background: conic-gradient(#e5484d, #f5a524, #46a758, #0091ff, #8e4ec6, #e5484d);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.acento--libre input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; border: 0; }

.previa {
  display: grid; gap: 1.5rem; padding-top: 1.1rem;
  max-height: none;
}
.hoja {
  position: relative; aspect-ratio: 210 / 297; width: 100%;
  background: #fff; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(19,26,34,.14), 0 8px 26px rgba(19,26,34,.14);
  outline: 1px solid var(--linea);
}
.hoja__svg { width: 100%; height: 100%; display: block; border-radius: 3px; }
.hoja__n {
  position: absolute; top: -.35rem; left: 0; transform: translateY(-100%);
  font-size: .72rem; font-weight: 600; color: var(--apagado);
}
.previa__pie {
  display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center;
  margin: .9rem 0 .8rem; font-size: .8rem; color: var(--apagado);
}
.previa__sep { opacity: .5; }
.previa__legal { margin-top: .5rem; text-align: center; font-size: .78rem; color: var(--apagado); }

/* =============================================================
   8. Barra móvil, modales y aviso de esquina
   ============================================================= */
.barra-movil {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  gap: .4rem; padding: .5rem var(--gutter) calc(.5rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--superficie) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--linea);
}
.barra-movil__bt {
  flex: 1 1 0; padding: .6rem .3rem; border-radius: var(--r-s);
  font-size: .88rem; font-weight: 600; color: var(--tinta-2);
  border: 1px solid var(--linea-fuerte); background: var(--superficie);
}
.barra-movil__bt.is-activo { background: var(--acento-suave); border-color: var(--acento); color: var(--acento); }
.barra-movil__pdf {
  flex: 0 0 auto; padding: .6rem 1rem; border-radius: var(--r-s);
  background: var(--acento); color: #fff; font-weight: 700; font-size: .88rem;
}
@media (prefers-color-scheme: dark) { .barra-movil__pdf { color: var(--acento-ink); } }

.modal {
  border: 0; padding: 0; background: transparent; max-width: min(94vw, 440px);
  margin: auto; color: var(--tinta);
}
.modal::backdrop { background: rgba(10, 14, 20, .55); backdrop-filter: blur(2px); }
.modal__caja {
  position: relative; background: var(--superficie);
  border: 1px solid var(--linea); border-radius: var(--r-l);
  box-shadow: var(--sombra-l); padding: 1.4rem 1.3rem 1.2rem; text-align: center;
}
.modal__caja--peque { text-align: left; }
.modal__x {
  position: absolute; top: .55rem; right: .55rem;
  width: 30px; height: 30px; border-radius: 50%; color: var(--apagado);
  display: flex; align-items: center; justify-content: center;
}
.modal__x svg { width: 15px; height: 15px; }
.modal__x:hover { background: var(--bg-2); color: var(--tinta); }
.modal__tit { font-size: 1.12rem; margin-bottom: .35rem; }
.modal__txt { font-size: .88rem; color: var(--tinta-2); margin-bottom: 1rem; }
.modal__bts { display: flex; gap: .5rem; justify-content: flex-end; }

.esquina {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 44;
  width: min(320px, calc(100vw - 2rem));
  background: var(--superficie); border: 1px solid var(--linea-fuerte);
  border-radius: var(--r); box-shadow: var(--sombra-l);
  padding: .6rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.esquina.is-dentro { opacity: 1; transform: none; }
.esquina__x {
  position: absolute; top: -9px; right: -9px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--superficie); border: 1px solid var(--linea-fuerte);
  color: var(--apagado); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra-s);
}
.esquina__x svg { width: 12px; height: 12px; }

/* =============================================================
   9. Anuncios (solo huecos reservados: aquí no hay ningún anuncio real)
   ============================================================= */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem; margin-inline: auto;
  border: 1px dashed var(--linea-fuerte); border-radius: var(--r-s);
  background: repeating-linear-gradient(135deg,
    var(--superficie-2) 0 10px, transparent 10px 20px);
  color: var(--apagado);
}
.ad-slot__label { font-size: .72rem; font-weight: 700; letter-spacing: .16em; }
.ad-slot__size { font-size: .68rem; opacity: .7; }
.ad-slot--leaderboard { max-width: 728px; min-height: 90px; margin-block: 1.6rem; }
.ad-slot--rect { max-width: 336px; min-height: 280px; margin-block: 2rem; }
.ad-slot--modal { width: 100%; max-width: 300px; min-height: 250px; margin-bottom: 1rem; }
.ad-slot--esquina { width: 100%; min-height: 100px; }

/* =============================================================
   10. Secciones de contenido
   ============================================================= */
.seccion { padding: clamp(2rem, 5vw, 3.4rem) 0; }
.seccion--gris { background: var(--bg-2); border-block: 1px solid var(--linea); }
.seccion h2 { margin-bottom: 1rem; }
.seccion h3 { margin: 1.7rem 0 .5rem; }
.seccion p { margin-bottom: .9rem; color: var(--tinta-2); }
.seccion__intro { font-size: 1.02rem; }

.pasos { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 1.4rem; }
.paso {
  position: relative; padding: 1.1rem 1.2rem 1.1rem 1.2rem;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--r); box-shadow: var(--sombra-s);
}
.paso__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--acento); color: #fff; font-weight: 700; font-size: .95rem;
  margin-bottom: .5rem;
}
@media (prefers-color-scheme: dark) { .paso__n { color: var(--acento-ink); } }
.paso h3 { margin: 0 0 .35rem; }
.paso p { margin: 0; font-size: .93rem; }

.ideas { display: grid; gap: .9rem; margin-top: 1.3rem; }
.idea {
  padding: 1rem 1.1rem; background: var(--superficie);
  border: 1px solid var(--linea); border-radius: var(--r);
}
.idea h3 { margin: 0 0 .3rem; color: var(--acento); }
.idea p { margin: 0; font-size: .92rem; }

.faq {
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--r); margin-bottom: .55rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: .85rem 1rem; font-weight: 600; font-size: .97rem;
  list-style: none; position: relative; padding-right: 2.4rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.1rem; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--apagado); border-bottom: 2px solid var(--apagado);
  transform: rotate(45deg); transition: transform .2s var(--ease-out);
}
.faq[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq p { padding: 0 1rem .9rem; margin: 0 0 .4rem; font-size: .93rem; color: var(--tinta-2); }
.faq p:last-child { margin-bottom: 0; }

/* Bloque de datos del titular en las páginas legales */
.legal__datos {
  margin: .9rem 0 1.2rem; padding: 1rem 1.15rem;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--r); line-height: 1.85;
}

.cierre { padding: clamp(2rem, 5vw, 3.2rem) 0; text-align: center; }
.cierre p { color: var(--tinta-2); margin-bottom: 1rem; }

/* =============================================================
   11. Pie
   ============================================================= */
.pie {
  padding: 2rem 0 3rem; border-top: 1px solid var(--linea);
  background: var(--bg-2); text-align: center;
}
.pie__marca { font-family: var(--display); font-weight: 600; }
.pie__marca strong { color: var(--acento); }
.pie__nav { display: flex; gap: 1.1rem; justify-content: center; margin: .7rem 0; font-size: .9rem; }
.pie__nav a { color: var(--tinta-2); }
.pie__nota { font-size: .8rem; color: var(--apagado); max-width: 40rem; margin-inline: auto; }

/* =============================================================
   12. Responsive
   ============================================================= */
@media (max-width: 959px) {
  .panel--previa { display: none; }
  html[data-vista="previa"] .panel--previa { display: block; }
  html[data-vista="previa"] .panel--editor { display: none; }
  .barra-movil { display: flex; }
  body { padding-bottom: 4.4rem; }
  .cab__nav { display: none; }
  /* El número de hoja se queda FUERA del papel también en móvil: si entra
     dentro, estira la caja y la hoja deja de tener proporción A4. */
  .previa { padding-top: 1.15rem; gap: 1.3rem; }
}

@media (max-width: 479px) {
  .entrada__campos { grid-template-columns: 1fr; }
  .entrada__campos > .campo--mitad { grid-column: 1 / -1; }
  .plantillas { flex-wrap: wrap; }
  .plantilla { flex: 1 1 30%; }
}

@media (min-width: 960px) {
  .app__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.3rem; }
  .panel--previa {
    position: sticky; top: 4.4rem;
    max-height: calc(100vh - 5.4rem); overflow-y: auto; overscroll-behavior: contain;
  }
  .pasos { grid-template-columns: repeat(3, 1fr); }
  .ideas { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .app__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

/* =============================================================
   13. Movimiento reducido — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .esquina { transition: none; }
}
