/* Cap by Aquendia: site styles
   Tokens mirror docs/design-system.md. Light by default, dark via prefers-color-scheme.
   Note: muted text is #5B6B7F (instead of #64748B) in light mode to keep WCAG AA on the #F6F7F9 background. */

:root {
  color-scheme: light dark;
  --primary: #0F766E;
  --on-primary: #FFFFFF;
  --primary-container: #CCFBF1;
  --on-primary-container: #042F2E;
  --primary-hover: #115E59;
  --secondary: #4F46E5;
  --secondary-container: #E0E7FF;
  --on-secondary-container: #312E81;
  --accent: #F59E0B;
  --accent-container: #FEF3C7;
  --on-accent-container: #92400E;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-variant: #EEF1F4;
  --on-surface: #0F172A;
  --muted: #5B6B7F;
  --outline: #E2E8F0;
  --outline-strong: #CBD5E1;
  --success: #15803D;
  --success-container: #DCFCE7;
  --warning: #D97706;
  --error: #DC2626;
  --error-container: #FEE2E2;
  --on-error-container: #991B1B;
  --chart-1: #0D9488;
  --chart-2: #4F46E5;
  --hero-gradient: linear-gradient(135deg, #0F766E 0%, #115E59 45%, #1E3A8A 100%);
  --shadow: 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .25);
  --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--primary);
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-field: 14px;
  --header-bg: rgba(246, 247, 249, .82);
  --glow-1: rgba(45, 212, 191, .22);
  --glow-2: rgba(79, 70, 229, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2DD4BF;
    --on-primary: #042F2E;
    --primary-container: #134E4A;
    --on-primary-container: #CCFBF1;
    --primary-hover: #5EEAD4;
    --secondary: #A5B4FC;
    --secondary-container: #1E1B4B;
    --on-secondary-container: #E0E7FF;
    --accent: #FBBF24;
    --accent-container: #3B2A0A;
    --on-accent-container: #FCD34D;
    --bg: #0B1120;
    --surface: #111827;
    --surface-variant: #1F2937;
    --on-surface: #F1F5F9;
    --muted: #94A3B8;
    --outline: #273244;
    --outline-strong: #374357;
    --success: #4ADE80;
    --success-container: #052E16;
    --warning: #FBBF24;
    --error: #F87171;
    --error-container: #3B0D0D;
    --on-error-container: #FECACA;
    --chart-1: #0D9488;
    --chart-2: #6366F1;
    --hero-gradient: linear-gradient(135deg, #134E4A 0%, #1E1B4B 100%);
    --shadow: 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
    --header-bg: rgba(11, 17, 32, .8);
    --glow-1: rgba(45, 212, 191, .12);
    --glow-2: rgba(99, 102, 241, .14);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; }
.num, .money, table td, .stat-value { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 12px 18px; border-radius: 12px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--outline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-surface); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: .75rem; letter-spacing: 0; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--on-surface); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 10px 14px; border-radius: 12px; transition: background .15s;
}
.nav a:hover { background: var(--surface-variant); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--primary-container); }
@media (prefers-color-scheme: dark) { .nav a[aria-current="page"] { color: var(--on-primary-container); } }
.nav .lang-switch { border: 1px solid var(--outline-strong); font-size: .85rem; font-weight: 650; padding: 8px 12px; margin-left: 6px; }
.nav .nav-cta { background: var(--primary); color: var(--on-primary); margin-left: 6px; }
.nav .nav-cta:hover { background: var(--primary-hover); }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--outline); background: var(--surface); color: var(--on-surface); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--outline);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; font-size: 1rem; }
  .nav .lang-switch, .nav .nav-cta { margin-left: 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius-btn);
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, background .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -8px rgba(15, 118, 110, .55); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--on-surface); border-color: var(--outline-strong); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); padding: 0 12px; }
.btn-light { background: #fff; color: #0F172A; }
.btn-light:hover { background: #F1F5F9; }
.btn-outline-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { background: rgba(255,255,255,.16); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; } }

/* ---------- Generic sections ---------- */
.section { padding-block: 88px; }
.section-sm { padding-block: 56px; }
@media (max-width: 700px) { .section { padding-block: 64px; } }
.eyebrow {
  display: inline-block; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); margin-bottom: 14px;
}
.lead { font-size: clamp(1.075rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 640px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.caption { font-size: .8125rem; color: var(--muted); line-height: 1.5; }

.card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-card);
  padding: 28px; box-shadow: var(--shadow);
}
@media (max-width: 480px) { .card { padding: 20px; border-radius: 20px; } }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.icon-bubble {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--primary-container); color: var(--primary); margin-bottom: 18px; flex: none;
}
@media (prefers-color-scheme: dark) { .icon-bubble { color: var(--on-primary-container); } }
.icon-bubble svg { width: 26px; height: 26px; }
.icon-bubble.indigo { background: var(--secondary-container); color: var(--secondary); }
.icon-bubble.amber { background: var(--accent-container); color: var(--on-accent-container); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; background: var(--surface-variant); color: var(--on-surface);
}
.chip svg { width: 15px; height: 15px; }
.chip-primary { background: var(--primary-container); color: var(--on-primary-container); }
.chip-warning { background: var(--accent-container); color: var(--on-accent-container); }
.chip-success { background: var(--success-container); color: var(--success); }
.chip-indigo { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow-x: clip; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none;
}
.hero::before { width: 620px; height: 620px; background: var(--glow-1); top: -220px; right: -120px; }
.hero::after { width: 520px; height: 520px; background: var(--glow-2); bottom: -260px; left: -180px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero { padding: 48px 0 72px; } }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--primary) 10%, var(--secondary) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin: 20px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-trust .chip { background: var(--surface); border: 1px solid var(--outline); }
.hero-trust .chip svg { color: var(--primary); }

