/* =========================================================
   CasFi — Landing page
   Tokens tomados del documento de producto:
   fondo gris claro, tarjetas blancas, sidebar oscuro y un
   color identificador por espacio.
   ========================================================= */

:root {
  /* Base */
  --bg: #EEF1F5;
  --surface: #FFFFFF;
  --ink: #0F1B2D;        /* sidebar y bandas oscuras */
  --ink-2: #1A2940;
  --text: #152033;
  --muted: #5A6578;
  --line: #DCE1E8;

  /* Colores por espacio */
  --personal: #2563EB;
  --empresa-a: #16A34A;
  --empresa-b: #EA580C;
  --prestamos: #7C3AED;
  --reserva: #0D9488;     /* fondo de emergencia */
  --reserva-ink: #0F766E;

  /* Semánticos */
  --pos: #15803D;
  --neg: #DC2626;
  --warn: #B45309;

  /* Tipografía */
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-2xl: clamp(1.875rem, 3.2vw, 2.5rem);
  --fs-hero: clamp(2.5rem, 4.6vw, 3.75rem);

  /* Forma */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px -12px rgba(15, 27, 45, .18);
  --wrap: 1180px;

  /* Íconos dibujados (chulo y equis), en vez de caracteres ✓ y × */
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.4 6.6 11.3 12.4 4.9' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ico-check-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.4 6.6 11.3 12.4 4.9' fill='none' stroke='%2315803D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ico-check-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.4 6.6 11.3 12.4 4.9' fill='none' stroke='%230B1A10' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ico-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7m0-7-7 7' fill='none' stroke='%23FCA5A5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--personal); outline-offset: 3px; border-radius: 4px; }

