/* Manrope (SIL OFL 1.1, ver /fonts/OFL.txt), autoalojada: la CSP sólo admite font-src 'self'. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-variable.woff2") format("woff2"),
       url("/fonts/manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Dirección (tanda 4): «faro de noche». La tinta es la superficie de los momentos importantes (portada,
   siguiente paso, código de prueba) y el ámbar es la luz: sólo marca lo que hay que hacer o lo que se logró.
   Ningún tono nuevo con personalidad propia: todos derivan de tinta, ámbar o papel (se retira --sea #1f5f7a).
   Contrastes medidos (fórmula WCAG 2.x) al lado de cada token. */
:root {
  color-scheme: light;
  /* Marca aprobada (paquete FaroBiz 22-oct-2026, Digital/brand-tokens.css) */
  --ink: #142D40;
  --amber: #F5B544;
  --paper: #F7F5EF;
  --white: #FFFFFF;
  /* Derivados de la tinta */
  --ink-deep: #0B1D2B;           /* hover del botón tinta */
  --ink-2: #1E3A50;              /* superficies sobre tinta */
  --ink-soft: #E9EEF1;           /* fondo informativo: tinta encima 12,2:1 */
  --on-ink: #F7F5EF;             /* papel sobre tinta 13,0:1 */
  --on-ink-muted: #B4C1CB;       /* sobre tinta 7,7:1 */
  --on-ink-line: #8A9BA8;        /* bordes de controles sobre tinta 5,0:1 */
  /* Derivados del ámbar */
  --amber-hover: #F0A62A;
  --amber-soft: #FFF4E0;
  --amber-line: #F2D39B;
  --amber-text: #8a5200;         /* sobre papel 5,9:1; sobre ámbar suave 5,9:1 */
  --warm: #FFFBF3;               /* tarjeta elegida */
  /* Neutros y estados */
  --card: var(--white);
  --line: #e4ded3;               /* separadores decorativos */
  --control-border: #7d8a94;     /* bordes de campos y controles: 3,5:1 sobre blanco, 3,3:1 sobre papel */
  --track: #e9e4d9;              /* interior de pistas de avance, siempre con borde --control-border */
  --muted: #586977;              /* sobre papel 5,2:1; sobre blanco 5,7:1 */
  --ok: #1b7a4c;
  --ok-soft: #e6f4ec;
  --err: #b3261e;
  --err-soft: #fdecea;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 45, 64, .05), 0 8px 24px rgba(20, 45, 64, .07);
  --shadow-lift: 0 2px 4px rgba(20, 45, 64, .06), 0 16px 36px rgba(20, 45, 64, .13);
  --shadow-ink: 0 20px 50px -18px rgba(11, 29, 43, .55);
  --shadow-ink-sm: 0 12px 22px -16px rgba(11, 29, 43, .6);   /* bloques de tinta seguidos de otros bloques */
  /* Curvas: salida fuerte para lo que entra o responde. */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease: var(--ease-out);
  --space-section: 1.5rem;
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  /* Manrope convierte «(c)» en «©» con la ligadura común: «501(c)(3)» salía como «501©(3)». */
  font-variant-ligatures: no-common-ligatures;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); overflow-wrap: anywhere; overflow-x: clip; }
main { flex: 1; outline: none; padding-block: 2rem 4.5rem; min-width: 0; }
img, svg { display: block; max-width: 100%; }
/* Enlaces: tinta subrayada (el subrayado, no el color, los distingue del texto). */
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(20, 45, 64, .45); transition: text-decoration-color .15s ease; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: currentColor; } }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4.6vw, 2.7rem); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; }
h3 { font-size: 1.06rem; font-weight: 700; }
p { margin: .5rem 0 0; }
strong, b { font-weight: 650; }

/* Foco: doble anillo (blanco por dentro, tinta por fuera). Tinta/papel 13,0:1; tinta/blanco 14,2:1.
   Sobre tinta, el anillo pasa a ámbar (7,8:1) con separación tinta. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--white); }
a:not([class]):focus-visible { border-radius: 3px; }
h1[tabindex="-1"]:focus, main:focus { outline: none; box-shadow: none; }
.hero :focus-visible, .next-card :focus-visible, .test-ticket :focus-visible { outline-color: var(--amber); box-shadow: 0 0 0 2px var(--ink); }
.wrap { width: min(72rem, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: .5rem .8rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra superior */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; gap: .5rem .75rem; min-height: 68px; flex-wrap: wrap; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; flex: none; color: var(--ink); text-decoration: none; border-radius: 6px; }
/* Logo integrado v3 oficial. viewBox recortado al dibujo (sin el margen transparente del archivo);
   180 px de ancho visible = mínimo del manual (pág. 7) para el horizontal sin lema. */
