/*
  Sistema de diseño compartido: Transporte Autorizado, HDS y Campañas de reciclaje.
  Escala contenida, un acento por sitio (body[data-site]) y neutros con leve sesgo al acento.
*/

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f5fa;
  --bg-sunk: #efedf6;
  --ink: #151a2d;
  --ink-2: #3e4459;
  --muted: #6b7185;
  --line: #e4e7ee;
  --line-strong: #cfd4df;

  /* Transporte Autorizado: paleta de la marca (docs/marca/paleta.svg, entregada por el cliente el 09-10-2026). Son
     seis pares; el principal es el lila #6708C7 con #EBA9FC. Los demás pares se usan donde un color distingue algo:
     verde y rojo para no peligrosos y peligrosos, naranjo y azul para los planes. El logo recorre los pares (site.js). */
  --marca: #6708C7;   --marca-2: #EBA9FC;
  --azul: #0E14DA;    --azul-2: #A8DFFD;
  --verde: #059A3F;   --verde-2: #D7F560;
  --naranja: #FF651C; --naranja-2: #FFE357;
  --rojo: #E90B2D;    --rojo-2: #FEB5A7;
  --accent: var(--marca);
  --accent-strong: #5206A0;
  --accent-soft: #F6EAFE;
  --on-accent: #ffffff;

  --safe: #1c7a4b;
  --safe-soft: #e7f3ec;
  --hazard: #c0301f;
  --hazard-soft: #fcebe8;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;

  --container: 1080px;
  --gutter: clamp(16px, 4.5vw, 32px);
  --section: clamp(56px, 7vw, 88px);

  /* Movimiento suave: salidas desaceleradas, sin rebote */
  --ease: cubic-bezier(.25, 1, .5, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.25, 1, .5, 1);
  --shadow-s: 0 1px 2px rgb(21 26 45 / .05), 0 2px 8px -2px rgb(21 26 45 / .06);
  --shadow-m: 0 2px 4px rgb(21 26 45 / .04), 0 16px 32px -16px rgb(21 26 45 / .22);

  --font: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  /* Escala tipográfica corta: pocos tamaños y sin saltos bruscos (13 → 34 px) */
  --fs-caption: .8125rem;
  --fs-small: .875rem;
  --fs-body-sm: .9375rem;
  --fs-body: 1rem;
  --fs-lead: 1.0625rem;
  --fs-card: 1.125rem;
  --fs-subtitle: 1.25rem;
  --fs-title: clamp(1.5rem, 1.32rem + .55vw, 1.75rem);
  --fs-display: clamp(1.75rem, 1.45rem + .95vw, 2.125rem);
  color-scheme: light;
}
/* Transporte: verde y rojo de la paleta. El verde y el naranjo puros no dan contraste suficiente para texto chico ni
   para un botón con texto blanco: ahí se usa su versión oscura (--safe, --tone-amber) y el color puro queda en líneas y fondos. */
