@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/estatico/fuentes/bricolage-grotesque.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/estatico/fuentes/figtree.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --surface: #FBF7F1;
  --surface-raised: #FFFFFF;
  --surface-raised-2: #FFFFFF;
  --surface-sunken: #F3ECE1;
  --ink: #231C15;
  --ink-muted: #6B5E50;
  --line: #E6DCCD;
  --line-strong: #8F8170;
  --cobre: #A84A22;
  --on-cobre: #FFFFFF;
  --cobre-texto: #A84A22;
  --cobre-soft: #F6E2D6;
  --cordillera: #24513F;
  --on-cordillera: #FFFFFF;
  --cordillera-soft: #DDEBE3;
  --palta: #4A7229;
  --palta-soft: #E6EFD9;
  --miel: #8A5D06;
  --miel-soft: #F7EBCF;
  --error: #A8322A;
  --on-error: #FFFFFF;
  --avatar: #24513F;
  --on-avatar: #FFFFFF;
  --campo: var(--surface-raised-2);

  /* El teléfono de ejemplo se hunde en claro y se eleva en oscuro, donde más claro es más arriba. */
  --telefono: var(--surface-sunken);
  --burbuja-coach: var(--surface-raised);

  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 1px 2px rgba(35, 28, 21, 0.06), 0 4px 16px rgba(35, 28, 21, 0.06);

  color-scheme: light;
}

:root[data-theme="oscuro"] {
  --surface: #271F18;
  --surface-raised: #332B23;
  --surface-raised-2: #3E352C;
  --surface-sunken: #1D1610;
  --ink: #EFE9DF;
  --ink-muted: #BCAF9E;
  --line: #453B31;
  --line-strong: #8A7A6B;
  --cobre: #E87835;
  --on-cobre: #211209;
  --cobre-texto: #E87835;
  --cobre-soft: #5E321D;
  --cordillera: #69B793;
  --on-cordillera: #061D14;
  --cordillera-soft: #224132;
  --palta: #9EC865;
  --palta-soft: #314021;
  --miel: #EBAE42;
  --miel-soft: #4E3914;
  --error: #F27D77;
  --on-error: #211209;
  --avatar: #224132;
  --on-avatar: #69B793;
  --campo: var(--surface-sunken);
  --telefono: var(--surface-raised);
  --burbuja-coach: var(--surface-raised-2);
  --shadow-soft: 0 0 0 1px var(--line), 0 12px 32px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

main { flex: 1; }

main, .cabecera, .secciones, .pie {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.angosta main, .angosta .cabecera, .angosta .pie { max-width: 28rem; }

/* En escritorio todo se alinea a un contenedor ancho; los formularios quedan en una tarjeta. */
@media (min-width: 64rem) {
  main, .cabecera, .secciones, .pie,
  .angosta .cabecera, .angosta .pie {
    max-width: 72rem;
    padding: 0 var(--space-8);
  }

  .angosta main {
    flex: none;
    max-width: 30rem;
    margin: var(--space-12) auto;
    padding: var(--space-8) 40px 40px;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }

  .angosta main h1 { margin-top: 0; }
  .angosta main > :last-child { margin-bottom: 0; }
  .angosta .pie { margin-top: auto; }
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -0.015em;
  margin: var(--space-8) 0 var(--space-3);
}

h2 {
  font-size: 22px;
  line-height: 28px;
  margin: 0 0 var(--space-3);
}

h3 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-muted);
  margin: var(--space-6) 0 var(--space-2);
}

p { margin: 0 0 var(--space-3); }

form { margin: 0 0 var(--space-6); }

a {
  color: var(--cobre-texto);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

strong, b { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--cordillera);
  outline-offset: 2px;
}

.icono { flex: none; width: 20px; height: 20px; }

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

@media (min-width: 40rem) {
  h1 { margin-top: var(--space-12); }
}

.cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}

.cabecera-acciones { display: flex; align-items: center; gap: var(--space-2); }

.boton-tema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.boton-tema:hover { background: var(--surface-sunken); }

/*
 * Lockup del logo: la marca mide el alto de la palabra, con 0,27 de la marca entre ambas y una
 * zona de respeto del 25 %. Es el de 52 px del lienzo de Seba, escalado a 26 px.
 */
.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.27em;
  padding: 0.25em;
  margin-left: -0.25em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.marca img { display: block; width: 1em; height: 1em; }

.cabecera form { margin: 0; }
.cabecera .enlace { color: var(--ink-muted); }

