/* VERIDEX — sitio público
   Sistema visual sobre la identidad del estudio: navy, cian, verde lima y
   lavanda sobre blanco, con la malla de degradado de la marca. Las guías
   conservan las referencias del Decreto 15-2026 al margen de cada sección. */

:root {
  --navy: #021936;
  --navy-soft: #16305a;
  --text: #1b2a3d;
  --muted: #5a6878;
  --white: #ffffff;
  --ground: #f7f6fb;
  --cyan: #00bdd2;
  --cyan-deep: #007483;
  --cyan-wash: #e0f7fa;
  --green: #8ac641;
  --green-wash: #eef7e2;
  --lavender: #d8cfe7;
  --lavender-soft: #efeaf6;
  --line: #e6e0f0;
  --line-soft: #efebf5;
  --violet: #5f4593;
  --risk-low: #8ac641;
  --risk-mid: #a58fd0;
  --risk-high: #021936;
  --font-display: "Outfit", "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: var(--font-text);
  --mesh:
    radial-gradient(60% 55% at 0% 0%, #d8cfe7 0%, rgba(216, 207, 231, 0) 70%),
    radial-gradient(55% 60% at 45% 0%, #7fdcea 0%, rgba(127, 220, 234, 0) 70%),
    radial-gradient(45% 55% at 100% 0%, #021936 0%, rgba(2, 25, 54, 0) 65%),
    radial-gradient(50% 50% at 100% 100%, #8ac641 0%, rgba(138, 198, 65, 0) 70%),
    radial-gradient(35% 35% at 92% 45%, #ffffff 0%, rgba(255, 255, 255, 0) 70%), #ffffff;
  --mesh-light:
    radial-gradient(50% 60% at 0% 0%, #e9e3f3 0%, rgba(233, 227, 243, 0) 70%),
    radial-gradient(50% 60% at 60% 0%, #d6f4f8 0%, rgba(214, 244, 248, 0) 70%),
    radial-gradient(40% 50% at 100% 100%, #e8f4d9 0%, rgba(232, 244, 217, 0) 70%), #ffffff;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  --sheet-pad: clamp(28px, 5vw, 56px);
  --ref-col: 9rem;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 10px 40px rgba(2, 25, 54, 0.07);
  --nav-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
}

h4 {
  font-size: 1rem;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

li {
  margin-bottom: 0.35em;
}

li::marker {
  color: var(--cyan);
}

table {
  border-collapse: collapse;
  width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--cyan-wash);
  color: var(--navy);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--white);
  color: var(--navy);
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
}

/* Contenedor ------------------------------------------------------------- */

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

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

/* Texto ------------------------------------------------------------------ */

.lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--navy-soft);
  max-width: 60ch;
}

.small {
  font-size: 0.9375rem;
}

.meta {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.meta a {
  color: var(--cyan-deep);
}

.ref {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cyan-deep);
  letter-spacing: 0.01em;
}

.link {
  color: var(--cyan-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--cyan) 60%, transparent);
  transition: text-decoration-color 0.15s;
}

.link:hover {
  text-decoration-color: var(--cyan-deep);
}

.prose a:not(.btn) {
  color: var(--cyan-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--cyan) 60%, transparent);
}

.prose a:not(.btn):hover {
  text-decoration-color: var(--cyan-deep);
}

.prose ul,
.prose ol {
  max-width: var(--measure);
}

.red {
  color: var(--violet);
}

/* Botones ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.btn:hover {
  background: var(--navy-soft);
  border-color: var(--navy-soft);
  box-shadow: 0 6px 18px rgba(2, 25, 54, 0.18);
}

.btn:active {
  background: var(--navy);
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-light {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

.btn-light:hover {
  background: #33cbdc;
  border-color: #33cbdc;
  color: var(--navy);
}

.btn-seal {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy);
}

.btn-seal:hover {
  background: #33cbdc;
  border-color: #33cbdc;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 28px;
}

.actions .link {
  font-size: 0.9375rem;
}

/* Navegación ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--navy);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  flex-shrink: 0;
}

.brand img {
  height: 26px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.nav-links li {
  margin: 0;
}

.nav-links a:not(.btn) {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 12px;
  color: var(--navy-soft);
  text-decoration: none;
  border-radius: 999px;
  transition:
    color 0.15s,
    background-color 0.15s;
}

.nav-links a:not(.btn):hover {
  color: var(--navy);
  background: var(--lavender-soft);
}

.nav-links a[aria-current="page"] {
  color: var(--navy);
  background: var(--cyan-wash);
}

.nav-links .nav-login {
  margin-left: 8px;
}

.nav-links .btn {
  min-height: 42px;
  padding: 8px 18px;
  margin-left: 8px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 14px;
  background: var(--white);
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle span[aria-hidden] {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 -6px 0 currentColor,
    0 6px 0 currentColor;
}

/* Portada: cabecera ------------------------------------------------------ */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 7vw, 88px);
  background: var(--mesh);
  background-size: 100% 100%;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 0.55em;
}

.hero .lead {
  max-width: 52ch;
  color: var(--navy);
}

/* Hoja ------------------------------------------------------------------- */

.sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--sheet-pad);
}

