/* Landing de Bolsillo Inteligente · dirección "Pulso esmeralda" (ver web/DESIGN.md).
   Misma paleta que la app (src/theme/colors.ts) y las mismas tipografías: Sora para
   titulares y cifras, autoalojada en assets/ (OFL); Inter o la del sistema para el cuerpo.
   Nada se pide a otro servidor. WOFF2 primero (24 KB por peso); el TTF queda de respaldo. */
@font-face { font-family: "Sora"; src: url("/assets/sora-600.woff2") format("woff2"), url("/assets/sora-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/sora-700.woff2") format("woff2"), url("/assets/sora-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b1311;
  --bg-deep: #08100d;
  --bg-2: #111b17;
  --card: #15211c;
  --card-raised: #1a2923;
  --ink: #f0f4f2;
  /* Texto largo del blog: menos brillo que --ink (11.9:1 sobre --bg) para leer sin deslumbrar. */
  --ink-soft: #c5d0cb;
  --muted: #9aaaa3;
  --line: #22302a;
  --line-strong: #2e4038;
  --green: #22c378;
  --green-hover: #3bd68c;
  --green-deep: #1b7e50;
  --green-ink: #adebce;
  --green-soft: #153425;
  --amber: #f4af25;
  --expense: #f07171;
  --blue: #4bb0e3;
  --purple: #b38be0;
  --slate: #5e7069;
  --radius: 28px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Sora", "Inter", "Segoe UI", system-ui, sans-serif;
  --shadow-lift: 0 24px 48px -20px rgba(2, 12, 8, 0.85);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-color: var(--line-strong) var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Grano fijo muy suave: rompe la planitud del fondo sin pedir imágenes. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--green-soft); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip-link:focus { left: 8px; }
/* Se mantiene para las páginas que aún lo usan. */
.eyebrow { font-size: 0.85rem; font-weight: 600; color: var(--green); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}
.button:active { transform: translateY(1px) scale(0.985); }
.button .icon { transition: transform 0.3s var(--ease-out); }
.button:hover .icon { transform: translateX(3px); }
.button-primary { background: var(--green); color: var(--bg); box-shadow: 0 12px 24px -14px rgba(2, 12, 8, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.button-primary:hover { background: var(--green-hover); box-shadow: 0 16px 28px -14px rgba(2, 12, 8, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.button-ghost { background: rgba(17, 27, 23, 0.6); border-color: var(--line-strong); color: var(--ink); backdrop-filter: blur(8px); }
.button-ghost:hover { background: var(--card-raised); border-color: #3b5147; }
.button-small { min-height: 42px; padding: 0 18px; font-size: 0.95rem; }

/* Navegación */
.site-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.wordmark img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; gap: 6px; font-size: 0.95rem; color: var(--muted); }
.nav-links a { position: relative; padding: 8px 12px; border-radius: 999px; transition: color 0.2s ease, background-color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); background: var(--green-soft); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 12px; width: 44px; height: 44px; color: var(--ink); cursor: pointer; }
.nav-drawer { border-top: 1px solid var(--line); padding: 12px 16px 18px; display: grid; gap: 4px; }
/* `display: grid` le ganaría al atributo `hidden`: el cajón se cierra aquí. */
.nav-drawer[hidden] { display: none; }
[hidden] { display: none !important; }
.nav-drawer a { padding: 12px 0; color: var(--muted); font-size: 1.05rem; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-deep), var(--green)); transform-origin: left; transform: scaleX(var(--progress, 0)); }
/* Con "Blog" son seis enlaces: por debajo de 1024 px no caben junto al botón y pasan al cajón. */
@media (max-width: 1024px) {
  .nav-links, .nav-inner .button { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
}

/* Portada */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 0; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -2;
  background:
    radial-gradient(40% 50% at 72% 38%, rgba(34, 195, 120, 0.2), transparent 70%),
    radial-gradient(30% 40% at 10% 10%, rgba(27, 126, 80, 0.16), transparent 70%);
}
.pulse-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px; align-items: center; }
.hero-intro { display: flex; align-items: center; gap: 9px; color: var(--green-ink); font-size: 0.85rem; margin-bottom: 22px; }
.hero-intro .icon { color: var(--green); }
.hero h1 { font-family: var(--display); font-size: clamp(2.6rem, 5.1vw, 4rem); line-height: 1.08; letter-spacing: -0.045em; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-description { color: var(--muted); font-size: 1.1rem; max-width: 43ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stores { margin-top: 24px; }
.hero-reassurance { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; margin-top: 18px; }
.hero-reassurance .icon { color: var(--green); }
.hero-benefits { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; padding-block: 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-benefits > div { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero-benefits > div + div { border-left: 1px solid var(--line); }
.hero-benefits .icon { color: var(--green); width: 26px; height: 26px; }
.hero-benefits strong, .hero-benefits span { display: block; }
.hero-benefits strong { font-size: 0.92rem; font-weight: 600; }
.hero-benefits span { color: var(--muted); font-size: 0.82rem; }

.hero-preview { min-width: 0; scroll-margin-top: 90px; }
.hero-stage { position: relative; min-height: 540px; display: grid; place-items: center; perspective: 1400px; }
.hero-stage::before { content: ""; position: absolute; inset: 14% 18%; background: radial-gradient(closest-side, rgba(34, 195, 120, 0.4), transparent 72%); filter: blur(34px); z-index: -1; }
.phone-tilt picture, .download-phones picture { display: block; }
.phone-tilt { margin-left: 54px; margin-bottom: 30px; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 0.1s linear; will-change: transform; }
.phone { position: relative; width: 270px; border-radius: 34px; background: var(--bg-2); box-shadow: 0 50px 90px -30px rgba(0, 8, 5, 0.9), 0 0 0 5px #17251e, 0 0 0 6px var(--line-strong); }

.chip {
  position: absolute; z-index: 2;
  background: rgba(17, 27, 23, 0.74);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(173, 235, 206, 0.08), 0 24px 44px -18px rgba(0, 8, 5, 0.85);
}
.chip-voice { top: 43%; left: -3%; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; max-width: 340px; }
.chip-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: var(--bg); flex: none; }
.wave { display: none; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--green); transform: scaleY(0.3); }
.chip-voice.is-listening .wave { display: inline-flex; }
.chip-voice.is-listening .voice-text { display: none; }
.chip-voice.is-listening .wave i { animation: wave 0.9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -0.2s; }
.wave i:nth-child(3) { animation-delay: -0.45s; }
.wave i:nth-child(4) { animation-delay: -0.1s; }
.wave i:nth-child(5) { animation-delay: -0.6s; }
@keyframes wave { 50% { transform: scaleY(1); } }
.voice-text { font-weight: 500; font-size: 0.98rem; white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--green); opacity: 0; }
.chip-voice.is-typing .caret { opacity: 1; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chip-tx { top: 57%; left: -1%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; min-width: 290px; transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), filter 0.5s ease; }
html.js .chip-tx:not(.is-shown) { opacity: 0; transform: translateY(14px) scale(0.95); filter: blur(6px); }
.tx-cat { font-size: 0.8rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--green-soft); color: var(--green-ink); }
.tx-name { font-weight: 600; }
.tx-amount { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--expense); }
.tx-amount.is-income { color: var(--green); }

.chip-balance { right: -1%; bottom: 9%; padding: 16px 18px 12px; width: 224px; display: grid; gap: 2px; }
.balance-label { font-size: 0.8rem; color: var(--muted); }
.balance-figure { font-family: var(--display); font-weight: 600; font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sparkline { width: 100%; height: 56px; margin-top: 6px; overflow: visible; }
.spark-area { fill: url(#spark-fill); }
.spark-line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--green); stroke: var(--bg); stroke-width: 2; }
.demo-flow { position: absolute; bottom: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; }
.demo-flow span { transition: color 0.25s ease; }
.demo-flow .is-current { color: var(--green-ink); }
.demo-flow .icon { width: 14px; opacity: 0.6; }
.demo-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.demo-label { color: var(--muted); font-size: 0.78rem; }
.demo-examples { display: flex; gap: 4px; }
.demo-examples button, .demo-pause { font: inherit; font-size: 0.82rem; min-height: 44px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--muted); border-radius: 12px; padding: 0 13px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.demo-examples button:hover, .demo-pause:hover { color: var(--ink); border-color: var(--green-deep); }
.demo-examples button[aria-pressed="true"] { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-deep); }
.demo-pause { display: grid; place-items: center; width: 44px; padding: 0; }
.demo-caption { text-align: center; color: var(--muted); font-size: 0.75rem; min-height: 2.8em; margin-top: 10px; }

html.js .enter { animation: rise 1s var(--ease-out) both; }
html.js .enter:nth-child(2) { animation-delay: 0.08s; }
html.js .enter:nth-child(3) { animation-delay: 0.16s; }
html.js .enter:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(8px); } }
/* El titular es el candidato a LCP: entra visible, solo con desplazamiento y foco. */
html.js .hero h1.enter { animation-name: rise-visible; }
@keyframes rise-visible { from { transform: translateY(14px); filter: blur(6px); } }