.brand-logo { width: 180px; height: auto; aspect-ratio: 382 / 83; }
.env-badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-text); background: var(--amber-soft); border: 1px solid var(--amber-line); padding: .15rem .55rem; border-radius: 999px; }
.env-badge.team { color: var(--white); background: var(--ink); border-color: var(--ink); }
.topnav { margin-left: auto; display: flex; gap: .5rem; align-items: center; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.topnav a, .topnav button { font-size: .92rem; }
.topnav .btn { font-weight: 600; }
.topnav .muted { font-size: .88rem; min-width: 0; }

/* ---------- Botones ----------
   Pulsar: escala .97 (160 ms, salida fuerte). Pasar el ratón: sólo con puntero fino.
   Cargando (aria-busy): el texto se oculta sin cambiar el ancho y gira un aro del color del botón. */
.btn { --spin: currentColor; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; letter-spacing: -.005em; cursor: pointer; text-decoration: none; overflow-wrap: normal; -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: transform .16s var(--ease-out), background-color .16s ease, border-color .16s ease, box-shadow .2s ease, color .16s ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { --spin: var(--white); background: var(--ink); color: var(--white); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 8px 20px -6px rgba(20, 45, 64, .45); }
.btn-amber { --spin: var(--ink); background: var(--amber); color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 8px 20px -6px rgba(214, 145, 30, .55); }
.btn-ghost { --spin: var(--ink); background: transparent; color: var(--ink); border-color: var(--control-border); }
.btn-on-ink { --spin: var(--on-ink); color: var(--on-ink); border-color: var(--on-ink-line); }
.btn-lg { min-height: 54px; padding-inline: 1.6rem 1.4rem; font-size: 1.04rem; }
.btn-arrow { width: 20px; height: 20px; flex: none; transition: transform .2s var(--ease-out); }
.btn-link { background: none; border: 0; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; padding: .4rem .2rem; text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: rgba(20, 45, 64, .45); text-underline-offset: 3px; min-height: 44px; border-radius: 6px; transition: text-decoration-color .15s ease; }
.btn-link:disabled { color: var(--muted); text-decoration: none; cursor: default; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn[aria-busy="true"] { opacity: 1; cursor: progress; color: transparent; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--spin); border-right-color: transparent; animation: rot .7s linear infinite; }
.btn-sm { min-height: 44px; padding: .45rem 1rem; font-size: .92rem; }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--white); }
.hero .btn:focus-visible, .next-card .btn:focus-visible, .test-ticket .btn:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:not(:disabled):hover { background: var(--ink-deep); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 12px 24px -8px rgba(20, 45, 64, .55); }
  .btn-amber:not(:disabled):hover { background: var(--amber-hover); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 12px 26px -8px rgba(214, 145, 30, .65); }
  .btn-ghost:not(:disabled):hover { background: var(--white); border-color: var(--ink); }
  .btn-on-ink:not(:disabled):hover { background: rgba(255, 255, 255, .08); border-color: var(--on-ink); }
  .btn:not(:disabled):hover .btn-arrow { transform: translateX(3px); }
  .btn:not(:disabled):hover:active { transform: scale(.97); }
  .btn-link:not(:disabled):hover { text-decoration-color: currentColor; }
}

/* ---------- Portada ---------- */
/* Panel de tinta con la retícula de una carta náutica (líneas al 3,5 %) y la luz del faro detrás. */
.screen:has(> .hero) { animation: none; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; padding: clamp(1.75rem, 5vw, 3.75rem) clamp(1.75rem, 5vw, 3.75rem) calc(clamp(1.75rem, 5vw, 3.75rem) + 2.25rem); border-radius: var(--radius-lg); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-ink); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 76% 34%, rgba(245, 181, 68, .16), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 64px); }
.hero > * { min-width: 0; }
.hero .eyebrow { color: var(--amber); }
.hero h1 { color: var(--on-ink); font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.02; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-lead { font-size: 1.15rem; color: var(--on-ink-muted); max-width: 33rem; margin-top: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; align-items: center; }
.hero-note { font-size: .92rem; color: var(--on-ink-muted); margin-top: 1rem; max-width: 33rem; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 26rem; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: 100%; }
/* Entrada: el texto sube en cascada (60 ms entre piezas) y el faro aparece detrás. Una vez, al cargar. */
.hero-copy > * { animation: rise .6s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.hero-art { animation: art-in .9s var(--ease-out) .1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes art-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
/* El faro: el haz gira como uno real (se estrecha al apuntar hacia ti y pasa al otro lado) y la lámpara
   destella justo cuando el haz te mira. Las olas se desplazan una longitud de onda (260), en bucle. */
.lh-beam, .lh-halo { transform-box: view-box; transform-origin: 200px 122px; }
.lh-beam { animation: beam 9s linear infinite; }
.lh-halo { animation: halo 9s linear infinite; }
.lh-sea-back { animation: sea 18s linear infinite; }
.lh-sea-front { animation: sea 12s linear infinite reverse; }
.lh-stars circle { animation: twinkle 5s ease-in-out infinite alternate; }
.lh-stars circle:nth-child(2n) { animation-delay: -2.5s; }
.lh-stars circle:nth-child(3n) { animation-duration: 7s; }
@keyframes beam {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  22% { transform: scaleX(.12); opacity: .55; }
  25% { transform: scaleX(0); opacity: .4; }
  28% { transform: scaleX(-.12); opacity: .55; }
  50% { transform: scaleX(-1); opacity: 1; }
  72% { transform: scaleX(-.12); opacity: .55; }
  75% { transform: scaleX(0); opacity: .4; }
  78% { transform: scaleX(.12); opacity: .55; }
}
@keyframes halo {
  0%, 15%, 35%, 65%, 85%, 100% { opacity: .45; transform: scale(.9); }
  25%, 75% { opacity: 1; transform: scale(1.25); }
}
@keyframes sea { to { transform: translateX(260px); } }
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }

/* Tres garantías: tarjetas que se montan sobre el borde inferior del panel. */
.trust { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: -2.25rem clamp(1rem, 3vw, 2.5rem) 0; }
.trust > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .1rem .85rem; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-lift); animation: rise .6s var(--ease-out) both; }
.trust > div:nth-child(1) { animation-delay: .3s; }
.trust > div:nth-child(2) { animation-delay: .36s; }
.trust > div:nth-child(3) { animation-delay: .42s; }
.trust-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-text); }
.trust-icon svg { width: 22px; height: 22px; }
.trust strong { display: block; font-size: 1rem; line-height: 1.3; }
.trust span:not(.trust-icon) { color: var(--muted); font-size: .93rem; }
.section { margin-top: 4rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: .5rem 2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -.025em; }
.section-head p { color: var(--muted); max-width: 34rem; margin: 0; }

/* Cómo funciona: una ruta punteada une los cuatro pasos (en móvil, en vertical). */
.steps-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: s; }
.steps-strip ol, ol.steps-strip { padding: 0; margin: 0; }
.steps-strip li { position: relative; list-style: none; counter-increment: s; padding-top: 3.6rem; }
.steps-strip li::before { content: counter(s, decimal-leading-zero); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--amber); font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 6px var(--paper); }
.steps-strip li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 58px; right: -1.5rem; height: 2px; background: repeating-linear-gradient(90deg, var(--control-border) 0 6px, transparent 6px 12px); }
.steps-strip strong { display: block; font-size: 1.1rem; font-weight: 800; }
.steps-strip span { display: block; color: var(--muted); font-size: .94rem; margin-top: .25rem; max-width: 16rem; }