.secciones {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

/* Sin padding lateral, para que el borde mida lo mismo que el contenido y no la orilla. */
@media (min-width: 64rem) {
  .secciones {
    width: calc(100% - 2 * var(--space-8));
    max-width: calc(72rem - 2 * var(--space-8));
    padding-left: 0;
    padding-right: 0;
  }
}

.secciones a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.secciones a:hover { background: var(--surface-raised); color: var(--ink); }

.secciones a[aria-current="page"] {
  background: var(--cobre-soft);
  border-color: var(--cobre-texto);
  color: var(--ink);
}

.pie {
  margin-top: var(--space-12);
  padding-bottom: var(--space-8);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.pie nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.pie a { color: var(--ink-muted); display: inline-flex; align-items: center; min-height: 44px; }

.tarjeta {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.tarjeta > :last-child { margin-bottom: 0; }

.tarjeta.pendiente {
  background: var(--surface-sunken);
  border: 1.5px dashed var(--line-strong);
  color: var(--ink-muted);
}

.tarjeta.pendiente h2 { color: var(--ink); }

.tarjeta.peligro { border: 1.5px solid var(--error); }

.rotulo {
  margin: var(--space-8) 0 var(--space-1);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-muted);
}

h2 + .rotulo { margin-top: 0; }

@media (min-width: 40rem) {
  .tarjeta { padding: var(--space-6); }
}

/* Panel, ajustes y mis datos en grilla: el orden del marcado es el del celular. */
@media (min-width: 64rem) {
  .tablero, .dos-columnas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    margin-top: var(--space-6);
  }

  .tablero {
    grid-template-areas:
      "telegram avisos"
      "hoy semana"
      "grafico grafico";
    align-items: stretch;
  }

  .tablero > .tarjeta, .dos-columnas .tarjeta { margin: 0; }
  .dos-columnas > div { display: grid; gap: var(--space-6); }
  .area-telegram { grid-area: telegram; }
  .area-hoy { grid-area: hoy; }
  .area-semana { grid-area: semana; }
  .area-grafico { grid-area: grafico; }
  .area-avisos { grid-area: avisos; }
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-6);
  font: inherit;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--on-cobre);
  background: var(--cobre);
  border: 1.5px solid var(--cobre);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.boton:hover { filter: brightness(1.06); }