@media (max-width: 980px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { max-width: 640px; }
  .hero h1 { max-width: 17ch; }
  .hero-preview { width: min(500px, 100%); justify-self: center; }
  .hero-stage { min-height: 540px; }
  .hero-benefits { margin-top: 30px; }
}
@media (max-width: 520px) {
  .hero-intro { font-size: 0.76rem; gap: 7px; }
  .hero h1 { font-size: clamp(2.5rem, 10.5vw, 3.3rem); }
  .hero-description { font-size: 1rem; }
  .hero-actions { gap: 10px; margin-top: 26px; }
  .hero-actions .button { padding-inline: 18px; font-size: 0.9rem; }
  .hero-stage { min-height: 480px; }
  .phone-tilt { margin-left: 26px; }
  .phone { width: 232px; border-radius: 32px; }
  .chip-voice { left: 0; top: 41%; max-width: 100%; gap: 8px; padding-right: 12px; }
  .chip-tx { left: 0; min-width: 0; width: min(280px, 96%); top: 56%; padding: 12px 14px; }
  .chip-balance { right: 0; bottom: 8%; width: 200px; padding: 12px 16px 8px; }
  .balance-figure { font-size: 1.25rem; }
  .sparkline { height: 36px; }
  .voice-text { font-size: 0.8rem; white-space: normal; }
  .demo-controls { gap: 8px; }
  .demo-label { width: 100%; text-align: center; }
  .hero-benefits { grid-template-columns: 1fr; gap: 20px; padding-block: 24px; }
  .hero-benefits > div { justify-content: flex-start; padding-inline: 8px; }
  .hero-benefits > div + div { border-left: 0; }
}

