/* =====================================================================
   Ludia — estilos base del sitio
   Sistema visual del masterplan (sección 1): coral / violeta / menta,
   Fredoka para títulos y Manrope para cuerpo. Solo tokens, sin colores sueltos.
   ===================================================================== */

:root {
  --bg: #FBF6EE;
  --bg-soft: #F3EBDC;
  --surface: #FFFFFF;
  --surface-2: #FFF9EF;
  --text: #2A2140;
  --text-soft: #5B5270;
  --border: #E7DCC8;
  --coral: #FF6A4D;
  --coral-ink: #C2431F;
  --violet: #5B3DF5;
  --violet-soft: #EDE9FE;
  --mint: #1FA98A;
  --mint-soft: #DEF6EE;
  --sun: #FFB020;
  --shadow: 0 20px 45px -25px rgba(42, 33, 64, .35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-title: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1530;
    --bg-soft: #211A3C;
    --surface: #241D42;
    --surface-2: #2A2249;
    --text: #F4EFFF;
    --text-soft: #B8AEDA;
    --border: #392F5C;
    --coral: #FF8266;
    --coral-ink: #FFB29D;
    --violet: #9C8CFF;
    --violet-soft: #342A5C;
    --mint: #4FD8B8;
    --mint-soft: #1E3A38;
    --sun: #FFC94D;
    --shadow: 0 20px 45px -20px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

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

html { scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* El atributo hidden debe ganarle a cualquier display de clase (.btn, .sala-grid…). */
[hidden] { display: none !important; }

img { max-width: 100%; }
h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* Texto solo para lectores de pantalla. Vivia en admin.css, pero el editor
   tambien lo necesita para etiquetar los botones de imagen de cada pareja. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--violet);
  background: var(--violet-soft);
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(255, 106, 77, .55);
}
.btn-primary:hover { background: var(--coral-ink); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* ---------- Barra superior ---------- */
.topbar {
  padding-block: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 10;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--coral), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-soft);
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.topbar.is-open .menu-toggle .icon-open { display: none; }
.topbar.is-open .menu-toggle .icon-close { display: block; }

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px 24px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .topbar.is-open .nav-links { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 72px 56px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  line-height: 1.08;
  margin-top: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--coral);
}
.hero-sub {
  margin-top: 18px;
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 46ch;
}
.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-soft);
}
.avatars { display: flex; }
.avatars span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--violet-soft);
  margin-left: -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.avatars span:first-child { margin-left: 0; }

/* ---------- Mock de dispositivo (animación de 3 escenas) ---------- */
.device {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
}
.device-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.device-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  display: block;
}
.device-screen {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.scene {
  position: absolute;
  inset: 20px;
  opacity: 0;
  animation: scenecycle 9s infinite;
}
.scene-2 { animation-delay: 3s; }
.scene-3 { animation-delay: 6s; }
@keyframes scenecycle {
  0%   { opacity: 0; transform: translateY(8px); }
  4%   { opacity: 1; transform: translateY(0); }
  30%  { opacity: 1; transform: translateY(0); }
  36%  { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { animation: none; opacity: 0; }
  .scene-1 { opacity: 1; }
}
.scene-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
  display: block;
}
.fake-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: .82rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.fake-chip-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fake-chip {
  background: var(--violet-soft);
  color: var(--violet);
  font-size: .72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.fake-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  font-size: .82rem;
}
.fake-card b { display: block; margin-bottom: 6px; }
.fake-answers { display: grid; gap: 6px; margin-top: 4px; }
.fake-answer {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .78rem;
  color: var(--text-soft);
}
.fake-answer.correct {
  border-color: var(--mint);
  background: var(--mint-soft);
  color: var(--mint);
  font-weight: 700;
}
.fake-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  text-align: center;
}
.fake-pin b {
  font-family: var(--font-title);
  font-size: 2.1rem;
  letter-spacing: .12em;
  color: var(--coral);
}
.fake-pin span { font-size: .78rem; color: var(--text-soft); }
.fake-pin .fake-live-count { color: var(--mint); font-weight: 700; }

/* ---------- Secciones ---------- */
section { padding-block: 64px; }
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 14px;
}
.section-head p {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 1.02rem;
}

/* Para quién es */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .audience-grid { grid-template-columns: 1fr; } }
.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.audience-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 14px;
}
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-mint   { background: var(--mint-soft); color: var(--mint); }
.tone-sun    { background: color-mix(in srgb, var(--sun) 22%, transparent); color: var(--coral-ink); }
.audience-card h3 { font-size: 1.02rem; font-weight: 600; }
.audience-card p { margin-top: 8px; font-size: .88rem; color: var(--text-soft); }

