/* ==========================================================================
   Axynology v2 — hoja de estilos de la portada (docs/v2/DESIGN.md).
   Móvil primero. Puntos de corte: 420 · 700 · 1040 · 1280 · 1440.
   Sin estilos en línea: lo dinámico va por clases o style.setProperty (CSP estricta).
   Todas las páginas usan esta hoja.
   ========================================================================== */

/* ---------- Fuentes (auto-alojadas, SIL OFL 1.1; recortadas con tools/v2-fonts.py) ----------
   Bricolage: una sola instancia 700 (la única que usa esta hoja; precargada, 19 KB). Inter: variable 400-700.
   JetBrains Mono: 400 (sellos, horas y bitácora). Latín básico + Latin-1 + la puntuación del sitio. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-400-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400-latin.woff2") format("woff2");
}
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 800; size-adjust: 101%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); size-adjust: 106.5%; }

/* ---------- Tokens (DESIGN §2) ---------- */
:root {
  --bg: #050605;
  --bg-2: #080a09;
  --surface-1: #0b0d0c;
  --surface-2: #111412;
  --surface-3: #181c19;
  --text: #eef2ef;
  --text-2: #c9d1cc;
  --muted: #a6afa9;
  --green: #10cf61;
  --green-2: #3bd87d;
  --mint: #8ff5b8;
  --green-a15: rgba(16, 207, 97, 0.15);
  --green-a30: rgba(16, 207, 97, 0.3);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --border-control: #727c76;
  --danger: #ff7a7a;
  --data-1: var(--green);
  --data-muted: #6b756f;
  /* Solo dentro de las piezas: colores de terceros imitados, nunca de marca */
  --taller-ig: #2b2a6b;        /* burbuja del cliente en el DM (imita Instagram) */

  --font-display: "Bricolage Grotesque", "Bricolage Fallback", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Inter Fallback", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --fs-display: clamp(2.5rem, min(5.2vw, 10svh), 4.75rem);
  --fs-h2: clamp(1.875rem, 4.2vw, 3.375rem);
  --fs-h3: clamp(1.375rem, 2.4vw, 2rem);
  --fs-h4: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1.6vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.875rem;
  --fs-mono: 0.8125rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;

  --r-pill: 999px;
  --r-card: 20px;
  --r-inner: 12px;
  --r-tag: 6px;

  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 360ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  --ease-travel: cubic-bezier(0.65, 0, 0.35, 1);

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --log-h: 56px;
  --section-pad: clamp(72px, 10vw, 136px);
  --row-gap: clamp(64px, 9vw, 120px);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + 12px);
  scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html.menu-open, html.menu-open body { overflow: hidden; }
img, svg, canvas { max-width: 100%; }
button svg, a svg, .gota { max-width: none; flex: none; }
img { display: block; height: auto; }
p { margin: 0 0 var(--sp-4); }
p, li, figcaption, dd { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
html:not(.js) [data-js-only] { display: none !important; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--green-2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur-1) var(--ease-std); }
a:hover { color: var(--mint); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--green); color: #000; }

h1, h2 { overflow-wrap: break-word; }
dd a[href^="mailto:"] { overflow-wrap: anywhere; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--text); }
h1 { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
/* Títulos de dos frases: cada frase en su bloque, el corte cae entre las dos */
.h3-s { display: block; text-wrap: balance; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 200;
  background: var(--green); color: #000; padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--sp-3); }

/* La gota (DESIGN §3.1): 12-16 px usa el dibujo óptico i-gota-s */
.gota { width: 12px; height: 12px; flex: none; color: var(--green); }

/* ---------- Rótulos (DESIGN §3.5) ---------- */
.label {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
  font: 500 var(--fs-label)/1.4 var(--font-body);
  color: var(--text-2);
}

/* ---------- Botones (DESIGN §5.1) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 700 1rem/1.1 var(--font-display); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-std), border-color var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur-1) var(--ease-std); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover { background: var(--green-2); color: #000; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-control); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--text-2); color: var(--text); }
.btn-secondary:hover .arrow-down { transform: translateY(3px); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn-xs { min-height: 44px; padding: 0 14px; font: 600 0.8125rem/1.2 var(--font-body); white-space: normal; text-align: left; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .chip[aria-disabled="true"], .field[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.text-link { font-weight: 500; }
/* Con espaciado de texto ampliado (WCAG 1.4.12), los botones pequeños pueden partir línea en lugar de salirse */
@media (max-width: 419.98px) {
  .btn-sm, .btn-field { white-space: normal; text-align: center; line-height: 1.2; padding-block: 6px; }
}

/* ---------- Cabecera (DESIGN §5.3) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  height: var(--header-h);
  transition: background-color var(--dur-2) var(--ease-std), border-color var(--dur-2) var(--ease-std);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(5, 6, 5, 0.86); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html.menu-open .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--sp-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 36px; height: 36px; }
.brand-word { display: none; font: 700 1.1875rem/1 var(--font-display); letter-spacing: -0.01em; }
.nav { display: none; }
.header-end { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
/* Selector de idioma: las dos opciones con la misma caja, así la barra queda centrada */
.lang { display: none; margin: 0; font: 500 var(--fs-label)/1 var(--font-body); color: var(--muted); align-items: center; }
.lang .lang-cur, .lang a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 32px; }
.lang .lang-cur { color: var(--text); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--mint); }
.lang-sep { margin: 0 2px; }
.header-cta { min-height: 44px; padding: 0 16px; }
.header-cta .cta-long { display: none; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--border-control); border-radius: var(--r-pill);
  background: transparent; color: var(--text); text-decoration: none; font: 500 var(--fs-small)/1 var(--font-body);
}
.menu-toggle svg { width: 18px; height: 18px; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-menu { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.menu-toggle:hover { background: var(--surface-3); color: var(--text); }
html.menu-open .header-cta { visibility: hidden; }
@media (max-width: 419.98px) {
  .header-cta { padding: 0 12px; }
  .menu-toggle { padding: 0 10px; }
}

@media (min-width: 420px) {
  .brand-word { display: inline; }
  .header-cta .cta-long { display: inline; }
  .header-cta .cta-short { display: none; }
}

/* Menú móvil: se comporta como diálogo (SITEMAP §4.3) */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 80;
  display: flex; flex-direction: column;
  background: var(--bg); border-top: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
}
.mm-nav { flex: 1; padding: var(--sp-3) var(--gutter) var(--sp-4); }
.mm-lang { display: flex; align-items: center; margin: 0 0 var(--sp-2); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
.mm-lang .lang-cur, .mm-lang a { display: inline-flex; align-items: center; min-height: 44px; }
.mm-lang .lang-cur { color: var(--text); font-weight: 600; }
.mm-lang .lang-sep { margin: 0 12px; }
.mm-lang a { color: var(--text-2); }
.mm-list { list-style: none; }
.mm-list > li { border-bottom: 1px solid var(--line); }
.mm-list a { display: flex; align-items: center; min-height: 48px; color: var(--text); text-decoration: none; }
.mm-list a:hover { color: var(--mint); }
.mm-big { font: 700 1.5rem/1.15 var(--font-display); letter-spacing: -0.015em; padding: 8px 0; }
.mm-sub { list-style: none; padding: 0 0 var(--sp-3) var(--sp-5); }
.mm-sub a { min-height: 44px; color: var(--text-2); font-size: var(--fs-small); }
.mm-gap { margin-top: var(--sp-4); }
.mm-meta { margin: var(--sp-5) 0 0; color: var(--muted); font-size: var(--fs-small); }
.mm-meta a { color: var(--text); }
.mm-cta { position: sticky; bottom: 0; padding: var(--sp-4) var(--gutter) calc(var(--sp-4) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu:not([hidden]) { animation: fade-down var(--dur-2) var(--ease-out); }
}
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 1040px) {
  .nav { display: block; }
  .nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
  .nav-list > li > a, .services > summary {
    display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px;
    border-radius: var(--r-pill);
    color: var(--text-2); text-decoration: none; font: 500 var(--fs-small)/1 var(--font-body);
    cursor: pointer; transition: color var(--dur-1) var(--ease-std), background-color var(--dur-1) var(--ease-std);
  }
  .nav-list > li > a:hover, .services > summary:hover { color: var(--text); background: var(--surface-3); }
  .lang { display: inline-flex; margin-right: var(--sp-2); }
  .menu-toggle { display: none; }
  .brand { margin-right: var(--sp-5); }
  .nav { margin-right: auto; }
  .header-cta { padding: 0 20px; }
}
.services { position: relative; }
.services > summary { list-style: none; }
.services > summary::-webkit-details-marker { display: none; }
.services .chev { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-std); }
.services[open] .chev { transform: rotate(180deg); }
.services[open] > summary { color: var(--text); background: var(--surface-3); }
.services-panel {
  position: absolute; top: calc(100% + 10px); left: -12px; z-index: 5;
  width: min(820px, calc(100vw - 2 * var(--gutter)));
  padding: var(--sp-5);
  background: var(--surface-1); border: 1px solid var(--line-2); border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
}
@media (prefers-reduced-motion: no-preference) {
  .services[open] .services-panel { animation: fade-down var(--dur-2) var(--ease-out); }
}
.services-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.services-grid a { display: block; height: 100%; padding: 14px 16px; border-radius: var(--r-inner); text-decoration: none; color: var(--text); }
.services-grid a:hover { background: var(--surface-3); color: var(--text); }
.sv-name { display: block; font: 600 1rem/1.3 var(--font-body); margin-bottom: 4px; }
.sv-line { display: block; font-size: var(--fs-label); line-height: 1.45; color: var(--muted); }
.services-foot { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-label); color: var(--muted); }
.services-foot p { margin: 0 0 6px; }
.services-foot p:last-child { margin: 0; }

@media (max-height: 500px) {
  .site-header { position: absolute; }
}

/* ---------- Hero (DESIGN §6) ---------- */
.hero {
  --logo: clamp(240px, 22vw, 300px);
  --logo-h: calc(var(--logo) * 0.704);
  --logo-off: 48px;
  --net-h: clamp(150px, 24svh, 220px);
  position: relative;
  min-height: min(calc(100svh - var(--log-h)), 880px);
  padding: calc(var(--header-h) + var(--sp-4)) 0 32px;
  display: flex; align-items: center;
  overflow: clip;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-text { position: relative; z-index: 2; min-width: 0; }
.hero-text .label { margin-bottom: var(--sp-4); }
.hero h1 { margin: 0 0 var(--sp-4); }
.hero h1 { text-wrap: balance; }
/* Teléfonos estrechos: el titular en español tiene grupos que no se parten ("para vender más", "y trabajar menos.",
   unas 8,1 veces el tamaño de letra); la letra baja con el ancho para que la línea más ancha quepa con margen. */
@media (max-width: 699.98px) {
  .hero h1:lang(es) { font-size: min(var(--fs-display), calc((100vw - 2 * var(--gutter)) / 8.5)); }
}
@media (min-width: 700px) and (max-width: 1039.98px) {
  .hero h1 { font-size: 3.25rem; }
}
.hl { position: relative; display: inline-block; }
.nw { white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.09em;
  background: var(--green); border-radius: 2px; transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  html.draw .hl::after { animation: underline 600ms var(--ease-out) 200ms both; }
}
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); max-width: 34rem; margin-bottom: var(--sp-5); }
.lead-2 { display: none; }
.hero-actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.hero-actions .btn { width: 100%; }
.hero-support { margin: var(--sp-3) 0 0; font-size: var(--fs-small); line-height: 1.55; color: var(--muted); max-width: 34rem; }