.sheet + .sheet {
  margin-top: clamp(24px, 3vw, 40px);
}

.sheet-tight {
  padding: clamp(22px, 3vw, 32px);
}

.sheets {
  padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 96px);
}

.sheets .sheet:first-child {
  margin-top: 0;
}

/* Sello de estado ------------------------------------------------------- */

.stamp {
  position: relative;
  display: inline-grid;
  gap: 2px;
  padding: 14px 20px 15px;
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  line-height: 1.1;
  animation: stamp-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(120deg, var(--cyan), var(--green));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stamp-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-deep);
}

.stamp-main {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.stamp-note {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

.stamp-sm {
  padding: 11px 16px 12px;
}

.stamp-sm .stamp-main {
  font-size: 1.25rem;
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-sheet {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 3vw, 32px);
  box-shadow: 0 24px 60px rgba(2, 25, 54, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-sheet .stamp {
  justify-self: start;
}

/* Libro: pares clave / valor --------------------------------------------- */

.ledger {
  margin: 0;
  font-size: 0.9375rem;
}

.ledger > div {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}

.ledger > div:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.ledger dt {
  color: var(--muted);
  font-weight: 500;
}

.ledger dd {
  margin: 0;
  color: var(--navy);
}

.ledger dd a {
  color: var(--cyan-deep);
}

/* Entrada anotada: referencia al margen + cuerpo ------------------------- */

.entry {
  display: grid;
  grid-template-columns: var(--ref-col) minmax(0, 1fr);
  gap: 16px clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line-soft);
}

.entry:first-child {
  padding-top: 0;
  border-top: 0;
}

.entry:last-child {
  padding-bottom: 0;
}

.entry-ref {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--cyan-deep);
  padding-top: 0.55rem;
  border-right: 2px solid var(--lavender);
  padding-right: 16px;
}

.entry-ref span {
  display: block;
}

.entry-ref .ref-note {
  color: var(--muted);
  font-weight: 500;
  margin-top: 6px;
}

.entry-body > h2:first-child,
.entry-body > h3:first-child {
  margin-top: 0;
}

.entry-body h2 {
  max-width: 24ch;
}

.entry-body h3 {
  margin-top: 1.6em;
}

.entry-body > h3:first-child {
  margin-top: 0;
}

/* Cabecera de páginas interiores ----------------------------------------- */

.page-head {
  padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 4vw, 44px);
  background: var(--mesh-light);
  background-size: 100% 100%;
}

.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
}

.page-head h1 {
  max-width: 18ch;
}

.page-head .lead {
  margin-top: 0.75em;
}

.page-head .stamp {
  box-shadow: var(--shadow);
}

.crumbs {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crumbs a {
  color: var(--cyan-deep);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--lavender);
}

/* Respuesta rápida ------------------------------------------------------- */

.answer {
  border-left: 4px solid var(--cyan);
  background: var(--cyan-wash);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px 16px 22px;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  max-width: 68ch;
}

.answer strong:first-child {
  color: var(--cyan-deep);
  font-weight: 700;
}

/* Secuencias (pasos, cronología) ----------------------------------------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
}

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0 16px;
  padding: 18px 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.steps > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.steps > li > * {
  grid-column: 2;
}

.steps > li::before {
  grid-column: 1;
  grid-row: 1 / span 2;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cyan-wash);
  color: var(--cyan-deep);
  font-size: 0.875rem;
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 0.3em;
  font-size: 1.0625rem;
}

.steps p {
  margin: 0;
}

.steps-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.steps-cols > li,
.steps-cols > li:first-child {
  display: block;
  padding: 0;
  border-top: 3px solid var(--cyan);
  padding-top: 12px;
}

.steps-cols > li::before {
  display: inline-grid;
  margin-bottom: 8px;
  grid-row: auto;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
  gap: 6px 20px;
  padding: 14px 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.timeline time,
.timeline .when {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.timeline .when small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
}

.timeline p {
  margin: 0;
}

.timeline .ref {
  margin-left: 8px;
}

.timeline li.now time,
.timeline li.now .when {
  color: var(--cyan-deep);
}

/* Catálogo (grupos del Art. 3) ------------------------------------------- */