/* Cómo funciona */
.how {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 820px) { .how-steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: var(--font-title);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  animation: pulse 9s infinite;
}
.step:nth-child(2) .step-num { animation-delay: 3s; }
.step:nth-child(3) .step-num { animation-delay: 6s; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(91, 61, 245, .35); }
  4%   { box-shadow: 0 0 0 6px rgba(91, 61, 245, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 61, 245, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .step .step-num { animation: none; }
}
.step h3 { font-size: 1.05rem; }
.step p { margin-top: 8px; font-size: .9rem; color: var(--text-soft); }

/* Por qué Ludia */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 820px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }
.value-card { padding: 6px 0; }
.value-card .mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mint-soft);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Sin esto el emoji hereda el cuerpo (14px) y queda como una mancha en la caja. */
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 12px;
}
/* Alterna los tres tonos de la marca para que la retícula no sea un bloque verde. */
.value-grid .value-card:nth-child(3n+2) .mark { background: var(--violet-soft); color: var(--violet); }
.value-grid .value-card:nth-child(3n) .mark {
  background: color-mix(in srgb, var(--sun) 22%, transparent);
  color: var(--coral-ink);
}
.value-card h3 { font-size: 1rem; }
.value-card p { margin-top: 6px; font-size: .88rem; color: var(--text-soft); }

/* Planes */
.pricing-grid {
  display: grid;
  /* Cuatro planes en UNA fila. Estaba clavado a 3 y al añadir Escuela caía a
     una segunda fila ella sola, como si fuera de otra categoría. Los cortes de
     abajo la reparten sin dejar nunca una tarjeta huérfana: 4 → 2+2 → 1. */
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: stretch;
}
.plan-cta { margin-top: 16px; }
.plan-resumen {
  margin-top: 4px;
  font-size: .84rem;
  color: var(--text-soft);
  min-height: 2.4em;
}
/* Lo que un plan NO incluye: se ve, pero apagado y sin el check. */
.plan-list li.no {
  color: var(--text-soft);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-soft) 50%, transparent);
}
.plan-list li.no::before { content: "✕"; color: var(--text-soft); }
/* El argumento que empuja del plan medio al recomendado. */
.plan-salto {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--mint-soft);
  color: var(--mint);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 1040px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.plan.featured {
  border-color: var(--coral);
  box-shadow: var(--shadow);
}
.plan-badge {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--coral);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: .03em;
}
.plan-name { font-family: var(--font-title); font-weight: 600; font-size: 1.15rem; }
.plan-price { font-size: 1.9rem; font-family: var(--font-title); font-weight: 600; }
.plan-price span { font-size: .85rem; font-weight: 500; color: var(--text-soft); font-family: var(--font-body); }
/* La alternativa anual: se anuncia el equivalente MENSUAL, que es lo que la
   gente compara, con el total del año y el ahorro detrás. */
.plan-anual {
  margin-top: 6px;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--mint);
  font-weight: 600;
}
.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: .88rem;
  color: var(--text-soft);
}
.plan-list li { display: flex; gap: 8px; align-items: flex-start; }
.plan-list li::before {
  content: "✓";
  color: var(--mint);
  font-weight: 700;
  flex: none;
}
.plan-note {
  font-size: .75rem;
  color: var(--text-soft);
  font-style: italic;
}

/* CTA final */
.cta-final {
  background: linear-gradient(135deg, var(--violet), var(--coral));
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  text-align: center;
  color: #fff;
}
@media (max-width: 560px) { .cta-final { padding: 40px 22px; } }
.cta-final h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-final p { color: rgba(255, 255, 255, .85); margin-top: 12px; max-width: 52ch; margin-inline: auto; }
.cta-final .hero-cta { justify-content: center; margin-top: 26px; }
.cta-final .btn-primary { background: #fff; color: #C2431F; box-shadow: none; }
.cta-final .btn-primary:hover { background: #FFF1EC; }
.cta-final .btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.cta-final .btn-ghost:hover { border-color: #fff; }
.cta-final :focus-visible { outline-color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 40px 60px;
  margin-top: 20px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-soft);
  font-size: .82rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--coral-ink);
  background: color-mix(in srgb, var(--sun) 16%, transparent);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ---------- Formularios (editor, cuenta, juego y sala) ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-soft);
}
.input, .select, .textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.input, .select { height: 44px; }
.textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}
.hint { font-size: .78rem; color: var(--text-soft); }
.hint code {
  background: var(--violet-soft);
  color: var(--violet);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .78rem;
}

/* Avisos de formulario */
.mensaje {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
}
.mensaje.error { background: color-mix(in srgb, var(--coral) 12%, transparent); color: var(--coral-ink); }
.mensaje.ok { background: var(--mint-soft); color: var(--mint); }