/* Hub: chips bajo la línea de apoyo (< 1040 px), en la columna de la red bajo el logo (1040-1279 px),
   constelación alrededor del logo (≥ 1280 px) */
.hub { margin-top: var(--sp-5); }
.hub-title { margin: 0 0 var(--sp-3); font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--text-2); }
.hub-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hub-link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 16px 0 14px;
  border: 1px solid var(--border-control); border-radius: var(--r-pill);
  font: 500 var(--fs-small)/1.2 var(--font-body); color: var(--text); text-decoration: none;
  transition: border-color var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std);
}
.hub-link:hover, .hub-link:focus-visible { border-color: var(--green); color: var(--mint); }
.hub-node { width: 12px; height: 12px; color: var(--green); flex: none; transition: color var(--dur-1) var(--ease-std); }

/* Red: caja propia en móvil (logo primero), columna derecha en escritorio */
.hero-art-col { order: -1; position: relative; height: var(--net-h); margin-bottom: var(--sp-4); }
.hero-art {
  --art-w: calc(var(--net-h) * 0.86);
  position: absolute; left: 50%; top: 50%;
  width: var(--art-w); height: calc(var(--art-w) * 0.704);
  transform: translate(-50%, -50%);
}
.hero-mark { position: relative; z-index: 2; width: 100%; height: 100%; display: block; overflow: visible; }
.hero-fallback, .hero-canvas {
  position: absolute; left: 50%; top: 50%; pointer-events: none;
  width: var(--mesh-size, calc(var(--net-h) - 8px)); height: var(--mesh-size, calc(var(--net-h) - 8px));
  max-width: none;
  transform: translate(-50%, -50%);
}
.hero-canvas, .hero-fallback {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--mesh-fade, 0px));
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--mesh-fade, 0px));
}
.hero-canvas { opacity: 0; }
.hero.has-canvas .hero-canvas { opacity: var(--net-fade, 1); }
.hero.has-canvas .hero-fallback { visibility: hidden; }

/* Logo que se dibuja en cada carga de la portada (html.draw lo pone js/flag.js; nunca con movimiento reducido).
   Mismo ritmo que el sitio anterior: trazo blanco 2 s, verde 1,4 s, relleno y el trazo se retira. */
.hero-mark { --ease-draw: cubic-bezier(0.45, 0, 0.55, 1); --ease-fill: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.hero-mark path { stroke-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .draw .hero-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; stroke-width: 3; }
  .draw .hero-mark .mk-w { stroke: #fff; animation: mk-draw 2s var(--ease-draw) 0.2s forwards, mk-fill 0.9s var(--ease-fill) 1.8s forwards, mk-unstroke 0.6s linear 2.2s forwards; }
  .draw .hero-mark .mk-g { stroke: var(--green); animation: mk-draw 1.4s var(--ease-draw) 0.7s forwards, mk-fill 0.7s var(--ease-fill) 1.9s forwards, mk-unstroke 0.6s linear 2.2s forwards; }
}
@keyframes mk-draw { to { stroke-dashoffset: 0; } }
@keyframes mk-fill { to { fill-opacity: 1; } }
@keyframes mk-unstroke { to { stroke-width: 0; } }

/* Pausa (DESIGN §6.5): botón simple cuya etiqueta dice lo que hará ("Pausar" / "Reanudar") */
.pause-btn {
  position: absolute; z-index: 3; top: calc(-1 * var(--net-h) - var(--sp-4) + 4px); right: 0;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 12px; justify-content: center;
  background: rgba(5, 6, 5, 0.72); border: 1px solid var(--border-control); border-radius: var(--r-pill);
  color: var(--muted); font: 500 var(--fs-label)/1 var(--font-body);
  transition: color var(--dur-1) var(--ease-std), border-color var(--dur-1) var(--ease-std);
}
.pause-btn:hover { color: var(--text); border-color: var(--text-2); }
.pause-btn svg { width: 14px; height: 14px; }
.pause-btn .i-play { display: none; }
.pause-btn[data-paused="true"] .i-play { display: block; }
.pause-btn[data-paused="true"] .i-pause { display: none; }
.pause-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pause-btn { display: none !important; } }

@media (min-width: 420px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
}
@media (min-width: 700px) {
  .lead-2 { display: inline; }
  .hero { --net-h: clamp(170px, 26svh, 240px); }
  .hero-lead, .hero-support { text-wrap: pretty; }
}

@media (min-width: 1040px) {
  .hero { padding: calc(var(--header-h) + var(--sp-6)) 0 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); column-gap: var(--sp-6); align-items: center; }
  .hero-art-col { order: 0; height: auto; align-self: stretch; margin: 0; }
  .hero-art {
    --art-w: var(--logo);
    left: calc(var(--logo-off) + var(--logo) / 2);
  }
  .hero-fallback, .hero-canvas { width: var(--mesh-size, calc(var(--logo) + 196px)); height: var(--mesh-size, calc(var(--logo) + 196px)); }
  .pause-btn {
    top: auto; right: auto; bottom: -24px;
    left: calc(100% + var(--sp-6));
    background: transparent; border-color: transparent;   /* no compite con las llamadas a la acción */
  }
  .pause-btn:hover, .pause-btn:focus-visible { border-color: var(--border-control); }
  .pause-btn span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
  .hero-lead { max-width: 42rem; font-size: 1.125rem; }
  .hero-support { max-width: none; }
  .hub-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* 1040-1279 px: los cinco enlaces del hub van como chips en la columna de la red, bajo el logo (decisión N3) */
@media (min-width: 1040px) and (max-width: 1279.98px) {
  .hero-art { left: 50%; top: 34%; }
  .hub {
    position: absolute; margin: 0;
    left: calc(100% + var(--sp-6));
    width: calc(100% * 0.85 / 1.15);
    top: calc(34% + var(--logo-h) / 2 + var(--sp-5));
  }
  .hub-list { justify-content: center; }
  .hub-link { background: rgba(5, 6, 5, 0.86); }
}

/* Constelación de servicios (≥ 1280 px; DESIGN §6.4) */
@media (min-width: 1280px) {
  .hub {
    --rc: calc(var(--logo) / 2 + 52px);
    position: absolute; margin: 0; width: 0; height: 0;
    left: calc(100% + var(--sp-6) + var(--logo-off) + var(--logo) / 2);   /* relativo a .hero-text (columna de texto) */
    top: 50%;
  }
  .hub-list { display: block; }
  .hub-item {
    --a: 0deg;
    position: absolute;
    left: calc(cos(var(--a)) * var(--rc));
    top: calc(sin(var(--a)) * var(--rc));
    width: max-content;
    transform: translate(-7px, -50%);
  }
  .hub-item:nth-child(1) { --a: -80deg; }
  .hub-item:nth-child(2) { --a: -40deg; }
  .hub-item:nth-child(3) { --a: 0deg; }
  .hub-item:nth-child(4) { --a: 40deg; }
  .hub-item:nth-child(5) { --a: 80deg; }
  /* Hasta que site.js mide (o si no carga): la disposición segura, que nunca pasa del borde de la retícula */
  html:not(.hub-placed) .hero { --logo-off: 0px; }
  html:not(.hub-placed) .hub { --rc: calc(var(--logo) / 2 + 28px); }
  html:not(.hub-placed) .hub-item:nth-child(1) { --a: -60deg; }
  html:not(.hub-placed) .hub-item:nth-child(2) { --a: -30deg; }
  html:not(.hub-placed) .hub-item:nth-child(4) { --a: 30deg; }
  html:not(.hub-placed) .hub-item:nth-child(5) { --a: 60deg; }
  html:not(.hub-placed) .hub-text { max-width: 8rem; white-space: normal; text-wrap: balance; }
  .hub-link {
    min-height: 44px; padding: 0; gap: 10px; border: 0; border-radius: 0;
    font: 500 var(--fs-label)/1.3 var(--font-body); color: var(--text-2);
  }
  .hub-text { padding: 2px 6px; border-radius: var(--r-tag); background: rgba(5, 6, 5, 0.72); white-space: nowrap; }
  /* Si no caben en una línea (site.js placeHub): dos líneas equilibradas, sin palabra sola (nbsp en el último par) */
  .hub.is-narrow .hub-text { max-width: 10rem; white-space: normal; text-wrap: balance; }
  .hub.is-narrower .hub-text { max-width: 8rem; }
  .hub-node { width: 14px; height: 14px; transform: rotate(calc(var(--a) + 45deg)); }
  .hub-link:hover, .hub-link:focus-visible, .hub-link.is-hot { color: var(--mint); }
  .hub-link:hover .hub-node, .hub-link:focus-visible .hub-node, .hub-link.is-hot .hub-node { color: var(--mint); }
  .hub-link:focus-visible { outline-offset: 4px; }
}

/* La gota que viaja (DESIGN §3.2) */
.pulse {
  position: fixed; left: 0; top: 0; z-index: 65; width: 14px; height: 14px;
  color: var(--green); pointer-events: none;
  offset-rotate: auto 45deg; offset-anchor: 50% 50%;
}

/* ---------- Franja "Bitácora del taller" (DESIGN §5.13) ---------- */
.logstrip { background: var(--bg-2); border-block: 1px solid var(--line); }
.logstrip-list { list-style: none; display: grid; grid-template-columns: 1fr; }
.ls-item {
  display: grid; grid-template-columns: 12px 5.5rem minmax(0, 1fr); column-gap: var(--sp-3); align-items: baseline;
  padding: 16px 0; min-height: var(--log-h);
  border-top: 1px solid var(--line);
}
.ls-item:first-child { border-top: 0; }
.ls-item .gota { color: var(--muted); align-self: start; margin-top: 5px; }
.ls-item .gota.is-on { color: var(--green); }
.ls-stamp { font: 400 var(--fs-mono)/1.5 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ls-text { font-size: var(--fs-small); line-height: 1.5; color: var(--text-2); }
.ls-text b { color: var(--text); font-weight: 600; }
.ls-visit-text, .closing-log-text { transition: opacity var(--dur-2) var(--ease-std); }
.ls-visit-text.is-swapping, .closing-log-text.is-swapping { opacity: 0; }
/* ≥ 700 px: 2 × 2 con la columna de sello fija; "Tu visita" primero (asoma bajo el hero) */
@media (min-width: 700px) {
  .logstrip-list { grid-template-columns: 1fr 1fr; column-gap: var(--sp-6); }
  .ls-item:nth-child(2) { border-top: 0; }
  /* Sin JavaScript no hay "tu visita": las tres entradas en una sola fila, sin bordes sueltos */
  html:not(.js) .logstrip-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html:not(.js) .ls-item { border-top: 0; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-pad); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: var(--sp-8); }
.section-head h2 { margin-bottom: var(--sp-4); }
.section-lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: 40rem; margin: 0; }
.anchor-alias { position: relative; top: calc(-1 * var(--section-pad)); display: block; height: 0; }
.nojs-note { display: none; }
html:not(.js) .nojs-note { display: block; margin: var(--sp-4) 0 0; font-size: var(--fs-small); color: var(--text-2); }

