/* ══════════════════════════════════════════
   QAUCE — qauce.css (QAUCE-WEB-2, 24-oct-2026)
   La página como una conversación anotada. Reglas:
   · El lima es el rotulador: subraya la cita que sostiene una nota y marca la
     acción principal. Nada más lleva lima.
   · Todo alineado a la izquierda, una sola familia (Helvetica, la del Studio).
   · Un solo momento animado: el subrayado de la portada. Lo demás responde a
     lo que hace la persona.
   Va después de style.css, que sigue poniendo la navegación, los botones y el pie.
 ══════════════════════════════════════════ */

:root,
[data-theme="dark"] {
  --papel: #0b1427;
  --tinta: #ffffff;
  --tinta-suave: #aab3c5;
  --raya: rgba(255, 255, 255, 0.12);
  --rotulador: #eef88f;
  --marcador: rgba(238, 248, 143, 0.22);
  --cita-texto: #f6fbc9;
  --cerebro-base: 201, 207, 220;
  --cerebro-activo: 238, 248, 143;
  --cifra-paso: rgba(255, 255, 255, 0.22);
  --radar-red: rgba(255, 255, 255, 0.12);
  --radar-antes: #c9cfdc;
  --radar-ahora: #eef88f;
  --radar-relleno: rgba(238, 248, 143, 0.16);
  --sombra-pliego: 0 24px 48px -28px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --papel: #ffffff;
  --tinta: #0d1526;
  --tinta-suave: #4a5268;
  --raya: rgba(16, 28, 56, 0.14);
  --rotulador: #eef88f;
  --marcador: #eef88f;
  --cita-texto: #0d1526;
  --cerebro-base: 120, 130, 155;
  --cerebro-activo: 18, 35, 82;
  --cifra-paso: rgba(16, 28, 56, 0.2);
  --radar-red: rgba(16, 28, 56, 0.12);
  --radar-antes: #6a7287;
  --radar-ahora: #122352;
  --radar-relleno: rgba(238, 248, 143, 0.55);
  --sombra-pliego: 0 30px 60px -36px rgba(16, 28, 56, 0.45);
}

/* ─── Estructura común ─── */
.contenedor {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.bloque { padding-block: 112px; text-align: left; }
.bloque h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 22ch;
  color: var(--clr-text);
}
.bloque-cabecera { margin-bottom: 64px; }
.bloque-sub {
  color: var(--clr-muted);
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 60ch;
  margin-top: 20px;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 36px;
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.cita:focus-visible,
.conmutador-btn:focus-visible,
.enlace:focus-visible,
.faq-item summary:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
}

/* ─── Portada ─── */
.portada {
  padding-top: 148px;
  padding-bottom: 112px;
  background: var(--clr-bg);
}
.portada-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.portada h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 12ch;
  color: var(--clr-text);
}
.portada-lead {
  margin-top: 28px;
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 44ch;
  color: var(--clr-muted);
}

/* El pliego: una hoja de transcripción sobre la mesa */
.pliego {
  background: var(--papel);
  color: var(--tinta);
  border: 1px solid var(--raya);
  border-radius: 6px;
  padding: 28px 32px 24px;
  box-shadow: var(--sombra-pliego);
}
.pliego-titulo {
  font-size: .875rem;
  color: var(--tinta-suave);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--raya);
  margin-bottom: 18px;
}
.turnos { list-style: none; display: grid; gap: 14px; }
.turno {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}
.turno .quien {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--tinta-suave);
  line-height: 1.4;
}
.turno p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--tinta);
}
.turno-cliente p { color: var(--tinta-suave); }

/* La cita: un botón que se lee como texto subrayado con rotulador */
.cita {
  display: inline;
  font: inherit;
  color: var(--cita-texto);
  text-align: inherit;
  border: 0;
  padding: 0 2px;
  margin: 0 -2px;
  cursor: pointer;
  border-radius: 2px;
  background-color: transparent;
  background-image: linear-gradient(var(--marcador), var(--marcador));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .25s ease;
}
.cita:hover,
.cita[aria-pressed="true"] { background-color: var(--rotulador); color: #0b1427; }

.pliego.subrayando:not(.subrayado-hecho) .cita {
  background-size: 0% 100%;
  animation: rotulador .7s ease-out forwards;
}
.pliego.subrayando .cita[data-n="2"] { animation-delay: .5s; }
.pliego.subrayando .cita[data-n="3"] { animation-delay: 1s; }
@keyframes rotulador { to { background-size: 100% 100%; } }

.nota {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--raya);
  min-height: 7.5rem;
}
.nota-pista { font-size: .9375rem; color: var(--tinta-suave); }
.nota-eje {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tinta);
}
.nota-cifra {
  display: inline-block;
  background: var(--rotulador);
  color: #0b1427;
  padding: 0 8px;
  border-radius: 3px;
  margin-left: 6px;
}
.nota-de { font-size: .9375rem; font-weight: 400; color: var(--tinta-suave); margin-left: 4px; }
.nota-porque { margin-top: 4px; font-size: 1rem; color: var(--tinta); }
.nota-sinmedir { margin-top: 12px; font-size: .8125rem; line-height: 1.5; color: var(--tinta-suave); }