/* Servicios: las cuatro estructuras disponibles en primera fila; lo opcional y lo que viene, más quieto. */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.service { grid-column: span 4; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.service-main { grid-column: span 3; box-shadow: var(--shadow); }
.service-soon { background: transparent; border-style: dashed; border-color: #cfc7b8; }
.service-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.service-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--amber); }
.service-icon svg { width: 26px; height: 26px; }
.service-soon .service-icon { background: #efebe3; color: var(--muted); }
.service h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.015em; }
.service p { color: var(--muted); font-size: .95rem; margin: 0; }

.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; background: var(--ink-soft); color: var(--ink); overflow-wrap: normal; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-wait { background: var(--amber-soft); color: var(--amber-text); }
.pill-muted { background: #efebe3; color: var(--muted); }

/* ---------- Asistente: una pregunta por pantalla ---------- */
.flow { max-width: 44rem; margin-inline: auto; }
.flow-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
/* Pista con borde --control-border (3,3:1 sobre papel); el relleno tinta contrasta 11:1 con el interior.
   El relleno se dibuja con scaleX y avanza desde el valor del paso anterior (app.js: 480 ms, salida fuerte). */
.progress { flex: 1; height: 10px; background: var(--track); border: 1px solid var(--control-border); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: left center; transform: scaleX(0); }
.progress-label { font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Cambio de paso: entra desde la derecha al avanzar y desde la izquierda al volver (220 ms). */
.screen { animation: step-in .22s var(--ease-out) both; }
.screen.screen-back { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes step-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-text); margin: 0 0 .6rem; }
.lead { color: var(--muted); font-size: 1.06rem; margin-top: .7rem; }

/* Tarjetas de elección: se levantan al pasar el ratón, se hunden al pulsar y, elegidas, se encienden
   (borde tinta doble, fondo cálido, icono en tinta con trazo ámbar y la marca ámbar que aparece). */
.choices { display: grid; gap: .85rem; margin-top: 1.7rem; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; text-align: left; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: .2rem 1rem; align-items: start; width: 100%; padding: 1.15rem 1.25rem; background: var(--card); border: 1.5px solid var(--control-border); border-radius: var(--radius); font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow); touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: transform .2s var(--ease-out), border-color .16s ease, box-shadow .2s ease, background-color .16s ease; }
.choice:active:not(:disabled) { transform: scale(.985); transition-duration: .1s; }
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--warm); box-shadow: inset 0 0 0 1px var(--ink), 0 10px 26px -12px rgba(20, 45, 64, .35); }
.choice:focus-visible { box-shadow: 0 0 0 2px var(--white), var(--shadow); }
@media (hover: hover) and (pointer: fine) {
  .choice:not(:disabled):hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: var(--shadow-lift); }
  .choice[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 1px var(--ink), var(--shadow-lift); }
  .choice:not(:disabled):hover:active { transform: translateY(0) scale(.985); }
  .choice:not(:disabled):hover .choice-icon { transform: rotate(-4deg) scale(1.04); }
}
.choice[aria-pressed="true"]::after { content: ""; position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23142D40' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 0 0 1.5px var(--ink); animation: pop .26s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.choice-icon { grid-row: span 3; width: 56px; height: 56px; border-radius: 16px; background: var(--ink-soft); display: grid; place-items: center; color: var(--ink); transition: transform .25s var(--ease-out), background-color .16s ease, color .16s ease; }
.choice[aria-pressed="true"] .choice-icon { background: var(--ink); color: var(--amber); }
.choice-icon svg { width: 30px; height: 30px; }
.choice-title { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; padding-right: 2.2rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.choice-text { color: var(--muted); font-size: .95rem; }
.choice-fit { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--amber-text); font-weight: 700; margin-top: .2rem; }
.choice-fit::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 1px var(--amber-text); flex: none; }
.choice.compact { grid-template-columns: 44px minmax(0, 1fr); padding: .95rem 1.05rem; align-items: center; }
.choice.compact .choice-icon { width: 44px; height: 44px; border-radius: 12px; grid-row: auto; }
.choice.compact .choice-icon svg { width: 24px; height: 24px; }
.choice.compact[aria-pressed="true"]::after { top: 50%; margin-top: -13px; }
/* Las tarjetas entran en cascada corta (40 ms) con la pantalla. */
.choices > .choice { animation: rise .3s var(--ease-out) both; }
.choices > .choice:nth-child(2) { animation-delay: .04s; }
.choices > .choice:nth-child(3) { animation-delay: .08s; }
.choices > .choice:nth-child(4) { animation-delay: .12s; }
.choices > .choice:nth-child(n+5) { animation-delay: .16s; }
.flow-actions { display: flex; gap: .75rem; align-items: center; justify-content: space-between; margin-top: 2rem; flex-wrap: wrap; }
.flow-actions .right { display: flex; gap: .75rem; align-items: center; margin-left: auto; flex-wrap: wrap; }
.banner .flow-actions { margin-top: .75rem; justify-content: flex-start; }
.banner p:first-child { margin-top: 0; }

