/* ---------- Base ---------- */
:root {
  --bg: #f7f9fc;
  --bg-alt: #eef3f7;
  --surface: #ffffff;
  --ink: #142236;
  --ink-soft: #42546b;
  --muted: #6c7c90;
  --line: #dfe7ee;
  --line-strong: #cad6e2;
  --primary: #0b6b5b;
  --primary-dark: #075346;
  --primary-soft: #e4f3ef;
  --accent: #ffc866;
  --accent-soft: #fff5df;
  --danger: #b3473f;
  --shadow-sm: 0 6px 18px rgba(20, 34, 54, 0.06);
  --shadow-md: 0 20px 45px rgba(20, 34, 54, 0.10);
  --shadow-lg: 0 30px 70px rgba(20, 34, 54, 0.14);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid #f0a92c;
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.container--narrow { width: min(calc(100% - 40px), 820px); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transition: top .2s ease;
}

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

/* ---------- Topbar & header ---------- */
.topbar {
  background: var(--primary-dark);
  color: #e7f5f1;
  font-size: .82rem;
  letter-spacing: .01em;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
}

.topbar__badge {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 200, 102, .16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 231, 238, .9);
  transition: box-shadow .2s ease;
}

.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.brand__text {
  font-size: 1.16rem;
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--ink);
}

.brand__text span { color: var(--primary); }

.brand__stack { display: flex; flex-direction: column; gap: 3px; }
.brand__domain {
  font-size: .64rem;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--muted);
}
.brand:hover .brand__domain { color: var(--primary); }

.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.home-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 650;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.home-button svg { width: 15px; height: 15px; flex: 0 0 15px; }
.home-button:hover { color: var(--primary); border-color: #bcd9d1; background: var(--primary-soft); }

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(280px, 28vw);
  min-width: 190px;
  height: 38px;
  padding: 0 7px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: #fff;
}
.site-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 107, 91, .12); }
.site-search__icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.site-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .84rem;
}
.site-search input::placeholder { color: #8b9aab; }
.site-search__submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 99px;
  padding: 5px 10px;
  background: var(--primary);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
}
.site-search__submit:hover { background: var(--primary-dark); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 88vw);
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 120;
}
.search-results[hidden] { display: none; }
.search-results__item { display: block; padding: 10px 12px; border-radius: 10px; }
.search-results__item:hover { background: var(--primary-soft); }
.search-results__title { display: block; color: var(--ink); font-size: .86rem; font-weight: 700; }
.search-results__desc { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.search-results__empty { padding: 12px; color: var(--ink-soft); font-size: .82rem; }

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

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.25vw, 18px);
}

.nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: right .22s ease;
}