/* ─── Cabecera: el cerebro ─── */
.cerebro { margin: 0; }
.cerebro-lienzo {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.cerebro-lienzo canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.cerebro-etiquetas { position: absolute; inset: 0; pointer-events: none; }
.cerebro-etiqueta {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  font: inherit;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--clr-text);
  background: var(--clr-nav-bg);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.cerebro-etiqueta.activa, .cerebro-etiqueta[aria-pressed="true"] { background: var(--clr-primary); color: var(--clr-on-primary); border-color: transparent; }
.cerebro-etiqueta:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 3px; }
.cerebro-ficha { min-height: 6.5rem; margin-top: 8px; }
.cerebro-ficha[hidden] { display: block; visibility: hidden; }
.cerebro-ficha-titulo { font-size: 1.25rem; font-weight: 700; color: var(--clr-text); }
.cerebro-ficha-sub { font-size: .9375rem; color: var(--clr-muted); }
.cerebro-ficha-texto { margin-top: 6px; font-size: 1rem; line-height: 1.55; color: var(--clr-text); max-width: 52ch; }
.cerebro-puente { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--clr-text); margin-bottom: 4px; }
/* Entrar: pegado al cerebro, justo debajo; secundario frente a «Pedir una demo» */
.cerebro-entrar {
  display: inline-flex; margin-top: 4px; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  font: inherit; font-size: .9375rem; font-weight: 700; color: var(--clr-text); cursor: pointer; white-space: nowrap;
  background: var(--clr-nav-bg); border: 1px solid var(--clr-text); border-radius: 999px;
  transition: background .2s, color .2s, opacity .4s;
}
.cerebro-entrar svg { width: 18px; height: 18px; }
.cerebro-entrar:hover { background: var(--clr-text); color: var(--clr-bg); }
.cerebro-entrar:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 3px; }
/* Al pulsar: el cerebro se acerca en el acto, mientras baja el viaje */
.cerebro-lienzo canvas { transition: transform 1.1s cubic-bezier(.55, 0, .2, 1), opacity .9s ease .25s; }
.cerebro.entrando .cerebro-lienzo canvas { transform: scale(2.6); opacity: 0; pointer-events: none; }
.cerebro.entrando .cerebro-etiquetas, .cerebro.entrando .cerebro-entrar { opacity: 0; transition: opacity .3s; }
.cerebro-leyenda { margin-top: 12px; font-size: .875rem; line-height: 1.5; color: var(--clr-muted); max-width: 56ch; }