/* ---------- El taller: filas y riel (DESIGN §4.2) ---------- */
.rows { position: relative; display: grid; gap: var(--row-gap); }
.row { position: relative; display: grid; gap: var(--sp-6); min-width: 0; }
.row-intro { min-width: 0; }
.row-intro p { color: var(--text-2); max-width: 66ch; }
.row-intro h3 { margin-bottom: var(--sp-4); }
.row-intro-2 { display: grid; gap: var(--sp-4); }
.row-links { display: flex; flex-wrap: wrap; gap: 6px var(--sp-5); margin: var(--sp-2) 0 0; }
.row-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.rail-term { display: none; }
@media (min-width: 1040px) {
  .rows { padding-left: var(--sp-7); }
  .rows::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 0; width: 1px; background: var(--line-2); }
  .rail-term {
    position: absolute; left: calc(-1 * var(--sp-7)); top: 1px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    font: 500 var(--fs-label)/1 var(--font-body); color: var(--muted);
    background: var(--bg); padding: 0 0 6px;
  }
  .rail-term .gota { color: var(--muted); transition: color var(--dur-2) var(--ease-std); }
  .rail-term.is-on .gota { color: var(--green); }
  .row-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .row > .row-intro .label .gota { display: none; }          /* la terminal del riel es la única gota de la fila */
  .row-intro-2 { grid-template-columns: 5fr 7fr; column-gap: var(--sp-7); align-items: start; }
  .row-intro-2 h3 { margin: 0; }
  .row-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-7); align-items: start; }
  .row-4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  /* El texto acompaña a la pieza mientras se baja (scroll nativo, sin secuestrarlo) */
  .row-split > .row-intro { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---------- Banco (DESIGN §5.6) ---------- */
.bench {
  position: relative; min-width: 0;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(12px, 2vw, 24px);
}
.bench-skip {
  position: absolute; left: 16px; top: -14px; z-index: 5;
  padding: 8px 14px; border-radius: var(--r-pill); background: var(--green); color: #000; font-weight: 600; text-decoration: none;
  transform: translateY(-200%); opacity: 0;
}
.bench-skip:focus { transform: none; opacity: 1; }
.bench-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--sp-3); min-height: 48px; margin-bottom: var(--sp-3); }
.bench-status { position: relative; display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; flex: none; }
.bench-status .gota { color: var(--muted); transition: color var(--dur-2) var(--ease-std); }
.bench-status .i-check { display: none; width: 16px; height: 16px; color: var(--green); }
.bench[data-state="running"] > .bench-head .bench-status .gota { color: var(--green); }
/* Terminada: el check ocupa el lugar de la gota (no se superponen) */
.bench[data-state="done"] > .bench-head .bench-status .gota, .bench.is-complete > .bench-head .bench-status .gota { display: none; }
.bench[data-state="done"] > .bench-head .bench-status .i-check, .bench.is-complete > .bench-head .bench-status .i-check { display: block; }
.bench-title { margin: 0; font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--text); flex: 1 1 0; min-width: 0; text-wrap: balance; }
.bench-reset {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--border-control); border-radius: var(--r-pill);
  color: var(--text-2); font: 500 var(--fs-label)/1 var(--font-body);
}
.bench-reset:hover { background: var(--surface-3); color: var(--text); }
.bench-reset svg { width: 16px; height: 16px; }
.bench-stage { position: relative; background: var(--surface-2); border-radius: var(--r-inner); min-width: 0; }
.bench-controls { position: relative; margin-top: var(--sp-4); min-width: 0; }
.bench-instr { margin: 0 0 var(--sp-3); font-size: var(--fs-small); color: var(--text-2); }
html:not(.js) [data-instr] { display: none; }
.bench-error { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-2) 0 var(--sp-3); color: var(--text-2); font-size: var(--fs-small); }

/* Bitácora del banco (DESIGN §3.4): alto fijo de 2 líneas que el módulo rellena en su sitio (el resto, con
   "Ver lo que pasó (n)"). El final ("Cotiza gratis →") es la última línea de la bitácora: no reserva una fila aparte. */
.bench-logbox { position: relative; margin-top: var(--sp-4); padding-top: var(--sp-1); border-top: 1px solid var(--line); }
.logbox-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 44px; }
.logbox-title { margin: 0; font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--muted); }
.log-toggle { min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--green-2); text-underline-offset: 3px; font-size: var(--fs-label); }
.bench-log {
  --log-lines: 2;
  list-style: none; display: flex; flex-direction: column; justify-content: flex-end;
  height: calc(var(--log-lines) * 1.5 * var(--fs-mono) + var(--log-lines) * 4px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 8px);
}
.bench-logbox.is-expanded .bench-log, html:not(.js) .bench-log { height: auto; -webkit-mask-image: none; mask-image: none; }
@media (max-width: 699.98px) {
  .js .bench-logbox:not(.is-expanded) .bench-log { --log-lines: 3; -webkit-mask-image: none; mask-image: none; justify-content: flex-start; }
  .js .bench-logbox:not(.is-expanded) .bench-log li:not(:last-child) { display: none; }
  .js .bench-logbox:not(.is-expanded) .bench-log li:last-child .log-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
}
.bench-log li {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3);
  padding-left: 20px; margin-top: 4px; flex: none;
  font: 400 var(--fs-mono)/1.5 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted);
}
.log-time { color: var(--muted); }
.log-time:empty { display: none; }
.log-text { color: var(--muted); overflow-wrap: anywhere; }
.bench-log li:last-child .log-text { color: var(--text-2); }
.bench-log li:last-child::before {
  content: ""; position: absolute; left: 0; top: calc(0.75em - 6px); width: 12px; height: 12px;
  background: var(--green);
  -webkit-mask: url("/assets/gota-s.svg") center / 12px 12px no-repeat;
  mask: url("/assets/gota-s.svg") center / 12px 12px no-repeat;
}
.log-text a { color: var(--text); font-family: var(--font-body); font-weight: 600; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .bench-log li.is-new { animation: log-in var(--dur-2) var(--ease-out); }
}
@keyframes log-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bench-log-empty { display: none; }
/* Antes del primer paso, el texto de ayuda ocupa la última línea de la bitácora (no queda un hueco en blanco) */
.js .bench-log-empty:not([hidden]) { display: block; position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding-left: 20px; font: 400 var(--fs-mono)/1.5 var(--font-mono); color: var(--muted); pointer-events: none; }
@media (max-width: 699.98px) {
  /* En el teléfono, la bitácora vacía se reduce a una línea hasta el primer paso */
  .js .bench-logbox:not(.is-expanded) .bench-log:empty, .js .bench[data-state="static"] .bench-logbox:not(.is-expanded) .bench-log { --log-lines: 1; }
}
.js .bench[data-state="static"] .bench-log li { display: none; }

/* Pista de primera vez: un único anillo de 1,2 s sobre el control principal (nunca con movimiento reducido) */
@media (prefers-reduced-motion: no-preference) {
  .is-hint { animation: hint-ring 1.2s var(--ease-out) 1; }
}
@keyframes hint-ring { 0% { box-shadow: 0 0 0 0 rgba(16, 207, 97, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(16, 207, 97, 0); } }

/* Chips y grupos segmentados (DESIGN §5.2) */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  background: transparent; border: 1px solid var(--border-control); border-radius: var(--r-pill);
  color: var(--text); font: 500 var(--fs-small)/1.2 var(--font-body);
  transition: border-color var(--dur-1) var(--ease-std), background-color var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std);
}
.chip:hover { border-color: var(--text-2); background: var(--surface-3); }
.chip[aria-pressed="true"] { background: var(--green-a15); border-color: var(--green); color: var(--text); }
.chip[aria-pressed="true"]::before {
  content: ""; width: 12px; height: 12px; background: var(--green);
  -webkit-mask: url("/assets/check.svg") center / 12px 12px no-repeat; mask: url("/assets/check.svg") center / 12px 12px no-repeat;
}
.chip-sm { min-height: 44px; padding: 0 12px; font-size: 0.8125rem; }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: var(--sp-2); font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--text-2); }
.seg-options { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.seg-options label { position: relative; display: inline-flex; }
.seg-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-options span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--border-control); border-radius: var(--r-pill);
  font: 500 var(--fs-small)/1.2 var(--font-body); color: var(--text);
  transition: border-color var(--dur-1) var(--ease-std), background-color var(--dur-1) var(--ease-std);
}
.seg-options label:hover span { border-color: var(--text-2); }
.seg-options input:checked + span { background: var(--green-a15); border-color: var(--green); }
.seg-options input:checked + span::before {
  content: ""; width: 12px; height: 12px; background: var(--green);
  -webkit-mask: url("/assets/check.svg") center / 12px 12px no-repeat; mask: url("/assets/check.svg") center / 12px 12px no-repeat;
}
.seg-options label:has(input:focus-visible) span { outline: 3px solid var(--green); outline-offset: 3px; }
.seg-sm .seg-options span { min-height: 44px; padding: 0 12px; font-size: var(--fs-label); }

/* Campos (DESIGN §5.14) */
.field-label { display: block; margin-bottom: 6px; font: 500 var(--fs-small)/1.4 var(--font-body); color: var(--text); }
.field-row { display: flex; gap: var(--sp-2); }
.field {
  flex: 1 1 auto; min-width: 0; width: 0; height: 48px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--border-control); border-radius: var(--r-inner);
  color: var(--text); font-size: 1rem;
}
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus-visible { outline-offset: 2px; }
.btn-field { min-height: 48px; padding: 0 18px; }
.select-field { display: grid; gap: 6px; font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--text-2); }
select {
  appearance: none; -webkit-appearance: none;
  height: 44px; padding: 0 36px 0 12px; min-width: 0;
  background: var(--surface-2) url("/assets/chev.svg") right 12px center / 14px 14px no-repeat;
  border: 1px solid var(--border-control); border-radius: var(--r-inner);
  color: var(--text); font: 400 var(--fs-small)/1.2 var(--font-body);
}
select:hover { border-color: var(--text-2); }

/* Etiquetas de estado */
.status-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; margin-right: 6px;
  border: 1px solid var(--border-control); border-radius: var(--r-tag);
  font: 400 var(--fs-mono)/1.5 var(--font-mono); color: var(--text-2); vertical-align: 1px;
}
.status-tag .gota { color: var(--muted); }
.status-tag.is-on .gota { color: var(--green); }
.status-tag .i-clock { width: 12px; height: 12px; color: var(--muted); flex: none; }
.status-plain { margin: 0; white-space: nowrap; }