/* Lo que el navegador pinta por su cuenta también lleva la marca */
html { accent-color: var(--personal); scrollbar-color: #B9C2CF var(--bg); }
::selection { background: color-mix(in srgb, var(--personal) 22%, transparent); color: inherit; }
input, textarea { caret-color: var(--personal); }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

.parts td { font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 22px; border-radius: 999px; white-space: nowrap;
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn-sm { padding: 9px 16px; }
.btn-lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn-primary { background: var(--personal); color: #fff; }
.btn-primary:hover { background: #1D4ED8; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { border-color: #B9C2CF; color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(238, 241, 245, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.125rem; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; object-fit: contain; }
/* Marca: «Cas» del color del texto y «Fi» en el verde de Casfi (letra Fredoka). */
.wordmark { font-family: "Fredoka", var(--font, system-ui), sans-serif; font-weight: 600; font-size: 1.25em; letter-spacing: -.01em; line-height: 1; }
.wordmark-fi { color: #12A06C; }
[data-theme="dark"] .wordmark-fi, .app-brand .wordmark-fi, .dark-band .wordmark-fi { color: #3DD39A; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 20px; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; place-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 96px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px; align-items: center;
}
.hero h1 {
  font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -.035em;
  font-weight: 800; max-width: 14ch; text-wrap: balance;
}
.hero-news {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-bottom: 22px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-sm); text-decoration: none; color: var(--text);
  transition: box-shadow .15s;
}
.hero-news:hover { box-shadow: inset 0 0 0 1.5px var(--personal); }
.hero-news[hidden] { display: none; }
.hn-tag { flex: none; padding: 3px 10px; border-radius: 999px; background: #FBBF24; color: #0F1B2D; font-size: .75rem; font-weight: 800; }
.hn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead { margin-top: 24px; font-size: var(--fs-lg); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; font-size: var(--fs-sm); font-weight: 600; }
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px;
  background: var(--ico-check) center / 14px no-repeat, var(--pos);
}
.hero-hint { margin-top: 28px; font-size: var(--fs-xs); color: var(--muted); }
.hero-hint a { color: var(--text); font-weight: 600; }
.hero { position: relative; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; }
.cta .cta-login { margin-top: 8px; font-size: var(--fs-sm); }
.cta-login a { color: var(--text); font-weight: 600; }

/* ---------- Mini-app de demostración ---------- */
.app {
  --space: var(--personal);
  position: relative;
  display: grid; grid-template-columns: 164px minmax(0, 1fr);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 4px rgba(15,27,45,.06), 0 30px 60px -24px rgba(15,27,45,.35);
  overflow: hidden;
  font-size: var(--fs-sm);
}
.app[data-space="personal"]  { --space: var(--personal); }
.app[data-space="empresaA"]  { --space: var(--empresa-a); }
.app[data-space="empresaB"]  { --space: var(--empresa-b); }
.app[data-space="prestamos"] { --space: var(--prestamos); }

.app-side { background: var(--ink); color: #C9D2DF; padding: 20px 12px; }
.app-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; padding: 0 8px 20px; }
.app-brand img { width: 24px; height: 24px; object-fit: contain; }
.app-side-label { font-size: var(--fs-xs); color: #7F8BA0; padding: 0 8px 8px; }
.space-list { display: grid; gap: 4px; }
.space-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; text-align: left; cursor: pointer;
  transition: background-color .15s;
}
.space-btn:hover { background: rgba(255,255,255,.06); }
.space-btn[aria-pressed="true"] { background: rgba(255,255,255,.1); color: #fff; }
.space-btn strong { display: block; font-weight: 600; font-size: .875rem; line-height: 1.2; }
.space-btn small { display: block; font-size: .75rem; color: #7F8BA0; }
.space-btn[aria-pressed="true"] small { color: #AEB8C8; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.space-btn[aria-pressed="true"] .dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }
.app-side-new { margin-top: 14px; padding: 8px 10px; font-size: .8125rem; color: #7F8BA0; border: 1px dashed #34445E; border-radius: 10px; }

.app-main { position: relative; background: #F4F6F9; padding: 20px; display: grid; gap: 14px; align-content: start; min-height: 440px; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.app-title { font-weight: 700; font-size: var(--fs-lg); line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.app-title::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--space); transition: background-color .3s; }
.app-sub { color: var(--muted); font-size: .8125rem; }
.demo-tag {
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 6px; background: #FEF3C7; color: #92400E;
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border-radius: 12px; padding: 11px 10px; box-shadow: 0 1px 2px rgba(15,27,45,.05); min-width: 0; }
.kpi small { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi strong { display: block; font-size: .875rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; }
.kpi em { font-style: normal; font-size: .75rem; font-weight: 600; }
.kpi em.up { color: var(--pos); }
.kpi em.down { color: var(--neg); }
.kpi:first-child { background: var(--space); color: #fff; transition: background-color .3s; }
.kpi:first-child small, .kpi:first-child em { color: rgba(255,255,255,.95); }

.panel { background: var(--surface); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(15,27,45,.05); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.legend { display: flex; gap: 12px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 5px; }
.sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sw-a { background: var(--space); }
.sw-b { background: #C3CBD7; }

/* En qué se fue: barra repartida por categoría, en tonos del color del espacio */
.spend-total { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.spend-bar { display: flex; height: 14px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: var(--spend-base, #E3E8EF); }
.spend-seg {
  flex: 0 0 0%; min-width: 0; box-shadow: inset -2px 0 0 var(--surface);
  background: color-mix(in srgb, var(--space) var(--t), var(--spend-base, #E3E8EF));
  transition: flex-basis .5s cubic-bezier(.2, .8, .2, 1), background-color .3s;
}
.spend-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; margin-top: 12px; font-size: .75rem; }
.spend-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.spend-legend .sw { flex: none; background: color-mix(in srgb, var(--space) var(--t), var(--spend-base, #E3E8EF)); transition: background-color .3s; }
.spend-legend span:not(.sw) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.spend-legend b { margin-left: auto; font-weight: 600; white-space: nowrap; }

.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 96px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; justify-content: center; }
.bar { width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; transition: height .45s cubic-bezier(.2,.8,.2,1), background-color .3s; }
.bar-a { background: var(--space); }
.bar-b { background: #C3CBD7; }
.bar-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; text-align: center; font-size: .6875rem; color: var(--muted); margin-top: 6px; }

.alert-panel { display: flex; gap: 10px; align-items: flex-start; padding-right: 72px; }
.alert-icon {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .75rem;
  background: color-mix(in srgb, var(--space) 14%, white); color: var(--space);
}
.alert-panel p { font-size: .8125rem; line-height: 1.45; }

.fab {
  position: absolute; right: 18px; bottom: 18px;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--space); color: #fff; font-size: 1.625rem; line-height: 1;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--space) 70%, transparent);
  cursor: pointer; transition: background-color .3s, transform .2s;
}
.fab[aria-expanded="true"] { transform: rotate(45deg); }
.fab-menu {
  position: absolute; right: 18px; bottom: 76px; width: 210px;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow);
}
.fab-menu p { font-size: .75rem; color: #9AA6B8; padding: 0 6px 6px; }
.fab-menu li { padding: 7px 6px; border-radius: 8px; font-size: .875rem; display: flex; align-items: center; gap: 8px; }
.fab-menu li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--space); }

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section h2, .dark-band h2, .cta h2 {
  font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; text-wrap: balance;
}
.section-head p { margin-top: 16px; color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; }
/* Estado de una sección que aún no está en la app: va pegado al título, no encima */
.h-status { margin-left: 6px; font-size: .8125rem; letter-spacing: 0; vertical-align: .35em; white-space: nowrap; }

/* Espacios */
.spaces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.spaces-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.space-card {
  /* La franja del color del espacio va en el fondo: sigue la curva de las esquinas sin adelgazarse */
  background: linear-gradient(var(--c), var(--c)) top / 100% 5px no-repeat, var(--surface);
  border-radius: var(--r-lg); padding: 33px 28px 28px;
  display: flex; flex-direction: column;
}
.space-card h3 { font-size: var(--fs-xl); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.space-need { margin-top: 10px; color: var(--muted); }
.mods { margin-top: 20px; display: grid; gap: 10px; font-size: var(--fs-sm); }
.mods li { padding-left: 22px; position: relative; }
.mods li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 10px; height: 10px; border-radius: 3px;
  background: color-mix(in srgb, var(--c) 22%, white); border: 1.5px solid var(--c);
}
.soon {
  display: inline-block; vertical-align: middle; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: .6875rem; font-weight: 700; line-height: 1.6; letter-spacing: 0;
  background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted);
}
.soon-light { margin-left: 6px; background: #FEF3C7; color: #92400E; }
.soon-ok { background: color-mix(in srgb, var(--pos) 16%, transparent); color: #166534; }
.mods li.is-soon { color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mods li.is-soon .soon { flex: none; margin-left: 0; }
.mods li.is-soon::before { background: transparent; border-style: dashed; }
.space-legend { margin-top: 16px; font-size: var(--fs-xs); color: var(--muted); }
.space-legend .soon { margin: 0 2px 0 0; }
.space-rule { margin-top: auto; padding-top: 20px; font-size: var(--fs-sm); font-weight: 600; color: color-mix(in srgb, var(--c) 72%, #000); }

/* Transferencia */
.transfer {
  margin-top: 28px; padding: 36px; border-radius: var(--r-lg);
  background: var(--ink); color: #E6EBF2;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center;
}
.transfer h3 { font-size: var(--fs-xl); line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.transfer-copy p { margin-top: 12px; color: #AEB8C8; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  border: 1.5px solid #34445E; background: transparent; color: #C9D2DF;
  padding: 7px 14px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: #5A6B85; }
.chip[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }

.transfer-viz { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: stretch; row-gap: 20px; }
.transfer-viz .link { align-self: center; }
.leg { background: var(--ink-2); border-radius: var(--r-md); padding: 18px; display: grid; gap: 4px; align-content: start; border: 1px solid #2A3A55; }
.leg-space { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; font-size: var(--fs-sm); }
.leg-space::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.leg-amount { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; }
.leg-amount.neg { color: #FCA5A5; }
.leg-amount.pos { color: #86EFAC; }
.leg-note { font-size: var(--fs-xs); color: #9AA6B8; min-height: 2.6em; }
.link { position: relative; height: 2px; background: linear-gradient(90deg, var(--personal), var(--empresa-a)); }
.link span {
  position: absolute; right: -2px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--empresa-a); border-right: 2px solid var(--empresa-a);
  transform: translateY(-50%) rotate(45deg);
}
.transfer-viz.is-reverse .link { transform: scaleX(-1); }
.transfer-total { grid-column: 1 / -1; text-align: center; font-size: var(--fs-sm); color: #AEB8C8; }
.transfer-total strong { color: #fff; font-size: var(--fs-md); }

/* Préstamos */
.loan-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.loan-copy p { margin-top: 16px; color: var(--muted); font-size: var(--fs-md); max-width: 52ch; }
.loan-copy h2 + p { margin-top: 20px; }
.loan-facts { margin-top: 28px; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 420px; }
.loan-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.loan-facts dt { color: var(--muted); }
.loan-facts dd { font-weight: 600; text-align: right; }

.loan-card { background: var(--bg); border-radius: var(--r-lg); padding: 28px; }
.loan-input { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 12px; }
.loan-input label { font-weight: 600; }
.loan-input output { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; color: var(--prestamos); }
.loan-input input { grid-column: 1 / -1; width: 100%; accent-color: var(--prestamos); margin: 8px 0 0; }
.loan-input + .loan-input { margin-top: 18px; }
.loan-formula { margin-top: 16px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-sm); }
.check.is-warn { color: var(--warn); }
.check.is-warn::before { content: "!"; display: grid; place-items: center; font-size: .75rem; font-weight: 800; background: #FEF3C7; }

.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 22px; background: var(--line); }
.split-int { background: var(--prestamos); transition: flex-basis .3s; }
.split-cap { background: #C4B5FD; transition: flex-basis .3s; }
.split-legend { display: flex; gap: 20px; margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); }
.split-legend li { display: flex; align-items: center; gap: 6px; }
.split-legend strong { color: var(--text); }
.sw-int { background: var(--prestamos); }
.sw-cap { background: #C4B5FD; }

.parts { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); border-radius: var(--r-md); overflow: hidden; }
.parts caption { text-align: left; font-weight: 600; padding-bottom: 10px; }
.parts th, .parts td { padding: 11px 14px; text-align: right; }
.parts th:first-child { text-align: left; }
.parts thead th { font-weight: 500; color: var(--muted); font-size: var(--fs-xs); border-bottom: 1px solid var(--line); }
.parts tbody tr + tr td, .parts tbody tr + tr th { border-top: 1px solid #EEF1F5; }
.parts tbody th { font-weight: 600; }
.parts tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.parts tfoot th, .parts tfoot td { border-top: 1.5px solid var(--text); font-weight: 700; }
.check { margin-top: 14px; font-size: var(--fs-sm); color: var(--pos); font-weight: 600; display: flex; align-items: flex-start; gap: 8px; }
.check::before { flex: none; content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--ico-check-green) center / 14px no-repeat, #DCFCE7; }

/* Página restringida de préstamos */
.page-title { font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; }
.access-tag { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--prestamos); background: #EDE9FE; padding: 4px 10px; border-radius: 999px; }

/* Fondo de emergencia: simulador */
.fund-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.fund-copy > p, .sim-panel > p { margin-top: 18px; color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; max-width: 52ch; }
.fund-controls { margin-top: 32px; display: grid; gap: 22px; max-width: 520px; }
.fund-input { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; }
.fund-input label { font-weight: 600; font-size: var(--fs-sm); }
.fund-input output { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; color: var(--reserva-ink); }
.fund-input input { grid-column: 1 / -1; width: 100%; margin: 6px 0 0; accent-color: var(--reserva); }
.fund-goal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fund-goal > span { font-weight: 600; font-size: var(--fs-sm); }
.goal-chips { display: flex; gap: 8px; }
.goal-chip {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  padding: 7px 16px; border-radius: 999px; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.goal-chip:hover { border-color: var(--reserva); }
.goal-chip[aria-pressed="true"] { background: var(--reserva-ink); border-color: var(--reserva-ink); color: #fff; }

.fund-card {
  background: radial-gradient(420px 260px at 50% 0%, rgba(45, 212, 191, .16), transparent 70%), var(--ink);
  color: #E6EBF2; border-radius: 28px; padding: 36px 32px 30px;
  display: grid; gap: 6px; text-align: center;
  box-shadow: 0 30px 60px -28px rgba(15, 27, 45, .55);
}
.fund-now { position: relative; width: 190px; margin: 0 auto 14px; }
.ring { width: 100%; transform: rotate(-90deg); }
.ring-track, .ring-val { fill: none; stroke-width: 10; }
.ring-track { stroke: #22324B; }
.ring-val {
  stroke: url(#ring-grad); stroke-linecap: round;
  stroke-dasharray: var(--p, 0) 100; transition: stroke-dasharray .45s cubic-bezier(.2, .8, .2, 1);
}
.fund-card.is-full .ring-val { filter: drop-shadow(0 0 6px rgba(94, 234, 212, .6)); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; }
.ring-center strong { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #fff; }
.ring-center span { font-size: var(--fs-xs); color: #9AA6B8; margin-top: 4px; }
.fund-head { font-size: var(--fs-lg); color: #fff; line-height: 1.3; }
.fund-head strong { color: #5EEAD4; }
.fund-date { font-size: var(--fs-sm); color: #9AA6B8; }
.fund-date::first-letter { text-transform: uppercase; }

.milestones { margin: 18px 0 4px; display: grid; gap: 8px; text-align: left; }
.milestones li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 14px 11px 40px; border-radius: 12px; background: #16233A; position: relative; font-size: var(--fs-sm);
}
.milestones li::before {
  content: ""; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3B4D6B;
}
.milestones li span { color: #E6EBF2; font-weight: 600; }
.milestones small { display: block; font-weight: 400; font-size: .75rem; color: #8592A6; }
.milestones b { font-weight: 600; color: #AEB8C8; text-align: right; font-size: var(--fs-xs); }
.milestones li.is-done::before { background: #4ADE80; border-color: #4ADE80; }
.milestones li.is-done b { color: #86EFAC; }
.milestones li.is-goal { background: #173A44; box-shadow: inset 0 0 0 1.5px #2DD4BF; }
.milestones li.is-goal::before { border-color: #5EEAD4; box-shadow: 0 0 0 4px rgba(94, 234, 212, .18); }
.milestones li.is-goal b { color: #5EEAD4; }
.fund-plan { font-size: var(--fs-sm); color: #AEB8C8; margin-top: 10px; }
.fund-plan strong { color: #fff; font-weight: 600; }
.fund-nudge { font-size: var(--fs-sm); color: #FDE68A; background: rgba(253, 230, 138, .08); border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.fund-nudge strong { color: #FEF3C7; }
.fund-nudge[hidden] { display: none; }
.sim-tabs { margin: 0 0 28px; }
.sim-panel[hidden] { display: none; }
.fund-note { margin-top: 28px; font-size: var(--fs-xs); color: var(--muted); max-width: 80ch; }

/* Salud financiera */
.health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.h-card { background: var(--surface); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.h-card h3 { font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -.01em; }
.fine { font-size: var(--fs-xs); color: var(--muted); margin-top: auto; line-height: 1.5; }

.gauge { position: relative; width: 190px; }
.gauge svg { width: 100%; }
.g-track, .g-val { fill: none; stroke-width: 11; stroke-linecap: round; }
.g-track { stroke: #E5E9F0; }
.g-val { stroke: var(--personal); stroke-dasharray: var(--v) 100; }
.gauge p { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.gauge strong { font-size: 2.25rem; color: var(--text); letter-spacing: -.03em; line-height: 1; }
.factors { display: grid; gap: 10px; font-size: var(--fs-sm); }
.factors li { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 12px; }
.factors meter { width: 100%; height: 8px; }

.big-num { font-size: 3.25rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--empresa-b); }
.big-num span { font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.formula { font-size: var(--fs-sm); color: var(--muted); }
.formula strong { color: var(--text); font-weight: 600; }

.prio { align-self: flex-start; font-size: var(--fs-xs); font-weight: 600; color: #B91C1C; background: #FEE2E2; padding: 3px 10px; border-radius: 999px; margin-top: -8px; }
.reco { display: grid; gap: 14px; }
.reco dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.reco dd { font-size: var(--fs-sm); margin-top: 2px; }

/* Privacidad (banda oscura) */
.dark-band { background: var(--ink); color: #E6EBF2; padding: 112px 0; }
.dark-band h2 { color: #fff; max-width: 20ch; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; margin-top: 56px; }
.promises h3 { font-size: var(--fs-md); color: #fff; padding-top: 16px; border-top: 2px solid #34445E; }
.promises p { margin-top: 8px; color: #AEB8C8; font-size: var(--fs-sm); }
.not-list { margin-top: 64px; padding: 28px 32px; border: 1px solid #2A3A55; border-radius: var(--r-lg); display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.not-list h3 { font-size: var(--fs-md); color: #fff; }
.not-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; color: #C9D2DF; font-size: var(--fs-sm); }
.not-list li { padding-left: 20px; position: relative; }
.not-list li { padding-left: 24px; }
.not-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 16px; height: 16px; background: var(--ico-x) center / contain no-repeat; }

/* Móvil */
.mobile-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.phone {
  justify-self: center; width: 290px; padding: 12px; border-radius: 44px;
  background: var(--ink); box-shadow: 0 30px 60px -24px rgba(15,27,45,.45); position: relative;
}
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 999px; background: var(--ink); z-index: 2; }
.phone-screen { background: #F4F6F9; border-radius: 34px; padding: 54px 18px 24px; position: relative; min-height: 560px; font-size: var(--fs-sm); }
.ph-space { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: #1D4ED8; background: #DBEAFE; padding: 4px 10px; border-radius: 999px; }
.ph-hi { margin-top: 12px; font-size: var(--fs-lg); font-weight: 700; }
.ph-card { margin-top: 12px; background: var(--personal); color: #fff; padding: 16px; border-radius: 16px; }
.ph-card small { display: block; opacity: .85; font-size: .75rem; }
.ph-card strong { font-size: 1.625rem; letter-spacing: -.02em; }
.ph-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; text-align: center; font-size: .6875rem; color: var(--muted); }
.ph-actions i {
  display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 4px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, white); color: var(--c);
}
.ph-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-sec { margin-top: 20px; font-weight: 600; font-size: .8125rem; }
.ph-list { margin-top: 8px; background: var(--surface); border-radius: 14px; padding: 4px 12px; }
.ph-list li { display: flex; justify-content: space-between; padding: 10px 0; font-size: .8125rem; }
.ph-list li + li { border-top: 1px solid #EEF1F5; }
.ph-list b { font-weight: 600; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.ph-fab { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: 50px; height: 50px; border-radius: 50%; background: var(--personal); color: #fff; display: grid; place-items: center; font-size: 1.625rem; box-shadow: 0 8px 18px -6px rgba(37,99,235,.7); }

.mobile-copy p { margin-top: 18px; color: var(--muted); font-size: var(--fs-md); max-width: 52ch; }
.steps { margin-top: 32px; display: grid; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 16px 0 16px 48px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .8125rem;
}
.steps strong { display: block; color: var(--text); font-size: var(--fs-md); }
.steps li.is-done::before { content: ""; background: var(--ico-check) center / 16px no-repeat, var(--pos); }

/* Novedades: sin JS se ven las ediciones tal cual; con JS, camino y tablero */
.news-head { margin-bottom: 0; }
.news-main[hidden] { display: none; }
.editions { display: grid; gap: 16px; margin-top: 32px; }
.edition { border-radius: var(--r-lg); padding: 28px; background: var(--surface); }
.ed-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: var(--fs-sm); color: var(--muted); }
.ed-name { font-weight: 700; color: var(--text); }
.edition h3 { margin-top: 10px; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -.02em; }
.ed-tagline { margin-top: 8px; color: var(--muted); }
.ed-items { margin-top: 18px; display: grid; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.ed-items strong { color: var(--text); }
#novedades .progress { margin-top: 40px; background: var(--surface); }
.progress[hidden], .board-col[hidden] { display: none; }

/* La edición nueva: misma tarjeta que «En construcción», pero ya lista */
.ed-board .board-now > div > li::after {
  background: linear-gradient(90deg, var(--personal) 0 25%, var(--empresa-a) 25% 50%, var(--empresa-b) 50% 75%, var(--prestamos) 75%);
  animation: none;
}
.ed-board .road-chip { background: #FBBF24; color: #0F1B2D; animation: none; }
.ed-board .board-now .road-bullets li { color: #AEB8C8; }
.ed-board .board-now .road-bullets b { color: #fff; font-weight: 600; }
.ed-board .board-now .road-bullets li::before {
  content: ""; border: 0; border-radius: 5px;
  background: var(--ico-check-dark) center / 12px no-repeat, #4ADE80;
}
.ed-cta { justify-self: start; margin-top: 10px; }

/* Lo que viene en Novedades: un cuadro en vez de número */
.next-intro { margin: -4px 0 16px; font-size: var(--fs-sm); color: var(--muted); }
.board-next.is-plain > ol > li::before {
  content: ""; left: 7px; top: 4px; width: 14px; height: 14px; border-radius: 4px;
  background: var(--surface); box-shadow: inset 0 0 0 2px #B9C2CF;
}
.board-next.is-plain > ol > li:not(:last-child)::after { top: 24px; }
.board-next.is-plain > ol > li > strong { padding-top: 0; }

/* Aviso de cookies (js/cookies.js): abajo a la izquierda; en el celular, a lo ancho */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 40; width: min(400px, calc(100% - 32px));
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
  border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px var(--line), 0 24px 50px -20px rgba(15, 27, 45, .45);
  opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .45s var(--ease-out, ease-out);
}
.cookie-banner.is-in { opacity: 1; transform: none; }
.cb-casfi { flex: none; width: 40px; height: auto; }
.cb-title { margin: 0; font-weight: 700; }
.cb-text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.cb-more { font-size: 14px; font-weight: 600; color: var(--personal); }
@media (max-width: 560px) { .cookie-banner { left: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: opacity .2s; transform: none; } }

/* Aviso flotante de novedades */
.news-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: min(360px, calc(100% - 32px));
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 44px 16px 16px;
  border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px var(--line), 0 24px 50px -20px rgba(15, 27, 45, .45);
  opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s;
}
.news-toast.is-in { opacity: 1; transform: none; }
.news-toast[hidden] { display: none; }
.nt-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #FBBF24;
}
.nt-icon::before {
  content: ""; width: 18px; height: 18px;
  background:
    linear-gradient(var(--personal), var(--personal)) 0 0 / 8px 8px no-repeat,
    linear-gradient(var(--empresa-a), var(--empresa-a)) 10px 0 / 8px 8px no-repeat,
    linear-gradient(var(--empresa-b), var(--empresa-b)) 0 10px / 8px 8px no-repeat,
    linear-gradient(var(--prestamos), var(--prestamos)) 10px 10px / 8px 8px no-repeat;
}
.nt-kicker { font-size: var(--fs-xs); font-weight: 700; color: #B45309; }
.nt-title { margin-top: 2px; font-weight: 700; line-height: 1.3; }
.nt-go { display: inline-block; margin-top: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--personal); }
.nt-close {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.nt-close:hover { background: var(--bg); color: var(--text); }

/* Hoja de ruta: barra de progreso y etapas */
.progress { background: var(--bg); border-radius: var(--r-lg); padding: 28px 32px; }
.progress-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.progress-num { font-size: var(--fs-lg); color: var(--muted); }
.progress-num strong { display: block; font-size: clamp(2.75rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--text); }
.progress-sub { font-size: var(--fs-sm); color: var(--muted); }
.progress-sub b { color: var(--text); }
/* Barra del camino: una sola pista que se llena hasta la etapa en construcción */
.journey { --llegada: 0%; margin-top: 64px; }
.journey-track {
  position: relative; height: 16px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
}
.journey-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; overflow: hidden;
  background: linear-gradient(90deg, var(--personal), var(--empresa-a) 45%, var(--empresa-b) 75%, var(--prestamos));
  transition: width 1.4s cubic-bezier(.2, .8, .2, 1);
}
/* Brillo que recorre lo construido */
.journey-fill::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: brillo-camino 3.2s ease-in-out 1.6s infinite;
}
@keyframes brillo-camino { 60%, 100% { transform: translateX(100%); } }
.journey-tick {
  position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%;
  background: var(--line); z-index: 1;
}
.journey-tick.is-done { background: rgba(255, 255, 255, .75); }
.journey-pin {
  position: absolute; top: 50%; left: 0; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: var(--surface); border: 4px solid var(--prestamos);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--prestamos) 20%, transparent);
  transition: left 1.4s cubic-bezier(.2, .8, .2, 1);
  animation: late-pin 2s ease-in-out infinite;
}
@keyframes late-pin { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--prestamos) 10%, transparent); } }
.journey-tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  display: grid; gap: 1px; padding: 7px 12px; border-radius: 10px; white-space: nowrap; text-align: center;
  background: var(--ink); color: #AEB8C8; font-size: .75rem; font-weight: 600;
}
.journey-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink);
}
.journey-tip strong { color: #fff; font-size: var(--fs-sm); }
.journey-tip.tip-end { left: auto; right: -14px; transform: none; }
.journey-tip.tip-end::after { left: auto; right: 20px; margin-left: 0; }
.journey-tip.tip-start { left: -14px; transform: none; }
.journey-tip.tip-start::after { left: 20px; margin-left: 0; }
.journey.is-shown .journey-fill { width: var(--llegada); }
.journey.is-shown .journey-pin { left: var(--llegada); }
/* El letrero sale cuando el marcador llega, para no asomarse cortado en el borde */
.journey-tip { opacity: 0; transition: opacity .35s ease 1.25s; }
.journey.is-shown .journey-tip { opacity: 1; }
.journey-ends { display: flex; justify-content: space-between; margin-top: 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.progress-next { margin-top: 14px; font-size: var(--fs-sm); color: var(--muted); }
.progress-next strong { color: var(--text); }

.road { margin-top: 24px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.road-bullets { display: none; }
.road li {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 18px 18px 20px; border-radius: var(--r-md);
  border: 1.5px dashed var(--line); font-size: var(--fs-xs); color: var(--muted);
}
.road li::before {
  content: "Próximamente"; justify-self: start; margin-bottom: 6px;
  font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted);
}
.road strong { color: var(--text); font-size: var(--fs-md); line-height: 1.25; letter-spacing: -.01em; }
.road li.is-done { border: 1.5px solid color-mix(in srgb, var(--pos) 35%, transparent); background: color-mix(in srgb, var(--pos) 6%, var(--surface)); }
.road li.is-done::before { content: "✓ Listo"; background: var(--pos); color: #fff; }
.road li.is-current {
  border: 2px solid var(--personal); background: color-mix(in srgb, var(--personal) 7%, var(--surface));
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--personal) 80%, transparent);
}
.road li.is-current::before { content: "● En construcción"; background: var(--personal); color: #fff; animation: late 1.6s ease-in-out infinite; }
@keyframes late { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--personal) 22%, transparent); } }
.road-cta { margin-top: 36px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.road-cta p { font-size: var(--fs-sm); color: var(--muted); }

/* Pestañas: una por columna del tablero, se ve un panel a la vez */
.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-top: 36px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.section-alt .tabs { background: var(--bg); }
.tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab-count { padding: 0 8px; border-radius: 999px; background: var(--line); color: var(--text); font-size: .75rem; line-height: 1.6; }
.tabs button[aria-selected="true"] .tab-count { background: rgba(255, 255, 255, .18); color: #fff; }

/* Con pestañas, el tablero muestra un solo panel a lo ancho */
.board.is-tabbed { display: block; margin-top: 20px; }
.board.is-tabbed > .board-col > h3 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.board.is-tabbed .board-done > ul,
.board.is-tabbed .board-next > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.board.is-tabbed .board-done > ul > li { padding: 14px 0 14px 34px; }
.board.is-tabbed .board-done > ul > li + li { border-top: 0; }
.board.is-tabbed .board-done > ul > li { border-bottom: 1px solid var(--line); }
.board.is-tabbed .board-done > ul > li::before { top: 15px; }
.board.is-tabbed .board-next > ol > li { padding: 4px 0 22px 44px; }
.board.is-tabbed .board-next > ol > li::after { display: none; }
.board.is-tabbed .board-done > ul > li > span,
.board.is-tabbed .board-next > ol > li > span { font-size: var(--fs-sm); margin-top: 2px; }
.board.is-tabbed .next-intro { margin: 0 0 20px; font-size: var(--fs-md); }
/* La tarjeta protagonista: texto a la izquierda, lo que trae a la derecha */
.board.is-tabbed .board-now > div > li {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; align-items: start; padding: 40px;
}
.board.is-tabbed .board-now > div > li > :not(.road-bullets) { grid-column: 1; }
.board.is-tabbed .board-now .road-bullets { grid-column: 2; grid-row: 1 / span 6; margin-top: 0; align-self: center; gap: 14px; }

.board { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); gap: 20px; align-items: start; }
.board[hidden] { display: none; }
.board-col > h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.board-col > ul, .board-col > ol { display: grid; gap: 8px; }

/* Ya lo puedes usar: lista compacta con su ✓ */
.board-done > ul { gap: 0; }
.board-done > ul > li { position: relative; padding: 8px 0 8px 32px; }
.board-done > ul > li + li { border-top: 1px solid var(--line); }
.board-done > ul > li > span { display: block; margin-top: 1px; font-size: var(--fs-xs); color: var(--muted); }
.board-done > ul > li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--ico-check) center / 14px no-repeat, var(--pos);
}
.board-done strong { color: var(--text); font-size: var(--fs-sm); font-weight: 600; }

/* En construcción: la tarjeta protagonista */
.board-now > div > li {
  position: relative; display: grid; gap: 10px; padding: 30px 28px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--ink); color: #AEB8C8;
  box-shadow: 0 30px 60px -30px rgba(15, 27, 45, .6);
}
.board-now > div > li::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--personal) 0 10px, #60A5FA 10px 20px);
  background-size: 28.28px 100%; animation: avanza 1.4s linear infinite;
}
@keyframes avanza { to { background-position: 28.28px 0; } }
.road-chip {
  justify-self: start; padding: 4px 12px; border-radius: 999px; background: var(--personal); color: #fff;
  font-size: .75rem; font-weight: 700; animation: late 1.6s ease-in-out infinite;
}
.board-now strong { color: #fff; font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.15; letter-spacing: -.02em; }
.board-now > div > li > span:not(.road-chip) { font-size: var(--fs-md); }
.board-now .road-bullets { display: grid; gap: 10px; margin-top: 8px; font-size: var(--fs-sm); color: #E6EBF2; }
.board-now .road-bullets li { position: relative; padding-left: 28px; }
.board-now .road-bullets li::before {
  content: ""; position: absolute; left: 0; top: .25em; width: 16px; height: 16px; border-radius: 5px;
  border: 2px solid #60A5FA; background: color-mix(in srgb, #60A5FA 18%, transparent);
}

/* Lo que viene: en orden, con su número */
.board-next > ol { counter-reset: etapa 8; gap: 0; }
.board-next > ol > li {
  counter-increment: etapa; position: relative; display: grid;
  padding: 0 0 16px 40px; min-height: 44px;
}
.board-next > ol > li > span { display: block; margin-top: 1px; font-size: var(--fs-xs); color: var(--muted); }
.road-eta { display: block; margin-top: 4px; font-style: normal; font-size: .75rem; font-weight: 600; color: var(--personal); }
.board-next > ol > li::before {
  content: counter(etapa); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: .8125rem; font-weight: 800; color: var(--text);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
}
.board-next > ol > li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 32px; bottom: 2px; border-left: 2px dashed var(--line);
}
.board-next strong { color: var(--text); font-size: var(--fs-sm); font-weight: 600; padding-top: 4px; }

/* Preguntas frecuentes */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg); font-size: 1.125rem; font-weight: 600; transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); font-size: var(--fs-sm); max-width: 62ch; }

/* CTA */
.cta { padding: 96px 0; }
.cta-inner {
  position: relative; overflow: hidden;
  background: var(--ink); color: #E6EBF2; border-radius: 28px; padding: 56px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center;
}
.cta-inner::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: linear-gradient(90deg, var(--personal) 0 25%, var(--empresa-a) 25% 50%, var(--empresa-b) 50% 75%, var(--prestamos) 75%);
}
.cta h2 { color: #fff; max-width: 20ch; }
.cta .cta-copy > p { color: #AEB8C8; font-size: var(--fs-lg); max-width: 46ch; }
.cta .btn-ghost { color: #fff; border-color: #5A6B85; }
.cta .btn-ghost:hover { border-color: #fff; }
/* El formulario vive en la misma banda oscura, separado por un filete, sin tarjeta dentro de tarjeta */
.cta-form { padding: 4px 0 4px 40px; border-left: 1px solid #2A3A55; align-content: start; }
.cta .cta-form-title { grid-column: 1 / -1; margin: 0 0 4px; color: #fff; font-weight: 700; }
.cta .btn-dark { background: #fff; color: var(--ink); }
.cta .btn-dark:hover { background: #E6EBF2; }
.cta p { margin-top: 12px; color: #AEB8C8; }
.cta-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.cta-form input {
  min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1.5px solid #34445E; background: var(--ink); color: #fff;
}
.cta-form input::placeholder { color: #7F8BA0; }
.cta-form input:focus-visible { outline-offset: 1px; border-color: var(--personal); }
.cta-form input[aria-invalid="true"] { border-color: var(--neg); }
.form-msg { grid-column: 1 / -1; font-size: var(--fs-sm); min-height: 1.5em; margin: 0; }
.form-msg.is-error { color: #FCA5A5; }
.form-msg.is-ok { color: #86EFAC; }
.cta .form-legal { grid-column: 1 / -1; margin: 0; font-size: var(--fs-xs); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { padding: 32px 0 48px; font-size: var(--fs-xs); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
.footer .brand { color: var(--text); font-size: var(--fs-md); }
.footer .brand-mark { width: 26px; height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Movimiento ----------
   Todo se ve sin JS. js/main.js pone .motion en <html> y desde ahí las cosas entran:
   el inicio y la demo se arman una vez, el resto aparece al llegar a la pantalla. */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* llega con decisión y frena suave */
  --ease-io: cubic-bezier(.65, 0, .35, 1);   /* para barridos */
}
html { scroll-padding-top: 84px; }

/* Botones y chips: responden al toque */
.btn { transition: background-color .2s, border-color .2s, color .2s, box-shadow .35s var(--ease-out), transform .35s var(--ease-out); }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn-primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--personal) 25%, transparent), 0 10px 22px -12px color-mix(in srgb, var(--personal) 70%, transparent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px color-mix(in srgb, var(--personal) 25%, transparent), 0 16px 30px -12px color-mix(in srgb, var(--personal) 80%, transparent); }
.btn-primary:hover:active { transform: scale(.97); }
.chip, .goal-chip, .space-btn, .tabs button { transition: background-color .2s, border-color .2s, color .25s, transform .3s var(--ease-out); }
.chip:active, .goal-chip:active, .space-btn:active, .tabs button:active { transform: scale(.96); transition-duration: .08s; }
.fab { transition: background-color .3s, transform .45s var(--ease-out), box-shadow .3s; }
.fab:active { transform: scale(.92); }
.fab[aria-expanded="true"]:active { transform: rotate(45deg) scale(.92); }
.fab-menu:not([hidden]) { animation: menu-in .32s var(--ease-out); transform-origin: bottom right; }
@keyframes menu-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.nav { transition: border-color .3s, box-shadow .4s var(--ease-out); }
.nav.is-scrolled { box-shadow: 0 12px 32px -26px rgba(15, 27, 45, .55); }
.nav-links a { transition: color .2s; }
.footer-links a, .hero-hint a, .nt-go { transition: color .2s, text-decoration-thickness .2s; }

/* Indicador que se desliza: el espacio elegido en la demo y la pestaña elegida */
.space-list, .tabs { position: relative; }
.space-ind, .tab-ind {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), height .5s var(--ease-out), background-color .3s;
}
.space-ind { border-radius: 10px; background: rgba(255, 255, 255, .1); }
.tab-ind { border-radius: 999px; background: var(--ink); }
.space-btn, .tabs button { position: relative; z-index: 1; }
.space-list.has-ind .space-btn[aria-pressed="true"],
.tabs.has-ind button[aria-selected="true"] { background: transparent; }
.is-settling .space-ind, .is-settling .tab-ind { transition: none; }

/* El panel que se elige entra en vez de aparecer de golpe */
.board.is-tabbed > .board-col:not([hidden]) { animation: panel-in .5s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* Entrada del inicio: el texto en cascada y la demo detrás */
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
.motion .hero-copy > * { animation: rise .85s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
.hero-copy > :nth-child(1) { --i: 0; } .hero-copy > :nth-child(2) { --i: 1; } .hero-copy > :nth-child(3) { --i: 2; }
.hero-copy > :nth-child(4) { --i: 3; } .hero-copy > :nth-child(5) { --i: 4; } .hero-copy > :nth-child(6) { --i: 5; }
.motion .hero .app { animation: app-in 1.1s var(--ease-out) .2s both; }
@keyframes app-in { from { opacity: 0; transform: translateY(32px) scale(.975); filter: blur(8px); } }

/* La demo se arma: barras que suben, el mes que se reparte, la alerta al final */
.app.is-intro .bar { transform-origin: bottom; animation: grow .9s var(--ease-out) both; animation-delay: calc(.55s + var(--i, 0) * 55ms); }
@keyframes grow { from { transform: scaleY(0); } }
.app.is-intro .spend-bar { animation: sweep 1.2s var(--ease-io) .5s both; }
@keyframes sweep { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
.app.is-intro .spend-legend li { animation: rise .6s var(--ease-out) both; animation-delay: calc(.9s + var(--i, 0) * 45ms); }
.app.is-intro .alert-panel { animation: rise .7s var(--ease-out) 1.25s both; }
.app.is-intro .fab { animation: pop .6s var(--ease-out) 1.45s both; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
/* Al cambiar de espacio, lo que cambia de texto se asienta */
.app.is-swapping [data-bind="name"], .app.is-swapping [data-bind="sub"],
.app.is-swapping [data-bind="spendTitle"], .app.is-swapping [data-bind="alert"],
.app.is-swapping .spend-legend { animation: swap .45s var(--ease-out); }
@keyframes swap { from { opacity: .2; transform: translateY(4px); } }

/* Al bajar: cada bloque entra una vez, con un leve desenfoque que se aclara */
.motion .reveal {
  opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity .75s var(--ease-out), transform .9s var(--ease-out), filter .75s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion .reveal.is-in { opacity: 1; transform: none; filter: none; }
/* Los indicadores se llenan cuando se ven */
.g-val { transition: stroke-dasharray 1.6s var(--ease-out) .35s; }
.motion .h-card.reveal:not(.is-in) .g-val { stroke-dasharray: 0 100; }
#fund-card.is-entering .ring-val { transition-duration: 1.6s; transition-delay: .3s; }
.motion #fund-card:not(.is-seen) .ring-val { stroke-dasharray: 0 100; }

/* Transferencia: la flecha gira y las cifras se asientan */
.link { transition: transform .55s var(--ease-out); }
.leg.is-swapping .leg-amount, .leg.is-swapping .leg-note { animation: swap .45s var(--ease-out); }

/* Preguntas: abren con su altura, no de golpe */
.faq summary::after { transition: transform .4s var(--ease-out), background-color .2s; }
.faq summary:hover::after { background: var(--line); }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}
.faq details[open] p { animation: rise .5s var(--ease-out) both; }

/* Aviso de novedades: entra con la misma curva */
.news-toast { transition: opacity .45s var(--ease-out), transform .6s var(--ease-out); }

/* ---------- Responsive ---------- */
/* Casfi, la mascota (Actualización 5) */
.casfi-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.casfi-copy > p { margin-top: 16px; color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; }
.casfi-copy .mods { --c: #12A06C; margin-top: 24px; font-size: var(--fs-md, 1rem); }
.casfi-hero { width: 100%; max-width: 420px; height: auto; justify-self: center; }
.casfi-aviso {
  display: flex; align-items: center; gap: 12px; margin-top: 28px; max-width: 360px;
  padding: 10px 16px 10px 10px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.casfi-aviso img { width: 48px; height: auto; }
.casfi-aviso p { display: grid; font-size: .9375rem; }
.casfi-aviso span { color: var(--muted); font-size: .8125rem; }
.casfi-sub { margin: 64px 0 20px; font-size: var(--fs-lg); font-weight: 700; }
.casfi-trajes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; }
.casfi-trajes li {
  display: grid; justify-items: center; gap: 8px; padding: 16px 10px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); text-align: center;
}
.casfi-trajes img { height: 140px; width: auto; max-width: 100%; object-fit: contain; transition: transform .25s; }
.casfi-trajes li:hover img { transform: translateY(-4px) rotate(-2deg); }
.casfi-trajes p { display: grid; gap: 2px; }
.casfi-trajes span { color: var(--muted); font-size: .8125rem; }
@media (max-width: 920px) {
  .casfi-grid { grid-template-columns: 1fr; }
  .casfi-hero { max-width: 320px; order: -1; }
  .casfi-trajes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .casfi-trajes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* El menú completo no cabe: pasa al botón de menú */
@media (max-width: 1120px) {
  .nav-toggle { display: grid; }
  .nav nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(15, 27, 45, .3);
  }
  .nav.is-open nav { display: block; }
  .nav.is-open { border-bottom-color: var(--line); }
  .nav-links { flex-direction: column; gap: 0; width: min(100% - 32px, var(--wrap)); margin: 0 auto; padding: 8px 0 16px; font-size: var(--fs-md); }
  .nav-links a { display: block; padding: 12px 0; color: var(--text); }
  .nav-links li + li { border-top: 1px solid var(--line); }
  .nav-inner { justify-content: flex-end; gap: 20px; }
  .nav-inner .brand { margin-right: auto; }
}

@media (max-width: 1080px) {
  .road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .faq-grid { gap: 40px; }
  .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .board-now { grid-column: 1 / -1; order: -1; }
  .board.is-tabbed .board-now > div > li { grid-template-columns: minmax(0, 1fr); padding: 32px 28px; }
  .board.is-tabbed .board-now .road-bullets { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .fund-grid { gap: 40px; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-inner { padding: 40px 32px; }
  .cta-form { padding: 28px 0 0; border-left: 0; border-top: 1px solid #2A3A55; }
  .hero { padding: 32px 0 72px; }
  .hero-grid, .loan-grid, .fund-grid, .mobile-grid, .transfer, .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 40px; }
  .hero h1 { max-width: 15ch; }
  .spaces, .health { grid-template-columns: minmax(0, 1fr); }
  .fund-card { max-width: 480px; width: 100%; justify-self: center; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-grid { gap: 48px; }
  .mobile-copy { order: -1; }
  .section, .dark-band { padding: 80px 0; }
  .not-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { padding: 14px 12px 12px; }
  .app-brand, .app-side-label, .app-side-new { display: none; }
  .space-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .space-btn { flex: none; width: auto; padding: 8px 12px; }
  .space-btn small { display: none; }
  .app-main { padding: 14px; min-height: 0; padding-bottom: 76px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spend-legend { column-gap: 16px; }
  .transfer { padding: 24px; }
  .transfer-viz { grid-template-columns: minmax(0, 1fr); }
  .link { width: 2px; height: 32px; justify-self: center; background: linear-gradient(180deg, var(--personal), var(--empresa-a)); }
  .transfer-viz.is-reverse .link { transform: scaleY(-1); }
  .link span { right: auto; top: auto; bottom: -2px; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .loan-card { padding: 18px; }
  .parts th, .parts td { padding: 10px 8px; }
  .parts tr > :nth-child(2) { display: none; } /* oculta "Aportó"; el % sigue visible bajo el nombre */
  .alert-panel { padding-right: 16px; }
  .road { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .journey { margin-top: 60px; }
  .ed-items { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board-now > div > li { padding: 26px 20px; }
  .tabs { display: flex; flex-wrap: nowrap; width: 100%; border-radius: 16px; }
  .tabs button {
    flex: 1 1 0; justify-content: center; padding: 10px 6px; border-radius: 12px;
    font-size: .8125rem; line-height: 1.2; text-align: center;
  }
  .tab-count { display: none; }
  .board.is-tabbed .board-done > ul,
  .board.is-tabbed .board-next > ol { grid-template-columns: minmax(0, 1fr); }
  .board.is-tabbed .board-now > div > li { padding: 26px 20px; }
  .hero-actions .btn-lg { flex: 1 1 100%; }
  .faq summary { padding: 16px; }
  .faq details p { padding: 0 16px 16px; }


  .news-toast { right: 16px; bottom: 16px; }
  .nav-actions .btn-ghost { display: none; }
  .progress { padding: 22px 20px; }
  .fund-card { padding: 28px 18px 22px; }
  .milestones li { padding-right: 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .milestones li span { display: flex; align-items: baseline; gap: 8px; }
  .milestones b { text-align: left; }
  .promises, .not-list ul { grid-template-columns: 1fr; }
  .cta-inner { padding: 36px 20px 24px; }
  .cta-form { padding: 24px 0 0; }
  .cta-form { grid-template-columns: 1fr; }
  .nav .btn-sm { padding: 8px 12px; font-size: .8125rem; }
  .nav-inner { gap: 12px; }
}

@media (max-width: 420px) {
  .nav .brand span { display: none; }
}

/* Movimiento reducido: nada se desplaza ni se repite, pero los cambios de estado
   siguen viéndose con un fundido corto */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .15s !important; transition-delay: 0s !important;
  }
  .motion .reveal { transform: none; filter: none; }
  .btn:active, .btn-primary:hover, .chip:active, .goal-chip:active, .space-btn:active, .tabs button:active, .fab:active { transform: none; }
}

/* Descarga de la app de Android dentro de «Empieza en el computador. Sigue en tu celular.» */
.steps .steps-btn { margin-top: 12px; display: inline-flex; }

/* ---------- Páginas legales (/terminos, /privacidad) ---------- */
.legal { padding: 56px 0 96px; }
.legal-doc { max-width: 72ch; margin-inline: auto; }
.legal-meta { margin-top: 12px; font-size: var(--fs-sm); color: var(--muted); }
.legal-resumen {
  margin-top: 32px; padding: 20px 24px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.legal-resumen h2 { font-size: var(--fs-md); font-weight: 700; }
.legal-resumen ul { margin-top: 10px; list-style: disc; padding-left: 1.25em; display: grid; gap: 6px; }
.legal-indice { margin-top: 28px; font-size: var(--fs-sm); }
.legal-indice ol { margin-top: 8px; list-style: decimal; padding-left: 1.5em; columns: 2 16rem; column-gap: 32px; }
.legal-indice li { break-inside: avoid; padding: 2px 0; }
.legal-indice a { color: var(--muted); text-decoration: none; }
.legal-indice a:hover { color: var(--text); text-decoration: underline; }
.legal-doc section { margin-top: 44px; scroll-margin-top: 96px; }
.legal-doc h2 { font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
.legal-doc h3 { margin-top: 20px; font-size: var(--fs-md); font-weight: 700; }
.legal-doc section p, .legal-doc section ul, .legal-doc section ol { margin-top: 12px; }
.legal-doc section ul { list-style: disc; padding-left: 1.25em; display: grid; gap: 6px; }
.legal-doc section ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: 6px; }
.legal-doc strong { font-weight: 700; }
.legal-otro { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
/* Datos que faltan por llenar antes de publicar. */
.pendiente { background: #FEF3C7; color: #92400E; padding: 0 4px; border-radius: 4px; font-weight: 600; }