.catalog {
  display: grid;
  gap: 0;
}

.catalog > section {
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
}

.catalog > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.catalog h3 {
  margin-bottom: 0.25em;
}

.catalog h3 .ref {
  display: inline-block;
  margin-left: 10px;
  font-weight: 600;
}

.catalog .who {
  color: var(--muted);
  margin-bottom: 0.75em;
}

.cols-2 {
  columns: 2;
  column-gap: 40px;
  max-width: none;
}

.cols-2 li {
  break-inside: avoid;
}

/* Lista de definiciones (capacidades) ------------------------------------ */

.defs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

.defs > div {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

.defs dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.defs dd {
  margin: 0;
  color: var(--text);
}

.defs-1 {
  grid-template-columns: minmax(0, 1fr);
}

/* Niveles de riesgo ------------------------------------------------------ */

.risk {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk li {
  display: grid;
  grid-template-columns: 14px minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.risk li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.risk i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(1px);
}

.risk .low i {
  background: var(--risk-low);
}

.risk .mid i {
  background: var(--risk-mid);
}

.risk .high i {
  background: var(--risk-high);
}

.risk strong {
  font-weight: 600;
  color: var(--navy);
}

.risk p {
  margin: 0;
}

/* Tablas ----------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  font-size: 0.9375rem;
  min-width: 520px;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.table th {
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--lavender);
}

.table thead th {
  padding-top: 0;
}

.table tbody th {
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}

.table td.center,
.table th.center {
  text-align: center;
  padding-right: 0;
}

.table .yes {
  color: var(--cyan-deep);
  font-weight: 700;
}

.table .no {
  color: var(--lavender);
}

/* Planes ----------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
  list-style: none;
  padding: 24px 0 0;
  margin: 0;
}

.plans > li {
  position: relative;
  margin: 0;
  padding-top: 16px;
  border-top: 3px solid var(--navy);
}

.plans > li.recommended {
  border-top-color: var(--green);
}

.plans h3 {
  margin-bottom: 0.2em;
}

.plans .tag {
  position: absolute;
  top: -26px;
  left: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green-wash);
}

.plans .clients {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.plans ul {
  padding-left: 1.1em;
  font-size: 0.9375rem;
}

.plans ul li {
  padding: 0;
  border: 0;
  margin-bottom: 0.35em;
}

/* Preguntas frecuentes --------------------------------------------------- */

.faq {
  max-width: 72ch;
}

.faq details {
  border-top: 1px solid var(--line-soft);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--line-soft);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--navy);
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--cyan-deep);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > *:not(summary) {
  padding-bottom: 18px;
}

.faq-static h3 {
  margin-top: 1.5em;
}

.faq-static h3:first-child {
  margin-top: 0;
}

/* Formularios ------------------------------------------------------------ */

.form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.9375rem;
  transition: border-color 0.15s;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--lavender);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 0;
  border-color: var(--cyan-deep);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.form .btn {
  justify-self: start;
}

.form-note {
  font-size: 0.875rem;
  color: var(--muted);
}

.form-done {
  padding: 8px 0;
}

/* Cuestionario de Persona Obligada --------------------------------------- */

#test {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.quiz-intro {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.quiz-progress {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan-deep);
  margin-top: 8px;
}

.quiz fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.quiz .quiz-q {
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}

.quiz .quiz-q:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.quiz .quiz-q > label,
.quiz legend {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  padding: 0;
}

.quiz-number {
  display: inline-block;
  min-width: 1.6em;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cyan-deep);
}

.quiz select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.9375rem;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choices label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.choices label:hover {
  border-color: var(--cyan);
}

.choices label:has(:checked) {
  border-color: var(--cyan);
  background: var(--cyan-wash);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.choices input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--cyan-deep);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.quiz-result {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--cyan);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--cyan-wash);
}

.quiz-result h3 {
  margin: 0 0 8px;
}

.quiz-result .meta {
  display: block;
  margin-top: 12px;
}

.quiz-help {
  margin-top: 20px;
  font-size: 0.9375rem;
}

/* Portada: bloque de cierre --------------------------------------------- */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: center;
  background: var(--mesh-light);
  background-size: 100% 100%;
}

/* Recursos: índice de guías ---------------------------------------------- */