body[data-site="transporte"] { --safe: #047A32; --safe-soft: #EFF9D6; --hazard: var(--rojo); --hazard-soft: #FEEDE8; }
body[data-site="hds"] { --accent: #0b7ea3; --accent-strong: #08678a; --accent-soft: #e7f4f9; --bg-alt: #f4f7f9; --bg-sunk: #ecf1f4; }
body[data-site="campanas"] { --accent: #1c7a4b; --accent-strong: #15613b; --accent-soft: #e8f3ec; --bg-alt: #f5f7f5; --bg-sunk: #edf1ee; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-gutter: stable; }  /* el ancho no cambia al bloquear el scroll bajo una ventana */
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
a, button, label, summary, input { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
select { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }  /* Safari suma el texto de las opciones al ancho de la página */
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -.018em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }
body[data-site="transporte"] ::selection { background: var(--marca-2); color: #1c0a36; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: var(--r-s); background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Tipografía ---------- */
.display { font-size: var(--fs-display); letter-spacing: -.028em; line-height: 1.08; }
.title { font-size: var(--fs-title); letter-spacing: -.024em; }
.subtitle { font-size: var(--fs-card); letter-spacing: -.012em; line-height: 1.3; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .875rem; line-height: 1.5; }
.label-up { font-size: var(--fs-caption); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* En el teléfono el texto más pequeño es de 14 px, y los campos de 16 px (con menos, el iPhone acerca la página al tocar un campo) */
@media (max-width: 860px) {
  :root { --fs-caption: .875rem; }
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) { font-size: 1rem; }
}

/* ---------- Header ---------- */
/* Barra flotante y translúcida: una cápsula de vidrio que deja ver el contenido al desplazarse */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-top: 10px; pointer-events: none; }
.site-header .container {
  position: relative; pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 8px 0 18px; border-radius: 999px;
}
/* El vidrio va en una capa propia: si estuviera en el contenedor, el menú desplegable (que vive dentro) no podría desenfocar la página */
.site-header .container::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  border: 1px solid rgb(255 255 255 / .6); background: rgb(255 255 255 / .62);
  -webkit-backdrop-filter: saturate(1.5) blur(6.4px); backdrop-filter: saturate(1.5) blur(6.4px);
  box-shadow: 0 10px 30px -18px rgb(21 26 45 / .4), 0 0 0 1px rgb(21 26 45 / .05);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled .container::before { background: rgb(255 255 255 / .74); box-shadow: 0 16px 40px -20px rgb(21 26 45 / .45), 0 0 0 1px rgb(21 26 45 / .06); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 800; font-size: .9375rem; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) {
  position: relative; padding: 7px 11px; border-radius: 999px; color: var(--ink-2);
  font-size: .875rem; font-weight: 700; text-decoration: none; transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover { color: var(--ink); background: rgb(21 26 45 / .06); }
.nav a[aria-current] { color: var(--ink); background: rgb(21 26 45 / .07); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: calc(74px + env(safe-area-inset-top, 0px)) var(--gutter) auto; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 18px 16px;
    border: 1px solid rgb(255 255 255 / .6); border-radius: 22px; background: rgb(255 255 255 / .8);
    -webkit-backdrop-filter: saturate(1.5) blur(8px); backdrop-filter: saturate(1.5) blur(8px);
    box-shadow: 0 24px 48px -24px rgb(21 26 45 / .4), 0 0 0 1px rgb(21 26 45 / .05);
    opacity: 0; transform: translateY(-6px); visibility: hidden;
    transition: opacity .22s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav a:not(.btn) { padding: 13px 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; color: var(--ink); background: none !important; }
  .nav .btn { margin: 16px 0 0; }
}

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 800; font-size: .9375rem; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s, border-color .2s, box-shadow .25s var(--ease), filter .15s;
}
.btn:active { filter: brightness(.95); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--spring); }
.btn svg[viewBox="0 0 24 24"] { width: 17px; height: 17px; stroke-width: 2.3; }
.btn .icon-done, .btn.is-done .icon-idle { display: none; }
.btn.is-done .icon-done { display: block; animation: fade-in .3s var(--ease) both; }
.btn.is-done { border-color: var(--safe); color: var(--safe); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgb(21 26 45 / .12), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { background: var(--accent-strong); }
/* WhatsApp: verde y con su ícono (pedido del cliente, 08-10-2026). Un verde más profundo que el de la marca para que
   el texto blanco se lea bien (contraste 4,7:1). */
.btn-wa { background: #0f8446; color: #fff; box-shadow: 0 1px 2px rgb(21 26 45 / .12), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-wa:hover { background: #0b6e3a; }
.btn-wa:focus-visible { outline: 2px solid #0f8446; outline-offset: 2px; }
.btn .wa-icon { width: 17px; height: 17px; }
/* El ícono de WhatsApp va verde donde no está sobre el botón verde (enlaces y burbuja «?») */
.wa-icon { color: #0f8446; }
.btn-wa .wa-icon { color: inherit; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
@media (hover: hover) { .btn:hover svg.arrow { transform: translateX(2px); } }

.link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 800; font-size: .9375rem; text-decoration: none; }
.link svg { width: 14px; height: 14px; transition: transform .3s var(--spring); }
.link:hover { color: var(--accent-strong); }
@media (hover: hover) { .link:hover svg.arrow, a:hover .link svg.arrow { transform: translateX(3px); } }
.text-link { color: var(--accent); text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 620px; margin-bottom: clamp(24px, 3.5vw, 36px); }
.section-head > * + * { margin-top: 10px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 80px); align-items: start; }
.split-layout > .section-head { position: sticky; top: 92px; margin-bottom: 0; }
@media (max-width: 900px) { .split-layout { grid-template-columns: 1fr; } .split-layout > .section-head { position: static; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(40px, 6vw, 72px); }
.hero-copy { max-width: 560px; }
.hero-copy .lead { margin-top: 16px; }
.hero-copy .actions { margin-top: 26px; }
.hero-meta { margin-top: 18px; color: var(--muted); font-size: var(--fs-caption); font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--accent); opacity: .7; }
.hero-media { border-radius: var(--r-l); overflow: hidden; background: var(--bg-sunk); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; } .hero-media img { aspect-ratio: 16 / 10; } }

/* ---------- Grillas y tarjetas ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: var(--r-m); background: var(--bg); border: 1px solid var(--line); }
.section-alt .card { border-color: transparent; box-shadow: var(--shadow-s); }
.card h3 { font-size: 1.0625rem; letter-spacing: -.012em; line-height: 1.3; }
.card p { margin-top: 6px; color: var(--ink-2); font-size: .9375rem; }
.card .card-foot { margin-top: auto; padding-top: 16px; }
.card-media { margin: -20px -20px 16px; overflow: hidden; border-radius: var(--r-m) var(--r-m) 0 0; background: var(--bg-sunk); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .9s var(--ease); }
a.card { text-decoration: none; color: inherit; transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s; }
@media (hover: hover) { a.card:hover { box-shadow: var(--shadow-m); } }
.detail-block { margin-top: clamp(40px, 5vw, 56px); }

/* Filas */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row :is(h3, h4) { font-size: 1rem; letter-spacing: -.01em; line-height: 1.35; }
.row p { margin-top: 3px; color: var(--muted); font-size: .875rem; max-width: 60ch; }
.row > .link { min-height: 32px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* Pasos */
.steps { counter-reset: step; list-style: none; display: grid; }
.step { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; padding-top: 0; }
.step::before {
  content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: var(--fs-caption); font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--ink-2); font-size: .9375rem; }

/* Lista con check */
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: .9375rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 99px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23151a2d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.5l2.2 2.2L11.5 6'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.list-title { font-size: .9375rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); margin-bottom: 10px; }
.body-copy { color: var(--ink-2); max-width: 62ch; }
.body-copy + .checklist, .body-copy + .list-title { margin-top: 18px; }

/* Nota documental: caja suave, sin barra de acento */
.doc-note { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-s); background: var(--bg-sunk); color: var(--ink-2); font-size: .875rem; }
.section-alt .doc-note { background: #fff; }

/* Bloque con imagen */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.feature-media { border-radius: var(--r-l); overflow: hidden; background: var(--bg-sunk); }
.feature-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-copy .lead { margin-top: 12px; }
.feature-copy .actions { margin-top: 22px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature-media img { aspect-ratio: 16 / 9; } }

/* Pestañas */
.doc-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }  /* columna acotada: en Safari la fila de pestañas ensanchaba todo el panel */
.doc-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px clamp(28px, 5vw, 56px); }
.doc-panel p { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }
.doc-panel .btn { margin-top: 18px; }
.doc-panel .field { margin-top: 16px; max-width: 340px; }
@media (max-width: 760px) { .doc-panel { grid-template-columns: 1fr; } }
.audiences { display: grid; gap: 22px; }
.material-action { display: grid; gap: 12px; align-content: start; }
.material-action .field { margin-top: 0; max-width: none; }
.material-action .btn { margin-top: 0; justify-self: start; }
.stages { list-style: none; }
.law-links { margin-top: 20px; gap: 10px 20px; }
.cross-note { margin-top: 18px; color: var(--muted); font-size: .875rem; }
@media (max-width: 760px) {
  .doc-picker .segmented, .audiences .segmented {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .doc-picker .segmented::-webkit-scrollbar, .audiences .segmented::-webkit-scrollbar { display: none; }
  .segmented label { flex: none; }
  /* Tres públicos: caben completos en el ancho de un teléfono, sin desvanecer el último */
  .audiences .segmented { -webkit-mask-image: none; }
  .audiences .segmented span { padding: 0 9px; }
}

/* ---------- Acordeón ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 0; cursor: pointer; list-style: none; font-weight: 800; font-size: .9375rem; line-height: 1.45;
  transition: color .2s;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { color: var(--accent-strong); }
.accordion .plus { position: relative; flex: none; width: 24px; height: 24px; color: var(--ink); }
.accordion .plus::before, .accordion .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.8px; margin: -.9px 0 0 -5px; border-radius: 2px; background: currentColor; }
.accordion .plus::after { width: 1.8px; height: 10px; margin: -5px 0 0 -.9px; transition: transform .3s var(--ease); }
.accordion details[open] .plus::after { transform: scaleY(0); }
.accordion .answer { padding: 0 40px 18px 0; color: var(--ink-2); font-size: .9375rem; }
.accordion .answer > * + * { margin-top: 10px; }
.accordion details.is-animating { overflow: hidden; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 26px; }
.form fieldset { border: 0; padding: 0; min-width: 0; margin: 0; }
.form legend { padding: 0; margin-bottom: 14px; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .fields .segmented { flex-wrap: nowrap; gap: 4px; }
  .fields .segmented label { flex: 1 1 auto; min-width: 0; }
  .fields .segmented span { width: 100%; justify-content: center; padding: 0 8px; font-size: var(--fs-caption); }
}
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-size: var(--fs-caption); font-weight: 800; color: var(--ink-2); }
.field .hint { font-size: var(--fs-caption); color: var(--muted); }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-s); background-color: #fff;
  font-size: 1rem; line-height: 1.4; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 92px; resize: vertical; }
.field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7185' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aeb4c2; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field [aria-invalid="true"] { border-color: var(--hazard) !important; }
::placeholder { color: #a3a8b6; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: #fff;
  font-weight: 800; font-size: .875rem; white-space: nowrap; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .18s var(--ease);
}
.segmented label:active span { filter: brightness(.96); }
.segmented input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; opacity: .5; }
.segmented .is-safe .dot { background: var(--safe); opacity: 1; }
.segmented .is-hazard .dot { background: var(--hazard); opacity: 1; }
.segmented input:checked + span .dot { background: #fff; }
/* Con JS: pista con un indicador que se desliza hacia la opción elegida */
.segmented.has-glide { position: relative; isolation: isolate; width: fit-content; max-width: 100%; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-sunk); }
.segmented.has-glide span { border-color: transparent; background: transparent; min-height: 36px; }
.segmented.has-glide input:checked + span { background: transparent; border-color: transparent; }
.segmented.has-glide input:not(:checked) + span:hover { color: var(--ink); background: rgb(255 255 255 / .55); }
.segmented > .glide {
  position: absolute; z-index: -1; left: 0; top: 0; border-radius: 999px; background: var(--ink); opacity: 0;
  box-shadow: 0 2px 6px -2px rgb(21 26 45 / .35);
  transition: transform .35s var(--ease), width .35s var(--ease), height .35s var(--ease), opacity .2s;
}
.segmented-fill.has-glide { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.segmented-fill span { width: 100%; justify-content: center; padding: 0 8px; }
.section-alt .segmented.has-glide { background: #fff; }

/* Pastillas de selección (radio o casilla) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill > span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: #fff;
  font-weight: 700; font-size: .875rem; line-height: 1.3; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .18s var(--ease);
}
.pill > span::before {
  content: ""; width: 0; height: 14px; margin-right: -7px; opacity: 0; background: currentColor; flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: width .25s var(--ease), margin .25s var(--ease), opacity .2s;
}
.pill input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
.pill input:checked + span::before { width: 14px; margin-right: 0; opacity: 1; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill input:disabled + span { opacity: .45; cursor: not-allowed; }
.pill:active > span { filter: brightness(.96); }
@media (hover: hover) { .pill input:not(:checked):not(:disabled):hover + span { border-color: var(--ink-2); } }
.pills-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.pills-scroll::-webkit-scrollbar { display: none; }
.pills-scroll .pill { flex: none; }
[data-required-group][data-invalid] { border-radius: var(--r-s); box-shadow: 0 0 0 2px var(--hazard-soft), 0 0 0 3px var(--hazard); }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice > span { display: grid; gap: 2px; align-content: start; height: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s, transform .18s var(--ease); }
.choice strong { font-size: .9375rem; }
.choice small { color: var(--muted); font-size: var(--fs-caption); line-height: 1.45; }
.choice:active > span { filter: brightness(.96); }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.form-submit p { color: var(--muted); font-size: var(--fs-caption); max-width: 44ch; }

/* Formulario por pasos */
.stepper { display: grid; gap: 10px; }
.stepper-labels { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; font-size: var(--fs-caption); font-weight: 800; color: var(--muted); }
.stepper-labels > * { transition: color .3s; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.stepper-labels > :last-child { text-align: right; }
.stepper-labels > :not(:first-child):not(:last-child) { text-align: center; }
.stepper-labels > .is-done, .stepper-labels > .is-current { color: var(--ink); }
.stepper-labels button.is-done { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.stepper-labels button.is-done:hover { color: var(--accent-strong); }
.stepper-labels button:disabled { cursor: default; }
.stepper-bar { height: 4px; border-radius: 99px; background: var(--bg-sunk); overflow: hidden; }
.stepper-bar i { display: block; height: 100%; width: var(--p, 33%); border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.step-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-nav [data-step-count] { margin-right: auto; font-variant-numeric: tabular-nums; }
.step-nav p { color: var(--muted); font-size: var(--fs-caption); flex-basis: 100%; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes step-in { from { opacity: 0; transform: translateX(10px); } }
  @keyframes step-back { from { opacity: 0; transform: translateX(-10px); } }
  .form fieldset.is-entering { animation: step-in .45s var(--ease) both; }
  .form fieldset.is-entering-back { animation: step-back .45s var(--ease) both; }
}

.summary { padding: 20px; border-radius: var(--r-m); background: var(--accent-soft); }
.summary h3 { font-size: 1.0625rem; }
.summary pre { margin: 14px 0 16px; padding: 14px; max-height: 300px; overflow: auto; border-radius: var(--r-s); background: #fff; white-space: pre-wrap; word-break: break-word; font: 400 .875rem/1.55 var(--font); color: var(--ink-2); }

/* Contacto */
.contact-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(28px, 6vw, 72px); align-items: start; }
.contact-aside { position: sticky; top: 92px; }
.contact-aside .lead { margin-top: 10px; }
.aside-list { margin-top: 22px; display: grid; gap: 10px; list-style: none; color: var(--ink-2); font-size: .875rem; }
.aside-list li { display: flex; gap: 9px; }
.aside-list svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--accent); }
.contact-aside .btn { margin-top: 22px; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } .contact-aside { position: static; } }
.panel { padding: clamp(20px, 3.5vw, 32px); border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); }
.section-alt .panel { border-color: var(--line); }

/* Relacionados: tarjeta compacta con miniatura */
.related {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r-l); color: inherit; text-decoration: none;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s;
}
.related img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--bg-sunk); }
.related > span { display: grid; gap: 4px; padding-right: 8px; }
.related strong { font-size: 1rem; letter-spacing: -.01em; }
.related small { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.related .link { margin-top: 4px; font-style: normal; font-size: .875rem; }
@media (hover: hover) { .related:hover { border-color: var(--line-strong); } }
@media (max-width: 420px) { .related { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; } }
.section-alt .related { background: var(--bg); }

/* Banda secundaria */
.partner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 40px); padding: 20px 22px; border-radius: var(--r-m); background: var(--bg-alt); }
.partner > div { max-width: 600px; }
.partner h3 { font-size: 1rem; }
.partner p { margin-top: 4px; color: var(--ink-2); font-size: .9375rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 44px 32px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px; }
.footer-grid h2 { font-size: .875rem; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.footer-grid ul { list-style: none; display: grid; gap: 6px; }
.footer-grid li { white-space: nowrap; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-grid .brand { margin: 0 0 10px; }
.footer-grid p { max-width: 32ch; color: var(--muted); }
.footer-legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-caption); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid li { white-space: normal; } }

