:root {
  color-scheme: light;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-strong: #e8f2eb;
  --ink: #0e1a11;
  --muted: #4a5e50;
  --line: #cad5c8;
  --accent: #009a65;
  --accent-strong: #007a50;
  --accent-soft: #cceedd;
  --warm: #bf5a1e;
  --blue: #1d5e8a;
  --page-dark: #0b1f13;
  --page-dark-mid: #122b1a;
  --shadow: 0 32px 80px rgba(11, 31, 19, 0.22);
  --shadow-sm: 0 4px 20px rgba(11, 31, 19, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration-color: rgba(0, 154, 101, 0.4);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent-strong);
}

/* ─── PAGE HERO BAND ─────────────────────────────────────── */

.page-hero-band {
  background: var(--page-dark);
  overflow-x: clip;
}

.page-hero-band .site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-hero-band .brand {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.page-hero-band .top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
}

.page-hero-band .top-nav a {
  text-decoration: none;
  transition: color 0.15s;
}

.page-hero-band .top-nav a:hover,
.page-hero-band .top-nav a[aria-current="page"] {
  color: #ffffff;
}

/* ─── HAMBURGER ──────────────────────────────────────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
  transform-origin: center;
}

.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;
  transform: scaleX(0);
}

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

/* ─── HERO ───────────────────────────────────────────────── */

.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 44px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 36px;
  align-items: start;
}

.hero > * {
  min-width: 0;
}

.hero--simple {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.hero-copy {
  padding-top: 12px;
}

.hero-copy .section-kicker {
  color: var(--accent);
}

.hero-copy h1 {
  color: #ffffff;
  margin: 0;
  max-width: 600px;
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.0;
  overflow-wrap: break-word;
}

.hero-copy .intro {
  max-width: 520px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero-stat {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-stat-value {
  display: block;
  color: #ffffff;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ─── CALCULATOR ─────────────────────────────────────────── */

.calculator {
  border: none;
  border-radius: 12px;
  padding: 28px;
  background: var(--surface);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45), 0 8px 28px rgba(0, 0, 0, 0.2);
}

.calculator-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.calculator-head h2 {
  margin-bottom: 0;
}

.result-total {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-align: right;
}

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

label {
  display: grid;
  gap: 7px;
  color: #34383c;
  font-size: 0.9rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c9d1ca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 154, 101, 0.16);
}

select {
  cursor: pointer;
  appearance: auto;
}

input[type="range"].range-control {
  --progress: 0%;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
  appearance: none;
}

input[type="range"].range-control:focus {
  outline: none;
}

input[type="range"].range-control::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--progress), #dce3df var(--progress) 100%);
}

input[type="range"].range-control::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(20, 20, 20, 0.24);
  appearance: none;
}

input[type="range"].range-control:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(0, 154, 101, 0.2);
}

input[type="range"].range-control::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #dce3df;
}

input[type="range"].range-control::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

input[type="range"].range-control::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(20, 20, 20, 0.24);
}

.input-suffix {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.input-suffix input {
  border-radius: 8px 0 0 8px;
}

.input-suffix span {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9d1ca;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 0 12px;
  background: #f0f3f2;
  color: var(--muted);
  font-weight: 800;
}

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

.summary div {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8faf8;
}

.summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.chart-wrap {
  width: 100%;
  aspect-ratio: 2.75 / 1;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f2faf6 100%);
}

#growthChart {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-axis {
  stroke: #c6cec7;
  stroke-width: 1;
}

.chart-grid {
  stroke: #e5e9e5;
  stroke-width: 1;
}

.chart-deposits {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
}

.chart-balance {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
}

.chart-area {
  fill: rgba(0, 154, 101, 0.1);
}

.chart-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ─── LOAN CHART ─────────────────────────────────────────── */

.chart-balance-remaining {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
}

.chart-interest-area {
  fill: rgba(191, 90, 30, 0.12);
}

.chart-interest-line {
  fill: none;
  stroke: var(--warm);
  stroke-width: 3;
  stroke-dasharray: 6 4;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  font-weight: 900;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  font-weight: 800;
}

p {
  margin: 0 0 16px;
}

/* ─── CONTENT BANDS ──────────────────────────────────────── */

.content-band,
.faq {
  padding: 80px 0;
  background: var(--surface);
}

.content-band.alt {
  background: var(--surface-strong);
}

.content-layout,
.section-heading,
.faq-grid {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

article p,
.note p,
details p {
  color: #2e3a30;
  font-size: 1.04rem;
  line-height: 1.7;
}

.note,
.steps {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: #fff;
}

.note h2 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.formula {
  margin: 28px 0;
  border-left: 5px solid var(--warm);
  padding: 20px 24px;
  background: #fff;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 850;
  overflow-wrap: anywhere;
  border-radius: 0 8px 8px 0;
}

.steps {
  display: grid;
  gap: 16px;
}

.steps div {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}

.steps span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 900;
  font-size: 0.95rem;
}

.steps p {
  margin: 5px 0 0;
  color: #2e3a30;
}

/* ─── RATES SECTION ──────────────────────────────────────── */

.rates {
  background: var(--page-dark);
  padding: 80px 0;
}

.rates .section-heading p {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rates .section-heading h2 {
  color: #ffffff;
}

.rates .section-heading > p:last-of-type {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.04rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  max-width: 680px;
}

.rate-grid {
  width: min(960px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.rate-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 24px;
  background: var(--page-dark-mid);
}

.rate-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
}

.rate-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.98rem;
  line-height: 1.65;
}

.rate-card a {
  color: var(--accent);
}

.rate-card a:hover {
  color: #fff;
}

/* ─── SOURCES ────────────────────────────────────────────── */

.sources {
  padding: 48px 0;
  background: #f1f5f1;
}

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

.source-list li {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 11px 14px;
  background: #fff;
  color: #2e3a30;
  font-weight: 700;
}

/* ─── FAQ ────────────────────────────────────────────────── */

.faq {
  background: #f1f5f1;
}

.section-heading {
  margin-bottom: 32px;
}

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

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
  background: #fff;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.98rem;
}

summary::marker {
  color: var(--accent);
}

details p {
  margin-top: 14px;
  margin-bottom: 0;
}

/* ─── FOOTER ─────────────────────────────────────────────── */

.site-footer-band {
  background: var(--page-dark);
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 48px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.site-footer a:hover {
  color: #fff;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 24px;
    padding-bottom: 52px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    display: none;
  }
}

@media (max-width: 760px) {
  .input-grid,
  .summary,
  .rate-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .page-hero-band .site-header {
    height: 60px;
    min-height: unset;
    padding: 0;
  }

  .page-hero-band .top-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--page-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: none;
  }

  .page-hero-band .top-nav.is-open {
    display: flex;
  }

  .page-hero-band .top-nav a {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
  }

  .page-hero-band .top-nav a:last-child {
    border-bottom: none;
  }

  .page-hero-band .top-nav a:hover,
  .page-hero-band .top-nav a[aria-current="page"] {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
  }

  .hero {
    width: min(100% - 24px, 1120px);
  }

  .calculator {
    padding: 18px;
  }

  .calculator-head,
  .site-footer {
    flex-direction: column;
  }

  .result-total {
    text-align: left;
  }

  .chart-wrap {
    min-height: 190px;
  }

  .content-band,
  .faq {
    padding: 56px 0;
  }

  .rates {
    padding: 56px 0;
  }
}