.nav a:hover { color: var(--primary); }
.nav a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Shared ---------- */
.eyebrow {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section { padding: 92px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: #102b3d; color: #fff; }
.section--dark .eyebrow { color: #8fe0cd; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .section-lead { color: #c6d7e2; }
.section--sources { background: #fff; border-top: 1px solid var(--line); }

.section-head { margin-bottom: 42px; max-width: 720px; }
.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  max-width: none;
}

.section-head--split > div:first-child { max-width: 660px; }

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 760;
}

.section-lead {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  max-width: 660px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .94rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 107, 91, .22);
}

.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 16px 30px rgba(11, 107, 91, .28); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn--light {
  background: #fff;
  color: var(--primary-dark);
  white-space: nowrap;
}

.btn--light:hover { background: #e9f7f3; }

.inline-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid rgba(11, 107, 91, .35);
}

.inline-link:hover { border-bottom-color: var(--primary); }

.microcopy { color: var(--muted); font-size: .78rem; line-height: 1.45; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 102px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6faf9 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image: linear-gradient(rgba(11,107,91,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(11,107,91,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero__glow--uno {
  width: 480px;
  height: 480px;
  right: -160px;
  top: -180px;
  background: radial-gradient(circle, rgba(11,107,91,.15), transparent 68%);
}

.hero__glow--dos {
  width: 380px;
  height: 380px;
  left: -160px;
  bottom: -200px;
  background: radial-gradient(circle, rgba(255,200,102,.22), transparent 68%);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.7rem, 5.7vw, 4.55rem);
  font-weight: 800;
  letter-spacing: -.055em;
  max-width: 13ch;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .04em;
  height: .1em;
  background: var(--accent);
  border-radius: 99px;
  z-index: -1;
}

.hero__lead {
  margin-top: 24px;
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__points {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 600;
}

.hero__points li { display: flex; align-items: center; gap: 8px; }

.hero__points span {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 900;
}

.hero__card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.hero__card::after {
  content: "";
  position: absolute;
  inset: 10px -10px -10px 10px;
  border-radius: var(--radius-lg);
  background: #dcefe9;
  z-index: -1;
}

.mini-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mini-card__label { color: var(--muted); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.mini-card__pill { padding: 4px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: .72rem; font-weight: 800; }
.mini-card__amount { margin-top: 12px; font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.05; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.mini-card__sub { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.mini-card__divider { height: 1px; margin: 24px 0 18px; background: var(--line); }
.mini-card__row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; color: var(--ink-soft); font-size: .9rem; }
.mini-card__row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-card__link { display: inline-flex; gap: 6px; margin-top: 18px; color: var(--primary); font-size: .88rem; font-weight: 800; }

/* ---------- Calculator ---------- */
.calculator-section { padding-top: 84px; }

.method-chip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 330px;
  padding: 16px 18px;
  border: 1px solid #d4e8e2;
  border-radius: 14px;
  background: #f0faf7;
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.55;
}

.method-chip span { color: var(--primary); font-weight: 900; font-size: 1rem; line-height: 1.2; }

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
  gap: 22px;
  align-items: start;
}

.form-card, .results, .schedule-card, .table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.form-card { padding: 28px; }

.form-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.form-card__head h3 { font-size: 1.16rem; }

.btn-reset {
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
}

.btn-reset:hover { background: var(--primary-soft); }

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 750; color: var(--ink); }

.input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 107, 91, .10);
}

.input-wrap span {
  padding: 0 14px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  white-space: nowrap;
}

.input-wrap--prefix span { border-right: 1px solid var(--line); }
.input-wrap--suffix span { border-left: 1px solid var(--line); }

.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.field-help { margin-top: 6px; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
  overflow: hidden;
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: .87rem;
  font-weight: 750;
  color: var(--primary-dark);
  list-style: none;
}

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

.advanced__icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary-soft);
  font-size: 1rem;
  line-height: 1;
}

.advanced[open] .advanced__icon { transform: rotate(45deg); }

.advanced__body { padding: 4px 16px 2px; border-top: 1px solid var(--line); }
.advanced__body .field:last-child { margin-bottom: 18px; }

.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1ef;
  color: var(--danger);
  font-size: .84rem;
  font-weight: 600;
}

.results { overflow: hidden; }