/* ---------- Proyectos (DESIGN §5.4): un solo marco 16:10 con barra de navegador; Twins como caso principal ---------- */
.cases { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.case { display: flex; flex-direction: column; min-width: 0; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.shot { margin: 0; padding: 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.shot-bar { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; background: #0b0d0c; border: 1px solid var(--line-2); border-bottom: 0; border-radius: var(--r-inner) var(--r-inner) 0 0; }
.shot-bar i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.shot-bar span { margin-left: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.shot picture { display: block; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 var(--r-inner) var(--r-inner); background: var(--surface-3); }
/* Mientras llega cada captura, su color dominante (nunca un bloque negro) */
#twins-subli .shot img { background: #1a0f2e; }
#tienda-seguridad-energia .shot img, #security-energy-store .shot img { background: #141414; }
#app-axynology .shot img, #axynology-app .shot img { background: #0c0f0d; }
.case-media { position: relative; }
.shot-phone { display: none; }
.case-body { display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 3vw, 32px); }
.case-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.case-logo { display: block; width: auto; height: 24px; }
.case-meta { margin: var(--sp-2) 0 0; font-size: var(--fs-label); line-height: 1.5; color: var(--muted); }
.case-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-3) 0 0; padding: 0; }
.case-tags li { padding: 3px 10px; border-radius: var(--r-tag); border: 1px solid var(--border-control); font: 500 12px/1.5 var(--font-body); color: var(--text-2); }
/* El reto → Lo que hicimos → El resultado, como un tramo corto del riel axón; la gota solo en el resultado */
.case-rail { position: relative; display: grid; gap: var(--sp-4); margin: var(--sp-5) 0 0; padding-left: 24px; }
.case-rail::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 12px; width: 1px; background: var(--line-2); }
.case-rail > div { position: relative; }
.case-rail > div::before { content: ""; position: absolute; left: -23px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-1); border: 1px solid var(--border-control); }
.case-rail > .is-result::before { display: none; }
.case-rail dt { margin: 0 0 2px; font: 600 var(--fs-label)/1.4 var(--font-body); color: var(--text); }
.case-rail .is-result dt .gota { position: absolute; left: -26px; top: 2px; width: 15px; height: 15px; color: var(--green); }
.case-rail dd { margin: 0; font-size: var(--fs-small); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.case-link { margin: auto 0 0; padding-top: var(--sp-4); }
.case-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
@media (min-width: 700px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-feature { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .case-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .case-feature .case-media { background: var(--surface-2); border-right: 1px solid var(--line); }
  .case-feature .shot { border-bottom: 0; padding: 24px 24px 64px; }
  .case-feature .shot-phone {
    display: block; position: absolute; right: 24px; bottom: 24px; width: 150px; height: auto;
    border: 5px solid #000; border-radius: 20px; outline: 1px solid var(--line-2); box-shadow: var(--shadow-float); background: #1a0f2e;
  }
  .case-feature .case-body { align-self: center; padding: clamp(28px, 3vw, 44px); }
  /* Si tras el caso principal queda una sola tarjeta, también va a lo ancho (sin hueco a su lado) */
  .case-feature + .case:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .case-feature + .case:last-child .shot { border-bottom: 0; border-right: 1px solid var(--line); padding: 24px; }
  .case-feature + .case:last-child .case-body { align-self: center; padding: clamp(28px, 3vw, 44px); }
}

/* ---------- Pieza 01 · Bot + Pieza 02 · Bandeja ---------- */
.stage-bot { display: grid; grid-template-columns: minmax(0, 1fr); padding: var(--sp-4); justify-items: center; }
.bot-inbox { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-5); min-width: 0; }
.phone {
  position: relative; width: min(100%, 300px); height: min(58svh, 540px); min-height: 360px;
  display: flex; flex-direction: column;
  background: #000; border: 1px solid var(--line-2); border-radius: 30px; padding: 8px;
  box-shadow: var(--shadow-float);
}
.phone-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 14px 6px; font: 600 12px/1 var(--font-body); color: var(--text-2); }
.phone-dots { display: inline-flex; gap: 3px; }
.phone-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-2); }
.phone-screen { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0a0c0b; border-radius: 22px; }
.pv { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.45; color: var(--text); transition: opacity var(--dur-3) var(--ease-std), transform var(--dur-3) var(--ease-std); }
.phone[data-view="post"] .dm-view, .phone[data-view="dm"] .post-view { opacity: 0; visibility: hidden; }
.phone[data-view="post"] .dm-view { transform: translateX(16px); }
.phone[data-view="dm"] .post-view { transform: translateX(-16px); }
.av { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); font: 700 11px/1 var(--font-body); color: var(--text-2); text-transform: uppercase; }
.av-shop { background: #0e2a1a; color: var(--mint); border-color: rgba(16, 207, 97, 0.4); }
.av-visitor { background: #1c1f2a; color: #c9ccf5; }
.av-c1 { background: #2a1c24; color: #f3c4d9; }
.av-c2 { background: #1f2630; color: #bcd3f0; }
.av-c3 { background: #2b2417; color: #f0d9a8; }
.av-c4 { background: #1d2a28; color: #b3e5dc; }
.pv-head, .dm-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pv-sub { display: block; font-size: 12px; color: var(--muted); margin-left: auto; }
.dm-head .pv-sub { margin: 0; }
.dm-head > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.dm-back { width: 16px; height: 16px; color: var(--text-2); }
.pv-img { position: relative; flex: 1 1 150px; min-height: 84px; max-height: 210px; overflow: hidden; background: #d9c29a; }
.pv-img img { width: 100%; height: 100%; object-fit: cover; }
.pv-tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: var(--r-tag); background: rgba(0, 0, 0, 0.72); font-size: 12px; color: var(--text); }
.pv-actions { display: flex; gap: 14px; padding: 8px 12px 2px; color: var(--text); }
.pv-actions svg { width: 20px; height: 20px; }
.pv-caption { margin: 0; padding: 4px 12px 6px; color: var(--text-2); }
.pv-caption b, .cmt b { color: var(--text); }
.pv-comments { list-style: none; padding: 2px 12px 10px; display: grid; gap: 7px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; }
.cmt p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.cmt .av { width: 22px; height: 22px; font-size: 10px; }
.cmt-reply { padding-left: 22px; }
/* Aviso del escenario: sobre la pantalla del teléfono, en cualquiera de sus dos vistas */
.stage-notice { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; margin: 0; padding: 8px 10px; border-radius: var(--r-inner); background: var(--surface-3); border: 1px solid var(--border-control); box-shadow: var(--shadow-float); font-size: 12.5px; line-height: 1.4; color: var(--text); }
.phone[data-view="dm"] .stage-notice { bottom: 72px; }
.dm-thread {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}
.dm-msg { margin: 0; max-width: 88%; padding: 9px 11px; border-radius: 16px; font-size: 13px; line-height: 1.42; flex: none; }
.dm-msg p { margin: 0 0 6px; }
.dm-msg p:last-child { margin: 0; }
.dm-in { background: var(--surface-3); border-bottom-left-radius: 6px; color: var(--text); }
.dm-out { align-self: flex-end; background: var(--taller-ig); color: #fff; border-bottom-right-radius: 6px; }
.dm-btn { display: inline-block; padding: 5px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-2); font-weight: 600; font-size: 12.5px; }
.dm-card { display: flex; align-items: center; gap: 10px; margin: 0; max-width: 88%; padding: 8px 10px; border-radius: var(--r-inner); border: 1px solid var(--line-2); background: #0e1210; font-size: 12.5px; color: var(--text-2); flex: none; }
.dm-card svg { width: 20px; height: 20px; color: var(--text); flex: none; }
.dm-card b { display: block; color: var(--text); }
.dm-compose { padding: 8px 10px 10px; border-top: 1px solid var(--line); min-height: 62px; display: flex; align-items: center; }
.dm-reply { width: 100%; min-height: 44px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--green); color: var(--text); font: 600 13px/1.25 var(--font-body); }
.dm-reply:hover { background: #1f2621; }
.dm-sent { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; font: 600 13px/1.25 var(--font-body); color: var(--text); }
.dm-sent .arr-side { display: none; }
@media (min-width: 1280px) { .dm-sent .arr-down { display: none; } .dm-sent .arr-side { display: inline; } }
.typing { display: flex; gap: 4px; margin: 0; padding: 10px 12px; width: max-content; border-radius: 16px; background: var(--surface-3); flex: none; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: dot 0.9s var(--ease-std) infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; }
  .typing i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes dot { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.bench-bot [data-part].is-off { display: none; }
/* Sin JavaScript: estado final estático; los controles y sus instrucciones no se muestran (DESIGN §5.6) */
html:not(.js) .typing, html:not(.js) .bot-inputs, html:not(.js) .bench .seg, html:not(.js) [data-send],
html:not(.js) .dash-filters, html:not(.js) .ib-actions, html:not(.js) .ib-compose, html:not(.js) .ib-resolve,
html:not(.js) .dash-view, html:not(.js) .ib-back { display: none !important; }

/* Ruta del teléfono a la bandeja: curva del logo (DESIGN §3.3) */
.route { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.route-path { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; transition: stroke var(--dur-2) var(--ease-std); }
.route.is-on .route-path { stroke: var(--green); }

/* Laptop y bandeja */
/* Portátil en todos los anchos: tapa con bisel y cámara, pantalla, y una base más ancha con su muesca y sombra */
.laptop { width: 100%; min-width: 0; padding: 0 3.5% 10px; }
.laptop-lid {
  position: relative; padding: 9px 7px 8px; background: #151916;
  border: 1px solid var(--line-2); border-radius: 12px 12px 3px 3px; box-shadow: var(--shadow-float);
}
.laptop-lid::before { content: ""; position: absolute; top: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #2c332e; }
.laptop-screen { min-width: 0; background: #000; border-radius: 3px; overflow: hidden; }
.laptop-screen .inbox { border: 0; border-radius: 0; }
.laptop-base {
  display: block; position: relative; height: 12px; margin: 0 -3.6%;
  background: linear-gradient(to bottom, #343c37 0, #20261f 2px, #181d19 55%, #0f1210 100%);
  border: 1px solid var(--line-2); border-top-color: #48514b; border-radius: 1px 1px 12px 12px / 1px 1px 10px 10px;
  box-shadow: 0 12px 16px -10px rgba(0, 0, 0, 0.9);
}
.laptop-base::before {
  content: ""; position: absolute; top: -1px; left: 50%; width: 18%; height: 4px; transform: translateX(-50%);
  background: #0b0d0c; border-radius: 0 0 6px 6px;
}
.inbox-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-3); margin: 0; width: 100%; font-size: var(--fs-small); color: var(--text-2); }
.inbox-cap-title { font-weight: 600; color: var(--text); }
.inbox-cap .bench-status .gota { color: var(--muted); }
.bench-bot.inbox-active .inbox-cap .bench-status .gota { color: var(--green); }
.bench-bot.inbox-done .inbox-cap .bench-status .gota { display: none; }
.bench-bot.inbox-done .inbox-cap .bench-status .i-check { display: block; }

.inbox {
  display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0;
  background: #0c0f0d; border: 1px solid var(--line-2); border-radius: var(--r-inner); overflow: hidden;
  font-size: 14px; line-height: 1.4; color: var(--text); text-align: left;
}
.ib-list { border-right: 1px solid var(--line); min-width: 0; }
.ib-list-title { margin: 0; padding: 12px 14px; font: 600 14px/1.3 var(--font-body); border-bottom: 1px solid var(--line); }
.ib-convs { list-style: none; display: flex; flex-direction: column; }
.ib-row { border-bottom: 1px solid var(--line); }
.ib-conv:focus-visible { outline-offset: -3px; border-radius: 0; }
.ib-conv {
  display: grid; grid-template-columns: 12px 26px minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  width: 100%; min-height: 62px; padding: 8px 12px; text-align: left;
  background: none; border: 0; color: var(--text); font-size: 13px;
  transition: background-color var(--dur-2) var(--ease-std);
}
button.ib-conv:hover { background: var(--surface-3); }
.ib-conv .gota { color: var(--data-muted); }
.ib-conv.is-new .gota { color: var(--green); }
.ib-conv .gota.is-pending { color: var(--data-muted); }
.ib-conv.is-active { background: rgba(255, 255, 255, 0.04); box-shadow: inset 2px 0 0 var(--green); }
.ib-conv.is-unread { background: var(--green-a15); }
.ib-conv-main { display: flex; flex-direction: column; min-width: 0; }
.ib-conv-main b { font-weight: 600; }
.ib-prev { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--muted); }
.ib-new { display: none; padding: 0 6px; border-radius: var(--r-tag); border: 1px solid var(--green); color: var(--text); font-size: 12px; }
.ib-conv.is-new .ib-new { display: inline-block; }
.ib-done { display: none; width: 14px; height: 14px; color: var(--green); }
.ib-conv.is-resolved .ib-done { display: block; }
.ib-conv.is-resolved .ib-new { display: none; }
.ib-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ib-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); min-height: 56px; }
.ib-who { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-2); }
.ib-who b { color: var(--text); }
.ib-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 0; background: none; border: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.ib-back svg { width: 16px; height: 16px; }
.ib-resolve { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: transparent; border: 1px solid var(--border-control); border-radius: var(--r-pill); font-size: 13px; }
.ib-resolve svg { width: 14px; height: 14px; }
.ib-resolve:hover { background: var(--surface-3); }
.ib-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.ib-actions-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ib-assign { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ib-assign select { height: 44px; font-size: 13px; padding: 0 30px 0 10px; background-position: right 10px center; }
.ib-ctx { margin: 8px 14px 0; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.ib-ctx b { color: var(--text); font-weight: 600; }
.ib-msgs {
  flex: 1 1 auto; min-height: 70px; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
}
.ib-msgs::before { content: ""; margin-top: auto; }    /* los mensajes se apilan abajo, como en un chat */
.dm-thread:focus-visible, .ib-msgs:focus-visible { -webkit-mask-image: none; mask-image: none; outline-offset: -3px; }
.m { margin: 0; max-width: 80%; padding: 7px 10px; border-radius: 12px; font-size: 13px; flex: none; }
.m-in { background: var(--surface-3); border-bottom-left-radius: 4px; }
.m-out { align-self: flex-end; background: #123a24; border-bottom-right-radius: 4px; }
.m-out small { display: block; font-size: 12px; color: var(--mint); }
.ib-compose { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); }
.ib-qr-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; background: var(--surface-3); border: 1px solid var(--border-control); border-radius: var(--r-pill); font-size: 13px; font-weight: 500; }
.ib-qr-btn svg { width: 14px; height: 14px; transform: rotate(180deg); }
.ib-qr-btn[aria-expanded="true"] svg { transform: none; }
.ib-input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-qr { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); z-index: 5; list-style: none; padding: 6px; background: var(--surface-3); border: 1px solid var(--border-control); border-radius: var(--r-inner); box-shadow: var(--shadow-float); }
.ib-qr button { display: block; width: 100%; min-height: 44px; padding: 6px 8px; text-align: left; background: none; border: 0; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.ib-qr button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.ib-qr b { color: var(--text); font-weight: 600; }
.ib-note { margin: 0; padding: 6px 14px 10px; font-size: 12px; color: var(--muted); }

/* Bandeja estrecha (< 700 px): lista primero, hilo al tocar (DESIGN §5.8). Sin JS se ven las dos. */
.js .inbox[data-view="list"] .ib-thread, .js .inbox[data-view="thread"] .ib-list { display: none; }
@media (min-width: 700px) {
  .inbox { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); height: 440px; }
  .inbox .ib-list, .inbox .ib-thread { display: flex !important; flex-direction: column; min-height: 0; }
  .inbox .ib-back { display: none !important; }
  .ib-convs { overflow: hidden; }
}
.js .bench-bot[data-state="static"] [data-conv="visitor"] { display: none; }

/* Estado inicial con JS (antes de cargar el módulo): la misma geometría que el estado de reposo */
.js .bench-bot[data-state="static"] [data-part] { display: none; }
.js .bench-bot[data-state="static"] .phone[data-view] .post-view { opacity: 1; visibility: visible; transform: none; }
.js .bench-bot[data-state="static"] .phone .dm-view { opacity: 0; visibility: hidden; }

/* Tableta y portátil estrecho (700-1279 px): teléfono a la izquierda, controles y bitácora a su lado;
   la bandeja debajo a todo el ancho (con marco de portátil desde 1040 px) */
@media (min-width: 700px) and (max-width: 1279.98px) {
  .bench-bot { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); column-gap: var(--sp-5); align-items: start; }
  .bench-bot > .bench-head { grid-column: 1 / -1; grid-row: 1; }
  .bench-bot > .stage-bot { grid-column: 1; grid-row: 2 / span 2; }
  .bench-bot > .bench-controls { grid-column: 2; grid-row: 2; margin-top: 0; }
  .bench-bot > .bench-logbox { grid-column: 2; grid-row: 3; align-self: start; }
  .bench-bot > .bot-inbox { grid-column: 1 / -1; grid-row: 4; }
  .bench-bot > .bench-error { grid-column: 1 / -1; grid-row: 5; }
}
@media (min-width: 1040px) {
  .laptop-lid { padding: 13px 10px 10px; border-radius: 16px 16px 4px 4px; }
  .laptop-lid::before { top: 5px; }
  .laptop-screen { border-radius: 4px; }
  .laptop-base { height: 16px; border-radius: 1px 1px 16px 16px / 1px 1px 14px 14px; }
  .laptop-base::before { height: 5px; }
}
@media (min-width: 1280px) {
  /* Escritorio ancho: teléfono y portátil en una sola fila del banco; el panel del escenario lo dibuja ::before */
  .bench-bot { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); column-gap: clamp(48px, 7vw, 96px); }
  .bench-bot::before { content: ""; grid-row: 2; grid-column: 1 / -1; background: var(--surface-2); border-radius: var(--r-inner); }
  .bench-bot > .bench-head, .bench-bot > .bench-controls, .bench-bot > .bench-logbox, .bench-bot > .bench-error { grid-column: 1 / -1; }
  .bench-bot > .bench-head { grid-row: 1; }
  .bench-bot > .stage-bot { grid-row: 2; grid-column: 1; position: relative; z-index: 1; align-self: center; background: none; padding: 32px 0 32px clamp(20px, 2.4vw, 32px); }
  .bench-bot > .bot-inbox { grid-row: 2; grid-column: 2; position: relative; z-index: 1; align-self: center; margin: 0; padding: 32px clamp(20px, 2.4vw, 32px) 24px 0; }
  .bench-bot > .route { display: block; position: absolute; grid-row: 2; grid-column: 1 / -1; inset: 0; z-index: 1; }
  .bench-bot > .bench-controls { grid-row: 3; }
  .bench-bot > .bench-logbox { grid-row: 4; }
  .bench-bot > .bench-error { grid-row: 5; }
  .bot-inbox .inbox-cap { order: 2; }
  .stage-bot .phone { width: 100%; height: 520px; }
  .laptop-screen .inbox { height: 500px; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); }
  .controls-bot { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-7); align-items: end; }
  .controls-bot .bench-instr { grid-column: 1 / -1; }
  .comment-form { max-width: 34rem; }
}
.bot-inputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-4); }
@media (min-width: 1280px) { .bot-inputs { margin: 0; } }