.index-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.index-list li {
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.index-list li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.prose .index-list a:not(.btn) {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
}

.index-list a,
.index-list .soon {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 6px 32px;
  padding: 18px 0;
  text-decoration: none;
  color: inherit;
}

.index-list a strong {
  color: var(--cyan-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--cyan) 60%, transparent);
}

.index-list a:hover strong {
  text-decoration-color: var(--cyan-deep);
}

.index-list .soon strong {
  color: var(--muted);
  font-weight: 700;
}

.index-list .soon strong small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
}

.index-list span {
  color: var(--text);
}

/* Pie -------------------------------------------------------------------- */

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding: clamp(40px, 6vw, 64px) 0 28px;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand img {
  height: 26px;
  width: auto;
}

.footer-tagline {
  margin: 12px 0 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.footer-brand p:not(.footer-tagline) {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer h4 {
  color: var(--white);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin: 0 0 9px;
}

.footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer a:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-underline-offset: 0.2em;
}

.footer a:focus-visible,
.footer button:focus-visible {
  outline-color: var(--cyan);
}

.footer-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.66);
  max-width: 96ch;
}

.footer-note strong {
  color: rgba(255, 255, 255, 0.9);
}

/* Figuras: diagramas e infografías ---------------------------------------- */

.figure {
  margin: 28px 0;
  max-width: none;
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure svg text {
  font-family: var(--font-text);
}

.figure figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 72ch;
}

.figure-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.figure-scroll svg {
  min-width: 640px;
}

.figure-narrow {
  max-width: 560px;
}

.figure-narrow.figure-scroll svg {
  min-width: 520px;
}

/* SVG: nodos, líneas y sellos */
.d-node {
  fill: var(--white);
  stroke: var(--lavender);
  stroke-width: 1.5;
}

.d-node-ink {
  fill: var(--navy);
  stroke: var(--navy);
}

.d-node-seal {
  fill: var(--cyan-wash);
  stroke: var(--cyan);
}

.d-line {
  fill: none;
  stroke: var(--lavender);
  stroke-width: 2;
}

.d-line-seal {
  stroke: var(--cyan);
}

.d-line-dash {
  stroke-dasharray: 5 5;
}

.d-arrow {
  fill: var(--cyan-deep);
  stroke: none;
}

.d-text {
  fill: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.d-text-bold {
  fill: var(--navy);
  font-size: 16px;
  font-weight: 700;
}

.d-text-small {
  fill: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.d-text-seal {
  fill: var(--cyan-deep);
  font-size: 12.5px;
  font-weight: 700;
}

.d-text-light {
  fill: var(--white);
  font-size: 15px;
  font-weight: 700;
}

.d-dot {
  fill: var(--white);
  stroke: var(--navy);
  stroke-width: 2.5;
}

.d-dot-seal {
  fill: var(--cyan);
  stroke: var(--cyan);
}

/* Flujo horizontal (proceso) */
.flow {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 12px;
  counter-reset: flow;
  max-width: none;
}

.flow li {
  counter-increment: flow;
  position: relative;
  margin: 0;
  padding: 14px 14px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--white);
}

.flow li::before {
  content: counter(flow);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-deep);
  margin-bottom: 6px;
}

.flow li::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  transform: translateY(-50%) rotate(45deg);
}

.flow li:last-child::after {
  display: none;
}

.flow li.flow-end {
  border-top-color: var(--green);
  background: var(--green-wash);
}

.flow strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.flow small {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Convergencia: grupos → Persona Obligada → obligaciones */
.converge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 0.7fr) 40px minmax(0, 1.1fr);
  align-items: center;
  gap: 12px;
  max-width: none;
}

.converge ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.converge li {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.converge li small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}

.converge .obligations li {
  border-left-color: var(--cyan);
  padding: 7px 10px;
  font-weight: 500;
}

.converge .obligations {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.converge-arrow {
  position: relative;
  height: 2px;
  background: var(--cyan);
}

.converge-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  transform: rotate(45deg);
}

.converge-center {
  padding: 18px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.converge-center small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

/* Barras de rango y de escala */
.bars {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) minmax(7rem, auto);
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.bars li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.bars .label {
  font-size: 0.875rem;
  color: var(--navy);
  font-weight: 600;
}

.bars .label small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}

.bars .track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--lavender-soft);
  overflow: hidden;
}

.bars .track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from, 0%);
  width: calc(var(--to, 100%) - var(--from, 0%));
  border-radius: 999px;
  background: var(--navy);
  transform-origin: left center;
}

.bars .track i.seal {
  background: var(--cyan);
}

.bars .track i.red {
  background: var(--violet);
}