/* Descarga y estado */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.stores a img { height: 52px; width: auto; }
.coming-soon { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-weight: 600; font-size: 0.95rem; }
.coming-soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Secciones */
.section { padding: 128px 0; }
.section-heading { max-width: 60ch; margin-bottom: 48px; }
.section-heading h2, .advisor h2, .download h2 { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.08; }
.section-heading p { color: var(--muted); font-size: 1.1rem; margin-top: 16px; }
@media (max-width: 760px) { .section { padding: 88px 0; } }

/* Bento de funciones */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento-card {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 24px;
  padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-raised), var(--card) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px var(--line);
}
.bento-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(34, 195, 120, 0.1), transparent 45%);
}
.bento-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(34, 195, 120, 0.7), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (hover: hover) and (pointer: fine) { .bento-card:hover::before, .bento-card:hover::after { opacity: 1; } }
.bento-card h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.bento-card p { color: var(--muted); font-size: 0.98rem; max-width: 46ch; }
.data-note { position: absolute; top: 28px; right: 28px; font-size: 0.75rem; color: var(--muted); }
.tile-capture { grid-column: 1 / 6; grid-row: 1 / 3; }
.tile-reports { grid-column: 6 / 13; }
.tile-budget { grid-column: 6 / 10; }
.tile-goals { grid-column: 10 / 13; }
.tile-group { grid-column: 1 / 7; }
.tile-remind { grid-column: 7 / 13; }
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile-capture, .tile-reports, .tile-group, .tile-remind { grid-column: 1 / -1; grid-row: auto; }
  .tile-budget { grid-column: 1 / 4; }
  .tile-goals { grid-column: 4 / 7; }
}
@media (max-width: 680px) {
  .bento-card { padding: 22px; }
  .tile-budget, .tile-goals { grid-column: 1 / -1; }
  .data-note { position: static; order: 3; }
}