/* ─── El viaje dentro del cerebro (js/viaje.js) ─── */
html.en-viaje body { overflow: hidden; }
html.en-viaje #main-content, html.en-viaje .navbar, html.en-viaje .footer {
  opacity: 0; transform: scale(1.04); filter: blur(6px);
  transition: opacity .6s ease, transform .9s cubic-bezier(.2, 0, 0, 1), filter .6s ease;
  pointer-events: none;
}
#main-content, .navbar, .footer { transition: opacity .5s ease, transform .6s ease, filter .5s ease; }
.viaje {
  position: fixed; inset: 0; z-index: 10000;
  background: #0b1427; color: #ffffff;
  opacity: 0; animation: viaje-entra .7s ease forwards;
  font-family: Helvetica, Arial, sans-serif;
}
.viaje.saliendo { animation: viaje-sale .5s ease forwards; }
@keyframes viaje-entra { to { opacity: 1; } }
@keyframes viaje-sale { from { opacity: 1; } to { opacity: 0; } }
.viaje-lienzo, .viaje-lienzo canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.viaje-barra {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 16px; padding: 16px 24px;
  background: linear-gradient(rgba(11, 20, 39, 0.92), rgba(11, 20, 39, 0));
}
.viaje-volver, .viaje-sonido {
  font: inherit; font-size: .9375rem; color: #ffffff; cursor: pointer;
  background: rgba(16, 28, 56, 0.8); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 10px 18px; min-height: 44px;
}
.viaje-volver:hover, .viaje-sonido:hover { border-color: #eef88f; }
.viaje-sonido { display: inline-grid; place-items: center; width: 44px; padding: 0; }
.viaje-sonido svg { width: 20px; height: 20px; }
.viaje-volver:focus-visible, .viaje-sonido:focus-visible, .viaje-ficha button:focus-visible, .viaje-ruta button:focus-visible { outline: 2px solid #eef88f; outline-offset: 3px; }
.viaje-empresa { flex: 1; font-size: .875rem; color: #c9cfdc; }
.viaje-acciones { display: flex; gap: 12px; align-items: center; }
.viaje-demo { padding: .7rem 1.4rem; }
.viaje-ruta {
  position: absolute; top: 84px; left: 24px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  max-width: 60vw; font-size: .8125rem; color: #c9cfdc;
}
.viaje-ruta button { font: inherit; color: #c9cfdc; background: none; border: 0; cursor: pointer; padding: 6px 4px; min-height: 32px; }
.viaje-ruta button:last-of-type { color: #eef88f; font-weight: 700; }
.viaje-ficha {
  position: absolute; right: 24px; top: 96px; width: min(380px, calc(100vw - 48px)); max-height: calc(100vh - 180px); overflow: hidden;
  display: flex; flex-direction: column; z-index: 2;
  background: rgba(16, 28, 56, 0.94); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
/* la cabecera (asa y ×) se queda; lo que se desplaza es el cuerpo */
.viaje-ficha-cuerpo { overflow: auto; min-height: 0; padding: 22px 22px 16px; overscroll-behavior: contain; }
.viaje-ficha[hidden] { display: none; }
.viaje-ficha-cerrar { position: absolute; z-index: 1; top: 8px; right: 10px; font: inherit; font-size: 1.5rem; color: #c9cfdc; background: none; border: 0; cursor: pointer; min-width: 40px; min-height: 40px; }
.viaje-ficha-tipo { font-size: .8125rem; color: #c9cfdc; }
.viaje-ficha-titulo:focus { outline: none; } /* recibe el foco al repintar la ficha; no es un control */
.viaje-ficha-titulo { font-size: 1.5rem; line-height: 1.15; font-weight: 700; margin: 4px 32px 6px 0; }
.viaje-ficha-sub { color: #c9cfdc; font-size: .9375rem; }
.viaje-ficha-cifra { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.viaje-ficha-cifra span { font-size: 1rem; color: #eef88f; margin-left: 6px; }
.viaje-ficha-studio { margin-top: 12px; font-size: .9375rem; line-height: 1.5; }
.viaje-ficha-studio strong { color: #eef88f; }
.viaje-ficha-rel { margin-top: 16px; font-size: .8125rem; color: #c9cfdc; }
.viaje-ficha-lista { list-style: none; margin-top: 6px; display: grid; gap: 2px; }
.viaje-ficha-lista button {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: left;
  font: inherit; font-size: .9375rem; color: #ffffff; background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 0; min-height: 40px; cursor: pointer;
}
.viaje-ficha-lista button:hover { color: #eef88f; }
.viaje-ficha-lista span { color: #8d97ad; font-size: .8125rem; white-space: nowrap; }
.viaje-pista {
  position: absolute; left: 24px; bottom: 20px; max-width: 46ch; font-size: .8125rem; color: #aab3c5;
  opacity: calc(1 - var(--intro, 0) * 0); 
}
/* Paneles del enfoque (QAUCE-WEB-4): flotan alrededor del nodo, unidos por un hilo fino.
   En el móvil viven dentro de la hoja de la ficha, en una fila que se desliza. */
.viaje-hilos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.viaje-hilos line { stroke: rgba(238, 248, 143, 0.32); stroke-width: 1; }
.viaje-paneles { position: absolute; inset: 0; pointer-events: none; }
.viaje-paneles .viaje-panel { position: absolute; pointer-events: auto; }
.viaje-panel {
  background: rgba(16, 28, 56, 0.94); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  padding: 14px 16px 12px; color: #ffffff; font-size: .875rem; line-height: 1.4;
  opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .55s cubic-bezier(.2, 0, 0, 1);
}
.viaje-panel.visto { opacity: 1; transform: none; }
.viaje-panel[hidden] { display: none; }
.viaje[data-nivel="0"] .viaje-paneles .viaje-panel.visto { animation: viaje-flota 7s ease-in-out infinite alternate; }
.viaje[data-nivel="0"] .viaje-paneles .viaje-panel.visto:nth-child(2n) { animation-duration: 8.5s; animation-delay: -3s; }
@keyframes viaje-flota { from { translate: 0 -3px; } to { translate: 0 4px; } }
.viaje-panel header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.viaje-panel h3 { font-size: .9375rem; font-weight: 700; line-height: 1.25; }
.viaje-panel header span { font-size: .6875rem; color: #8d97ad; white-space: nowrap; }
.viaje-panel-sub { margin-top: 8px; color: #c9cfdc; font-size: .8125rem; }
.viaje-panel-sub strong { color: #ffffff; font-variant-numeric: tabular-nums; }
.viaje-panel-grafica { display: flex; align-items: flex-end; gap: 10px; margin-top: 4px; color: #eef88f; }
.viaje-panel-grafica svg { flex: 1; min-width: 0; height: 52px; }
.viaje-panel-grafica circle { fill: #eef88f; }
.viaje-panel-cifra { font-size: 1.75rem; font-weight: 700; line-height: 1; color: #ffffff; font-variant-numeric: tabular-nums; }
.viaje-panel-cifra span { font-size: .8125rem; color: #c9cfdc; font-weight: 400; }
.viaje-panel-lista { list-style: none; margin-top: 8px; display: grid; gap: 0; }
.viaje-panel-lista li { padding: 7px 0 7px 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); position: relative; }
.viaje-panel-lista li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: #56627f; }
.viaje-panel-lista li.es-alerta::before { background: #ff8fa3; }
.viaje-panel-lista li.es-bien::before { background: #eef88f; }
.viaje-panel-lista strong { display: block; font-weight: 700; font-size: .8125rem; }
.viaje-panel-lista span { display: block; color: #c9cfdc; font-size: .8125rem; }
.viaje-panel-studio { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: .75rem; color: #c9cfdc; line-height: 1.45; }
.viaje-panel-studio strong { color: #eef88f; }
.viaje-ficha-paneles:empty { display: none; }
.viaje-ficha-paneles {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 14px -22px 0; padding: 0 22px 4px; scroll-padding: 0 22px;
}
.viaje-ficha-paneles .viaje-panel { flex: 0 0 min(78vw, 290px); scroll-snap-align: start; background: rgba(11, 20, 39, 0.9); }
/* QAUCE-WEB-6: buscador del viaje y cifras con su referencia */
.viaje-buscar { position: relative; width: min(320px, 26vw); }
.viaje-buscar > svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: #aab3c5; pointer-events: none; }
.viaje-buscar input {
  width: 100%; min-height: 44px; padding: 10px 14px 10px 38px; font: inherit; font-size: .9375rem; color: #ffffff;
  background: rgba(16, 28, 56, 0.85); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; outline: none;
}
.viaje-buscar input::placeholder { color: #aab3c5; }
.viaje-buscar input:focus { border-color: #eef88f; }
.viaje-buscar input::-webkit-search-cancel-button { display: none; }
.viaje-buscar-caja {
  position: absolute; top: calc(100% + 8px); left: 0; width: max(100%, 360px); z-index: 6;
  background: rgba(16, 28, 56, 0.98); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  padding: 10px 8px 8px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.viaje-buscar-caja[hidden] { display: none; }
.viaje-buscar-titulo { font-size: .75rem; color: #8d97ad; padding: 2px 8px 6px; }
.viaje-buscar-caja ul { list-style: none; max-height: 320px; overflow: auto; }
.viaje-buscar-caja li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px; border-radius: 6px; cursor: pointer; font-size: .9375rem; }
.viaje-buscar-caja li svg { width: 14px; height: 14px; flex: none; }
.viaje-buscar-caja li span { flex: 1; min-width: 0; }
.viaje-buscar-caja li em { font-style: normal; font-size: .75rem; color: #8d97ad; white-space: nowrap; }
.viaje-buscar-caja li:hover, .viaje-buscar-caja li[aria-selected="true"] { background: rgba(255, 255, 255, 0.08); }
.viaje-buscar-studio { margin-top: 6px; padding: 8px 8px 2px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: .75rem; line-height: 1.45; color: #c9cfdc; }
.viaje-buscar-studio strong { color: #eef88f; }
.viaje-ficha-cifra span { color: #c9cfdc; }
.viaje-ficha-cifra span.baja { color: #ff8fa3; }
.viaje-ficha-antes { font-size: .875rem; color: #c9cfdc; margin-top: 2px; }
.viaje-ficha-serie { margin: 8px 0 0; color: #c9cfdc; }
.viaje-ficha-serie.baja { color: #ff8fa3; }
.viaje-ficha-serie svg { width: 100%; height: 42px; display: block; }
.viaje-ficha-serie figcaption { font-size: .75rem; color: #8d97ad; }
@media (min-width: 761px) and (max-width: 1100px) {
  .viaje-empresa { position: absolute; top: 72px; left: 24px; right: 24px; font-size: .8125rem; }
  .viaje-ruta { top: 96px; }
  .viaje-ficha { top: 124px; max-height: calc(100vh - 208px); }
}
/* QAUCE-WEB-5: leyenda que filtra, guía de entrada y hoja del móvil en tres alturas */
.viaje-leyenda {
  position: absolute; left: 24px; bottom: 16px; right: 24px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  pointer-events: none;
}
.viaje-leyenda button {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .8125rem; color: #c9cfdc;
  background: rgba(16, 28, 56, 0.85); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 6px 12px; min-height: 34px; cursor: pointer;
}
.viaje-leyenda svg { width: 14px; height: 14px; flex: none; }
.viaje-leyenda button:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.3); }
.viaje-leyenda button[aria-pressed="true"] { color: #0b1427; background: #eef88f; border-color: #eef88f; }
.viaje-leyenda button[aria-pressed="true"] svg { color: #0b1427 !important; }
.viaje-leyenda .viaje-vertodo { color: #ffffff; border-color: rgba(255, 255, 255, 0.3); margin-right: 6px; }
.viaje-leyenda button:focus-visible { outline: 2px solid #eef88f; outline-offset: 2px; }
.viaje-guia {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, 8px); list-style: none;
  display: flex; gap: 28px; padding: 16px 24px; border-radius: 10px;
  background: rgba(11, 20, 39, 0.82); border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, 0, 0, 1);
}
.viaje-guia.vista { opacity: 1; transform: translate(-50%, 0); }
.viaje-guia.ida { opacity: 0; transform: translate(-50%, -6px); }
.viaje-guia li { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 16ch; text-align: center; font-size: .9375rem; line-height: 1.3; }
.viaje-guia svg { width: 30px; height: 30px; color: #eef88f; }
.viaje-ficha-asa { display: none; }
@media (max-width: 760px) {
  .viaje-barra { padding: 10px 10px; gap: 6px; flex-wrap: nowrap; }
  .viaje-empresa { position: absolute; top: 58px; left: 12px; right: 12px; font-size: .75rem; }
  .viaje-acciones { gap: 6px; margin-left: auto; }
  .viaje-demo { padding: .55rem .8rem; font-size: .8125rem; white-space: nowrap; }
  .viaje-volver, .viaje-sonido { padding: 6px 10px; font-size: .8125rem; min-height: 40px; white-space: nowrap; }
  .viaje-sonido { width: 40px; padding: 0; }
  .viaje-ruta { top: 80px; left: 12px; max-width: calc(100vw - 24px); }
  .viaje-ficha:not([hidden]) ~ .viaje-pista { display: none; }
  .viaje-ficha {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 48vh;
    border-radius: 16px 16px 0 0; border-bottom: 0;
  }
  .viaje-pista { left: 12px; right: 12px; bottom: 12px; }
  .viaje-buscar { position: absolute; top: 56px; left: 10px; right: 10px; width: auto; }
  .viaje-buscar input { min-height: 40px; font-size: 16px; } /* 16 px: Safari no amplía la página al enfocarlo */
  .viaje-buscar-caja ul { max-height: min(320px, 34vh); }
  .viaje-buscar-caja { width: 100%; }
  .viaje-empresa { top: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .viaje-ruta { top: 128px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .viaje.buscando .viaje-ficha { visibility: hidden; }
  .viaje-leyenda { top: 162px; bottom: auto; left: 0; right: 0; flex-wrap: nowrap; overflow-x: auto; padding: 0 12px 4px; scrollbar-width: none; pointer-events: auto; }
  .viaje-leyenda::-webkit-scrollbar { display: none; }
  .viaje-leyenda button { flex: none; min-height: 32px; padding: 5px 10px; font-size: .75rem; }
  .viaje-guia { top: 46%; gap: 16px; padding: 14px 16px; width: calc(100vw - 32px); justify-content: space-between; }
  .viaje-guia li { font-size: .8125rem; }
  .viaje-ficha { transition: max-height .35s cubic-bezier(.2, 0, 0, 1); }
  .viaje-ficha-cuerpo { padding-top: 28px; }
  .viaje-ficha[data-altura="entera"] ~ .viaje-leyenda { visibility: hidden; }
  .viaje-ficha[data-altura="titulo"] { max-height: 112px; overflow: hidden; }
  .viaje-ficha[data-altura="mitad"] { max-height: 48vh; }
  .viaje-ficha[data-altura="entera"] { max-height: calc(100% - 64px); }
  .viaje-ficha-asa {
    display: block; position: absolute; z-index: 1; top: 0; left: 50%; transform: translateX(-50%); width: 88px; height: 26px;
    background: none; border: 0; cursor: grab; touch-action: none;
  }
  .viaje-ficha-asa span { display: block; width: 40px; height: 4px; margin: 0 auto; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
  .viaje-ficha-asa:focus-visible { outline: 2px solid #eef88f; outline-offset: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  html.en-viaje #main-content, html.en-viaje .navbar, html.en-viaje .footer { transform: none; filter: none; }
  .viaje-panel, .viaje-panel.visto { transition: none; transform: none; animation: none !important; }
  .cerebro-lienzo canvas { transition: none; }
  .cerebro.entrando .cerebro-lienzo canvas { transform: none; }
  .viaje-guia, .viaje-guia.vista, .viaje-guia.ida, .viaje-ficha { transition: none; }
  .viaje, .viaje.saliendo { animation-duration: .01s; }
}

/* ─── El laboratorio: recorrido de tres pasos ─── */
.recorrido { list-style: none; display: grid; gap: 72px; }
.recorrido .paso {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
  font-size: inherit;
  letter-spacing: normal;
  margin: 0;
  color: inherit;
}
.recorrido .paso:nth-child(even) img { order: 2; }
.recorrido img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.paso-num {
  display: block;
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--cifra-paso);
  margin-bottom: 16px;
}
.paso-texto h3 {
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--clr-text);
}
.paso-texto p {
  margin-top: 12px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--clr-muted);
  max-width: 40ch;
}

/* ─── QAUCE Studio ─── */
.estudio { background: var(--clr-bg-2); }
.studio-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.studio-texto .acciones { margin-top: 28px; }
.puntos { list-style: none; display: grid; gap: 22px; margin-top: 40px; }
.puntos li { padding-left: 18px; border-left: 1px solid var(--clr-border); }
.puntos h3 { font-size: 1.0625rem; font-weight: 700; color: var(--clr-text); }
.puntos p { margin-top: 4px; font-size: 1rem; line-height: 1.6; color: var(--clr-muted); }
.acceso { margin-top: 16px; font-size: .875rem; color: var(--clr-muted); max-width: 52ch; }

.radar { margin: 0; }
.conmutador {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  margin-bottom: 20px;
}
.conmutador-btn {
  font: inherit;
  font-size: .9375rem;
  border: 0;
  background: transparent;
  color: var(--clr-muted);
  padding: 8px 18px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.conmutador-btn[aria-pressed="true"] {
  background: var(--clr-primary);
  color: var(--clr-on-primary);
  font-weight: 700;
}
.radar-svg { display: block; width: 100%; max-width: 460px; height: auto; overflow: visible; }
.radar-anillo, .radar-eje { fill: none; stroke: var(--radar-red); stroke-width: 1; }
.radar-antes { fill: none; stroke: var(--radar-antes); stroke-width: 1.5; stroke-dasharray: 4 4; }
.radar-ahora { fill: var(--radar-relleno); stroke: var(--radar-ahora); stroke-width: 2; stroke-linejoin: round; }
.radar-etiqueta { font-size: 11px; fill: var(--clr-muted); font-family: Helvetica, Arial, sans-serif; }
.radar-cifra { font-weight: 700; fill: var(--clr-text); }
.radar-leyenda { margin-top: 16px; font-size: .875rem; color: var(--clr-muted); max-width: 46ch; }

/* ─── Para quién ─── */
.perfiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.perfiles article { padding-top: 20px; border-top: 1px solid var(--clr-border); }
.perfiles h3 { font-size: 1.375rem; font-weight: 700; color: var(--clr-text); }
.perfiles p { margin-top: 10px; font-size: 1rem; line-height: 1.65; color: var(--clr-muted); }

/* ─── Quién está detrás (P551) ─── */
.quien { background: var(--clr-bg-2); }
.quien-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}
.quien-foto {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-md);
}
.quien-texto p {
  margin-top: 20px;
  color: var(--clr-muted);
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 56ch;
}
.quien .quien-enlace {
  display: inline-block;
  margin-top: 28px;
  padding-block: 8px;
  font-size: 1.0625rem;
  color: var(--clr-text);
  text-decoration-color: var(--clr-primary);
}

/* ─── Banda común de las tres webs (P553) ─── */
.banda-webs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: .9rem; padding-bottom: var(--sp-sm); margin-bottom: var(--sp-md); border-bottom: 1px solid var(--clr-border); }
.banda-webs a { color: var(--clr-muted); padding-block: 6px; transition: color .2s; }
.banda-webs a:hover, .banda-webs a:focus-visible { color: var(--clr-text); }
.banda-actual { display: inline-flex; align-items: center; gap: 8px; color: var(--clr-text); font-weight: 600; padding-block: 6px; }
.banda-punto { width: 6px; height: 6px; border-radius: 50%; background: var(--clr-primary); flex: 0 0 auto; }

/* ─── Preguntas ─── */
.preguntas-rejilla {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.preguntas .faq-list { max-width: none; margin: 0; gap: 0; }
.preguntas .faq-item {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--clr-border);
  border-radius: 0;
  margin: 0;
}
.preguntas .faq-item:first-child { border-top: 1px solid var(--clr-border); }
.preguntas .faq-item[open] { border-color: var(--clr-border); }
.preguntas .faq-item summary { padding: 22px 0; font-size: 1.0625rem; }
.preguntas .faq-item p { padding: 0 0 22px; color: var(--clr-muted); line-height: 1.65; max-width: 62ch; }

/* ─── Cierre ─── */
.cierre { padding-block: 128px; }
.cierre h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); max-width: 18ch; }
.enlace {
  color: var(--clr-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--clr-border);
}
.enlace:hover { color: var(--clr-text); }

/* ─── Superficies del navegador y detalles (auditoría con la guía de Impeccable, 24-oct) ─── */
::selection { background: #eef88f; color: #0b1427; }
html { scrollbar-color: rgba(255, 255, 255, 0.28) var(--clr-bg); accent-color: #eef88f; }
[data-theme="light"] { scrollbar-color: rgba(16, 28, 56, 0.3) var(--clr-bg); accent-color: #122352; }
h1, h2, h3 { text-wrap: balance; }
.nota-cifra, .radar-cifra, .paso-num { font-variant-numeric: tabular-nums; }
/* Zonas de pulsación de al menos 24 px de alto en el menú y el pie (WCAG 2.5.8). */
.nav-links a:not(.nav-cta) { display: inline-block; padding-block: 12px; }
.footer-links a, .footer-legal a { display: inline-block; padding-block: 8px; }

/* ─── Móvil y tableta ─── */
@media (max-width: 960px) {
  .portada { padding-top: 112px; padding-bottom: 72px; }
  .portada-rejilla,
  .studio-rejilla,
  .preguntas-rejilla,
  .quien-rejilla { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .banda-webs { justify-content: center; }
  .pliego { transform: none; }
  .recorrido .paso { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .recorrido .paso:nth-child(even) img { order: 0; }
  .perfiles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bloque { padding-block: 80px; }
  .bloque-cabecera { margin-bottom: 40px; }
  .radar-svg { margin-inline: auto; }
}
@media (max-width: 600px) {
  .contenedor { padding-inline: 16px; }
  .pliego { padding: 20px 18px 18px; }
  .turno { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .paso-num { font-size: 3.25rem; margin-bottom: 8px; }
  .recorrido { gap: 56px; }
  .acciones .btn-primary,
  .acciones .btn-ghost { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .pliego.subrayando .cita { animation: none; background-size: 100% 100%; }
  .cita, .conmutador-btn { transition: none; }
}