/* ---------- Pieza 03 · Antes y después ---------- */
.stage-compare { padding: var(--sp-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.cmp { position: relative; display: grid; grid-template-columns: 1fr; gap: var(--sp-4); justify-items: center; }
.cmp-shot { position: relative; margin: 0; width: min(100%, 300px); aspect-ratio: 375 / 700; max-height: 62svh; border-radius: 22px; border: 6px solid #000; outline: 1px solid var(--line-2); overflow: hidden; background: #000; }
/* Rótulos: fuera de la pantalla con JS (una fila encima del marco); sin JS, abajo dentro de cada captura */
.cmp-tags { display: none; }
.js .bench-compare:not([data-state="error"]) .cmp-tags {
  display: flex; justify-content: space-between; width: min(100%, 300px); margin: 0 auto -8px;
  font: 600 12px/1.5 var(--font-body); color: var(--text-2);
}
.cmp-tag { position: absolute; bottom: 8px; z-index: 3; padding: 2px 8px; border-radius: var(--r-tag); background: rgba(0, 0, 0, 0.78); color: #fff; font: 600 12px/1.5 var(--font-body); }
.cmp-before .cmp-tag { left: 8px; }
.cmp-after .cmp-tag { right: 8px; }
.js .bench-compare:not([data-state="error"]) .cmp-tag { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cmp-divider { display: none; }
.cmp-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.js .bench-compare:not([data-state="error"]) .cmp { touch-action: pan-y; cursor: ew-resize; }
.hotspot {
  position: absolute; z-index: 4; width: 44px; height: 44px; padding: 0; margin: -22px 0 0 -22px;
  display: grid; place-items: center; background: none; border: 0; color: #000; font: 700 12px/1 var(--font-body);
  isolation: isolate;
}
.hotspot::before { content: ""; position: absolute; z-index: -1; width: 24px; height: 24px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px #000; }
/* Sobre la portada nueva (375 × 700): 1 la línea del precio al mayor, 2 el botón de WhatsApp, 3 junto al titular.
   Siempre a ≥ 8 px del borde derecho, para que el anillo de foco no se recorte. */
.hs-1 { left: 86%; top: 91%; anchor-name: --hs1; }
.hs-2 { left: 86%; top: 76%; anchor-name: --hs2; }
.hs-3 { left: 80%; top: 37%; anchor-name: --hs3; }
.hotspot.is-on::before { box-shadow: 0 0 0 2px #000, 0 0 0 5px var(--green-a30); }
/* El globo sale junto a su punto (anclaje CSS) y nunca oscurece la página */
#hs-web-1 { position-anchor: --hs1; }
#hs-web-2 { position-anchor: --hs2; }
#hs-web-3 { position-anchor: --hs3; }
.hs-pop {
  position: fixed; inset: auto; margin: 0 8px; position-area: left center; position-try-fallbacks: flip-inline, flip-block;
  padding: 10px 12px; max-width: min(260px, calc(100vw - 32px)); background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border-control); border-radius: var(--r-inner); font-size: var(--fs-small); box-shadow: var(--shadow-float);
}
@supports not (anchor-name: --a) {
  .hs-pop { inset: auto 16px 16px 16px; margin: 0; max-width: none; }
}
.hs-pop::backdrop { background: transparent; }
.cmp-notes { display: grid; gap: 6px; align-content: start; font-size: var(--fs-small); color: var(--text-2); }
.cmp-notes-title { margin: 6px 0 0; font-weight: 600; color: var(--text); }
.cmp-list { list-style: none; counter-reset: diff; display: grid; gap: 6px; }
.cmp-list li { position: relative; padding-left: 30px; counter-increment: diff; }
.cmp-list li::before { content: counter(diff); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border-control); font: 600 12px/1 var(--font-body); color: var(--text); }
.cmp-list-before li::before { content: "–"; }
.cmp-list li.is-on { border-radius: 6px; background: var(--green-a15); box-shadow: 0 0 0 4px var(--green-a15); color: var(--text); }
.cmp-list li.is-on::before { border-color: var(--green); }
.cmp-more { margin: var(--sp-2) 0 0; line-height: 1.55; }
.cmp-cap { margin: var(--sp-2) 0 0; font-size: var(--fs-label); line-height: 1.5; color: var(--muted); }
.cmp-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); min-width: 0; }
.controls-compare { margin: 0; }
/* < 1040 px: la pista mide lo mismo que el teléfono, así control y divisor se sienten unidos */
@media (max-width: 1039.98px) {
  .controls-compare { width: min(100%, 300px); margin-inline: auto; }
}
/* 700-1039 px: teléfono y notas en dos columnas (sin 230 px vacíos a cada lado) */
@media (min-width: 700px) and (max-width: 1039.98px) {
  .js .bench-compare:not([data-state="error"]) .stage-compare { grid-template-columns: 300px minmax(0, 1fr); column-gap: var(--sp-6); align-items: start; }
}
/* Pista a todo el ancho bajo la imagen; los botones en sus extremos, debajo */
.cmp-track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4px var(--sp-3); }
.cmp-track .cmp-range { grid-row: 1; grid-column: 1 / -1; }
.cmp-track [data-show="before"] { grid-row: 2; grid-column: 1; justify-self: start; }
.cmp-track [data-show="after"] { grid-row: 2; grid-column: 2; justify-self: end; }
.cmp-track .btn { max-width: 100%; }
.cmp-range { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.cmp-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--border-control); }
.cmp-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--border-control); }
.cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 30px; margin-top: -13px; border-radius: var(--r-pill); border: 1px solid var(--text-2); background: var(--surface-3) url("/assets/handle.svg") center / 28px 14px no-repeat; }
.cmp-range::-moz-range-thumb { width: 44px; height: 30px; border-radius: var(--r-pill); border: 1px solid var(--text-2); background: var(--surface-3) url("/assets/handle.svg") center / 28px 14px no-repeat; }
.cmp-range:focus-visible { outline-offset: 2px; }
/* Con JS: un solo marco de teléfono; las dos pantallas superpuestas, "Después" encima y recortada con --pos.
   La línea divisoria vive dentro del marco (nunca se dibuja fuera de la pantalla). */