/* Registro por foto: el recibo se escanea y los campos salen solos. */
.capture-demo { flex: 1; display: grid; gap: 32px; align-content: center; }
.receipt-scene { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: center; }
.receipt {
  position: relative; overflow: hidden; display: grid; gap: 6px;
  padding: 20px 18px 26px; border-radius: 6px 6px 0 0;
  background: #f1efe7; color: #1c2420;
  font: 500 0.86rem/1.35 ui-monospace, "Cascadia Mono", Consolas, monospace;
  transform: rotate(-3deg);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.8);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
}
.receipt strong { font-size: 0.9rem; }
.receipt > span:first-of-type { color: #5b6660; }
.receipt hr { width: 100%; border: 0; border-top: 1px dashed #9aa39e; margin: 4px 0; }
.r-row { display: flex; justify-content: space-between; gap: 10px; }
.r-total { font-weight: 800; font-size: 0.9rem; }
.scan-beam { position: absolute; left: -10%; right: -10%; top: 0; height: 42px; opacity: 0; background: linear-gradient(180deg, transparent, rgba(34, 195, 120, 0.35) 70%, var(--green) 72%, transparent 74%); transform: translateY(-50px); }
.extracted { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.extracted li { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(8, 16, 13, 0.6); box-shadow: inset 0 0 0 1px var(--line); }
.extracted span { font-size: 0.78rem; color: var(--muted); }
.extracted b { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  html.js .capture-demo.is-playing .scan-beam { animation: scan 6s var(--ease-out) infinite; }
  html.js .capture-demo.is-playing .extracted li { animation: field 6s var(--ease-out) infinite; }
  html.js .capture-demo.is-playing .extracted li:nth-child(2) { animation-delay: 0.18s; }
  html.js .capture-demo.is-playing .extracted li:nth-child(3) { animation-delay: 0.36s; }
}
@keyframes scan { 0% { transform: translateY(-50px); opacity: 1; } 35% { transform: translateY(300px); opacity: 1; } 40%, 100% { transform: translateY(300px); opacity: 0; } }
@keyframes field { 0%, 30% { opacity: 0.15; transform: translateX(-12px); filter: blur(4px); } 42%, 90% { opacity: 1; transform: none; filter: none; } 100% { opacity: 0.15; transform: none; } }
@media (max-width: 520px) { .receipt-scene { grid-template-columns: 1fr; } .receipt { max-width: 250px; } }

.voice-memo { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 14px; align-items: center; padding: 16px 18px; border-radius: 20px; background: rgba(8, 16, 13, 0.6); box-shadow: inset 0 0 0 1px var(--line); }
.memo-wave { display: flex; align-items: center; gap: 3px; height: 34px; }
.memo-wave i { flex: 1; max-width: 4px; height: 100%; border-radius: 2px; background: var(--green); transform: scaleY(var(--h)); opacity: 0.85; }
.memo-time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.memo-text { grid-column: 1 / 3; font-weight: 500; color: var(--ink); font-size: 0.98rem; }
.memo-result { justify-self: end; font-size: 0.78rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--green-soft); color: var(--green-ink); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  html.js .capture-demo.is-playing .memo-wave i { animation: memo 1.1s ease-in-out infinite; }
  .memo-wave i:nth-child(3n) { animation-delay: -0.3s; }
  .memo-wave i:nth-child(3n + 1) { animation-delay: -0.65s; }
  .memo-wave i:nth-child(4n) { animation-delay: -0.9s; }
}
@keyframes memo { 50% { transform: scaleY(calc(var(--h) * 0.35)); } }

/* Informes: barras por mes que cambian la dona. */
.report { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.report-bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 26px; }
.bar { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.bar-fill { display: block; width: 100%; height: calc(100% - 26px); border-radius: 8px 8px 4px 4px; background: var(--line-strong); transform-origin: bottom; transform: scaleY(var(--v, 0.6)); transition: transform 0.9s var(--ease-out), background-color 0.25s ease; }
html.js .report:not(.is-drawn) .bar-fill { transform: scaleY(0.02); }
.bar:hover .bar-fill { background: #3b5147; }
.bar[aria-pressed="true"] .bar-fill { background: linear-gradient(180deg, var(--green), var(--green-deep)); }
.bar.is-current .bar-fill { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 12px); }
.bar.is-current[aria-pressed="true"] .bar-fill { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 6px, transparent 6px 12px), linear-gradient(180deg, var(--green), var(--green-deep)); }
.bar[aria-pressed="true"] { color: var(--ink); }
.bar-label { font-size: 0.8rem; text-align: center; }
.bar-value { position: absolute; left: 50%; bottom: calc((100% - 26px) * var(--v, 0.6) + 34px); transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity 0.2s ease; font-variant-numeric: tabular-nums; }
.bar[aria-pressed="true"] .bar-value, .bar:hover .bar-value { opacity: 1; }
.report-donut { position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.donut { width: 132px; height: 160px; }
.donut-track { fill: none; stroke: var(--line); stroke-width: 16; }
.donut-segments circle { fill: none; stroke-width: 16; transition: stroke-dasharray 0.9s var(--ease-out), stroke-dashoffset 0.9s var(--ease-out); }
.donut-center { position: absolute; left: 0; top: 50%; width: 132px; transform: translateY(-50%); display: grid; text-align: center; }
.donut-center b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.donut-month { font-size: 0.72rem; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.85rem; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .report { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .report-donut { grid-template-columns: 1fr; justify-items: center; } .donut-center { top: 66px; left: 50%; transform: translate(-50%, -50%); } .legend { width: 100%; } }

/* Presupuesto: barras sin pista que se llenan al entrar. */
.budget { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.budget li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 0.9rem; }
.b-name { font-weight: 600; }
.b-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.b-bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--green); transform-origin: left; transform: scaleX(var(--pct)); transition: transform 1.1s var(--ease-out); }
.b-bar.is-near { background: var(--amber); }
html.js .tile-budget:not(.is-visible) .b-bar { transform: scaleX(0); }
.budget li:nth-child(1) .b-bar { transition-delay: 0.2s; }
.budget li:nth-child(2) .b-bar { transition-delay: 0.32s; }
.budget li:nth-child(3) .b-bar { transition-delay: 0.44s; }
.budget-left { margin-top: auto; color: var(--muted); }
.budget-left b { color: var(--ink); font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Metas: anillo de progreso. */
.goal { position: relative; width: 150px; height: 150px; margin-inline: auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 11; }
.ring-fill { fill: none; stroke: var(--green); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--goal)); transition: stroke-dashoffset 1.4s var(--ease-out) 0.2s; }
html.js .tile-goals:not(.is-visible) .ring-fill { stroke-dashoffset: 100; }
.goal-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.goal-center b { font-family: var(--display); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.goal-center > span { font-size: 0.75rem; color: var(--muted); }
.goal-meta { font-size: 0.88rem; text-align: center; color: var(--muted); }
.goal-meta b { color: var(--ink); }

/* Gastos en grupo: quién le debe a quién. */
.split { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.split-bill { display: grid; gap: 2px; padding: 16px 18px; border-radius: 16px; background: rgba(8, 16, 13, 0.6); box-shadow: inset 0 0 0 1px var(--line); }
.split-bill span, .split-bill small { font-size: 0.8rem; color: var(--muted); }
.split-bill b { font-family: var(--display); font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.settle { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.settle li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; }
.settle b { font-variant-numeric: tabular-nums; font-weight: 600; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; font-size: 0.75rem; font-weight: 700; color: var(--bg); }
.a-luis { background: var(--blue); }
.a-ana { background: var(--purple); }
.a-mariela { background: var(--green-ink); }
.flow { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px); }
.flow i { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  html.js .tile-group.is-visible .flow i { animation: travel 2.6s var(--ease-out) infinite; }
  html.js .tile-group.is-visible .settle li:nth-child(2) .flow i { animation-delay: 0.5s; }
}
@keyframes travel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 80% { left: calc(100% - 8px); opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@media (max-width: 560px) { .split { grid-template-columns: 1fr; } }

/* Recordatorios: pila de avisos que rota. */
.toasts { position: relative; list-style: none; margin: 0; padding: 0; height: 132px; }
.toasts li {
  --i: 0;
  position: absolute; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 14px 18px; border-radius: 16px;
  background: var(--card-raised); box-shadow: inset 0 0 0 1px var(--line-strong), 0 16px 30px -18px rgba(0, 0, 0, 0.8);
  transform: translateY(calc(var(--i) * 24px)) scale(calc(1 - var(--i) * 0.05));
  opacity: calc(1 - var(--i) * 0.24);
  z-index: calc(10 - var(--i));
  transition: transform 0.7s var(--ease-out), opacity 0.5s ease;
}
.toasts li:nth-child(2) { --i: 1; }
.toasts li:nth-child(3) { --i: 2; }
.toasts li:nth-child(4) { --i: 3; }
.toasts li.is-leaving { transform: translateY(-24px) scale(0.98); opacity: 0; }
/* Solo se lee el aviso de delante; los de atrás son el borde de la pila. */
.toasts li > * { transition: opacity 0.4s ease; }
.toasts li:not(:first-child) > * { opacity: 0; }
.toasts b { font-weight: 600; }
.toasts span { grid-column: 1; font-size: 0.85rem; color: var(--amber); }
.toasts em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Asesor IA */
.section-advisor { position: relative; background: linear-gradient(180deg, var(--bg), var(--bg-deep) 50%, var(--bg)); }
.advisor { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.advisor h2 { margin-bottom: 18px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 52ch; }
.ai-list { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.ai-list li { display: flex; gap: 12px; align-items: flex-start; }
.ai-list .icon { color: var(--green); margin-top: 2px; }
.ai-note { margin-top: 28px; padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 0.95rem; }
.chat { margin: 0; display: grid; gap: 14px; padding: 22px; border-radius: var(--radius); background: linear-gradient(180deg, var(--card-raised), var(--card)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift); }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-head b { display: block; font-family: var(--display); font-weight: 600; }
.chat-head small { color: var(--muted); font-size: 0.8rem; }
.chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--green-soft); color: var(--green); }
.chat-body { display: grid; gap: 12px; min-height: 380px; align-content: start; }
.msg { margin: 0; padding: 12px 16px; border-radius: 18px; max-width: 88%; font-size: 0.95rem; transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.msg-user { justify-self: end; background: var(--green); color: var(--bg); font-weight: 500; border-bottom-right-radius: 6px; }
.msg-ai { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.msg-ai p { margin: 0; }
.msg-typing { display: none; gap: 5px; width: max-content; padding: 14px 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s ease-in-out infinite; }
.msg-typing i:nth-child(2) { animation-delay: 0.15s; }
.msg-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 50% { transform: translateY(-4px); opacity: 0.4; } }
.compare { display: grid; gap: 8px; margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.c-row { display: grid; grid-template-columns: 76px 1fr 52px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.c-row > span:last-child { text-align: right; }
.c-bar { height: 8px; border-radius: 99px; background: var(--slate); transform-origin: left; transform: scaleX(var(--w)); transition: transform 1s var(--ease-out) 0.3s; }
.c-row.is-now { color: var(--ink); }
.c-row.is-now .c-bar { background: var(--amber); }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.chat-actions span { padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chat figcaption { font-size: 0.75rem; color: var(--muted); }
html.js .chat [data-step]:not(.is-shown) { opacity: 0; transform: translateY(10px); }
html.js .chat [data-step]:not(.is-shown) .c-bar { transform: scaleX(0); }
html.js .chat .msg-typing.is-shown { display: flex; }
html.js .chat .msg-typing.is-gone { display: none; }
@media (max-width: 900px) { .advisor { grid-template-columns: 1fr; gap: 48px; } .chat-body { min-height: 0; } }

/* Privacidad */
.privacy { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.privacy .section-heading { position: sticky; top: 120px; }
.privacy-list { display: grid; gap: 14px; }
.privacy-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 26px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s ease, transform 0.4s var(--ease-out); }
.privacy-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.p-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--green-soft); color: var(--green); font-size: 1.2rem; }
.privacy-card h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.privacy-card p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; gap: 0; } .privacy .section-heading { position: static; } }

/* Preguntas frecuentes: acordeón nativo (details/summary), sin JS. Las respuestas
   están en el HTML aunque estén plegadas, así que los buscadores las leen. */
.faq { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.faq .section-heading { position: sticky; top: 120px; }
.faq a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s ease; }
.faq-item:hover, .faq-item[open] { box-shadow: inset 0 0 0 1px var(--line-strong); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: 20px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.05rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--green); transition: transform 0.3s var(--ease-out); }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 22px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; gap: 0; } .faq .section-heading { position: static; } }

/* Descargar */
.download { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 128px 0 0; border-top: 1px solid var(--line); }
.download-glow { position: absolute; left: 50%; top: 42%; width: min(1100px, 140vw); aspect-ratio: 1; transform: translate(-50%, -30%); z-index: -1; background: radial-gradient(closest-side, rgba(34, 195, 120, 0.28), rgba(27, 126, 80, 0.12) 45%, transparent 70%); }
@media (prefers-reduced-motion: no-preference) {
  .download-glow { animation: breathe 9s ease-in-out infinite paused; }
  .download.is-playing .download-glow { animation-play-state: running; }
  .download-phones picture { animation: phone-float 7s ease-in-out infinite paused; }
  .download-phones picture:last-child { animation-delay: -3.5s; }
  .download.is-playing .download-phones picture { animation-play-state: running; }
}
@keyframes breathe { 50% { transform: translate(-50%, -30%) scale(1.08); opacity: 0.8; } }
@keyframes phone-float { 50% { translate: 0 -14px; } }
.download-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 28px; }
.download h2 { max-width: 28ch; margin: 0 auto 18px; }
.download h2 em { font-style: normal; color: var(--green); }
.download p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.download .stores { justify-content: center; margin-top: 30px; }
.download .download-note { font-size: 0.85rem; margin-top: 16px; }
.download-phones { display: flex; justify-content: center; gap: 24px; height: 340px; margin-top: 64px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.download-phones img { width: 260px; border-radius: 36px; box-shadow: 0 0 0 1px rgba(173, 235, 206, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.download-phones picture:first-child img { transform: translateY(40px) rotate(-6deg); }
.download-phones picture:last-child img { transform: rotate(4deg); }
@media (max-width: 560px) { .download-phones { height: 260px; } .download-phones img { width: 190px; } .download-phones picture:first-child { display: none; } }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 0.9rem; background: var(--bg-deep); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer nav a, .footer-button { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a, .footer-button { transition: color 0.2s ease; }
.site-footer a:hover, .footer-button:hover { color: var(--ink); }
.site-footer .wrap > span a { text-decoration: underline; text-underline-offset: 3px; }
/* Reabre el aviso de cookies (consent.js lo muestra; sin JS no haría nada). */
.footer-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

/* Aparición al hacer scroll: solo si el JS está (html.js); si no, todo se ve. */
html.js .reveal { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out); }
html.js .reveal.is-visible { opacity: 1; transform: none; filter: none; }
.bento .reveal:nth-child(2) { transition-delay: 0.06s; }
.bento .reveal:nth-child(3) { transition-delay: 0.12s; }
.bento .reveal:nth-child(4) { transition-delay: 0.18s; }
.bento .reveal:nth-child(5) { transition-delay: 0.06s; }
.bento .reveal:nth-child(6) { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .enter { opacity: 1; transform: none; filter: none; transition: none; animation: none; }
  .phone-tilt { transform: none; transition: none; }
  .demo-flow span, .demo-examples button, .demo-pause, .button, .button .icon { transition: none; }
  .wave i, .msg-typing i, .caret { animation: none !important; }
  .b-bar, .ring-fill, .bar-fill, .c-bar, .chip-tx, .toasts li, .donut-segments circle, .faq-item summary .icon { transition: none; }
  .post-card, .post-more .icon { transition: none; }
  .post-card:hover { transform: none; }
}

/* Aviso de cookies (consent.js). Informativo, no modal: abajo, compacto, sin
   atrapar el foco. Mientras se ve, la página reserva su alto al final para que
   no tape el pie (--consent-space lo calcula consent.js). */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  max-width: 40rem; margin-inline: auto;
  display: grid; gap: 12px; align-items: center;
  padding: 14px 14px 14px 18px; border-radius: 20px;
  background: var(--card-raised); color: var(--muted); font-size: 0.9rem; line-height: 1.5;
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-lift);
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.consent a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.consent .button { min-height: 44px; padding: 0 22px; font-size: 0.95rem; }
.consent-configure { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--green-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.consent-settings fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.consent-settings legend { margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.consent-option { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.consent-option input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.consent-option strong { color: var(--ink); }
.consent-settings .button { margin-top: 12px; }
@media (min-width: 640px) {
  .consent { grid-template-columns: 1fr auto; gap: 18px; left: 24px; right: 24px; bottom: 24px; font-size: 0.95rem; }
  .consent-settings { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) { .consent { animation: consent-in 0.5s var(--ease-out) both; } }
@keyframes consent-in { from { opacity: 0; transform: translateY(18px); } }
html.has-consent body { padding-bottom: var(--consent-space, 0px); }

/* Blog (/blog). Las páginas las genera web/generar-blog.mjs desde web/contenido/
   con la cabecera y el pie de index.html. Tarjetas y tipografía de la landing;
   el cuerpo del artículo mide ~34em (65–72 caracteres por línea). */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 140%; z-index: -1; background: radial-gradient(36% 48% at 80% 30%, rgba(34, 195, 120, 0.14), transparent 70%); }
.page-hero h1 { margin-top: 20px; max-width: 18ch; font-family: var(--display); font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.05; letter-spacing: -0.035em; }
.page-hero h1 em { font-style: normal; color: var(--green); }
.page-hero .lead { margin-top: 18px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 10px; color: var(--slate); }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs a:hover { color: var(--ink); }
.feed-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 14px; color: var(--green-ink); font-size: 0.95rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.feed-link:hover { color: var(--ink); }
.blog-section { padding: 72px 0; }
.blog-section + .blog-section { padding-top: 0; }
.blog-section > .wrap > h2 { margin-bottom: 28px; font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.1; }
@media (max-width: 760px) { .page-hero { padding: 40px 0 36px; } .blog-section { padding: 48px 0; } }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-raised), var(--card) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s ease, transform 0.4s var(--ease-out);
}
.post-card:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px var(--line-strong); transform: translateY(-2px); }
.post-card-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.85rem; color: var(--muted); }
/* En el HTML el título va primero (lo lee así un lector de pantalla); a la vista, la categoría encima. */
.post-card .post-meta { order: -1; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--green-soft); color: var(--green-ink); font-size: 0.8rem; font-weight: 600; line-height: 1.4; }
.post-card :is(h2, h3) { font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
/* Toda la tarjeta es clicable, pero el enlace (y su nombre accesible) es solo el título. */
.post-card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card :is(h2, h3) a:focus-visible { outline: none; }
.post-card :is(h2, h3) a:focus-visible::after { outline: 2px solid var(--green); outline-offset: -4px; }
.post-card p { color: var(--muted); font-size: 0.97rem; }
.post-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 0.95rem; font-weight: 600; }
.post-more .icon { transition: transform 0.3s var(--ease-out); }
.post-card:hover .post-more .icon { transform: translateX(3px); }
@media (max-width: 1040px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .post-grid { grid-template-columns: 1fr; } .post-card-body { padding: 22px; } }