.bars .value {
  font-size: 0.875rem;
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.bars-axis {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 0 calc(min(13rem, 30%) + 16px);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Niveles de riesgo como banda */
.riskband {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  max-width: none;
}

.riskband > div {
  padding-top: 10px;
  border-top: 6px solid var(--lavender);
  border-radius: 3px 3px 0 0;
}

.riskband .low {
  border-top-color: var(--risk-low);
}

.riskband .mid {
  border-top-color: var(--risk-mid);
}

.riskband .high {
  border-top-color: var(--risk-high);
}

.riskband strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--navy);
}

.riskband span {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}

/* Aparición al entrar en pantalla (solo figuras) */
html.js .figure .d-node,
html.js .figure .d-dot,
html.js .figure .d-text,
html.js .figure .d-text-bold,
html.js .figure .d-text-small,
html.js .figure .d-text-seal,
html.js .figure .d-text-light,
html.js .figure .d-arrow,
html.js .figure .flow li,
html.js .figure .converge li,
html.js .figure .converge-center,
html.js .figure .riskband > div {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
  transition-delay: calc(var(--i, 0) * 70ms);
}

html.js .figure .d-line {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1.1s ease-out 0.15s;
}

html.js .figure .converge-arrow {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s ease-out 0.3s;
}

html.js .figure .bars .track i {
  transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

html.js .figure.in .d-node,
html.js .figure.in .d-dot,
html.js .figure.in .d-text,
html.js .figure.in .d-text-bold,
html.js .figure.in .d-text-small,
html.js .figure.in .d-text-seal,
html.js .figure.in .d-text-light,
html.js .figure.in .d-arrow,
html.js .figure.in .flow li,
html.js .figure.in .converge li,
html.js .figure.in .converge-center,
html.js .figure.in .riskband > div {
  opacity: 1;
  transform: none;
}

html.js .figure.in .d-line {
  stroke-dashoffset: 0;
}

html.js .figure.in .converge-arrow,
html.js .figure.in .bars .track i {
  transform: scaleX(1);
}

/* Responsivo ------------------------------------------------------------- */

@media (max-width: 1040px) {
  .nav-links {
    font-size: 0.875rem;
  }
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: grid;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 12px var(--gutter) 20px;
    gap: 2px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 1rem;
  }
  .nav-links.open a:not(.btn) {
    display: block;
    padding: 12px 12px;
  }
  .nav-links.open .nav-login {
    margin-left: 0;
  }
  .nav-links.open .btn {
    margin: 10px 0 0;
    justify-self: start;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-sheet {
    max-width: 480px;
  }
  .page-head-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .page-head-grid .stamp {
    justify-self: start;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .quiz-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .quiz-intro {
    position: static;
  }
  .cta-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --nav-h: 66px;
  }
  .brand img {
    height: 22px;
  }
  .converge {
    grid-template-columns: minmax(0, 1fr);
  }
  .converge-arrow {
    width: 2px;
    height: 28px;
    margin: 0 auto;
    transform-origin: top center;
  }
  .converge-arrow::after {
    right: -3px;
    top: auto;
    bottom: -1px;
    transform: rotate(135deg);
  }
  html.js .figure .converge-arrow {
    transform: scaleY(0);
  }
  html.js .figure.in .converge-arrow {
    transform: scaleY(1);
  }
  .bars li {
    grid-template-columns: minmax(0, 1fr) minmax(5rem, auto);
  }
  .bars .track {
    grid-column: 1 / -1;
  }
  .bars-axis {
    margin-left: 0;
  }
  .riskband {
    grid-template-columns: minmax(0, 1fr);
  }
  .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .entry-ref {
    border-right: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
  }
  .entry-ref span {
    display: inline;
  }
  .entry-ref .ref-note {
    margin: 0;
  }
  .defs {
    grid-template-columns: minmax(0, 1fr);
  }
  .cols-2 {
    columns: 1;
  }
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .index-list a,
  .index-list .soon {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .risk li {
    grid-template-columns: 14px minmax(0, 1fr);
  }
  .risk p {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .plans,
  .steps-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .actions .btn {
    width: 100%;
  }
  .quiz-actions .btn {
    width: 100%;
  }
  .stamp-main {
    font-size: 1.375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .figure *,
  html.js .figure .d-line,
  html.js .figure .converge-arrow,
  html.js .figure .bars .track i {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
    transition: none;
  }
  .stamp,
  .stamp-sm {
    animation: none;
  }
  .btn,
  .link,
  .faq summary::after,
  .choices label,
  .nav-links a {
    transition: none;
  }
}