/* ---------- Formularios ---------- */
.field { margin-top: 1.25rem; min-width: 0; }
.field label, .label { display: block; font-weight: 700; margin-bottom: .4rem; }
.hint { display: block; color: var(--muted); font-size: .9rem; margin-top: .35rem; }
/* Borde de campo --control-border: 3,5:1 sobre blanco. */
.input, select.input { width: 100%; min-height: 52px; padding: .75rem 1rem; border: 1.5px solid var(--control-border); border-radius: 14px; font: inherit; color: var(--ink); background: var(--white); transition: border-color .15s ease, box-shadow .15s ease; }
.input:hover { border-color: var(--ink); }
.input:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--white); }
.input:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.input[aria-invalid="true"] { border-color: var(--err); border-width: 2px; }
.input:disabled { background: #f1eee7; color: var(--muted); }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .75rem; }
.row > .field { margin-top: 1rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 6.5rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; border: 0; background: var(--ink-soft); color: var(--ink); border-radius: 10px; padding: 0 .85rem; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.meter { display: flex; gap: 4px; margin-top: .5rem; }
.meter i { flex: 1; height: 6px; border-radius: 9px; background: var(--track); box-shadow: inset 0 0 0 1px var(--control-border); transition: background-color .2s ease; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--err); box-shadow: none; }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--amber-text); box-shadow: none; }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--ok); box-shadow: none; }
.check { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--ink); flex: none; }
.error { color: var(--err); font-size: .92rem; font-weight: 700; margin-top: .45rem; }
.banner { display: flex; gap: .75rem; align-items: flex-start; padding: .95rem 1.05rem; border-radius: 14px; margin-top: 1.2rem; font-size: .95rem; border: 1px solid transparent; animation: rise .26s var(--ease-out) both; }
.banner > div { min-width: 0; }
.banner-info { background: var(--ink-soft); color: var(--ink); border-color: #d3dce2; }
.banner-warn { background: var(--amber-soft); color: #5e3800; border-color: var(--amber-line); }
.banner-err { background: var(--err-soft); color: #7d1b15; border-color: #f4c7c3; }
.banner-ok { background: var(--ok-soft); color: #11563a; border-color: #bfe0cd; }
.banner svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.test-code { font-variant-numeric: tabular-nums; letter-spacing: .2em; font-weight: 800; }
.code-input { letter-spacing: .4em; font-size: 1.6rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; max-width: 18rem; }
.code-input.code-filled { animation: filled .32s var(--ease-out); }
@keyframes filled { 40% { transform: scale(1.03); } }

/* Código de prueba: tarjeta de tinta imposible de pasar por alto. El código va en ámbar sobre tinta (7,8:1). */
.test-ticket { position: relative; overflow: hidden; margin-top: 1.4rem; padding: 1.25rem 1.35rem 1.15rem; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-ink-sm); animation: ticket-in .42s var(--ease-out) .08s both; }
.test-ticket > * { position: relative; }
@keyframes ticket-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
#test-code + .hint { margin-top: 1rem; }
.test-ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; font-size: .84rem; color: var(--on-ink-muted); }
.test-ticket-tag { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--amber); padding: .2rem .6rem; border-radius: 999px; }
.test-ticket-label { margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--on-ink-muted); }
.test-ticket .test-code { margin: .1rem 0 0; font-size: clamp(2rem, 8.5vw, 2.9rem); line-height: 1.1; letter-spacing: .16em; color: var(--amber); overflow-wrap: anywhere; }
.test-ticket-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.test-ticket-foot { margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed rgba(180, 193, 203, .4); font-size: .86rem; color: var(--on-ink-muted); }

/* Nombre */
.name-result { margin-top: 1rem; }
.ideas { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.idea { border: 1.5px solid var(--control-border); background: var(--white); color: var(--ink); border-radius: 999px; padding: .45rem .9rem; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; min-height: 44px; transition: transform .16s var(--ease-out), border-color .15s ease, background-color .15s ease; }
.idea:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .idea:hover { border-color: var(--ink); background: var(--warm); } }