.cta-card {
  display: grid; gap: 14px; justify-items: start; padding: 40px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-raised), var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px var(--line), var(--shadow-lift);
}
.cta-card h2 { max-width: 24ch; font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.1; }
.cta-card p { max-width: 54ch; color: var(--muted); }
.cta-card .button { margin-top: 8px; }
@media (max-width: 680px) { .cta-card { padding: 28px 22px; } }

.article-header { padding: 48px 0 0; }
.article-header .breadcrumbs { margin-bottom: 22px; }
.article-header h1 { max-width: 22ch; font-family: var(--display); font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; }
.article-lead { max-width: 60ch; margin-top: 18px; color: var(--muted); font-size: 1.15rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.article-meta b { color: var(--ink); font-weight: 600; }
.article-cover { margin-top: 36px; margin-bottom: 0; }
.article-cover img { width: 100%; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.article-layout { display: grid; gap: 40px; padding: 40px 0 8px; }
.article-toc { display: none; }
@media (min-width: 1080px) {
  .article-layout { grid-template-columns: 14rem minmax(0, 1fr); gap: 64px; }
  .article-main { grid-column: 2; }
  .article-header > * { margin-left: calc(14rem + 64px); }
  .article-toc { display: block; position: sticky; top: 100px; align-self: start; }
}
.article-toc p { margin-bottom: 12px; font-family: var(--display); font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.article-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.article-toc a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.article-toc a:hover { color: var(--ink); border-left-color: var(--green); }

.article-body { max-width: 34em; font-size: 1.0625rem; line-height: 1.75; color: var(--ink-soft); }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { margin-top: 2.2em; font-family: var(--display); font-size: clamp(1.4rem, 2.8vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); scroll-margin-top: 96px; }
.article-body h3 { margin-top: 1.9em; font-family: var(--display); font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.article-body :is(h2, h3) + * { margin-top: 0.55em; }
.article-body a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover { color: var(--green-hover); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body :is(ul, ol) { margin-bottom: 0; padding-left: 1.3em; }
.article-body li + li { margin-top: 0.45em; }
.article-body li::marker { color: var(--green); }
.article-body ol > li::marker { font-family: var(--display); font-weight: 600; }
.article-body .checklist { list-style: none; display: grid; gap: 10px; padding: 20px 22px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.article-body .checklist li + li { margin-top: 0; }
.checklist .icon { margin-top: 0.3em; color: var(--green); }
.callout { padding: 18px 20px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.callout-title { color: var(--ink); font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.table-wrap:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.article-body caption { padding: 14px 16px 6px; caption-side: top; text-align: left; color: var(--muted); font-size: 0.85rem; }
.article-body :is(th, td) { padding: 10px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.article-body thead th { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.article-body tbody th { color: var(--ink); font-weight: 500; }
.article-body tbody tr:last-child > * { border-bottom: 0; }
.article-body tfoot > tr > * { color: var(--ink); font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.article-body :is(th, td).num { text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .article-body :is(th, td) { padding: 9px 10px; } .article-body caption { padding: 12px 10px 4px; } }
.article-note { margin-top: 2.4em !important; padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; max-width: calc(34em * 1.0625); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--green); font-weight: 600; }
.back-link .icon { transform: scaleX(-1); }
.back-link:hover { color: var(--green-hover); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }

/* Páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.legal h1 { font-family: var(--display); font-size: 2rem; margin-bottom: 4px; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); }
.legal a { color: var(--green); }
.legal :is(p, li, td) a { text-decoration: underline; text-underline-offset: 3px; }
.legal .meta { font-size: 0.95rem; margin-bottom: 24px; }
.legal .box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 16px 0; }
.legal ol, .legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 8px; font-size: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.legal footer a, .legal footer .footer-button { display: inline-flex; align-items: center; min-height: 44px; }
.legal footer .footer-button { color: var(--green); }
.legal footer span a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal .button { min-height: 44px; margin: 8px 0; }
.legal .table-wrap { margin: 16px 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.legal :is(th, td) { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 600; }
.legal td { color: var(--muted); }
.legal tbody tr:last-child > * { border-bottom: 0; }
.legal code { padding: 1px 6px; border-radius: 6px; background: var(--green-soft); color: var(--green-ink); font: 0.88em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
/* En móvil, cada fila de la tabla es una ficha con sus etiquetas (data-label). */
@media (max-width: 640px) {
  .legal :is(table, thead, tbody, tr, th, td) { display: block; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .legal tbody tr:last-child { border-bottom: 0; }
  .legal td { padding: 4px 0; border: 0; }
  .legal td::before { content: attr(data-label); display: block; color: var(--ink); font-size: 0.85rem; font-weight: 600; }
}
