:root {
  --ink: #17201d;
  --muted: #5d6864;
  --forest: #12372a;
  --forest-2: #1f5a43;
  --mint: #e8f3ed;
  --cream: #f7f5ef;
  --white: #ffffff;
  --line: #dbe2de;
  --gold: #c69748;
  --danger: #a12f2f;
  --shadow: 0 18px 50px rgba(18, 55, 42, .10);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
button, input, select { font: inherit; }
a { color: var(--forest-2); }
img, svg { display: block; max-width: 100%; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(820px, calc(100% - 32px)); }
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; background: var(--white); color: var(--forest);
}
.skip-link:focus { top: 16px; }
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(219,226,222,.9);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--forest); text-decoration: none; }
.brand span:last-child { display: flex; align-items: baseline; gap: 2px; }
.brand strong { font-size: 1rem; letter-spacing: -.02em; }
.brand small { font-size: .82rem; color: var(--muted); }
.brand-mark { width: 38px; height: 38px; padding: 8px; border-radius: 11px; background: var(--forest); }
.brand-mark svg { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
nav { display: flex; gap: 24px; }
nav a { color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 650; }
nav a:hover, nav a:focus-visible { color: var(--forest-2); }
.hero {
  overflow: hidden;
  padding: 82px 0 74px;
  background:
    radial-gradient(circle at 80% 20%, rgba(198,151,72,.18), transparent 27%),
    linear-gradient(145deg, #f9fbf9 0%, #edf5f0 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 58px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--forest-2); font-size: .77rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--forest); line-height: 1.12; letter-spacing: -.035em; }
h1 { max-width: 800px; margin-bottom: 22px; font-size: clamp(2.6rem, 6vw, 5.1rem); }
h2 { margin-bottom: 18px; font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { margin-bottom: 12px; font-size: 1.35rem; }
.hero-copy { max-width: 760px; margin: 0; color: #3f4c47; font-size: clamp(1.06rem, 2vw, 1.3rem); }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.trust-row span, .privacy-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border: 1px solid #cfe0d7; border-radius: 999px;
  background: rgba(255,255,255,.75); color: var(--forest); font-size: .82rem; font-weight: 700;
}
.trust-row span::before, .privacy-pill::before { content: "✓"; font-weight: 900; }
.hero-note {
  padding: 28px;
  border: 1px solid rgba(18,55,42,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
}
.hero-note strong { color: var(--forest); font-size: 1.05rem; }
.hero-note p { color: var(--muted); }
.calculator-section { padding: 82px 0; }
.section-heading, .schedule-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-heading h2 { max-width: 800px; margin-bottom: 0; }
.calculator-shell {
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  overflow: hidden; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.input-panel, .results-panel { padding: clamp(24px, 4vw, 42px); }
.input-panel { background: var(--white); }
.results-panel { background: var(--forest); color: var(--white); }
.results-panel .eyebrow { color: #b9d9c9; }
.results-panel h3 { color: var(--white); }
fieldset { min-width: 0; margin: 0 0 26px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--forest); font-size: .95rem; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; color: #34423d; font-size: .9rem; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
input, select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid #bcc8c2; border-radius: 10px; background: var(--white); color: var(--ink);
}
input:focus, select:focus { outline: 3px solid rgba(31,90,67,.16); border-color: var(--forest-2); }
.input-prefix, .input-suffix {
  display: flex; align-items: center; overflow: hidden;
  border: 1px solid #bcc8c2; border-radius: 10px; background: var(--white);
}
.input-prefix:focus-within, .input-suffix:focus-within { outline: 3px solid rgba(31,90,67,.16); border-color: var(--forest-2); }
.input-prefix > span, .input-suffix > span { padding: 0 12px; color: var(--muted); }
.input-prefix input, .input-suffix input { min-width: 0; border: 0; border-radius: 0; outline: 0; }
.input-prefix input { padding-left: 0; }
.input-suffix input { padding-right: 0; }
.primary-button, .secondary-button, .text-button {
  min-height: 48px; border-radius: 10px; cursor: pointer; font-weight: 800;
}
.primary-button { padding: 11px 18px; border: 1px solid var(--forest); background: var(--forest); color: var(--white); }
.primary-button:hover { background: var(--forest-2); }
.text-button { margin-left: 10px; padding: 10px 12px; border: 0; background: transparent; color: var(--forest-2); }
.form-error { margin-bottom: 14px; padding: 11px 13px; border-radius: 9px; background: #fff0f0; color: var(--danger); font-weight: 700; }
.total-payment { margin: 4px 0; font-size: clamp(3rem, 7vw, 5.25rem); font-weight: 850; letter-spacing: -.055em; line-height: 1; }
.result-caption { margin-top: 10px; color: #cfe0d7; font-size: .9rem; }
.breakdown { display: grid; gap: 10px; margin: 28px 0 16px; }
.breakdown div, .summary-grid div, .ratio-row { display: flex; justify-content: space-between; gap: 20px; }
.breakdown span { color: #dbe9e2; }
.payment-bar { display: flex; height: 11px; overflow: hidden; margin-bottom: 28px; border-radius: 999px; background: rgba(255,255,255,.12); }
.payment-bar span:nth-child(1) { background: #f4f0df; }
.payment-bar span:nth-child(2) { background: #d2b87c; }
.payment-bar span:nth-child(3) { background: #91b8a5; }
.payment-bar span:nth-child(4) { background: #d98f72; }
.payment-bar span:nth-child(5) { background: #879ca2; }
.summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.summary-grid div { display: grid; gap: 3px; padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.055); }
.summary-grid span { color: #cfe0d7; font-size: .8rem; }
.savings-card { margin-top: 18px; padding: 18px; border: 1px solid rgba(198,151,72,.4); border-radius: 12px; background: rgba(198,151,72,.11); }
.savings-card span { display: block; color: #ead7b7; font-size: .82rem; }
.savings-card strong { display: block; margin-top: 3px; font-size: 1.25rem; }
.savings-card p { margin-bottom: 0; color: #ead7b7; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.secondary-button { padding: 10px 14px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--white); }
.secondary-button:hover { background: rgba(255,255,255,.08); }
.fine-print { color: var(--muted); font-size: .78rem; line-height: 1.55; }
.results-panel .fine-print { color: #b9cec3; }
.schedule-card { margin-top: 34px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); }
.schedule-heading { align-items: center; margin-bottom: 18px; }
.schedule-heading h3 { margin-bottom: 0; }
.schedule-heading p { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--forest); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td { color: #38443f; }
.soft-section { padding: 82px 0; background: var(--cream); border-block: 1px solid #ebe7dc; }
.two-column, .content-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.8fr); gap: 70px; align-items: start; }
.compact-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.compact-form .primary-button { grid-column: 1 / -1; }
.ratio-card, .source-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 14px 36px rgba(18,55,42,.06); }
.ratio-row { margin-top: 16px; color: var(--forest); }
.meter { height: 10px; overflow: hidden; margin: 9px 0 18px; border-radius: 999px; background: #e9eeeb; }
.meter span { display: block; width: 0; height: 100%; background: var(--forest-2); transition: width .25s ease; }
.content-section, .faq-section { padding: 82px 0; }
.content-grid article p { color: #46534e; font-size: 1.05rem; }
.inline-link { display: inline-block; margin-top: 8px; font-weight: 800; }
.source-card { background: var(--mint); }
.faq-section { padding-top: 20px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 20px 0; color: var(--forest); cursor: pointer; font-size: 1.05rem; font-weight: 800; }
details p { margin-top: 0; padding: 0 0 20px; color: var(--muted); }
.site-footer { padding: 50px 0 20px; background: #0e2a20; color: #d7e6df; }
.footer-grid { display: flex; justify-content: space-between; gap: 36px; }
.footer-brand { color: var(--white); }
.footer-grid p { max-width: 520px; color: #acc4b9; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(100px,1fr)); gap: 10px 24px; }
.footer-links a { color: #d7e6df; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #91ab9f; font-size: .82rem; }

.page-hero { padding: 64px 0; background: var(--mint); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; font-size: clamp(2.5rem,5vw,4.4rem); }
.page-content { padding: 70px 0; }
.prose { width: min(780px, 100%); }
.prose h2 { margin-top: 42px; font-size: 2rem; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: #44514c; }
.prose table { margin: 24px 0; }
.notice { padding: 18px; border-left: 4px solid var(--gold); background: #fbf6ec; }
.code-formula { overflow-x: auto; padding: 16px; border-radius: 10px; background: #f1f4f2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero-grid, .calculator-shell, .two-column, .content-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 58px; }
  .calculator-shell { overflow: visible; }
  .results-panel { border-radius: 0 0 24px 24px; }
  .section-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 620px) {
  .container, .narrow { width: min(100% - 22px, 1160px); }
  .header-inner { min-height: 64px; }
  .field-grid, .compact-form, .summary-grid { grid-template-columns: 1fr; }
  .compact-form .primary-button { grid-column: auto; }
  .input-panel, .results-panel { padding: 22px 18px; }
  h1 { font-size: 2.55rem; }
  .hero { padding: 48px 0; }
  .calculator-section, .soft-section, .content-section, .faq-section { padding: 56px 0; }
  .footer-grid, .footer-bottom { flex-direction: column; }
}
@media print {
  .site-header, .hero, .input-panel, .result-actions, .soft-section, .content-section, .faq-section, .site-footer, .privacy-pill { display: none !important; }
  .calculator-section { padding: 0; }
  .calculator-shell { display: block; box-shadow: none; border: 0; }
  .results-panel { color: #000; background: #fff; padding: 0; }
  .results-panel h3, .results-panel .eyebrow { color: #000; }
  .result-caption, .results-panel .fine-print, .breakdown span, .summary-grid span { color: #333; }
  .summary-grid div { border-color: #aaa; }
  .payment-bar { display: none; }
  .schedule-card { border: 0; padding: 20px 0; }
}