.results__primary {
  padding: 28px;
  background: linear-gradient(145deg, #0d715f 0%, #075346 100%);
  color: #fff;
}

.results__label { color: #b9e4d9; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.results__amount {
  margin-top: 6px;
  font-size: clamp(2.7rem, 5vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1.06;
  font-variant-numeric: tabular-nums;
}

.results__caption { margin-top: 7px; color: #cbe9e0; font-size: .85rem; }

.results__gauge {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.donut {
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#ffc866 0 60%, rgba(255,255,255,.22) 60% 100%);
  position: relative;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #0a5d4f;
}

.donut span { position: relative; font-size: .76rem; font-weight: 800; color: #fff; }

.legend { display: grid; gap: 9px; flex: 1; min-width: 0; }

.legend > div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d7eee8;
  font-size: .82rem;
}

.legend strong { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }

.legend__dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.legend__dot--capital { background: var(--accent); }
.legend__dot--intereses { background: rgba(255,255,255,.35); }

.results__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.metric:nth-child(odd) { border-right: 1px solid var(--line); }
.metric:nth-last-child(-n+2) { border-bottom: 0; }

.metric span { display: block; color: var(--muted); font-size: .77rem; font-weight: 650; }
.metric strong { display: block; margin-top: 4px; font-size: 1.22rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.results__extras {
  padding: 8px 24px 16px;
  background: #fbfdfc;
  border-top: 1px solid var(--line);
}

.extras-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: .82rem;
}

.extras-row strong { color: var(--primary-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }

.results__disclaimer {
  padding: 14px 24px 18px;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.5;
  border-top: 1px solid var(--line);
}

/* ---------- Schedule & tables ---------- */
.schedule-card {
  margin-top: 22px;
  padding: 28px;
}

.schedule-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.schedule-card h3, .table-card h3 { font-size: 1.22rem; }

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg-alt);
  gap: 3px;
}

.segmented button {
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.segmented button.is-active { background: #fff; color: var(--primary-dark); box-shadow: 0 2px 8px rgba(20,34,54,.08); }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 610px;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  text-align: left;
  padding: 13px 16px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  caption-side: top;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid #edf1f5;
  white-space: nowrap;
}

.data-table th:first-child, .data-table td:first-child { text-align: left; }

.data-table thead th {
  background: #f4f8fa;
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f9fcfb; }
.data-table tbody tr.is-highlight { background: #f0faf7; }

.schedule-note, .table-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: .76rem;
}

.table-card { padding: 26px 28px; margin-top: 22px; }
.table-card--secondary { margin-top: 18px; }
.table-card__title { margin-bottom: 16px; }
.table-card__title p { margin-top: 6px; color: var(--muted); font-size: .84rem; }

/* ---------- Explanation ---------- */
.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.explain-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.icon-box {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 900;
}

.explain-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.explain-card p { color: var(--ink-soft); font-size: .9rem; }
.explain-card p + p { margin-top: 12px; }

.split-bar {
  display: flex;
  height: 10px;
  margin: 20px 0 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line);
}

.split-bar__capital { width: 28%; background: var(--accent); }
.split-bar__intereses { width: 72%; background: #c8d5de; }

.formula {
  padding: 14px 16px;
  border-radius: 11px;
  background: var(--bg-alt);
  color: var(--primary-dark) !important;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 1.02rem !important;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.formula-list { margin: 16px 0; padding-left: 20px; color: var(--ink-soft); font-size: .88rem; }
.formula-list li + li { margin-top: 5px; }

.callout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #f2dfae;
}

.callout__icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #e9a928;
  color: #fff;
  font-weight: 900;
}

.callout h3 { font-size: 1rem; margin-bottom: 6px; }
.callout p { color: #6d5a2e; font-size: .9rem; }

/* ---------- Examples ---------- */
.insight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: .84rem;
}

.insight-card span { font-size: 1.5rem; line-height: 1; }
.insight-card strong { display: block; }

.section--dark .docs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.doc-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
}

.doc-card__tag {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(255,200,102,.18);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 900;
}

.doc-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.doc-card p { color: #c8d8e3; font-size: .86rem; line-height: 1.65; }
.doc-card strong { color: #fff; }

.legal-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 26px 28px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}

.legal-note h3 { font-size: 1.05rem; margin-bottom: 6px; }
.legal-note p { color: #c8d8e3; font-size: .88rem; max-width: 760px; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
  color: var(--ink);
}

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

.faq-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.05rem;
  line-height: 1;
}

.faq-item[open] .faq-icon { transform: rotate(45deg); }

.faq-item p {
  padding: 0 44px 22px 4px;
  color: var(--ink-soft);
  font-size: .93rem;
  max-width: 700px;
}

/* ---------- Answer-first, TOC, cases and glossary ---------- */
.section--answer {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.answer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.answer-lead {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.8;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 26px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.quick-facts > div { padding: 16px 18px; background: #fbfcfd; }
.quick-facts dt { color: var(--primary); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.quick-facts dd { margin: 6px 0 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.55; }

.toc-card {
  padding: 24px;
  border: 1px solid #d4e8e2;
  border-radius: var(--radius);
  background: #f2faf7;
}

.toc-card h3 { font-size: 1rem; margin-bottom: 12px; }
.toc-card ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: .86rem; }
.toc-card li + li { margin-top: 8px; }
.toc-card a { color: var(--ink-soft); font-weight: 600; }
.toc-card a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.section--cases { background: #f3f7fa; }

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

.case-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.case-card h3 { font-size: 1.04rem; margin-bottom: 10px; }
.case-card p { color: var(--ink-soft); font-size: .86rem; line-height: 1.65; }
.case-card a { display: inline-flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 16px; color: var(--primary); font-size: .82rem; font-weight: 800; }

.section--glossary { background: #ffffff; }

.glossary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 24px;
  align-items: start;
}

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

.glossary-list > div { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfd; }
.glossary-list dt { color: var(--ink); font-size: .92rem; font-weight: 800; }
.glossary-list dd { margin: 6px 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.55; }

.keyword-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}

.keyword-card h3 { font-size: 1rem; margin-bottom: 8px; }
.keyword-card p { color: var(--muted); font-size: .84rem; }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.keyword-chips a {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #cfe0da;
  border-radius: 99px;
  background: #fff;
  color: var(--primary-dark);
  font-size: .76rem;
  font-weight: 650;
}
.keyword-chips a:hover { border-color: var(--primary); background: var(--primary-soft); }
.keyword-card__note { margin-top: 14px !important; font-size: .78rem !important; }
.keyword-card__note a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11, 107, 91, 0.32);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--primary-dark); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Sources ---------- */
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.source-card {
  position: relative;
  display: block;
  padding: 26px;
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

a.source-card:hover { transform: translateY(-3px); border-color: #a9d5ca; box-shadow: var(--shadow-md); }

.source-card__label { color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.source-card h3 { margin-top: 12px; font-size: 1.1rem; }
.source-card p { margin-top: 8px; color: var(--muted); font-size: .86rem; max-width: 270px; }
.source-card__arrow { position: absolute; right: 24px; bottom: 20px; color: var(--primary); font-size: 1.2rem; }
.source-card--plain { background: #fbfcfd; }

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 24px; background: #0d2231; color: #d3e0e9; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, .6fr) minmax(150px, .7fr);
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand--footer .brand__text { color: #fff; }
.brand--footer .brand__text span { color: #76d7c1; }
.footer__about p { margin-top: 16px; max-width: 420px; font-size: .86rem; color: #a8bccb; }

.footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer__links h3 { margin-bottom: 6px; color: #fff; font-size: .84rem; text-transform: uppercase; letter-spacing: .1em; }
.footer__links a { color: #b7c9d5; font-size: .86rem; }
.footer__links a:hover { color: #76d7c1; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  color: #8fa5b6;
  font-size: .76rem;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.breadcrumbs a { color: var(--primary); }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs span[aria-current] { color: var(--ink-soft); }

/* ---------- Legal pages ---------- */
.legal-hero {
  padding: 72px 0 46px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; }
.legal-hero p { margin-top: 14px; color: var(--ink-soft); max-width: 700px; }

.legal-content { padding: 54px 0 90px; }
.legal-content article { max-width: 780px; }
.legal-content h2 { margin-top: 36px; margin-bottom: 10px; font-size: 1.35rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--ink-soft); font-size: .95rem; }
.legal-content p + p { margin-top: 12px; }
.legal-content ul { padding-left: 22px; }
.legal-content li + li { margin-top: 6px; }
.legal-content a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.legal-content .legal-update { color: var(--muted); font-size: .82rem; }
.legal-back { display: inline-flex; gap: 8px; margin-top: 36px; color: var(--primary); font-weight: 700; font-size: .88rem; }

/* ---------- 404 page ---------- */
.error-hero h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); }
.error-hero .eyebrow { color: var(--primary); }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.error-hero + .section .section-lead { color: var(--ink-soft); }
.case-card p + p { margin-top: 10px; }
.case-card a { color: var(--primary); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__card { max-width: 520px; }
  .calculator-layout { grid-template-columns: 1fr; }
  .results__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(3) { border-right: 1px solid var(--line); }
  .explain-grid { grid-template-columns: 1fr; }
  .answer-grid, .glossary-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section--dark .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 0; }
  .site-search { width: 210px; min-width: 160px; }
  .home-button__label { display: none; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 132px; }
  .header__inner { flex-wrap: wrap; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .header-tools { order: 3; width: 100%; min-width: 0; margin-left: 0; }
  .site-search { flex: 1 1 auto; width: auto; min-width: 0; }
  .home-button { flex: 0 0 auto; }
  .site-search__submit { padding: 5px 8px; }
  .home-button__label { display: inline; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 4px; border-bottom: 1px solid #f0f3f6; }
  .nav a::after { display: none; }
  .section-head--split { flex-direction: column; align-items: flex-start; }
  .method-chip, .insight-card { max-width: none; width: 100%; }
  .schedule-card__head { flex-direction: column; align-items: flex-start; }
  .legal-note { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .container, .container--narrow { width: min(calc(100% - 32px), var(--max)); }
  .topbar p { font-size: .74rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding: 64px 0 74px; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .hero h1 em { white-space: normal; }
  .hero__lead { font-size: 1rem; }
  .section { padding: 66px 0; }
  .form-card, .results, .schedule-card, .table-card { padding: 20px; }
  .results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(3) { border-right: 1px solid var(--line); }
  .results__gauge { gap: 14px; }
  .donut { width: 76px; height: 76px; flex-basis: 76px; }
  .donut::before { inset: 11px; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; }
  .section--dark .docs-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .quick-facts, .glossary-list { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 6px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .legal-hero { padding: 54px 0 36px; }
}

/* ---------- Importe: respuesta directa ---------- */
.amount-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 18px;
  margin-top: 26px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}
.amount-hero__main { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; }
.amount-hero__main span, .amount-hero__side span { color: var(--muted); font-size: .82rem; }
.amount-hero__main strong { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -.035em; color: var(--primary-dark); line-height: 1.1; }
.amount-hero__main small { color: var(--ink-soft); font-size: .84rem; }
.amount-hero__side { flex: 0 1 230px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-left: 22px; border-left: 1px solid var(--line); }
.amount-hero__side > div { display: flex; flex-direction: column; }
.amount-hero__side strong { font-size: 1.05rem; color: var(--ink); }
@media (max-width: 620px) {
  .amount-hero { padding: 18px; }
  .amount-hero__side { flex-basis: 100%; padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Enhanced tools ---------- */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  width: 100%;
  padding: 12px 42px 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  appearance: none;
  cursor: pointer;
}
.effort-box {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.effort-box > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.effort-box span { color: var(--ink-soft); font-size: .9rem; }
.effort-box strong { font-size: 1.35rem; letter-spacing: -.02em; }
.effort-note { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.effort-note--reasonable { color: var(--primary); }
.effort-note--notice { color: #a8751c; }
.effort-note--high { color: var(--danger); font-weight: 600; }
.results__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}
.action-btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.action-btn--csv { margin-right: auto; }
.schedule-card__head .action-btn--csv { align-self: flex-start; }
.budget-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.budget-detail { margin-top: 14px; color: var(--ink-soft); font-size: .95rem; }
.checklist-card {
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
}
.checklist-card h3 { color: #fff; margin-bottom: 8px; }
.checklist-card__lead { color: rgba(255, 255, 255, .74); font-size: .92rem; max-width: 720px; }
.checklist { list-style: none; counter-reset: checklist; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 22px 0 0; padding: 0; }
.checklist li { counter-increment: checklist; position: relative; padding-left: 42px; color: rgba(255, 255, 255, .86); font-size: .9rem; }
.checklist li::before {
  content: counter(checklist);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #3b2b0c;
  font-weight: 700;
  font-size: .85rem;
}
.checklist strong { display: block; color: #fff; margin-bottom: 3px; }
.checklist span { display: block; line-height: 1.55; }
@media (max-width: 900px) {
  .budget-layout { grid-template-columns: 1fr; }
  .schedule-card__head .action-btn--csv { margin-right: 0; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .to-top, .results__actions, .action-btn,
  .nav-toggle, .site-search, .hero__actions, .segmented, .btn, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .container, .container--narrow { width: 100%; max-width: none; }
  .section { padding: 16px 0; break-inside: avoid; }
  .form-card, .results, .schedule-card, .table-card, .case-card, .doc-card { box-shadow: none; border: 1px solid #bbb; background: #fff; }
  .section--dark, .section--dark * { background: #fff !important; color: #000 !important; }
  .data-table thead { display: table-header-group; }
  .data-table tr { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .table-scroll { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