.js .bench-compare:not([data-state="error"]) .cmp {
  display: block; margin-inline: auto; width: min(100%, 300px); aspect-ratio: 375 / 700; max-height: 62svh;
  border: 6px solid #000; border-radius: 22px; outline: 1px solid var(--line-2); overflow: hidden; background: #000;
}
.js .bench-compare:not([data-state="error"]) .cmp-shot { position: absolute; inset: 0; width: auto; max-height: none; aspect-ratio: auto; border: 0; outline: 0; border-radius: 0; }
.js .bench-compare:not([data-state="error"]) .cmp-after { clip-path: inset(0 0 0 var(--pos, 3%)); }
.js .bench-compare:not([data-state="error"]) .cmp-divider {
  display: block; position: absolute; top: 0; bottom: 0; left: var(--pos, 3%); z-index: 5; width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none;
}
html:not(.js) .controls-compare, .bench-compare[data-state="error"] .controls-compare { display: none; }
@media (min-width: 700px) {
  html:not(.js) .cmp, .bench-compare[data-state="error"] .cmp { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1040px) {
  .stage-compare { grid-template-columns: 280px minmax(0, 1fr); column-gap: var(--sp-6); align-items: start; padding: var(--sp-5); }
  .cmp-shot, .js .bench-compare:not([data-state="error"]) .cmp, .js .bench-compare:not([data-state="error"]) .cmp-tags { width: 280px; }
  /* Sin JavaScript (o si el módulo no carga): las dos pantallas lado a lado ocupan el ancho y las notas van debajo */
  html:not(.js) .stage-compare, .bench-compare[data-state="error"] .stage-compare { grid-template-columns: minmax(0, 1fr); }
  html:not(.js) .cmp, .bench-compare[data-state="error"] .cmp { grid-template-columns: repeat(2, 280px); justify-content: start; }
}

/* ---------- Pieza 04 · Automatización ---------- */
.controls-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin: 0 0 var(--sp-4); }
.controls-flow .bench-instr { margin: 0; }
.order-card { padding: 12px 14px; border-radius: var(--r-inner); background: var(--surface-2); border: 1px solid var(--line-2); }
.order-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.order-title svg { width: 18px; height: 18px; color: var(--text-2); }
.order-line { margin: 0; font-size: var(--fs-small); color: var(--text-2); }
.controls-flow .btn { justify-self: start; max-width: 100%; }
.stage-flow { padding: var(--sp-5) var(--sp-4); }
.flow { list-style: none; position: relative; display: grid; gap: var(--sp-5); }
.flow::before { content: ""; position: absolute; left: 19.5px; top: 20px; bottom: 20px; width: 1px; background: var(--line-2); }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--sp-4); align-items: start; align-content: start; }
.station {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-1); border: 1px solid var(--border-control); color: var(--text-2);
  transition: border-color var(--dur-2) var(--ease-std), color var(--dur-2) var(--ease-std);
}
.station svg { width: 20px; height: 20px; }
.step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.step-title { font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--text); }
.step-detail { font-size: var(--fs-mono); line-height: 1.45; color: var(--muted); }
/* El detalle del pago cambia de texto (estático, reposo, esperando): reserva dos líneas para que el banco no cambie de alto */
.step[data-step="2"] .step-detail { min-height: calc(2 * 1.45 * var(--fs-mono)); }
.step-state { font: 400 var(--fs-mono)/1.5 var(--font-mono); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.step-state::before { content: ""; width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: url("/assets/dot.svg") center / 12px 12px no-repeat; mask: url("/assets/dot.svg") center / 12px 12px no-repeat; opacity: 0.6; }
.step.is-running .station { border-color: var(--green); color: var(--green); }
.step.is-running .step-state { color: var(--text); }
.step.is-running .step-state::before { background: var(--green); opacity: 1; }
.step.is-done .station { border-color: var(--green); color: var(--green); }
.step.is-done .step-state::before { -webkit-mask-image: url("/assets/check.svg"); mask-image: url("/assets/check.svg"); background: var(--green); opacity: 1; }
.step.is-waiting .station { border-color: var(--text-2); color: var(--text); }
.step.is-waiting .step-state::before { -webkit-mask-image: url("/assets/clock.svg"); mask-image: url("/assets/clock.svg"); opacity: 1; }
.step-verify { margin-top: 6px; align-self: flex-start; }
.flow-note { margin: var(--sp-5) 0 0; font-size: var(--fs-label); color: var(--muted); max-width: 66ch; }
.flow-link { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; display: none; }
.flow-link path { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; transition: stroke var(--dur-2) var(--ease-std); }
.flow-link path.is-on { stroke: var(--green); }
.js .bench-flow[data-state="static"] .step .station { border-color: var(--border-control); color: var(--text-2); }
.js .bench-flow[data-state="static"] .step .step-state { visibility: hidden; }
@media (min-width: 700px) {
  .controls-flow { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--sp-5); }
  .controls-flow .bench-instr { grid-column: 1 / -1; }
  .controls-flow .order-card { grid-column: 1 / -1; justify-self: start; }
}
@media (min-width: 1040px) {
  .controls-flow { grid-template-columns: auto auto 1fr; align-items: end; }
  .controls-flow .order-card { grid-column: auto; }
  .controls-flow .btn { justify-self: start; }
  .stage-flow { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
  /* El botón "Verificar pago" tiene su sitio reservado bajo el paso 2: la fila no cambia de alto al aparecer */
  .step[data-step="2"] .step-body { position: relative; padding-bottom: 50px; }
  .step-verify { position: absolute; left: 0; bottom: 0; margin: 0; }
  .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--sp-4); }
  .flow::before { display: none; }
  .flow-link { display: block; }
  .step { grid-template-columns: 1fr; row-gap: var(--sp-3); }
  .step-body { padding: 0; }
}