/* Avisos que llevan una dirección dentro (el enlace para restablecer la
   contraseña, que el administrador tiene que copiar entero). Sin esto la URL
   desborda la caja o se parte por donde no debe, y se copia a medias. */
.mensaje-largo {
  font-weight: 500;
  overflow-wrap: anywhere;
  line-height: 1.5;
  user-select: all;
}

/* Aquí vivían los estilos de `.licencia-banda`, la franja aparte con la
   licencia de colegio. Se retiraron con su marcado el 18/09/2026, cuando
   Escuela pasó a ser un plan más de la rejilla: dejar las reglas huérfanas
   solo sirve para que alguien las reutilice sin saber qué pintaban. */

/* ---------- Colegios en el panel ---------- */
.colegios-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.colegio-editable {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  background: var(--surface);
}
.colegio-editable h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

/* ---------- Cuenta en la barra superior ---------- */
.cuenta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-soft);
}
.cuenta-inicial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--coral));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  flex: none;
}
@media (max-width: 560px) { .cuenta-nombre { display: none; } }
.form-salir { margin: 0; }

/* Botón que parece enlace (barra superior, editor y lista de sesiones). */
.link-btn {
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-soft);
  background: none;
  border: 0;
  padding: 6px 4px;
  cursor: pointer;
}
.link-btn:hover { color: var(--violet); }
.link-btn.danger:hover { color: var(--coral-ink); }

/* ---------- Colores compartidos de opciones y notas ----------
   Los usan el editor (vista previa), la pantalla del participante y la
   proyección del anfitrión, así que viven en la hoja base. */
.opt-0 { background: var(--coral); }
.opt-1 { background: var(--violet); }
.opt-2 { background: var(--mint); }
.opt-3 { background: #D9912A; }
.opt-4 { background: #3A87C9; }
.opt-5 { background: #B04F9B; }

.nota-0 { background: #FFE6A7; }
.nota-1 { background: #CFE8FF; }
.nota-2 { background: #FFD3C7; }
.nota-3 { background: #D7F5E4; }

/* ---------- Barra inferior fija (editor de sesión y sala del anfitrión) ---------- */
.builder-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.builder-bar .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.builder-bar .status { font-size: .82rem; color: var(--text-soft); }

/* ---------- Páginas internas simples ---------- */
.page-simple {
  padding-block: 88px 64px;
  text-align: center;
}
.page-simple .wrap { max-width: 640px; }
.page-simple h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin-top: 18px;
}
.page-simple p {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 1.05rem;
}
.page-simple .hero-cta { justify-content: center; }

/* ==========================================================================
   Páginas de texto largo: Privacidad y Enfoque.

   Van en una columna estrecha (unos 68 caracteres por línea) porque son para
   LEERSE, no para ojearse como la portada. Una línea de 1100 px obliga al ojo
   a buscar dónde empieza la siguiente y se abandona la lectura a la mitad.
   ========================================================================== */

.wrap-estrecho {
  max-width: 720px;
}

.legal-doc {
  padding-block: 48px 24px;
}
.legal-doc h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 6px 0 10px;
}
.legal-doc h2 {
  font-size: 1.12rem;
  margin: 34px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.legal-doc h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.legal-doc p,
.legal-doc li {
  color: var(--text-soft);
  line-height: 1.7;
}
.legal-doc ul {
  padding-left: 1.1rem;
  margin: 10px 0 16px;
}
.legal-doc li {
  margin-bottom: 8px;
}
.legal-doc strong {
  color: var(--text);
}
.legal-doc code {
  font-size: .86em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
}

.legal-doc .entradilla {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.legal-fecha {
  font-size: .82rem;
  color: var(--text-soft);
  margin-bottom: 22px;
}
.legal-volver {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* Avisos del documento. El de "borrador" usa el ámbar de advertencia y el de
   "falta un dato" el coral, que en este producto siempre significa atención:
   son los mismos colores del semáforo de los informes, no otros nuevos. */
.aviso {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 18px 0 26px;
  font-size: .9rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}
.aviso strong {
  color: var(--text);
}
.aviso-borrador {
  background: color-mix(in srgb, var(--sun) 14%, transparent);
  border-color: color-mix(in srgb, var(--sun) 40%, transparent);
}
.aviso-falta {
  background: color-mix(in srgb, var(--coral) 12%, transparent);
  border-color: color-mix(in srgb, var(--coral) 38%, transparent);
}

/* Enlaces del pie */
.footer-enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-enlaces a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer-enlaces a:hover,
.footer-enlaces a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--violet);
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