/* Tarjetas y resumen. Ritmo: 1,5 rem entre la entrada (lead, banner) y el primer bloque; 1 rem entre tarjetas. */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); box-shadow: var(--shadow); min-width: 0; }
.flow > .card { margin-top: var(--space-section); }
.card + .card, .flow > .card + .card { margin-top: 1rem; }
.card > :first-child { margin-top: 0; }
.price { margin-top: 1.4rem; }
.card > .price:first-child { margin-top: 0; }
.price-group { padding-block: .7rem; border-top: 1px solid var(--line); }
.price-group:first-child { border-top: 0; padding-top: 0; }
.price-group h3 { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .35rem; }
.price-line { display: flex; justify-content: space-between; gap: 1rem; padding-block: .25rem; }
.price-line span:first-child { min-width: 0; }
.price-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
/* Total: franja ámbar suave con la cifra grande (tinta sobre #FFF4E0, 13:1). */
.price-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 1.1rem; margin-top: .6rem; border-radius: 14px; background: var(--amber-soft); border: 1px solid var(--amber-line); font-weight: 800; font-size: 1.1rem; }
.price-total span:last-child { font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.recap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem 1rem; margin-top: 1rem; align-items: center; }
.card > .recap:first-child { margin-top: 0; }
.recap dt { color: var(--muted); font-size: .92rem; }
.recap dd { margin: 0; font-weight: 700; min-width: 0; }
.recap a { font-weight: 600; font-size: .92rem; }
.next-list { margin: .8rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.next-list li { margin-top: .35rem; padding-left: .2rem; }
.next-list li::marker { color: var(--amber-text); font-weight: 800; }

/* ---------- Panel del expediente ---------- */
.case-head { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.case-head > div:first-child { min-width: 0; flex: 1 1 20rem; }
/* Anillo de avance: dos medias lunas que giran (sólo transform) y la cifra cuenta a la par. Al 100 %, ámbar. */
.ring { position: relative; width: 112px; height: 112px; border-radius: 50%; background: var(--track); box-shadow: inset 0 0 0 1px var(--control-border); flex: none; }
.ring-half { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; }
.ring-r { left: 50%; }
.ring-l { left: 0; }
.ring-half i { position: absolute; top: 0; width: 100%; height: 100%; background: var(--ink); }
.ring-r i { left: -100%; border-radius: 999px 0 0 999px; transform-origin: right center; transform: rotate(0deg); }
.ring-l i { left: 100%; border-radius: 0 999px 999px 0; transform-origin: left center; transform: rotate(0deg); }
.ring[data-p="100"] .ring-half i { background: var(--amber); }
.ring-num { position: absolute; inset: 12px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--control-border); display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* Siguiente paso: el bloque de tinta del panel; la acción, en ámbar. */
.next-card { position: relative; overflow: hidden; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: var(--space-section); background: var(--ink); color: var(--on-ink); border-color: var(--ink); box-shadow: var(--shadow-ink-sm); }
.next-card > * { position: relative; }
.next-card > div { min-width: 0; flex: 1 1 16rem; }
.next-card h2 { color: var(--on-ink); margin-top: .3rem; }
.who { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-text); }
.next-card .who { color: var(--amber); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.grid-2 > .card + .card { margin-top: 0; }
.grid-2 + .card, .grid-2 + .grid-2 { margin-top: 1rem; }
/* Hitos: el tramo recorrido se pinta en verde, los hitos entran en cascada, el último completado
   suelta un anillo una vez y el que está en curso respira tres veces y se queda quieto. */
.timeline { list-style: none; padding: 0; margin: 1rem 0 0; }
.timeline li { position: relative; padding: 0 0 1.1rem 2.3rem; animation: rise .4s var(--ease-out) both; }
.timeline li:nth-child(2) { animation-delay: .05s; }
.timeline li:nth-child(3) { animation-delay: .1s; }
.timeline li:nth-child(4) { animation-delay: .15s; }
.timeline li:nth-child(5) { animation-delay: .2s; }
.timeline li:nth-child(n+6) { animation-delay: .25s; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.timeline li.done::before { background: var(--ok); }
.timeline li:last-child::before { display: none; }
.dot { position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--control-border); background: var(--white); }
.timeline .done .dot { background: var(--ok); border-color: var(--ok); }
.timeline .done .dot::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; animation: pop .3s cubic-bezier(.34, 1.4, .64, 1) .25s both; }
.timeline .done:has(+ .current) .dot::before, .timeline .done:last-child .dot::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: burst 1s var(--ease-out) .55s; }
@keyframes burst { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
/* En curso: borde tinta (14:1 sobre blanco) con relleno ámbar; el halo (transform/opacity) late 3 veces. */
.timeline .current .dot { border-color: var(--ink); background: var(--amber); }
.timeline .current .dot::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: rgba(245, 181, 68, .4); z-index: -1; transform: scale(.75); opacity: 0; animation: breathe 2.2s ease-in-out .4s 3; }
@keyframes breathe { 0%, 100% { transform: scale(.75); opacity: 0; } 50% { transform: scale(1.15); opacity: 1; } }
.timeline .rejected .dot { background: var(--err); border-color: var(--err); }
.timeline strong { display: block; font-weight: 700; }
.timeline .current strong { font-weight: 800; }
.timeline .pending strong { color: var(--muted); font-weight: 500; }
.timeline small { color: var(--muted); }
.list { list-style: none; padding: 0; margin: .8rem 0 0; }
.list li { display: flex; justify-content: space-between; gap: .5rem 1rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list li > * { min-width: 0; }
.list li:first-child { border-top: 0; }
.list small { color: var(--muted); display: block; }
.cases { display: grid; gap: .85rem; margin-top: var(--space-section); }
.case-row { display: flex; align-items: center; gap: 1rem; justify-content: space-between; text-decoration: none; color: inherit; flex-wrap: wrap; border-color: var(--control-border); transition: transform .2s var(--ease-out), border-color .16s ease, box-shadow .2s ease; }
.case-row > div:first-child { min-width: 0; flex: 1 1 16rem; }
.case-row:focus-visible { box-shadow: 0 0 0 2px var(--white), var(--shadow); }
.case-row:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .case-row:hover { border-color: var(--ink); box-shadow: var(--shadow-lift); transform: translateY(-2px); } }
.mini-bar { width: 140px; height: 8px; border-radius: 9px; background: var(--track); border: 1px solid var(--control-border); overflow: hidden; }
.mini-bar span { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: left center; transform: scaleX(0); }
.consent-text { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin-top: 1.2rem; }

/* Pasarela de prueba */
.gateway { max-width: 28rem; margin-inline: auto; }
.fake-card { position: relative; overflow: hidden; border-radius: 20px; padding: 1.35rem; color: var(--white); background: linear-gradient(140deg, var(--ink-2), var(--ink) 55%, var(--ink-deep)); box-shadow: var(--shadow-ink); margin-top: 1.2rem; font-weight: 600; }
.fake-card::before { content: ""; position: absolute; top: 1.3rem; right: 1.35rem; width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f8c870, var(--amber) 60%, #d9952a); }
.fake-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0 100%, rgba(245, 181, 68, .18), transparent 55%); pointer-events: none; }
.fake-card .num { font-size: 1.25rem; letter-spacing: .14em; margin-top: 1.6rem; font-variant-numeric: tabular-nums; }
.fake-card .meta { display: flex; justify-content: space-between; margin-top: .8rem; font-size: .82rem; color: var(--on-ink-muted); }