/* Phone mockup */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone {
  width: 320px; max-width: 100%; border-radius: 44px; padding: 12px; background: #0B1120;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #273244; position: relative;
}
.phone-screen { border-radius: 34px; background: #F6F7F9; color: #0F172A; padding: 44px 14px 18px; overflow: hidden; position: relative; }
@media (prefers-color-scheme: dark) { .phone-screen { background: #0B1120; color: #F1F5F9; } }
.phone-screen::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 20px; background: #0B1120; }
.ph-greet { font-size: .75rem; color: var(--muted); margin: 0 4px 2px; }
.ph-title { font-weight: 750; font-size: 1.05rem; margin: 0 4px 12px; }
.ph-hero { border-radius: 22px; padding: 16px; color: #fff; background: var(--hero-gradient); }
.ph-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ph-hero-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; font-weight: 600; }
.ph-hero-name { font-weight: 700; font-size: .95rem; }
.ph-ring { width: 74px; height: 74px; flex: none; }
.ph-ring text { font-family: var(--font); }
.ph-date { margin-top: 10px; font-size: .78rem; opacity: .85; }
.ph-date strong { display: block; font-size: 1.3rem; letter-spacing: -.02em; opacity: 1; }
.ph-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.2); margin-top: 12px; overflow: hidden; }
.ph-bar span { display: block; height: 100%; width: 58%; border-radius: 99px; background: #fff; }
.ph-bar-legend { display: flex; justify-content: space-between; font-size: .68rem; opacity: .85; margin-top: 6px; }
.ph-card { margin-top: 10px; border-radius: 18px; background: #fff; border: 1px solid #E2E8F0; padding: 12px; }
@media (prefers-color-scheme: dark) { .ph-card { background: #111827; border-color: #273244; } }
.ph-card-title { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.ph-lever { display: flex; align-items: center; gap: 10px; font-size: .74rem; line-height: 1.35; }
.ph-lever .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #FEF3C7; color: #92400E; flex: none; }
.ph-lever .dot svg { width: 16px; height: 16px; }
.ph-lever .gain { margin-left: auto; background: #FEF3C7; color: #92400E; font-weight: 700; border-radius: 99px; padding: 3px 8px; font-size: .68rem; white-space: nowrap; }
.ph-fan { width: 100%; height: auto; }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--outline); border-radius: 18px;
  padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-size: .82rem;
  animation: floaty 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: .95rem; }
.float-card .icon-bubble { width: 38px; height: 38px; border-radius: 12px; margin: 0; }
.float-card .icon-bubble svg { width: 20px; height: 20px; }
.float-a { left: -24px; top: 3%; }
.float-b { right: -10px; bottom: 16%; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@media (max-width: 1100px) { .float-a { left: 0; } .float-b { right: 0; } }
@media (max-width: 420px) { .float-card { display: none; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  background: var(--on-surface); color: var(--bg); font-weight: 750; font-size: .95rem; margin-bottom: 16px;
}
.step p { color: var(--muted); margin: 0; }

/* ---------- Calculator teaser cards ---------- */
.calc-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.calc-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.calc-card p { color: var(--muted); flex: 1; }
.calc-card .more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 650; }
.calc-card .more svg { width: 18px; height: 18px; transition: transform .2s; }
.calc-card:hover .more svg { transform: translateX(4px); }

/* ---------- Split feature (couples) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li svg { width: 22px; height: 22px; color: var(--primary); flex: none; margin-top: 2px; }
.couple-visual { position: relative; }
.couple-visual .card { padding: 24px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--outline); }
.member-row:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.avatar.a { background: #0F766E; } .avatar.b { background: #4F46E5; }
.member-row .grow { flex: 1; min-width: 0; }
.member-row .amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 14px 0 8px; background: var(--surface-variant); }
.stack-bar span:nth-child(1) { background: var(--chart-1); }
.stack-bar span:nth-child(2) { background: var(--chart-2); }

/* ---------- Trust band ---------- */
.trust-band { background: var(--hero-gradient); color: #fff; border-radius: 32px; padding: 56px; position: relative; overflow: hidden; }
.trust-band::after { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; right: -120px; top: -160px; background: rgba(255,255,255,.07); }
.trust-band h2, .trust-band h3 { color: #fff; }
.trust-band .lead { color: rgba(255,255,255,.85); }
.trust-band .eyebrow { color: #99F6E4; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .ti-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.trust-item .ti-icon svg { width: 22px; height: 22px; }
.trust-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.trust-item p { color: rgba(255,255,255,.82); margin: 0; font-size: .95rem; }
.trust-band .grid { position: relative; z-index: 1; }
@media (max-width: 700px) { .trust-band { padding: 32px 20px; border-radius: 24px; } }

/* ---------- Download ---------- */
.download { text-align: center; }
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 22px; border-radius: 16px;
  background: #0B1120; color: #fff; text-decoration: none; text-align: left; border: 1px solid #273244; min-width: 210px;
}
@media (prefers-color-scheme: dark) { .store-btn { background: #F1F5F9; color: #0B1120; border-color: #F1F5F9; } }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: .7rem; opacity: .8; line-height: 1.2; }
.store-btn strong { display: block; font-size: 1.1rem; line-height: 1.2; }
.store-btn[aria-disabled="true"] { cursor: default; }
.prefill-note { display: none; margin: 24px auto 0; max-width: 560px; text-align: left; }
.prefill-note.show { display: flex; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 56px 0 32px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); background: var(--glow-1); top: -300px; right: -100px; z-index: -1; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Calculator layout ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; padding-bottom: 72px; }
@media (max-width: 960px) { .calc-layout { grid-template-columns: minmax(0, 1fr); } }
.calc-form { position: sticky; top: 88px; }
@media (max-width: 960px) { .calc-form { position: static; } }
.calc-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scrollbar-width: none; }
.calc-tabs::-webkit-scrollbar { display: none; }
.calc-tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  text-decoration: none; color: var(--on-surface); background: var(--surface); border: 1px solid var(--outline); font-weight: 600; font-size: .9rem;
}
.calc-tabs a svg { width: 18px; height: 18px; color: var(--primary); }
.calc-tabs a[aria-current="page"] { background: var(--on-surface); color: var(--bg); border-color: var(--on-surface); }
.calc-tabs a[aria-current="page"] svg { color: inherit; }

/* Forms */
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.field .hint { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, select.input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: var(--radius-field);
  border: 1.5px solid var(--outline-strong); background: var(--surface); color: var(--on-surface);
  font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { padding: 14px 16px; min-height: 110px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--error); }
.input-wrap .affix { position: absolute; color: var(--muted); font-weight: 600; pointer-events: none; }
.input-wrap .affix.pre { left: 16px; }
.input-wrap .affix.post { right: 16px; }
.input-wrap.has-pre .input { padding-left: 34px; }
.input-wrap.has-post .input { padding-right: 52px; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px;
}
.field-error { color: var(--error); font-size: .85rem; margin-top: 6px; font-weight: 500; display: none; }
.field-error.show { display: block; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preset {
  border: 1px solid var(--outline-strong); background: transparent; color: var(--on-surface);
  border-radius: 999px; padding: 8px 14px; min-height: 36px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.preset:hover { border-color: var(--primary); color: var(--primary); }
.range { width: 100%; margin-top: 14px; accent-color: var(--primary); height: 28px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px 16px; border-radius: var(--radius-field); background: var(--surface-variant); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.check span { font-size: .95rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .row-2 { grid-template-columns: 1fr; } }
details.advanced { border-top: 1px solid var(--outline); padding-top: 14px; margin: 4px 0 20px; }
details.advanced summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary svg { width: 18px; height: 18px; transition: transform .2s; }
details.advanced[open] summary svg { transform: rotate(180deg); }
details.advanced .advanced-body { padding-top: 14px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-variant); border-radius: var(--radius-field); padding: 4px; gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { margin: 0; text-align: center; padding: 12px 8px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.segmented input:checked + label { background: var(--surface); box-shadow: var(--shadow); color: var(--primary); }
.segmented input:focus-visible + label { box-shadow: var(--focus); }

/* Result panel */
.result-panel { min-height: 420px; display: flex; flex-direction: column; }
.result-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 12px; color: var(--muted); }
.result-empty .empty-art { width: 140px; height: 140px; margin-bottom: 20px; }
.result-empty h2 { font-size: 1.25rem; color: var(--on-surface); }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.result-label { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.big-number {
  font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; margin: 6px 0 6px; overflow-wrap: anywhere;
}
.big-sub { color: var(--muted); font-size: 1rem; margin-bottom: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr)); gap: 12px; margin: 8px 0 24px; }
.stat { background: var(--surface-variant); border-radius: 18px; padding: 16px; }
.stat-label { font-size: .8125rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; overflow-wrap: anywhere; }
.result-section-title { font-size: 1rem; font-weight: 700; margin: 8px 0 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--outline); border-radius: 16px; margin-bottom: 20px; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 12px 14px; text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-variant); }
table.data tbody tr + tr td { border-top: 1px solid var(--outline); }
table.data tfoot td { border-top: 2px solid var(--outline-strong); font-weight: 700; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 18px; }
.result-anim { animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px;
  background: var(--surface-variant); font-size: .8125rem; color: var(--muted); line-height: 1.5;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.notice strong { color: var(--on-surface); }
.notice.warning { background: var(--accent-container); color: var(--on-accent-container); }
.notice.warning svg, .notice.warning strong { color: var(--on-accent-container); }
.notice.error { background: var(--error-container); color: var(--on-error-container); font-size: .95rem; }
.notice.error svg, .notice.error strong { color: var(--on-error-container); }
.notice.success { background: var(--success-container); color: var(--on-surface); font-size: .95rem; }
.notice.success svg { color: var(--success); }
.notice.info { background: var(--primary-container); color: var(--on-primary-container); font-size: .95rem; }
.notice.info svg, .notice.info strong { color: var(--on-primary-container); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice .btn { margin-top: 10px; min-height: 40px; padding: 0 14px; font-size: .9rem; }

.cta-box {
  margin-top: 24px; border-radius: 22px; padding: 24px; color: #fff; background: var(--hero-gradient);
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta-box h3 { color: #fff; margin: 0 0 4px; font-size: 1.15rem; }
.cta-box p { margin: 0; color: rgba(255,255,255,.85); font-size: .95rem; }
.cta-box .grow { flex: 1 1 260px; }

/* Skeleton */
.skeleton { display: grid; gap: 14px; }
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--surface-variant) 25%, var(--outline) 50%, var(--surface-variant) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Chart */
.chart-card { border: 1px solid var(--outline); border-radius: 18px; padding: 16px 16px 8px; margin-bottom: 20px; position: relative; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--outline); stroke-width: 1; }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .bar-hit:hover, .chart .bar-hit:focus { fill: color-mix(in srgb, var(--on-surface) 6%, transparent); outline: none; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--on-surface); color: var(--bg); border-radius: 12px; padding: 10px 12px;
  font-size: .8rem; line-height: 1.45; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5;
  font-variant-numeric: tabular-nums;
}
.chart-tip.show { opacity: 1; }
.chart-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

/* ---------- Prose (legal) ---------- */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; padding-top: .4em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--outline); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-variant); }
.prose .table-scroll { overflow-x: auto; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-bottom: 80px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: .9rem; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 2px solid var(--outline); }
.toc a { display: block; padding: 6px 12px; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--primary); border-left-color: var(--primary); }
@media (max-width: 900px) { .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .toc { position: static; } .toc ol { grid-template-columns: 1fr; } }
.draft-banner { display: flex; gap: 12px; align-items: flex-start; }

/* ---------- Transparency ---------- */
.commit-card h3 { font-size: 1.1rem; }
.commit-card p { color: var(--muted); margin: 0; }
.never-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.never-list li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface-variant); }
.never-list li svg { width: 22px; height: 22px; color: var(--error); flex: none; margin-top: 1px; }
.rules-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.rule-list { display: grid; gap: 10px; }
.rule-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 18px; border: 1px solid var(--outline); border-radius: 16px; background: var(--surface); }
.rule-item .r-label { font-weight: 650; }
.rule-item .r-value { color: var(--muted); font-size: .92rem; grid-column: 1; overflow-wrap: anywhere; }
.rule-item .r-status { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.rule-item .r-meta { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
@media (max-width: 520px) { .rule-item { grid-template-columns: 1fr; } .rule-item .r-status { grid-row: auto; grid-column: 1; justify-self: start; } }
.money-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
@media (max-width: 680px) { .money-flow { grid-template-columns: 1fr; } .money-flow .arrow { transform: rotate(90deg); justify-self: center; } }
.money-flow .arrow svg { width: 32px; height: 32px; color: var(--muted); }

/* ---------- Auth landing (verify/reset) ---------- */
.auth-wrap { min-height: calc(100vh - 68px - 200px); display: grid; place-items: center; padding: 48px 0 80px; }
.auth-card { width: 100%; max-width: 480px; text-align: center; }
.auth-card .state-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 20px; }
.auth-card .state-icon svg { width: 38px; height: 38px; }
.state-icon.ok { background: var(--success-container); color: var(--success); }
.state-icon.ko { background: var(--error-container); color: var(--error); }
.state-icon.wait { background: var(--primary-container); color: var(--primary); }
.auth-card form { text-align: left; margin-top: 12px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle svg { width: 20px; height: 20px; }
.input-wrap.has-toggle .input { padding-right: 54px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-variant); margin-top: 10px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--error); transition: width .2s, background .2s; border-radius: 99px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--outline); padding: 56px 0 32px; margin-top: 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 400px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid ul a { color: var(--on-surface); text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-grid ul a:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--outline); margin-top: 40px; padding-top: 24px; font-size: .85rem; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .btn, .card, .input, .chip { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .site-footer, .calc-form, .cta-box, .toc { display: none !important; }
  body { background: #fff; color: #000; }
}

/* fixes */
.field label.check { display: flex; font-weight: 400; margin: 0; }
.field label.check > span { font-weight: 600; }
.field label.check .caption { font-weight: 400; }
.caption svg, .notice svg { flex: none; }
[tabindex="-1"]:focus { box-shadow: none; outline: none; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform .2s; }
details[open] > summary svg { transform: rotate(180deg); }

/* Secondary precision: the only place where technical or legal terms may appear (docs/guide-redaction.md). */
.fine-print { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
span.fine-print { font-size: .85em; }
.prose .fine-print { margin-top: -.4em; }