.boton.secundario {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.boton.secundario:hover { filter: none; background: var(--surface-raised-2); }

.boton.peligro {
  color: var(--on-error);
  background: var(--error);
  border-color: var(--error);
}

.enlace {
  min-height: 44px;
  padding: 0 var(--space-1);
  font: inherit;
  font-size: 15px;
  color: var(--cobre-texto);
  background: none;
  border: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.acciones {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.acciones .boton { margin-top: 0; }

@media (min-width: 40rem) {
  .boton { width: auto; }
  .acciones { grid-template-columns: auto auto; justify-content: start; }
}

.aviso-ia {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin: var(--space-6) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--cordillera-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}

.aviso-ia .icono { color: var(--cordillera); margin-top: 0; }
.aviso-ia p { margin: 0; }

label {
  display: block;
  margin: var(--space-6) 0 var(--space-2);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

input, select, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
}

/* Dentro de una tarjeta el campo sube un escalón para no confundirse con ella. */
.tarjeta input, .tarjeta select, .tarjeta textarea { background: var(--campo); }

fieldset {
  min-width: 0;
  margin: var(--space-6) 0 0;
  padding: var(--space-4) 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

legend {
  float: left;
  width: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

legend + * { clear: both; margin-top: 0; }

input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }

textarea { resize: vertical; line-height: 24px; }

[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.ayuda, .vacio {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.vacio { font-size: 15px; line-height: 22px; }

.ayuda p { margin: 0; }

.ejemplos { margin: var(--space-1) 0; padding-left: 1.25rem; color: var(--ink); }

.ejemplos li + li { margin-top: 2px; }

.error {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: var(--space-2) 0 0;
  color: var(--error);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.estado { margin: 0 0 var(--space-3); }

.estado.ok {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--palta-soft);
  color: var(--ink);
  font-weight: 600;
}

.estado.ok .icono { color: var(--palta); margin-top: 2px; }

/* Portada: la cabecera lleva el lockup del logo; el nombre grande del hero es la ilustración tipográfica. */
.portada .cabecera { min-height: 56px; }

/* Alturas medidas de la cabecera y el pie de la portada, para centrar el hero en lo que queda. */
.portada { --alto-cabecera: 56px; --alto-pie: 149px; }

@media (min-width: 60rem) {
  .hero {
    display: grid;
    min-height: calc(100svh - var(--alto-cabecera) - var(--alto-pie));
    align-content: center;
    align-items: center;
  }

  .hero-texto { padding-top: 0; }
}

.hero { padding-bottom: var(--space-8); }

.hero-arte { margin: 0 calc(-1 * var(--space-4)) 0 0; }

.bloques { display: block; width: 100%; height: 132px; }
.bloques .cobre { fill: var(--cobre); }
.bloques .tinte { fill: var(--cobre-soft); }
.bloques .cordillera { fill: var(--cordillera); }
.bloques .palta { fill: var(--palta); }
.bloques .suelo { fill: var(--surface); }

.ojos {
  transform-box: fill-box;
  transform-origin: center;
  animation: parpadeo 7s ease-in-out infinite;
}

.ojos-2 { animation-duration: 9s; animation-delay: 2.5s; }
.ojos-3 { animation-duration: 6s; animation-delay: 4s; }
.ojos-4 { animation-duration: 8s; animation-delay: 1s; }
.ojos-5 { animation-duration: 5.5s; animation-delay: 3.2s; }

@keyframes parpadeo {
  0%, 96%, 100% { transform: scaleY(1); }
  98% { transform: scaleY(0.1); }
}

.wordmark {
  margin: var(--space-8) 0 var(--space-3);
  font-size: 64px;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lema {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  max-width: 34rem;
  text-wrap: balance;
}

.bajada {
  margin: 0;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 26px;
  max-width: 34rem;
}

.hero .aviso-ia { max-width: 34rem; }

.diferencia {
  margin: var(--space-4) 0 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
}

@media (min-width: 64rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    gap: var(--space-12);
    align-items: center;
    padding-block: var(--space-12);
  }

  .hero-arte { grid-column: 2; grid-row: 1; margin: 0; }
  .hero-texto { grid-column: 1; grid-row: 1; }
  .bloques { height: auto; }
  .wordmark { margin: 0 0 var(--space-4) -6px; font-size: 120px; }
  .lema { font-size: 28px; line-height: 34px; }
  .bajada { font-size: 18px; line-height: 28px; }
}

.demos {
  padding: var(--space-8) 0 0;
  border-top: 1px solid var(--line);
}

.demos h2 { font-size: 28px; line-height: 34px; }

.demos-elegir { margin: 0; padding: 0; border: 0; }

.demos-elegir legend {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.demos-grilla {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.demo-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.chip:hover { background: var(--surface-raised); }

.demo-radio:checked + .chip {
  background: var(--cobre-soft);
  border-color: var(--cobre-texto);
}

.demo-radio:focus-visible + .chip {
  outline: 3px solid var(--cordillera);
  outline-offset: 2px;
}

.demo { display: none; }

.demo-radio:nth-of-type(1):checked ~ .demo:nth-of-type(1),
.demo-radio:nth-of-type(2):checked ~ .demo:nth-of-type(2),
.demo-radio:nth-of-type(3):checked ~ .demo:nth-of-type(3),
.demo-radio:nth-of-type(4):checked ~ .demo:nth-of-type(4),
.demo-radio:nth-of-type(5):checked ~ .demo:nth-of-type(5),
.demo-radio:nth-of-type(6):checked ~ .demo:nth-of-type(6),
.demo-radio:nth-of-type(7):checked ~ .demo:nth-of-type(7) { display: block; }

.telefono {
  flex-basis: 100%;
  margin: var(--space-4) 0 0;
  padding: var(--space-4) var(--space-3) var(--space-6);
  background: var(--telefono);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

.chat-quien {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 var(--space-1) var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
}

.chat-quien img { display: block; flex: none; width: 28px; height: 28px; }

.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* El indicador y el globo comparten celda: el espacio queda reservado y nada salta. */
.paso {
  display: grid;
  grid-template-areas: "globo" "teclado";
  justify-items: start;
}

.paso.tu { justify-items: end; }
.paso.tu + .paso.coach, .paso.coach + .paso.tu { margin-top: var(--space-2); }
.paso > .escribiendo, .paso > .burbuja { grid-area: globo; }

.burbuja {
  max-width: 85%;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.coach .burbuja {
  background: var(--burbuja-coach);
  border: 1px solid var(--line);
  border-bottom-left-radius: var(--radius-sm);
}

.tu .burbuja {
  background: var(--cobre-soft);
  border-bottom-right-radius: var(--radius-sm);
}

.escribiendo {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  background: var(--burbuja-coach);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
  opacity: 0;
}

.escribiendo i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
}

.teclado {
  grid-area: teclado;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  width: 85%;
  margin-top: var(--space-1);
}

.tecla {
  padding: 6px var(--space-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--burbuja-coach);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
}

.tecla.tocada {
  border-color: var(--cobre-texto);
  background: var(--cobre-soft);
}

.foto { display: block; width: 200px; max-width: 100%; height: auto; }
.foto-fondo { fill: var(--cordillera-soft); }
.foto-envoltorio { fill: var(--cobre); }
.foto-tabla { fill: var(--surface-raised); }
.foto-titulo { fill: var(--ink); }
.foto-fila { fill: var(--line-strong); }
.foto-marca { fill: var(--cobre-soft); }
.foto-mano { fill: var(--miel-soft); stroke: var(--line-strong); stroke-width: 1.5; }
.foto + .leyenda { margin: var(--space-2) 0 0; }

.audio { display: flex; align-items: center; gap: var(--space-2); }
.reproducir { flex: none; width: 32px; height: 32px; }
.reproducir circle { fill: var(--cobre-texto); }
.reproducir path { fill: var(--cobre-soft); }
.onda { flex: none; width: 120px; height: 32px; }
.onda rect { fill: var(--ink); opacity: 0.55; }
.duracion { font-size: 14px; font-variant-numeric: tabular-nums; }
.transcripcion { margin: var(--space-2) 0 0; font-style: italic; }

/* Cada mensaje entra a su hora; los del coach van precedidos por "escribiendo". */
.paso:nth-child(1) { --t: 0.3s; --sig: 1.9s; }
.paso:nth-child(2) { --t: 1.9s; --sig: 4.6s; }
.paso:nth-child(3) { --t: 4.6s; --sig: 6s; }
.paso:nth-child(4) { --t: 6s; --sig: 8.6s; }
.paso:nth-child(5) { --t: 8.6s; --sig: 10s; }
.paso:nth-child(6) { --t: 10s; --sig: 11.4s; }
.paso:nth-child(7) { --t: 11.4s; --sig: 12.8s; }

.paso > .burbuja, .paso > .teclado { animation: entra 0.35s ease-out var(--t) both; }
.paso > .escribiendo { animation: escribe 1s linear calc(var(--t) - 1s) both; }
.escribiendo i { animation: punto 0.9s ease-in-out calc(var(--t) - 1s) 2; }
.escribiendo i:nth-child(2) { animation-delay: calc(var(--t) - 0.85s); }
.escribiendo i:nth-child(3) { animation-delay: calc(var(--t) - 0.7s); }
.tecla.tocada { animation: toca 0.25s ease-out var(--sig) backwards; }

@keyframes entra {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes escribe {
  0% { opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes punto {
  0%, 60%, 100% { transform: none; opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

@keyframes toca {
  from { border-color: var(--line); background: var(--burbuja-coach); }
}

@media (min-width: 64rem) {
  .demos { padding-top: var(--space-12); }
  .demos h2 { font-size: 34px; line-height: 40px; }

  /* Las mismas columnas que el hero: el teléfono queda bajo los bloques. */
  .demos-grilla {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    grid-auto-rows: min-content;
    column-gap: var(--space-12);
    row-gap: var(--space-2);
  }

  .chip { grid-column: 1; justify-self: start; min-height: 44px; }
  .telefono { grid-column: 2; grid-row: 1 / span 8; margin-top: 0; padding: var(--space-6) var(--space-6) var(--space-8); }
}

@media (prefers-reduced-motion: reduce) {
  .ojos, .paso > .burbuja, .paso > .teclado, .escribiendo i, .tecla.tocada { animation: none; }
  .escribiendo { display: none; }
}

.cifra {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-1);
  color: var(--ink-muted);
}

.numeral {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.contexto {
  margin: 0 0 var(--space-3);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.secundaria {
  margin: var(--space-4) 0 var(--space-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.progreso { display: block; margin: var(--space-2) 0; }
.progreso .pista { fill: var(--surface-sunken); }
.progreso .relleno.kcal { fill: var(--cordillera); }
.progreso .relleno.sobre { fill: var(--miel); }
.progreso .relleno.proteina { fill: var(--palta); }
.progreso + .contexto { margin-top: var(--space-1); }

.extras, .comidas, .dias {
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.extras {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-3);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.comidas li, .dias li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 22px;
}

.comidas li:last-child, .dias li:last-child { border-bottom: 1px solid var(--line); }
.comidas .hora { color: var(--ink-muted); }
.comidas .que { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comidas .kcal { white-space: nowrap; }

.dias { margin-top: var(--space-4); }
.dias .fecha { flex: 0 0 6.5rem; font-weight: 600; }
.dias .valor { flex: 1; }
.dias .sin-registro { color: var(--ink-muted); }
.dias .rutinas { flex-basis: 100%; padding-left: calc(6.5rem + var(--space-3)); color: var(--ink-muted); font-size: 14px; line-height: 20px; }

/*
 * El gráfico viene en seis versiones con sus colores ya puestos, porque también se rasteriza
 * fuera de la página. Se ve solo la del tema y el ancho actuales.
 */
.grafico { margin-top: var(--space-3); }
.grafico svg { display: block; width: 100%; height: auto; }
/* La versión angosta escala con el ancho: entre el celular y 40rem, el tope evita letras de 20 px. */
.grafico .angosto svg { max-width: 25rem; }
.grafico .variante { display: none; }
.grafico .claro.angosto { display: block; }

@media (min-width: 40rem) {
  .grafico .claro.angosto { display: none; }
  .grafico .claro.ancho { display: block; }
}

@media (min-width: 64rem) {
  .grafico .claro.ancho { display: none; }
  .grafico .claro.amplio { display: block; }
}

[data-theme="oscuro"] .grafico .claro { display: none; }
[data-theme="oscuro"] .grafico .oscuro.angosto { display: block; }

@media (min-width: 40rem) {
  [data-theme="oscuro"] .grafico .oscuro.angosto { display: none; }
  [data-theme="oscuro"] .grafico .oscuro.ancho { display: block; }
}

@media (min-width: 64rem) {
  [data-theme="oscuro"] .grafico .oscuro.ancho { display: none; }
  [data-theme="oscuro"] .grafico .oscuro.amplio { display: block; }
}

details { margin-top: var(--space-4); }

summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cobre-texto);
  font-weight: 600;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: right;
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
}

th { color: var(--ink-muted); font-weight: 600; }
th:first-child, td:first-child { text-align: left; white-space: nowrap; }

caption {
  margin-bottom: var(--space-2);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }

/* Consentimiento del registro: casilla propia y botón apagado hasta marcarla, sin JS. */
.consentimiento {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-6);
}

.consentimiento input[type="checkbox"] {
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  background: var(--campo);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.consentimiento input[type="checkbox"]:checked { background: var(--cobre); border-color: var(--cobre); }

.consentimiento input[type="checkbox"]:checked::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--on-cobre);
  border-bottom: 2.5px solid var(--on-cobre);
  transform: translateY(-2px) rotate(-45deg);
}

.consentimiento input[type="checkbox"][aria-invalid="true"] { border-color: var(--error); }

.consentimiento label { margin: 0; font-weight: 400; font-size: 15px; line-height: 22px; }

.registro:has(#acepto:not(:checked)) .boton[type="submit"] { opacity: 0.5; cursor: not-allowed; }

/* Lista de espera en la portada: texto y oferta, y el formulario en una tarjeta. */
.lista {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--space-4);
}

.lista h2 { font-size: 28px; line-height: 34px; }
.lista-texto > p:not(.oferta) { color: var(--ink-muted); font-size: 17px; line-height: 26px; max-width: 34rem; }

.oferta {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--cobre-soft);
  color: var(--ink);
  font-weight: 600;
  max-width: 34rem;
}

.oferta .icono { color: var(--cobre-texto); margin-top: 2px; }
.oferta a { font-weight: 400; white-space: nowrap; }

.formulario-lista { margin: var(--space-6) 0 0; }
.formulario-lista > label:first-of-type { margin-top: 0; }

.opcional { color: var(--ink-muted); font-weight: 400; }

.opciones { margin-top: var(--space-6); padding: 0; border: 0; }

.opciones legend {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.opciones .ayuda { margin-top: 0; }

.opciones-grilla { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* El radio queda en el árbol de accesibilidad y en el teclado; se ve su chip. */
.opcion {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.opciones .chip { min-height: 44px; white-space: normal; }
.opcion:checked + .chip { background: var(--cobre-soft); border-color: var(--cobre-texto); }
.opcion:focus-visible + .chip { outline: 3px solid var(--cordillera); outline-offset: 2px; }

/* Trampa para programas: fuera de la vista sin display:none, que algunos detectan. */
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.formulario-lista:has(#acepto-lista:not(:checked)) .boton[type="submit"] { opacity: 0.5; cursor: not-allowed; }

@media (min-width: 64rem) {
  .lista {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    gap: var(--space-12);
    align-items: start;
    padding-block: var(--space-12);
  }

  .lista h2 { font-size: 34px; line-height: 40px; }
  .formulario-lista { margin: 0; }
}

/* Partes de un documento legal que todavía no revisa nadie. */
.borrador { margin-top: var(--space-8); }
.borrador h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

.etiqueta {
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--miel-soft);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.aviso-ia + p { margin-top: var(--space-6); }

/* Administración: más ancha que el panel, con tablas que se desplazan solas en el celular. */
.admin-seccion { margin-top: var(--space-8); }
.admin-grilla { display: grid; gap: var(--space-4); }
.admin-grilla .tarjeta { margin: 0; }
.admin-grilla h3 + .tabla-numeros, .admin-grilla .cifra + h3 { margin-top: var(--space-4); }
.tabla-numeros caption { margin-top: var(--space-3); }

/* relative: los textos .oculto son absolutos y, sin esto, escapan del desplazamiento. */
.tabla-desplazable {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.tabla-admin { min-width: 56rem; }
.tabla-admin th, .tabla-admin td { text-align: left; vertical-align: middle; white-space: nowrap; padding: var(--space-2) var(--space-3); }
.tabla-admin tbody tr:last-child td { border-bottom: 0; }

.en-linea { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; }
.acciones-celda { display: flex; gap: var(--space-2); }
.numero-completo { font-variant-numeric: tabular-nums; font-weight: 600; }
.boton-chico { width: auto; min-height: 36px; margin: 0; padding: 0 var(--space-4); font-size: 14px; }
.etiqueta-ok { background: var(--palta-soft); }

.actividad { margin: 0; padding: 0; list-style: none; }
.actividad li { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.campo-copiar { font-size: 14px; }

@media (min-width: 64rem) {
  .admin-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
.tabla-numeros td { white-space: nowrap; }

/* /admin: la conversación guardada, en las mismas burbujas que los demos, sin animación. */
.chat-revision .paso > .burbuja, .chat-revision .paso > .teclado { animation: none; }
.chat-revision .burbuja { white-space: pre-line; }
/* Un botón apretado: solo la tecla tocada, a la derecha, con su hora debajo. */
.chat-revision .tipo-boton { grid-template-areas: "globo"; }
.chat-revision .tipo-boton .teclado { grid-area: globo; display: flex; justify-content: flex-end; width: auto; margin-top: 0; }
.chat-revision .tipo-boton .tecla.tocada { animation: none; }
.chat-revision .tipo-boton > .chat-hora { grid-row: 2; }
.chat-hora { display: block; margin-top: var(--space-1); font-size: 12px; line-height: 16px; color: var(--ink-muted); text-align: right; }
.conversacion-dias { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-4); }
.conversaciones { display: flex; flex-direction: column; gap: var(--space-3); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.conversaciones li { padding: var(--space-3) var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.conversaciones .ultimo { margin: var(--space-1) 0 0; color: var(--ink-muted); overflow-wrap: anywhere; }
/*
 * 404 y 500. Excepción acotada que pidió Seba: los elementos de la marca hacen de personaje
 * (el bloque con yunta busca con una lupa; los bloques del Cover se desarman). No es una mascota.
 */
.pagina-desvio main { display: grid; align-content: center; }

.desvio {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-6) var(--space-12);
}

.desvio-dibujo { display: block; justify-self: center; width: min(100%, 18rem); height: auto; }
.desvio-500 .desvio-dibujo { width: min(100%, 24rem); }

.desvio-texto { display: grid; gap: var(--space-4); max-width: 32rem; }
.desvio-texto p { margin: 0; color: var(--ink-muted); }
.desvio-texto h1 { margin: 0; }
.desvio-texto .boton { margin-top: var(--space-2); }
.desvio-codigo { font-size: 14px; font-weight: 600; }

.d-cobre { fill: var(--cobre); }
.d-suelo { fill: var(--surface); }
.d-tinte { fill: var(--cobre-soft); }
.d-cordillera { fill: var(--cordillera); }
.d-palta { fill: var(--palta); }
.d-hueco { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 10 8; }
.d-mango { stroke: var(--ink); stroke-width: 11; stroke-linecap: round; }
.d-lente { fill: var(--surface); fill-opacity: 0.35; stroke: var(--ink); stroke-width: 8; }

/* Los ojos siguen a la lupa: los dos grupos comparten el mismo vaivén. */
@keyframes d-barrer {
  0%, 8% { transform: translateX(-58px); }
  46%, 54% { transform: translateX(16px); }
  92%, 100% { transform: translateX(-58px); }
}

@keyframes d-mirar-hueco {
  0%, 35% { transform: translate(0, 0); }
  45%, 80% { transform: translate(-7px, -4px); }
  90%, 100% { transform: translate(0, 0); }
}

@keyframes d-rodar {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(-14px) rotate(-40deg); }
}

.d-buscan { animation: d-barrer 6s ease-in-out infinite; }
.d-miran { animation: d-mirar-hueco 5.5s ease-in-out infinite; }
.d-rueda { animation: d-rodar 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .d-buscan, .d-miran, .d-rueda { animation: none; }
}

@media (min-width: 60rem) {
  .desvio {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-12);
    min-height: calc(100svh - 64px - 149px);
  }

  .desvio-dibujo { width: 100%; max-width: 27rem; }
  .desvio-500 .desvio-dibujo { max-width: 35rem; }
  .desvio-404 .desvio-dibujo { order: 2; }
  .desvio-texto h1 { font-size: 48px; line-height: 52px; letter-spacing: -0.02em; }
  .desvio-texto p:not(.desvio-codigo) { font-size: 18px; line-height: 28px; }
  .desvio-texto .boton { justify-self: start; }
}

/* Portada con WhatsApp activo: el distintivo sobre el nombre. Ícono genérico, sin logo de terceros. */
.whatsapp-distintivo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-8) 0 var(--space-3);
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--cordillera-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.whatsapp-distintivo .icono { flex: none; width: 18px; height: 18px; color: var(--cordillera); }

.whatsapp-distintivo + .wordmark { margin-top: 0; }

@media (min-width: 64rem) {
  .whatsapp-distintivo { margin-top: 0; }
}

/*
 * Nombres de canal que rotan solo con CSS (canales.html). La CSP no deja estilos en línea, así que
 * hay clases y un @keyframes por cantidad, de 2 a 6: cada nombre dura 2,6 s y se cruza con el
 * siguiente en 0,3 s. Los retrasos son negativos para que la primera vuelta ya cruce suave. Los
 * nombres van apilados en la misma celda, así que el ancho es el del más largo y nada salta.
 * Generado con un script: si cambia el paso o el fundido, cambian todos.
 */
.canal-rotativo { display: inline-grid; vertical-align: baseline; }
.canal-rotativo-item {
  grid-area: 1 / 1;
  opacity: 0;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.canal-rotativo-quieto { display: none; }

.canal-rotativo-n2 .canal-rotativo-item { animation-name: canal-rotativo-2; animation-duration: 5.2s; }
.canal-rotativo-n2 .canal-rotativo-i1 { animation-delay: 0s; }
.canal-rotativo-n2 .canal-rotativo-i2 { animation-delay: -2.6s; }

@keyframes canal-rotativo-2 {
  0%, 44.23% { opacity: 1; transform: none; }
  50% { opacity: 0; transform: translateY(-0.35em); }
  94.23% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

.canal-rotativo-n3 .canal-rotativo-item { animation-name: canal-rotativo-3; animation-duration: 7.8s; }
.canal-rotativo-n3 .canal-rotativo-i1 { animation-delay: 0s; }
.canal-rotativo-n3 .canal-rotativo-i2 { animation-delay: -5.2s; }
.canal-rotativo-n3 .canal-rotativo-i3 { animation-delay: -2.6s; }

@keyframes canal-rotativo-3 {
  0%, 29.49% { opacity: 1; transform: none; }
  33.33% { opacity: 0; transform: translateY(-0.35em); }
  96.15% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

.canal-rotativo-n4 .canal-rotativo-item { animation-name: canal-rotativo-4; animation-duration: 10.4s; }
.canal-rotativo-n4 .canal-rotativo-i1 { animation-delay: 0s; }
.canal-rotativo-n4 .canal-rotativo-i2 { animation-delay: -7.8s; }
.canal-rotativo-n4 .canal-rotativo-i3 { animation-delay: -5.2s; }
.canal-rotativo-n4 .canal-rotativo-i4 { animation-delay: -2.6s; }

@keyframes canal-rotativo-4 {
  0%, 22.12% { opacity: 1; transform: none; }
  25% { opacity: 0; transform: translateY(-0.35em); }
  97.12% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

.canal-rotativo-n5 .canal-rotativo-item { animation-name: canal-rotativo-5; animation-duration: 13s; }
.canal-rotativo-n5 .canal-rotativo-i1 { animation-delay: 0s; }
.canal-rotativo-n5 .canal-rotativo-i2 { animation-delay: -10.4s; }
.canal-rotativo-n5 .canal-rotativo-i3 { animation-delay: -7.8s; }
.canal-rotativo-n5 .canal-rotativo-i4 { animation-delay: -5.2s; }
.canal-rotativo-n5 .canal-rotativo-i5 { animation-delay: -2.6s; }

@keyframes canal-rotativo-5 {
  0%, 17.69% { opacity: 1; transform: none; }
  20% { opacity: 0; transform: translateY(-0.35em); }
  97.69% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

.canal-rotativo-n6 .canal-rotativo-item { animation-name: canal-rotativo-6; animation-duration: 15.6s; }
.canal-rotativo-n6 .canal-rotativo-i1 { animation-delay: 0s; }
.canal-rotativo-n6 .canal-rotativo-i2 { animation-delay: -13s; }
.canal-rotativo-n6 .canal-rotativo-i3 { animation-delay: -10.4s; }
.canal-rotativo-n6 .canal-rotativo-i4 { animation-delay: -7.8s; }
.canal-rotativo-n6 .canal-rotativo-i5 { animation-delay: -5.2s; }
.canal-rotativo-n6 .canal-rotativo-i6 { animation-delay: -2.6s; }

@keyframes canal-rotativo-6 {
  0%, 14.74% { opacity: 1; transform: none; }
  16.67% { opacity: 0; transform: translateY(-0.35em); }
  98.08% { opacity: 0; transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .canal-rotativo { display: none; }
  .canal-rotativo-quieto { display: inline; }
}

/* Tarjeta de chats del panel, con Telegram y WhatsApp. Prefijo canales- para no pisar otras vistas. */
.canales-lista { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.canales-canal h3 { margin: 0 0 var(--space-1); }
.canales-canal .estado, .canales-canal form { margin: 0; }

/* Comentarios: el formulario del panel y la lista en /admin. */
.feedback-tarjeta { margin-top: var(--space-6); }
.feedback-formulario .opciones { margin-top: var(--space-4); }
.feedback-comentarios { margin: 0; padding: 0; list-style: none; }
.feedback-comentarios .tarjeta { margin: 0 0 var(--space-3); }
.feedback-texto { white-space: pre-line; overflow-wrap: anywhere; margin: 0; }

/* Uso: subsecciones de /admin, el mapa de calor y las señales. */
.admin-subsecciones { display: flex; gap: var(--space-4); margin: 0 0 var(--space-4); }
.admin-subsecciones a { color: var(--ink-muted); font-weight: 600; text-decoration: none; padding: var(--space-1) 0; }
.admin-subsecciones a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--cobre); }
.admin-senales { grid-template-columns: 1fr auto; }
.admin-senales dd { text-align: right; font-variant-numeric: tabular-nums; }
.admin-mapa-titulo { margin: var(--space-6) 0 var(--space-2); }
.admin-mapa { min-width: 44rem; font-size: 12px; border-collapse: separate; border-spacing: 2px; }
.admin-mapa th, .admin-mapa td { padding: 0; height: 24px; text-align: center; border: 0; }
.admin-mapa tbody th { padding: 0 var(--space-2); text-align: left; }
.admin-mapa td { border-radius: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.admin-mapa .admin-nivel-0 { background: var(--surface-sunken); }
.admin-mapa .admin-nivel-1 { background: var(--cobre-soft); }
.admin-mapa .admin-nivel-2 { background: color-mix(in srgb, var(--cobre) 40%, var(--cobre-soft)); }
.admin-mapa .admin-nivel-3 { background: color-mix(in srgb, var(--cobre) 70%, var(--cobre-soft)); color: var(--on-cobre); }
.admin-mapa .admin-nivel-4 { background: var(--cobre); color: var(--on-cobre); }
.admin-tabla-uso { min-width: 80rem; }