/* ---------- Burbuja de ayuda y aviso ---------- */
/* Cerrada: burbuja de vidrio con «?», teñida con el acento del sitio. Al abrirla se expande como vidrio líquido:
   primero sube y luego se ensancha (sin rebote), se aclara y las acciones aparecen de abajo arriba. Al cerrar, al revés. */
.dock {
  --liquid: cubic-bezier(.32, .72, 0, 1);  /* la curva de las hojas de iOS: arranque firme, llegada muy suave */
  --dock-size: 56px;
  position: fixed; z-index: 45;
  right: max(clamp(16px, 2.5vw, 28px), env(safe-area-inset-right, 0px));
  bottom: calc(clamp(16px, 2.5vw, 28px) + env(safe-area-inset-bottom, 0px));
  width: var(--dock-size); height: var(--dock-size); overflow: hidden; isolation: isolate;
  border-radius: calc(var(--dock-size) / 2);
  color: #fff; background: var(--accent); background: color-mix(in srgb, var(--accent) 80%, transparent);
  -webkit-backdrop-filter: blur(14.4px) saturate(1.8); backdrop-filter: blur(14.4px) saturate(1.8);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / .45), inset 0 -2px 4px rgb(0 0 0 / .06), 0 18px 36px -16px rgb(21 26 45 / .55), 0 3px 10px rgb(21 26 45 / .12);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s ease, transform .5s var(--ease), visibility 0s linear .5s,
    width .36s var(--liquid), height .46s var(--liquid) .05s, border-radius .46s var(--liquid), background-color .35s ease, color .3s ease;
}
.dock.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .3s ease, transform .5s var(--ease), visibility 0s,
    width .36s var(--liquid), height .46s var(--liquid) .05s, border-radius .46s var(--liquid), background-color .35s ease, color .3s ease;
}
.dock.is-open {
  width: var(--dock-w); height: var(--dock-h); border-radius: 26px; color: var(--ink); background: rgb(255 255 255 / .84);
  transition: opacity .3s ease, transform .5s var(--ease), visibility 0s,
    height .5s var(--liquid), width .58s var(--liquid) .05s, border-radius .58s var(--liquid), background-color .45s ease, color .3s ease;
}
/* Brillo del vidrio: reflejo arriba y un borde de luz que se desvanece hacia el centro */
.dock::before, .dock::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.dock::before { z-index: 0; background: radial-gradient(130% 70% at 28% 0%, rgb(255 255 255 / .34), transparent 62%); }
.dock::after {
  z-index: 3; padding: 1px;
  background: linear-gradient(150deg, rgb(255 255 255 / .85), rgb(255 255 255 / .14) 36%, rgb(255 255 255 / .06) 64%, rgb(255 255 255 / .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.dock-toggle {
  position: absolute; right: 0; bottom: 0; z-index: 2; display: grid; place-items: center;
  width: var(--dock-size); height: var(--dock-size); padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer;
}
.dock-toggle svg { grid-area: 1 / 1; width: 24px; height: 24px; transition: opacity .25s ease; }
.dock-toggle .dock-x, .dock.is-open .dock-toggle .dock-q { opacity: 0; }
.dock.is-open .dock-toggle .dock-x { opacity: 1; }
.dock-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.dock-menu { position: absolute; right: 0; bottom: 0; z-index: 1; display: grid; gap: 6px; width: min(17rem, calc(100vw - 32px)); padding: 8px 8px var(--dock-size); }
.dock-action {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1px solid rgb(255 255 255 / .8); border-radius: 18px;
  background: rgb(255 255 255 / .66); color: var(--ink); font: inherit; font-size: var(--fs-body-sm); font-weight: 800; line-height: 1.2;
  text-align: left; text-decoration: none; cursor: pointer;
}
.dock-action.is-primary { border-color: transparent; background: var(--accent); color: #fff; }
.dock-action svg { flex: none; width: 19px; height: 19px; }
.dock-action:active { background: #fff; }
.dock-action.is-primary:active { background: var(--accent-strong); }
.dock-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dock-caption { position: absolute; left: 18px; bottom: 0; display: flex; align-items: center; height: var(--dock-size); margin: 0; color: var(--ink-2); font-size: var(--fs-small); font-weight: 800; }
@media (hover: hover) {
  .dock-action:hover { background: rgb(255 255 255 / .92); }
  .dock-action.is-primary:hover { background: var(--accent-strong); }
}
@media (prefers-reduced-motion: no-preference) {
  .dock-action, .dock-caption { opacity: 0; transform: translateY(12px); filter: blur(4px); transition: opacity .14s ease, transform .2s ease, filter .14s ease, background-color .2s; }
  .dock.is-open .dock-action, .dock.is-open .dock-caption {
    opacity: 1; transform: none; filter: none;
    transition: opacity .35s ease var(--d), transform .55s var(--liquid) var(--d), filter .4s ease var(--d), background-color .2s;
  }
  .dock-caption { --d: .06s; }
  .dock-action { --d: .1s; }
  .dock-action:nth-child(3) { --d: .14s; }
  .dock-action:nth-child(2) { --d: .18s; }
  .dock-action:nth-child(1) { --d: .22s; }
}
@media (prefers-reduced-motion: reduce) { .dock, .dock.is-visible, .dock.is-open { transition: none; } }
/* Sin desenfoque disponible, el vidrio se vuelve casi opaco para que el texto de atrás no compita */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .dock.is-open { background: rgb(255 255 255 / .97); } }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;  /* sin esto, left: 50% lo limita a media pantalla */
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: .875rem;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: transform .4s var(--spring), opacity .25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 760px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- Movimiento ----------
   El contenido es visible en reposo; la animación solo corre cuando una sección entra en pantalla. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes fade-in { from { opacity: 0; transform: translateY(-3px); } }
  @keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
  .reveal.is-in, .reveal-group.is-in > * { animation: rise .9s var(--ease) both; }
  .reveal-group.is-in > * { animation-delay: calc(var(--i, 0) * 70ms); }
  .accordion details.is-opening .answer { animation: fade-in .4s var(--ease) both; }
  [data-tab-panel]:not([hidden]) { animation: panel-in .35s var(--ease) both; }
  .hero-copy > * { animation: rise .8s var(--ease) 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; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print { .site-header, .dock, .toast { display: none !important; } }