/* Aviso flotante: sube desde abajo (300 ms, salida fuerte) y se va más rápido (200 ms). */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .6rem; transform: translate(-50%, 160%); opacity: 0; background: var(--ink); color: var(--white); padding: .75rem 1.25rem .75rem 1rem; border-radius: 999px; font-size: .95rem; font-weight: 600; box-shadow: var(--shadow-ink); transition: transform .2s ease-in, opacity .2s ease-in, visibility 0s linear .2s; max-width: calc(100% - 32px); z-index: 20; visibility: hidden; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .3s var(--ease-out), opacity .2s ease-out, visibility 0s; }
.footer { border-top: 1px solid var(--line); background: var(--white); font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; padding-block: 1.4rem; }
.footer a { display: inline-block; padding-block: .6rem; margin-block: -.6rem; }
/* Enlaces del pie: objetivo de 44 px de alto sin solapar filas al envolver (el margen negativo va en la lista, no en cada enlace). */
.footer-links { list-style: none; margin: -.6rem 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.footer-links a { margin-block: 0; font-weight: 600; }
.footer-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.footer-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 1rem; }
.spin { width: 28px; height: 28px; border: 3px solid var(--track); border-top-color: var(--ink); border-radius: 50%; animation: rot .7s linear infinite; margin: 3rem auto; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Operador: la tabla nunca ensancha la página; si no cabe, se desplaza dentro de su tarjeta. */
.card:has(> .op-table), .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.op-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.op-table th, .op-table td { text-align: left; padding: .65rem .5rem; border-top: 1px solid var(--line); vertical-align: top; }
.op-table thead th { border-top: 0; }
.op-table th { font-weight: 700; color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow-wrap: normal; }
.op-table td a { font-weight: 700; }
.op-table thead + tbody tr > td:nth-child(1) { min-width: 12rem; }
.op-table thead + tbody tr > td:nth-child(2) { min-width: 11rem; }
.op-table thead + tbody tr > td:nth-child(4) { min-width: 15rem; }
.op-table tbody:only-child td:nth-child(1) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.op-table tbody:only-child td:nth-child(4) { min-width: 12rem; }
.op-table tr:hover td { background: #fbf9f4; }
.op-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.op-form .field { margin-top: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
/* Ritmo de la consola (marcado generado por operador.js) */
main > h1 + .card, main > h1 + p + .grid-2, main > h1 + .muted + .grid-2 { margin-top: var(--space-section); }
.card h2 + form, .card h2 + .op-form, .card h2 + .op-table, .card h2 + .kv { margin-top: 1rem; }
.card .kv + h3, .card .list + h3 { margin-top: 1.5rem; }
/* La consola es una herramienta: sin cascadas ni latidos; sólo la respuesta al pulsar y pasar el ratón. */
.console .timeline li, .console .banner { animation: none; }
.console .timeline .current .dot::before, .console .timeline .done .dot::before { display: none; }
.console .timeline .done .dot::after { animation: none; }
.console main > h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); }

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .hero-art { max-width: 14rem; order: -1; margin-top: -.5rem; }
  .trust { grid-template-columns: minmax(0, 1fr); margin: -1.75rem .75rem 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service, .service-main { grid-column: auto; }
  .steps-strip { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps-strip li { padding: .55rem 0 1.6rem 4.1rem; min-height: 46px; }
  .steps-strip li:not(:last-child)::after { top: 52px; bottom: 4px; left: 22px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--control-border) 0 6px, transparent 6px 12px); }
  .steps-strip span { max-width: none; }
  .op-form { grid-template-columns: minmax(0, 1fr); }
  /* Lista de expedientes del equipo: cada fila pasa a ser una tarjeta con su etiqueta. */
  .card:has(> .op-table > thead) { overflow-x: visible; }
  .op-table:has(> thead) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .op-table:has(> thead) tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; padding: .85rem 0; border-top: 1px solid var(--line); }
  .op-table:has(> thead) tbody tr:first-child { border-top: 0; padding-top: 0; }
  .op-table:has(> thead) td { display: block; border: 0; padding: 0; min-width: 0 !important; }
  .op-table:has(> thead) td:not([colspan])::before { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  /* Mismas columnas que la cabecera de operador.js (antes faltaba «Trámite» y las etiquetas iban corridas). */
  .op-table:has(> thead) td:nth-child(1):not([colspan])::before { content: "Nombre"; }
  .op-table:has(> thead) td:nth-child(2)::before { content: "Trámite"; }
  .op-table:has(> thead) td:nth-child(3)::before { content: "Cliente"; }
  .op-table:has(> thead) td:nth-child(4)::before { content: "Pago"; }
  .op-table:has(> thead) td:nth-child(5)::before { content: "Siguiente"; }
  .op-table:has(> thead) td:nth-child(6)::before { content: "Avance"; }
  .op-table:has(> thead) tr:hover td { background: none; }
}
@media (max-width: 34rem) {
  :root { font-size: 16px; }
  main { padding-top: 1.25rem; }
  .hero { border-radius: 22px; padding: 1.5rem 1.25rem 2.75rem; }
  .hero h1 { font-size: clamp(2.05rem, 9.6vw, 2.5rem); }
  .hero-lead { font-size: 1.05rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .choices.two { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 1fr 1fr; }
  .row > .field:first-child { grid-column: 1 / -1; }
  .choice { grid-template-columns: 46px minmax(0, 1fr); padding: 1rem; }
  .choice-icon { width: 46px; height: 46px; border-radius: 13px; }
  .choice-icon svg { width: 26px; height: 26px; }
  .flow-actions .right { width: 100%; }
  .flow-actions .right .btn { flex: 1; }
  .ring { width: 96px; height: 96px; }
  .ring-num { inset: 10px; font-size: 1.2rem; }
  .price-total span:last-child { font-size: 1.4rem; }
  /* «Prueba» no cabe junto al logo y la navegación en 375 px: pasa a ser una franja fina sobre la barra, de borde a borde. */
  .topbar:not(.topbar-static) .env-badge:not(.team) { order: -1; flex: 0 0 calc(100% + 32px); margin: -.5rem -16px .1rem; padding: .2rem 16px; border-width: 0 0 1px; border-radius: 0; text-align: center; font-size: .7rem; line-height: 1.4; }
  .recap { grid-template-columns: minmax(0, 1fr) auto; }
  .recap dt { grid-column: 1 / -1; margin-top: .4rem; }
  .topnav .btn-sm { padding-inline: .8rem; }
  /* EXCEPCIÓN pendiente de Reinier: a 180 px el logo no cabe junto a «Mis expedientes · Salir» en 375 px
     (343 px útiles − 188 px de navegación − 12 px de separación = 143 px). 140 px es el mayor que cabe en una línea. */
  .brand-logo { width: 140px; }
}
/* Movimiento reducido: nada se desplaza ni gira; el faro queda quieto con el haz encendido.
   (Las animaciones WAAPI de app.js comprueban la misma preferencia.) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Páginas de texto largo (términos, privacidad, preguntas, contacto). HTML estático, sin JS.
   Medida: columna de 34 rem (578 px a 17 px) ≈ 66-74 caracteres por línea en Manrope (medido). */
.topbar-static .env-badge { display: inline-block; }
.topbar-static .brand-logo { width: 180px; }
.doc-page { padding-top: 1rem; }
.doc { max-width: 34rem; margin-inline: auto; }
.doc-back { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font-weight: 600; text-decoration: none; border-radius: 6px; margin-left: -.2rem; padding-inline: .2rem; }
.back-link svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) and (pointer: fine) { .back-link:hover { text-decoration: underline; } }
.doc-head { padding-bottom: .25rem; }
.doc-head h1 { margin-top: .75rem; text-wrap: balance; }
.doc-meta { margin-top: 1.25rem; font-size: .95rem; line-height: 1.7; }