/* ---------- Pieza 05 · Panel ---------- */
.controls-dash { margin: 0 0 var(--sp-4); }
.dash-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.stage-dash { padding: var(--sp-4); min-height: 520px; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.dash-title { margin: 0; font: 600 var(--fs-small)/1.3 var(--font-body); }
.dash-summary { margin: 0 0 var(--sp-4); font-size: var(--fs-label); color: var(--muted); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.kpi { padding: 12px; border-radius: var(--r-inner); background: var(--surface-1); border: 1px solid var(--line); min-width: 0; }
.kpi dt { font-size: 0.8125rem; color: var(--muted); }
.kpi dd { margin: 0; }
.kpi-val { font: 700 clamp(1.375rem, 2.4vw, 2rem)/1.15 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); transition: opacity var(--dur-1) var(--ease-std); }
.kpi-val[data-kpi="top"] { font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.2; padding-top: 0.2em; }
.kpi-val.is-swapping { opacity: 0.35; }
.kpi-var { font-size: 0.8125rem; color: var(--text-2); }
.charts { position: relative; display: grid; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.chart { margin: 0; min-width: 0; }
.chart figcaption { font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--text-2); margin-bottom: var(--sp-2); }
.bars-v {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 2px;
  height: 150px; padding-bottom: 22px;
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat,
              linear-gradient(var(--line), var(--line)) 0 calc((100% - 22px) / 2) / 100% 1px no-repeat,
              linear-gradient(var(--line-2), var(--line-2)) 0 calc(100% - 22px) / 100% 1px no-repeat;
}
.bar-v { position: relative; flex: 1 1 0; display: flex; justify-content: center; height: 100%; }
.bar-v i {
  position: absolute; bottom: 0; width: min(60%, 28px); height: calc(var(--h, 0) * 100%);
  background: var(--data-1); border-radius: 4px 4px 0 0;
  transition: height 240ms var(--ease-std);
}
.bar-v span { position: absolute; bottom: -20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bars-v .bar-v:nth-child(even) span.is-thin { visibility: hidden; }
.bars-h { display: grid; gap: 8px; }
.bar-h { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: var(--sp-2); font-size: 12px; color: var(--text-2); }
.bar-h b { position: relative; display: flex; align-items: center; height: 18px; font-weight: 400; }
.bar-h b i { display: block; height: 100%; width: calc(var(--w, 0) * (100% - 4.5rem)); background: var(--data-1); border-radius: 0 4px 4px 0; transition: width 240ms var(--ease-std), background-color var(--dur-1); }
.bar-h b em { font-style: normal; margin-left: 6px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-h.is-muted b i { background: var(--data-muted); }
/* Alturas del estado inicial (30 días), escritas por tools/v2-static.mjs con los mismos datos que usa el módulo */
/* v2-static:bars */
.bars-v .bar-v:nth-child(1) i { --h: 0.985; }
.bars-v .bar-v:nth-child(2) i { --h: 0.949; }
.bars-v .bar-v:nth-child(3) i { --h: 1; }
.bars-v .bar-v:nth-child(4) i { --h: 0.928; }
.bars-v .bar-v:nth-child(5) i { --h: 0.958; }
.bars-h .bar-h:nth-child(1) b i { --w: 1; }
.bars-h .bar-h:nth-child(2) b i { --w: 0.756; }
.bars-h .bar-h:nth-child(3) b i { --w: 0.62; }
.bars-h .bar-h:nth-child(4) b i { --w: 0.47; }
/* /v2-static:bars */
.chart-tip { position: absolute; z-index: 5; margin: 0; padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--border-control); border-radius: 8px; font-size: 12px; color: var(--text); pointer-events: none; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); left: var(--tx, 0); top: var(--ty, 0); }
.dash-view { margin: 0 0 var(--sp-4); }
/* La tabla nunca desborda la página (espaciado de texto ampliado, WCAG 1.4.12): se desplaza dentro de su caja */
.dash-table-wrap { overflow-x: auto; border-radius: 4px; }
.dash-table, .chart-tables table { width: 100%; border-collapse: collapse; font-size: var(--fs-label); }
.dash-table caption, .chart-tables caption { text-align: left; font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--text-2); padding-bottom: 6px; }
.dash-table th, .dash-table td, .chart-tables th, .chart-tables td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.dash-table th[scope="row"], .dash-table thead th:first-child, .chart-tables th[scope="row"], .chart-tables thead th:first-child { text-align: left; font-weight: 400; color: var(--text); overflow-wrap: anywhere; }
.dash-table thead th, .chart-tables thead th { color: var(--muted); font-weight: 500; }
.chart-tables { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-4); }
@media (max-width: 419.98px) {
  .dash-table th, .dash-table td, .chart-tables th, .chart-tables td { padding: 7px 4px; }
}
@media (prefers-reduced-motion: reduce) { .bar-v i, .bar-h b i { transition: none; } }
@media (min-width: 700px) {
  .dash-filters { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: var(--sp-4); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .charts { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: var(--sp-5); }
}
@media (min-width: 1040px) {
  .dash-filters { grid-template-columns: 1fr 1fr; }
  .dash-filters .seg { grid-column: 1 / -1; }
  .stage-dash { padding: var(--sp-5); }
  .charts { grid-template-columns: 1fr; }
}
@media (min-width: 1280px) {
  .dash-filters { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .dash-filters .seg { grid-column: auto; }
  .charts { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

/* ---------- Fila 05 · Recorrido por la app (DESIGN §5.17) ---------- */
.bench-tour { padding-bottom: clamp(12px, 2vw, 24px); }
.tabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.tabs [role="tab"] {
  min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: transparent;
  border: 1px solid var(--border-control); color: var(--text); font: 500 var(--fs-small)/1 var(--font-body);
}
.tabs [role="tab"]:hover { background: var(--surface-3); }
.tabs [role="tab"][aria-selected="true"] { background: var(--green-a15); border-color: var(--green); }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 6px; }
.tabs [role="tab"]::before {
  content: ""; flex: none; width: 12px; height: 12px; background: transparent;
  -webkit-mask: url("/assets/check.svg") center / 12px 12px no-repeat; mask: url("/assets/check.svg") center / 12px 12px no-repeat;
}
.tabs [role="tab"][aria-selected="true"]::before { background: var(--green); }
html:not(.js) .tour .tabs { display: none; }
.tab-panel + .tab-panel { margin-top: var(--sp-5); }
.js .tour .tab-panel + .tab-panel { margin-top: 0; }
/* Antes de que llegue el módulo, con JS ya se pinta la geometría final: pestañas y solo la primera pantalla */
.js .bench-tour[data-state="static"] .tab-panel + .tab-panel { display: none; }
.tab-name { margin: 0 0 var(--sp-2); font-weight: 600; font-size: var(--fs-small); }
.js .tour .tab-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-frame { margin: 0; border: 1px solid var(--line-2); border-radius: var(--r-inner); overflow: hidden; background: #0c0f0d; }
.app-url { margin: 0; padding: 7px 12px; border-bottom: 1px solid var(--line); font: 400 13px/1.3 var(--font-body); color: var(--muted); }
.app-frame figcaption { padding: 10px 12px; border-top: 1px solid var(--line); font-size: var(--fs-label); color: var(--text-2); }
.app-screen { min-height: 250px; font-size: 12px; line-height: 1.4; color: var(--text-2); }
.app-conv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.ac-side { display: none; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); background: #0a0c0b; }
.ac-item { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 6px; }
.ac-item.is-on { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.ac-item i { font-style: normal; color: var(--muted); }
.ac-sep { margin-top: 8px; padding: 4px 8px; color: var(--muted); }
.ac-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.ac-conv { display: block; padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-conv b { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 600; }
.ac-conv.is-on { background: rgba(255, 255, 255, 0.04); box-shadow: inset 2px 0 0 var(--green); }
.ac-thread { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.ac-ctx { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); }
.ac-msg { align-self: flex-start; max-width: 90%; padding: 6px 9px; border-radius: 10px; background: var(--surface-3); color: var(--text); }
.ac-out { align-self: flex-end; background: #123a24; }
.ac-tags i { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--green); font-style: normal; color: var(--text); }
@media (min-width: 700px) { .app-conv { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.5fr); } .ac-side { display: flex; } }
.app-prod { padding: 12px; }
.ap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ap-head b { color: var(--text); font-size: 13px; }
.ap-btn { padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--border-control); color: var(--text); }
.ap-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 0.7fr) minmax(0, 1.6fr) 40px; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ap-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row span:first-child { color: var(--text); }
.ap-th { color: var(--muted); }
.ap-th span:first-child { color: var(--muted); }
.ap-on, .ap-off { justify-self: end; width: 30px; height: 18px; border-radius: 9px; background: var(--green); position: relative; }
.ap-on::after, .ap-off::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #000; }
.ap-off { background: var(--data-muted); }
.ap-off::after { right: auto; left: 2px; }
@media (max-width: 699.98px) { .ap-row { grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) 40px; } .ap-row span:nth-child(3) { display: none; } }
.app-stats { padding: 12px; display: grid; gap: 12px; }
.as-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.as-kpis span { display: flex; flex-direction: column; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-1); }
.as-kpis span { min-width: 0; }
.as-kpis i { font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.as-kpis b { font: 700 1.25rem/1.2 var(--font-display); color: var(--text); }
.as-top { display: grid; gap: 6px; }
.as-top b { color: var(--text); font-weight: 600; }
.as-bar { position: relative; height: 22px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.as-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; background: var(--data-1); opacity: 0.85; }
.as-b1::before { width: 88%; } .as-b2::before { width: 54%; } .as-b3::before { width: 37%; }
.as-bar i { position: relative; z-index: 1; display: block; padding: 3px 8px; font-style: normal; color: #000; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-foot { margin: var(--sp-3) 0 0; font-size: var(--fs-label); color: var(--muted); }
.taller-note { margin: var(--sp-8) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 1040px) { .taller-note { margin-left: var(--sp-7); } }

/* ---------- Cómo trabajamos: línea axón (DESIGN §3.6) ---------- */
.axon { list-style: none; position: relative; display: grid; gap: var(--sp-6); counter-reset: none; }
.axon::before { content: ""; position: absolute; left: 19.5px; top: 20px; bottom: 28px; width: 1px; background: var(--line-2); }
.axon li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--sp-4); align-content: start; }
.axon .station { grid-row: span 2; font: 600 1rem/1 var(--font-display); color: var(--text); }
.axon h3 { font-size: var(--fs-h4); line-height: 1.2; letter-spacing: -0.01em; margin: 8px 0 6px; }
.axon p { margin: 0; color: var(--text-2); max-width: 40ch; }
.axon-end { position: absolute; left: 14px; bottom: -22px; }
.process-more { display: grid; gap: var(--sp-8); margin-top: var(--sp-8); }
.sub-title { font-size: var(--fs-h4); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: var(--sp-4); }
.promise-list { list-style: none; display: grid; gap: var(--sp-4); }
.promise-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: var(--sp-3); }
.promise-list .gota { margin-top: 7px; }
.promise-list p { margin: 0; color: var(--text-2); }
.promise-list strong { color: var(--text); font-weight: 600; }
.after-launch { padding: clamp(20px, 3vw, 32px); border-radius: var(--r-card); background: var(--surface-1); border: 1px solid var(--line); }
.after-launch p:not(.label) { color: var(--text-2); }
.after-launch p:last-child { margin: 0; }
@media (min-width: 1040px) {
  .axon { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--sp-6); }
  .axon::before { left: 20px; right: 20px; top: 19.5px; bottom: auto; width: auto; height: 1px; }
  .axon li { grid-template-columns: 1fr; }
  .axon .station { grid-row: auto; }
  .axon h3 { margin-top: var(--sp-4); }
  .axon-end { left: auto; right: -6px; top: 14px; bottom: auto; }
  .axon li:last-child::after { content: ""; position: absolute; left: 40px; right: 12px; top: 19.5px; height: 1px; background: var(--line-2); }
  .process-more { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--sp-7); }
}

/* ---------- Diagnóstico ---------- */
@media (max-width: 359.98px) {
  .btn { white-space: normal; text-align: center; }
}
/* A medida: "¿No ves lo que necesitas? Lo diseñamos para ti." */
.custom-card { display: grid; gap: var(--sp-5); padding: clamp(24px, 4vw, 44px); background: linear-gradient(135deg, rgba(16, 207, 97, 0.08), transparent 60%), var(--surface-1); border: 1px solid var(--line); border-left: 2px solid var(--green); border-radius: var(--r-card); }
.custom-main h2 { margin-bottom: var(--sp-3); font-size: clamp(1.75rem, 3.2vw, 2.5rem); text-wrap: balance; }
.custom-main p:last-child { margin: 0; max-width: 60ch; color: var(--text-2); }
.custom-actions { margin: 0; }
@media (min-width: 1040px) { .custom-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-8); } }

.offer-card > * { min-width: 0; }
.offer-card { display: grid; gap: var(--sp-6); padding: clamp(24px, 4vw, 48px); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); }
/* H2 de tarjeta: un poco menor que el de sección, para que "Diagnóstico gratis: | 30 minutos y un plan claro" quepa en dos líneas */
.offer-main h2 { margin-bottom: var(--sp-4); font-size: clamp(1.875rem, 3.3vw, 2.875rem); }
.offer-main p { color: var(--text-2); max-width: 44ch; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-5); }
.offer-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.drop-list { list-style: none; display: grid; gap: var(--sp-3); }
.drop-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: var(--sp-3); color: var(--text-2); }
.drop-list .gota { margin-top: 7px; }
@media (min-width: 1040px) { .offer-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--sp-8); align-items: center; } }

/* ---------- Preguntas (DESIGN §5.15) ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font: 600 1.125rem/1.35 var(--font-body); color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--mint); }
.faq-icon { width: 20px; height: 20px; flex: none; color: var(--text-2); transition: transform var(--dur-2) var(--ease-std); }
.faq details[open] .faq-icon { transform: rotate(180deg); }
.answer p { margin: 0 0 var(--sp-5); color: var(--text-2); max-width: 66ch; }
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    .faq { interpolate-size: allow-keywords; }
    .faq details::details-content { height: 0; overflow: clip; transition: height var(--dur-2) var(--ease-std), content-visibility var(--dur-2) allow-discrete; }
    .faq details[open]::details-content { height: auto; }
  }
}
@media (min-width: 1040px) {
  .faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-8); align-items: start; }
  .faq-grid .section-head { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}

/* ---------- Cierre ---------- */
.closing { text-align: center; }
.closing-inner { max-width: 46rem; }
.closing h2 { margin-bottom: var(--sp-4); }
.closing p { color: var(--text-2); margin-inline: auto; max-width: 40rem; }
/* La misma línea de la bitácora ("tu visita") cierra la página */
.closing-log { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 0 auto var(--sp-5) !important; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r-tag); background: var(--bg-2); font-size: var(--fs-small); line-height: 1.5; }
.closing-log .ls-stamp { font-size: var(--fs-mono); }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin: var(--sp-6) 0 var(--sp-5); }
.closing-mail { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-bottom: var(--sp-2) !important; color: var(--muted) !important; }
.closing-help { font-size: var(--fs-label); color: var(--muted) !important; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid var(--border-control); border-radius: var(--r-pill); color: var(--text-2); font: 500 var(--fs-label)/1 var(--font-body); }
.copy-btn:hover { background: var(--surface-3); color: var(--text); }
.copy-btn svg { width: 16px; height: 16px; }

