:root {
  color-scheme: light;
  --ink: #122321;
  --muted-ink: #5f6f6c;
  --green-950: #072e2a;
  --green-900: #0b3d38;
  --green-700: #1b665a;
  --green-100: #dcece8;
  --green-50: #f0f7f5;
  --amber: #f5b942;
  --amber-soft: #fff4d4;
  --surface: #ffffff;
  --surface-muted: #f5f7f6;
  --line: #d7dfdc;
  --danger: #a52b2b;
  --shadow: 0 18px 46px rgba(18, 35, 33, 0.1);
  --radius-lg: 24px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; padding: 10px 14px; background: #fff; border: 2px solid var(--green-900); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); border-bottom: 1px solid rgba(215,223,220,.9); backdrop-filter: blur(16px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--green-900); color: #fff; font-size: 12px; letter-spacing: .04em; }
nav { display: flex; gap: 24px; }
nav a { color: var(--muted-ink); text-decoration: none; font-size: 14px; font-weight: 650; }
nav a:hover { color: var(--green-900); }

.calculator-section { padding: 48px 0 72px; }
.intro-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 34px; align-items: end; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--green-700); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 800px; font-size: clamp(35px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.lede { max-width: 780px; margin: 16px 0 0; color: var(--muted-ink); font-size: 18px; }
.trust-note { display: grid; gap: 7px; min-width: 190px; color: var(--green-900); font-size: 13px; font-weight: 700; }
.trust-note span::before { content: "✓"; margin-right: 8px; color: var(--green-700); }

.calculator-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: start; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.calculator-form { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 18px; padding: 30px; background: var(--surface); }
.section-heading { display: flex; gap: 13px; align-items: center; grid-column: 1 / -1; padding-bottom: 6px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-heading p { margin: 2px 0 0; color: var(--muted-ink); font-size: 14px; }
.step-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-100); color: var(--green-900); font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .advanced.full, .form-actions.full, .form-error.full { grid-column: 1 / -1; }
label { font-size: 14px; font-weight: 720; }
.optional { color: var(--muted-ink); font-size: 12px; font-weight: 500; }
input, select { width: 100%; min-height: 47px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #bcc8c5; border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(27,102,90,.14); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(165,43,43,.1); }
.money-input { display: grid; grid-template-columns: auto 1fr; align-items: center; min-height: 47px; border: 1px solid #bcc8c5; border-radius: 10px; background: #fff; overflow: hidden; }
.money-input:focus-within { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(27,102,90,.14); }
.money-input span { padding-left: 12px; color: var(--muted-ink); font-weight: 720; }
.money-input input { border: 0; box-shadow: none; padding-left: 8px; }
.money-input input:focus { box-shadow: none; }
small { color: var(--muted-ink); font-size: 12px; line-height: 1.35; }
.advanced { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; }
.advanced summary { cursor: pointer; color: var(--green-900); font-size: 14px; font-weight: 750; }
.advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 18px; }
.check-field { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; color: var(--muted-ink); font-weight: 600; }
.check-field input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--green-700); }
.form-error { min-height: 0; color: var(--danger); font-size: 13px; font-weight: 650; }
.form-error:not(:empty) { padding: 10px 12px; border-radius: 9px; background: #fff0f0; }
.form-actions { display: flex; align-items: center; gap: 14px; padding-top: 3px; }
.primary-button, .secondary-button { min-height: 48px; border: 0; border-radius: 11px; padding: 0 20px; font-weight: 790; }
.primary-button { flex: 1; color: #fff; background: var(--green-900); box-shadow: 0 8px 18px rgba(11,61,56,.2); }
.primary-button:hover { background: var(--green-950); }
.secondary-button { color: var(--green-900); background: var(--green-100); }
.text-button { border: 0; background: transparent; color: var(--green-700); font-weight: 720; padding: 10px; }

.result-panel { position: sticky; top: 92px; min-height: 620px; height: fit-content; align-self: start; padding: 32px; color: #fff; background: var(--green-950); }
.result-empty { display: flex; min-height: 550px; flex-direction: column; align-items: flex-start; justify-content: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 16px; color: var(--green-950); background: var(--amber); font-weight: 900; }
.result-empty h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.result-empty p { margin: 10px 0 16px; color: #c9d9d5; }
.result-empty ul { margin: 0; padding-left: 20px; color: #b9cec9; }
.result-empty li + li { margin-top: 7px; }
.result-topline { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.result-label { margin: 0; color: #b8cec9; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.result-total { margin: 5px 0 0; color: #fff; font-size: clamp(34px, 5vw, 49px); font-weight: 820; line-height: 1; letter-spacing: -.04em; }
.estimate-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #d5e4e0; font-size: 11px; font-weight: 750; }
.result-context { margin: 14px 0 20px; color: #c9d9d5; font-size: 13px; }
.summary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.13); }
.summary-row div { padding: 13px; background: rgba(255,255,255,.055); }
.summary-row span, .fgts-summary span { display: block; color: #a9c1bc; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.summary-row strong, .fgts-summary strong { display: block; margin-top: 3px; font-size: 17px; }
.fgts-summary { margin: 14px 0 22px; padding: 14px; border-radius: 12px; color: var(--green-950); background: var(--amber-soft); }
.fgts-summary div { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.fgts-summary span { color: #6e5315; }
.fgts-summary p { margin: 5px 0 0; color: #705c2d; font-size: 12px; line-height: 1.35; }
.result-content h3 { margin: 0 0 7px; font-size: 16px; }
.breakdown { border-top: 1px solid rgba(255,255,255,.14); }
.breakdown-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.11); }
.breakdown-row span { color: #d2dfdc; font-size: 13px; }
.breakdown-row small { display: block; color: #8eaaa4; margin-top: 2px; }
.breakdown-row strong { white-space: nowrap; font-size: 14px; }
.breakdown-row.discount strong { color: #ffb3a8; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
.result-actions .text-button { color: #c6d9d4; }
.legal-note { margin: 17px 0 0; color: #92aca6; font-size: 11px; line-height: 1.45; }

.content-section { padding: 86px 0; }
.content-section.muted { background: var(--surface-muted); }
.content-section h2 { margin: 0; max-width: 740px; font-size: clamp(29px, 4vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.content-section h3 { letter-spacing: -.02em; }
.content-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; }
.section-copy > p:last-child { margin-top: 19px; color: var(--muted-ink); font-size: 17px; }
.formula-list { border-top: 1px solid var(--line); }
.formula-list article { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.formula-list article > span { color: var(--green-700); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.formula-list h3 { margin: 0 0 4px; font-size: 18px; }
.formula-list p { margin: 0; color: var(--muted-ink); }
.comparison-wrap { margin-top: 32px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
table { width: 100%; min-width: 810px; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; }
thead th { color: #fff; background: var(--green-900); font-size: 13px; }
tbody th { font-weight: 760; }
tbody td { color: #40514e; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-note { margin: 14px 0 0; color: var(--muted-ink); font-size: 13px; }
.sources-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.sources-grid > div > p:last-child { color: var(--muted-ink); }
.source-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.source-list li { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.source-list a { color: var(--green-900); font-weight: 780; text-underline-offset: 3px; }
.source-list span { color: var(--muted-ink); }
.faq-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 19px 0; cursor: pointer; font-weight: 770; }
.faq-list p { margin: -5px 0 20px; color: var(--muted-ink); }

footer { padding: 34px 0; color: #d2dfdc; background: var(--green-950); }
.footer-inner { display: flex; justify-content: space-between; gap: 25px; align-items: center; }
.footer-inner p { margin: 4px 0 0; color: #8fa9a3; font-size: 13px; }
.footer-meta { display: flex; gap: 20px; color: #a9bebb; font-size: 13px; }
.footer-meta a { color: #fff; }

@media (max-width: 920px) {
  nav { display: none; }
  .intro-line, .content-grid, .sources-grid, .faq-layout { grid-template-columns: 1fr; gap: 28px; }
  .trust-note { grid-template-columns: repeat(3, auto); justify-content: start; }
  .calculator-grid { grid-template-columns: 1fr; }
  .result-panel { position: relative; top: auto; min-height: 460px; }
  .result-empty { min-height: 390px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { position: static; }
  .header-inner { min-height: 60px; }
  .calculator-section { padding: 30px 0 50px; }
  .intro-line { margin-bottom: 22px; }
  .trust-note { grid-template-columns: 1fr; }
  .calculator-form { grid-template-columns: 1fr; padding: 22px 18px; }
  .field.full, .advanced.full, .form-actions.full, .form-error.full { grid-column: auto; }
  .advanced-grid { grid-template-columns: 1fr; }
  .check-field { grid-column: auto; }
  .result-panel { padding: 26px 20px; }
  .summary-row { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .content-section { padding: 62px 0; }
  .source-list li { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner, .footer-meta { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