/* Aviso de borrador: ámbar suave, texto #5e3800 (9,45:1 sobre #fff4e2, medido). */
.draft-banner { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.25rem; padding: 1rem 1.1rem; border: 1px solid #f2d39b; border-radius: 14px; background: var(--amber-soft); color: #5e3800; font-size: .95rem; }
.draft-banner > div { min-width: 0; }
.draft-banner p { margin: 0; }
.draft-banner p + p { margin-top: .35rem; }
.draft-title { font-weight: 800; letter-spacing: .01em; }
.draft-icon { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* Marcadores pendientes [ ... ]: fondo ámbar con subrayado discontinuo (no sólo color). Tinta sobre #fde3a7: 11,3:1; en el aviso, sobre #fbd88a: 10,3:1. El fondo casi no se distingue del papel (1,15:1): lo que marca es el subrayado #8a5200 (5,1:1 y 4,65:1). */
mark.pending { background: #fde3a7; color: var(--ink); padding: .05em .25em; border-radius: 4px; border-bottom: 1.5px dashed var(--amber-text); -webkit-box-decoration-break: clone; box-decoration-break: clone; font-weight: 600; }
.draft-banner mark.pending { background: #fbd88a; }

/* Cuerpo del documento */
.doc-body { margin-top: .5rem; }
.doc-section { margin-top: 2.6rem; }
.doc-section h2 { font-size: clamp(1.18rem, 2.6vw, 1.35rem); line-height: 1.25; text-wrap: balance; scroll-margin-top: 6rem; }
.doc-section h2 + * { margin-top: .7rem; }
.doc-body p { margin: .8rem 0 0; line-height: 1.65; }
.doc-body ul, .doc-body ol { margin: .8rem 0 0; padding-left: 1.3rem; line-height: 1.6; }
.doc-body li + li { margin-top: .5rem; }
.doc-body li::marker { color: var(--muted); }
.doc-body ol li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
.doc code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; background: #efebe3; padding: .08em .3em; border-radius: 4px; overflow-wrap: anywhere; }

/* Tablas de dos columnas */
.doc-table-wrap { margin-top: 1rem; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: .7rem 1rem .7rem 0; border-top: 1px solid var(--line); }
.doc-table th:last-child, .doc-table td:last-child { padding-right: 0; }
.doc-table thead th, .doc-table thead td { border-top: 0; padding-top: 0; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-table tbody th { font-weight: 600; width: 50%; }
.doc-table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }

/* Índice: tarjeta al principio; en escritorio, columna fija a la izquierda. */
.toc { margin-top: 1.75rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.toc-title { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc-list { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .94rem; line-height: 1.35; }
.toc-list a { display: block; padding-block: .4rem; color: var(--ink); text-decoration: none; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { .toc-list a:hover { color: var(--amber-text); text-decoration: underline; } }
@media (min-width: 64rem) {
  .doc.has-toc { max-width: none; display: grid; grid-template-columns: 14rem minmax(0, 34rem); column-gap: clamp(2.5rem, 5vw, 4.5rem); justify-content: center; align-items: start; }
  .has-toc > .doc-back { grid-column: 2; grid-row: 1; }
  .has-toc > .doc-head { grid-column: 2; grid-row: 2; }
  .has-toc > .doc-body { grid-column: 2; grid-row: 3; }
  .has-toc > .toc { grid-column: 1; grid-row: 2 / 4; position: sticky; top: 5.5rem; margin-top: .9rem; max-height: calc(100vh - 7rem); overflow-y: auto; padding: 0 0 0 1rem; background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
  .has-toc .toc-list { font-size: .9rem; }
  .has-toc .toc-list a { padding-block: .3rem; }
}

/* Preguntas frecuentes: <details>/<summary> nativos (teclado y lectores sin JS). */
.faq { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: baseline; gap: .6rem; min-height: 44px; padding: 1.05rem 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.06rem; line-height: 1.35; border-radius: 6px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; align-self: center; width: 22px; height: 22px; margin-left: auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23142D40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; transition: transform .2s var(--ease); }
.faq-item[open] > summary::after { transform: rotate(180deg); }
.faq-num { flex: none; min-width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.faq-q { min-width: 0; }
@media (hover: hover) and (pointer: fine) { .faq-item summary:hover .faq-q { color: var(--amber-text); } }
.faq-a { padding: 0 0 1.4rem calc(1.6em + .6rem); }
.faq-a > :first-child { margin-top: 0; }
.doc-closing { margin-top: 2.25rem; }

/* Contacto */
.doc-email { font-size: clamp(1.2rem, 3.4vw, 1.45rem); font-weight: 700; }
.doc-email a { overflow-wrap: anywhere; }
.doc-links { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; align-items: center; }
.doc-links li + li { margin-top: 0; }
.doc-links li + li::before { content: "·"; color: var(--muted); padding-inline: .6rem; }
.doc-links a { display: inline-block; padding-block: .55rem; }

@media (max-width: 34rem) {
  .faq-a { padding-left: 0; }
  .doc-section { margin-top: 2.2rem; }
}
@media print {
  .topbar, .footer, .doc-back, .toc, .skip { display: none; }
}

/* ---------- Tanda 3: pantallas de corporación, sin fines de lucro y nombre ficticio ---------- */

/* Desplegables: flecha propia en tinta (la nativa cambia con cada sistema). Deshabilitado: sin flecha (lo pisa .input:disabled). */
select.input { -webkit-appearance: none; appearance: none; padding-right: 2.75rem; text-overflow: ellipsis;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23142D40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .9rem center / 20px no-repeat; }

/* Propósito: alto para 240 caracteres en móvil (unas 5 líneas) y sólo crece en vertical. */
textarea.input { display: block; min-height: 8.5rem; max-height: 24rem; resize: vertical; line-height: 1.5; }

/* Fecha efectiva y acciones: campos cortos, del ancho de su contenido. */
input[type="date"].input { display: block; max-width: 16rem; -webkit-appearance: none; appearance: none; text-align: left; font-variant-numeric: tabular-nums; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input::-webkit-calendar-picker-indicator { cursor: pointer; padding: .25rem; margin-right: -.25rem; border-radius: 6px; }
.input-short { max-width: 14rem; font-variant-numeric: tabular-nums; }

/* Directores y oficiales: el formulario «Añadir una persona» va en su propia tarjeta. */
.flow > form.card { margin-top: 1rem; }
.flow > form.card > h2 { font-size: 1.15rem; }
.flow > form.card > .field:first-of-type { margin-top: 1rem; }
.flow > form.card .flow-actions { margin-top: 1.5rem; }
.flow .card > .list:first-child > li:first-child { padding-top: 0; }
.flow .card > .list:last-child > li:last-child { padding-bottom: 0; }
.flow .card > .list > li > div { font-weight: 600; }
.flow .card > .list > li > div small { font-weight: 400; margin-top: .15rem; }

/* Cargos: casillas como fichas que envuelven (Director, Presidente…). La casilla sigue a la vista: el estado no depende sólo del color. */
fieldset.plain:has(> legend) { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
fieldset.plain > legend { float: left; width: 100%; padding: 0; margin-bottom: .1rem; font-weight: 600; }
fieldset.plain > .check { margin: 0; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .95rem .4rem .7rem; border: 1.5px solid var(--control-border); border-radius: 999px; background: var(--white); font-size: .95rem; transition: border-color .15s, background-color .15s; }
fieldset.plain > .check input { width: 20px; height: 20px; margin: 0; }
fieldset.plain > .check:has(input:checked) { border-color: var(--ink); background: var(--warm); }
fieldset.plain > .check:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--white); }
fieldset.plain > .check input:focus-visible { outline: none; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { fieldset.plain > .check:hover { border-color: var(--ink); } }

/* Condados añadidos: fichas con «Quitar» dentro. */
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.chip-list:empty { display: none; }
.chip-list li { display: inline-flex; align-items: center; gap: 0; padding: 0 .25rem 0 .95rem; min-height: 44px; border: 1.5px solid var(--control-border); border-radius: 999px; background: var(--white); font-weight: 600; font-size: .95rem; }
.chip-list li .btn-link { min-height: 40px; margin-left: .55rem; padding: .25rem .7rem; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; font-size: .88rem; }

/* Avisos del equipo seguidos: un solo bloque (4 px entre ellos, esquinas interiores cerradas). */
.banner-warn + .banner-warn { margin-top: 4px; border-top-left-radius: 5px; border-top-right-radius: 5px; }
.banner-warn:has(+ .banner-warn) { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
.banner a { color: inherit; font-weight: 600; }
.banner-warn a[href^="#/expediente/"] { white-space: nowrap; }
.flow > .card + .banner { margin-top: 1rem; }

/* Textos largos en tarjetas de ancho completo (Exención de impuestos, 501(c)(3)): medida legible. */
.card > p, .banner > div { max-width: 68ch; }

/* Consola: texto aceptado y datos firmados, plegables. */
.card details { margin-top: .4rem; font-size: .9rem; }
.card details > summary { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; cursor: pointer; list-style: none; color: var(--ink); font-weight: 700; border-radius: 6px; }
.card details > summary::-webkit-details-marker { display: none; }
.card details > summary::before { content: ""; flex: none; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 6l6 6-6 6' fill='none' stroke='%23142D40' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .15s var(--ease); }
.card details[open] > summary::before { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) { .card details > summary:hover { text-decoration: underline; text-underline-offset: 3px; } }
.card details > :not(summary) { margin: .2rem 0 .5rem; padding: .75rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.card details > p { line-height: 1.55; }
.card details .kv { font-size: .86rem; }

/* Firmas anuladas: filete gris a la izquierda para separarlas de las vigentes. */
.list li:has(> div > .pill-muted) > div { border-left: 3px solid var(--control-border); padding-left: .8rem; }
.list li:has(> div > .pill-muted) small { margin-top: .2rem; }

/* Formularios de la consola: avisos y botón a todo el ancho; el vencimiento del nombre ficticio, también (su ejemplo es largo). */
.op-form > :not(.field) { grid-column: 1 / -1; }
.op-form > div:empty { display: none; }
.op-form > .field:has(> #expires) { grid-column: 1 / -1; }
.op-form > .field:has(> #expires) .input { max-width: 22rem; font-variant-numeric: tabular-nums; }
.card > .hint + form { margin-top: 1rem; }

/* Portada: «Desde $X en total» al pie de cada tarjeta de estructura, alineado entre tarjetas.
   Reserva su línea antes de que llegue el precio (sin salto de maquetación). */
.service p.hint[data-price] { margin-top: auto; padding-top: .6rem; min-height: calc(1.55em + .6rem); color: var(--ink); font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* «¿Qué quieres corregir?»: cada dato con su botón, alineados; el botón no se parte. */
.flow .card > .list > li > span { font-weight: 600; flex: 1 1 12rem; }
.flow .card > .list > li > .btn { flex: none; }
.flow > .card + .hint { margin-top: 1rem; }

/* Consola, «Registro» en pantallas estrechas: cada fila es un bloque (fecha y quién arriba; acción y detalle debajo). */
@media (max-width: 52rem) {
  .op-table > tbody:only-child tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
  .op-table > tbody:only-child tr:first-child { border-top: 0; padding-top: 0; }
  .op-table > tbody:only-child td { display: block; padding: 0; border: 0; min-width: 0 !important; }
  .op-table > tbody:only-child td:nth-child(1), .op-table > tbody:only-child td:nth-child(2) { color: var(--muted); font-size: .82rem; }
  .op-table > tbody:only-child td:nth-child(3) { grid-column: 1 / -1; font-weight: 600; }
  .op-table > tbody:only-child td:nth-child(4) { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .op-table > tbody:only-child td:nth-child(4):empty { display: none; }
  .op-table > tbody:only-child tr:hover td { background: none; }
  .card:has(> .op-table > tbody:only-child) { overflow-x: visible; }
}

@media (max-width: 34rem) {
  /* Pares clave-valor de la consola: en una columna para que el valor no quede en una franja estrecha. */
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { margin-top: .5rem; font-size: .82rem; }
  .kv dt:first-child { margin-top: 0; }
}