/* ---------- Pie (DESIGN §5.18) ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: var(--sp-8) 0 var(--sp-6); font-size: var(--fs-small); }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand { margin-bottom: var(--sp-3); }
.footer-brand .brand img { width: 32px; height: 32px; }
.footer-brand .brand-word { display: inline; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.footer-origin { color: var(--text-2) !important; }
.footer-title { margin: 0 0 var(--sp-3); font: 600 var(--fs-small)/1.4 var(--font-body); color: var(--text); }
.footer-col ul { list-style: none; display: grid; gap: 6px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--mint); text-decoration: underline; text-decoration-color: var(--green-2); }
.footer-meta { margin: var(--sp-7) 0 0; padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-label); color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-5); margin: var(--sp-3) 0 0; font-size: var(--fs-label); color: var(--muted); }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }

/* ---------- Contacto flotante (DESIGN §5.12; apagado por bandera) ---------- */
.float-contact { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fc-chat { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 56px; height: 56px; padding: 0 18px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--green); color: var(--text); box-shadow: var(--shadow-float); text-decoration: none; font-weight: 600; }
.fc-chat svg { width: 22px; height: 22px; color: var(--green); }
.fc-chat .i-close { display: none; }
.fc-chat[aria-expanded="true"] .i-close { display: block; }
.fc-chat[aria-expanded="true"] .i-chat { display: none; }
.fc-alert { max-width: 280px; margin: 0; padding: 10px 12px; background: var(--surface-3); border: 1px solid var(--border-control); border-radius: var(--r-inner); font-size: var(--fs-label); }
@media (min-width: 700px) { .fc-label { display: none; } .fc-chat { padding: 0; width: 56px; } }
.float-contact.is-tucked { visibility: hidden; }

/* ---------- Páginas internas: hero, migas y componentes de contenido (generadas por tools/v2-build.mjs) ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(32px, 6vw, 72px)) 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); background: radial-gradient(120% 80% at 85% 0%, rgba(16, 207, 97, 0.07), transparent 60%), var(--bg); }
.page-hero h1 { max-width: 20ch; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.04; text-wrap: balance; }
.page-hero-legal h1 { max-width: 24ch; font-size: clamp(2rem, 4vw, 3rem); }
.page-lead { max-width: 40rem; margin: var(--sp-4) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.page-meta { margin: var(--sp-3) 0 0; font: 400 var(--fs-mono)/1.5 var(--font-mono); color: var(--muted); }
.page-note { max-width: 46rem; margin: var(--sp-3) 0 0; font-size: var(--fs-small); line-height: 1.55; color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-6) 0 0; }
.crumbs { margin-bottom: var(--sp-5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; font-size: var(--fs-label); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; color: var(--text-2); }
.crumbs [aria-current="page"] { color: var(--text); }
@media (max-width: 419.98px) { .page-actions .btn { width: 100%; } }

/* Tarjetas de contenido */
.pieces { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin: 0; padding: 0; }
.piece { display: flex; flex-direction: column; min-width: 0; padding: clamp(20px, 3vw, 28px); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); }
.piece h3 { font-size: var(--fs-h4); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--sp-2); text-wrap: balance; }
.piece h3 a { text-decoration: none; }
.piece h3 a:hover { color: var(--mint); }
.piece p { margin: 0; color: var(--text-2); line-height: 1.55; }
.piece p + p { margin-top: var(--sp-2); }
.piece ul { margin: var(--sp-3) 0 0; padding-left: 1.1em; color: var(--text-2); }
.piece-kicker { margin: 0 0 var(--sp-2) !important; font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--muted) !important; }
.piece-actions { margin-top: auto !important; padding-top: var(--sp-5); }
@media (min-width: 700px) { .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .pieces-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Tarjeta "A medida" al final de una rejilla de servicios: ocupa la fila entera y lleva el acento verde de .custom-card */
.piece-custom { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(16, 207, 97, 0.08), transparent 60%), var(--surface-1); border-left: 2px solid var(--green); }

/* Dos columnas: texto + tarjeta lateral */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.split-main > :last-child { margin-bottom: 0; }
.split-main .section-head { margin-bottom: var(--sp-5); }
.split-aside { align-self: start; padding: clamp(20px, 3vw, 28px); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--text-2); }
.split-aside > :last-child { margin-bottom: 0; }
.split-aside h3 { font-size: var(--fs-h4); line-height: 1.2; margin: 0 0 var(--sp-3); }
@media (min-width: 1040px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--sp-8); } }

/* Ficha, chips, nota y franja */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); column-gap: var(--sp-4); padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 var(--fs-label)/1.5 var(--font-body); color: var(--muted); }
.facts dd { margin: 0; color: var(--text); line-height: 1.5; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip-list li { padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-control); font-size: var(--fs-label); color: var(--text-2); }
.note { margin: var(--sp-5) 0 0; font-size: var(--fs-label); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.note a { color: var(--text-2); }
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-6); margin: var(--sp-8) 0 0; padding: clamp(18px, 3vw, 24px) clamp(20px, 3vw, 28px); background: var(--surface-1); border: 1px solid var(--line); border-left: 2px solid var(--green); border-radius: var(--r-inner); }
.strip p { margin: 0; max-width: 60ch; color: var(--text-2); }
.strip strong { color: var(--text); font-weight: 600; }
.strip a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.prose { max-width: 46rem; color: var(--text-2); line-height: 1.65; }
.prose h3 { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-h4); line-height: 1.2; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
/* Pasos: tantas columnas como pasos (3 a 5) en escritorio */
@media (min-width: 1040px) {
  .axon:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .axon:has(> li:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--sp-5); }
}
/* Una pieza del taller dentro de una sección de página interna */
.section .bench { margin-top: var(--sp-2); }
.bench-end { display: block; height: 0; }
.bench-end + *, .section .container > .drop-list + *, .section .container > .promise-list + *, .split-main > .drop-list + *, .pieces + p, .axon + p { margin-top: var(--sp-6); }
.section .container > .bench-end + .drop-list, .section .container > .bench-end + .promise-list { max-width: 60rem; }
.section .cases { margin-top: var(--sp-2); }


/* Proyectos (/proyectos/): cada caso con la misma cabecera que la portada (captura | ficha), el riel a lo ancho y su pieza */
.work-case .case-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); align-items: center; }
.work-case .case-head-media .shot { border: 1px solid var(--line); border-radius: var(--r-card); }
.work-case .case-head-body .section-lead { margin: var(--sp-3) 0 var(--sp-5); }
.work-case .facts { margin-top: 0; }
.case-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; text-wrap: balance; }
.case-title .case-logo { height: 30px; }
.case-rail-wide { margin-top: var(--sp-8); }
.case-rail-wide > div::before { background: var(--bg); }
.case-rail-wide dd { max-width: 60ch; }
.work-case .bench { margin-top: var(--sp-8); }
.case-more { margin-top: var(--sp-6); }
@media (min-width: 1040px) {
  .work-case .case-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--sp-8); }
  .work-case .case-media .shot { padding-bottom: 64px; }
  .work-case .case-media .shot-phone {
    display: block; position: absolute; right: 24px; bottom: 24px; width: 150px; height: auto;
    border: 5px solid #000; border-radius: 20px; outline: 1px solid var(--line-2); box-shadow: var(--shadow-float); background: #1a0f2e;
  }
  /* El riel en horizontal: tres tramos en fila, la gota verde solo en el resultado */
  .case-rail-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--sp-7); padding: 28px 0 0; }
  .case-rail-wide::before { left: 4px; right: 0; top: 4px; bottom: auto; width: auto; height: 1px; }
  .case-rail-wide > div::before { left: 0; top: -28px; }
  .case-rail-wide .is-result dt .gota { left: -3px; top: -31px; }
}

/* Contacto */
.contact-option { scroll-margin-top: calc(var(--header-h) + 16px); }
.contact-option.is-picked { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: var(--sp-6) 0 0; color: var(--muted); }
.contact-form { display: grid; gap: var(--sp-5); max-width: 46rem; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.form-field { display: grid; gap: 6px; margin: 0; }
.form-field .field { width: 100%; }
.form-field label { font: 500 var(--fs-small)/1.4 var(--font-body); color: var(--text); }
.form-field textarea.field { min-height: 132px; padding-top: 12px; resize: vertical; }
.form-field select.field { appearance: auto; }
.form-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--sp-3); align-items: start; margin: 0; color: var(--text-2); }
.form-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin: 0; }
.form-help { font-size: var(--fs-label); color: var(--muted); }
.form-status { margin: 0; color: var(--text-2); }
.form-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 700px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-wide { grid-column: 1 / -1; } }

/* Legales: el texto final de main, con la cabecera y el pie de la v2 */
.legal-section { padding-top: clamp(32px, 5vw, 56px); }
.legal-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
.legal-toc { align-self: start; padding: var(--sp-5); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-card); font-size: var(--fs-label); }
.legal-toc-title { margin: 0 0 var(--sp-3); font-weight: 600; color: var(--text); }
/* Cada entrada ya trae su número en el texto: la lista no numera otra vez */
.legal-toc ol { list-style: none; margin: 0; padding-left: 0; display: grid; gap: 6px; color: var(--muted); }
.legal-toc a { color: var(--text-2); }
.legal-body { max-width: 46rem; color: var(--text-2); line-height: 1.7; overflow-wrap: anywhere; }
.legal-body h2 { margin: var(--sp-8) 0 var(--sp-4); font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.2; color: var(--text); scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { margin: var(--sp-6) 0 var(--sp-3); font-size: 1.125rem; line-height: 1.3; color: var(--text); }
.legal-body p, .legal-body ul, .legal-body ol { margin: 0 0 var(--sp-4); }
.legal-body ul, .legal-body ol { padding-left: 1.2em; }
.legal-body li + li { margin-top: 6px; }
.legal-body strong { color: var(--text); }
.legal-body hr { margin: var(--sp-7) 0; border: 0; border-top: 1px solid var(--line); }
.legal-body .table-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 var(--sp-5); }
.legal-body table { border-collapse: collapse; font-size: var(--fs-small); }
.legal-body th, .legal-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-body th { color: var(--text); background: var(--surface-1); }
.legal-related { margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.legal-related ul { list-style: none; display: grid; gap: 6px; margin: var(--sp-3) 0 0; padding: 0; }
.legal-related a { display: inline-flex; align-items: center; min-height: 32px; }
@media (min-width: 1040px) {
  .legal-layout { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); column-gap: var(--sp-8); }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
}

/* ---------- Alto contraste (forced-colors): los iconos pintados con máscara usan colores del sistema ---------- */
@media (forced-colors: active) {
  .gota, .hub-node, .bench-status .gota { color: CanvasText; }
  .chip[aria-pressed="true"], .seg-options input:checked + span { border-width: 2px; }
  .chip[aria-pressed="true"]::before, .seg-options input:checked + span::before,
  .bench-log li:last-child::before, .step-state::before, .hotspot::before,
  .tabs [role="tab"][aria-selected="true"]::before { forced-color-adjust: none; background: Highlight; }
  .hotspot { forced-color-adjust: none; color: HighlightText; }
  .bar-v i, .bar-h b i { forced-color-adjust: none; background: CanvasText; }
  .cmp-divider { forced-color-adjust: none; background: CanvasText; }
}

/* ---------- Movimiento reducido (DESIGN §8) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
