:root {
  --ink: #17211b;
  --muted: #66716a;
  --paper: #f7f5ef;
  --card: #fffefa;
  --line: #dfdfd7;
  --green: #1d5942;
  --green-bright: #b7e4c7;
  --lime: #d9ed92;
  --gold: #efc86d;
  --coral: #df8b73;
  --blue: #84b6d7;
  --shadow: 0 24px 70px rgba(26, 47, 36, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(217, 237, 146, .32), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(132, 182, 215, .20), transparent 22rem),
    var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
}

button, input, select { font: inherit; }

button, select { cursor: pointer; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 19px/1 "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.brand > span:last-child > span { color: var(--green); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: var(--green);
  transform: rotate(-2deg);
}

.brand-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; margin-right: 28px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }
.currency-label { font-size: 13px; color: var(--muted); }
.currency-select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.6);
  color: var(--ink);
  font-weight: 600;
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.intro { max-width: 680px; margin: 40px 0 30px; }
.eyebrow, .step-label {
  margin: 0 0 7px;
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font: 800 clamp(34px, 5vw, 60px)/1.03 "Manrope", sans-serif;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.intro > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 17px; }

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(370px, .85fr);
  background: var(--card);
  border: 1px solid rgba(26, 47, 36, .1);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.input-panel { padding: 38px 42px 42px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.panel-heading h2 { margin: 0; font: 700 24px/1.2 "Manrope", sans-serif; letter-spacing: -.035em; }
.reset-button { border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 700; padding: 7px; }
.reset-button:hover { text-decoration: underline; }

.field-grid, .cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.full-width { grid-column: 1 / -1; }
.field { min-width: 0; }
.field > label, .label-row label { display: block; margin: 0 0 9px; font-weight: 700; font-size: 14px; }
.field label span { color: var(--muted); font-size: 12px; font-weight: 500; }
.label-row { display: flex; align-items: center; justify-content: space-between; min-height: 25px; gap: 12px; }
.field-value { color: var(--muted); font-size: 13px; font-weight: 600; }

.money-input, .text-input, .select-wrap {
  height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  transition: border-color .2s, box-shadow .2s;
}

.money-input:focus-within, .text-input:focus-within, .select-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29, 89, 66, .10);
}

.money-input input, .text-input input, .select-wrap select {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.currency-symbol { padding-left: 15px; color: var(--muted); font-weight: 700; }
.input-suffix, .suffix-input span { padding-right: 15px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.select-wrap select { appearance: none; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 17px) calc(50% + 2px)/5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) calc(50% + 2px)/5px 5px no-repeat; }

.range { width: 100%; height: 5px; margin: 13px 0 0; appearance: none; border-radius: 99px; background: linear-gradient(to right, var(--green) 0 var(--range-progress, 50%), #e9e9e3 var(--range-progress, 50%) 100%); }
.range::-webkit-slider-thumb { appearance: none; width: 19px; height: 19px; border: 5px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.range::-moz-range-thumb { width: 10px; height: 10px; border: 5px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 1px 5px rgba(0,0,0,.25); }

.segmented { display: inline-flex; padding: 2px; border-radius: 9px; background: #eceee9; }
.segment { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 5px 9px; font-size: 11px; font-weight: 700; }
.segment.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.costs { margin-top: 30px; border-top: 1px solid var(--line); }
.costs summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 24px 0; cursor: pointer; }
.costs summary::-webkit-details-marker { display: none; }
.costs summary strong { display: block; font: 700 16px/1.2 "Manrope", sans-serif; }
.costs summary svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform .2s; }
.costs[open] summary svg { transform: rotate(180deg); }
.cost-grid { gap: 18px; padding-bottom: 2px; }
.compact { height: 47px; }
.form-error { min-height: 18px; margin: 14px 0 -20px; color: #9b3727; font-size: 13px; }

.result-panel {
  position: relative;
  padding: 40px;
  color: white;
  background:
    radial-gradient(circle at 90% 0%, rgba(217, 237, 146, .18), transparent 17rem),
    var(--green);
}

.result-panel::before { content: ""; position: absolute; inset: 14px 14px auto auto; width: 110px; height: 110px; border: 1px solid rgba(255,255,255,.12); border-radius: 34px; transform: rotate(8deg); pointer-events: none; }
.result-topline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: rgba(255,255,255,.72); font-size: 13px; }
.estimate-badge { padding: 5px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; color: var(--lime); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.monthly-total { position: relative; margin-top: 11px; font: 800 clamp(42px, 5vw, 64px)/1 "Manrope", sans-serif; letter-spacing: -.055em; }
.result-caption { margin: 8px 0 0; color: rgba(255,255,255,.58); font-size: 12px; }

.payment-visual { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 28px; margin: 35px 0; }
.donut { width: 154px; height: 154px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lime) 0 74%, var(--gold) 74% 88%, var(--blue) 88% 96%, var(--coral) 96% 100%); transform: rotate(-50deg); }
.donut::before { content: ""; width: 111px; height: 111px; border-radius: 50%; background: var(--green); }
.donut-center { position: absolute; text-align: center; transform: rotate(50deg); }
.donut-center span { display: block; color: rgba(255,255,255,.55); font-size: 11px; }
.donut-center strong { display: block; margin-top: 2px; font: 700 20px/1 "Manrope", sans-serif; }
.legend { display: grid; gap: 10px; }
.legend-item { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-label { color: rgba(255,255,255,.65); }
.legend-value { font-weight: 700; }
.result-divider { height: 1px; background: rgba(255,255,255,.14); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 18px; margin: 27px 0; }
.summary-grid span { display: block; color: rgba(255,255,255,.55); font-size: 11px; }
.summary-grid strong { display: block; margin-top: 5px; font: 700 16px/1.2 "Manrope", sans-serif; }
.tip { display: flex; gap: 11px; padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.07); }
.tip svg { flex: 0 0 18px; width: 18px; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; }
.tip p { margin: 0; font-size: 11px; line-height: 1.45; }
.tip strong, .tip span { display: block; }
.tip span { color: rgba(255,255,255,.62); margin-top: 2px; }

.disclaimer { max-width: 780px; margin: 22px auto 0; color: var(--muted); font-size: 11px; line-height: 1.55; text-align: center; }
.content-section { max-width: 940px; margin: 90px auto 0; }
.section-kicker { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.content-section h2 { max-width: 720px; margin: 10px 0 18px; font: 800 clamp(28px, 4vw, 42px)/1.1 "Manrope", sans-serif; letter-spacing: -.045em; }
.content-section > p, .split-content p { color: var(--muted); line-height: 1.75; font-size: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.info-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.48); }
.info-grid article > span { color: var(--green); font-size: 11px; font-weight: 700; }
.info-grid h3 { margin: 16px 0 8px; font: 700 18px/1.2 "Manrope", sans-serif; }
.info-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.split-content { display: grid; grid-template-columns: .8fr 1fr; gap: 70px; align-items: start; }
.split-content h2 { margin-bottom: 0; }
.split-content > div:last-child > p:first-child { margin-top: 2px; }
.text-link { display: inline-block; margin-top: 8px; color: var(--green); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(29,89,66,.25); }
.faq { margin-bottom: 80px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { max-width: 760px; color: var(--muted); line-height: 1.65; }
.site-footer { width: min(1180px, calc(100% - 40px)); margin: 40px auto 0; padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer > div { display: flex; align-items: baseline; gap: 12px; }
.site-footer strong { color: var(--ink); font: 800 16px/1 "Manrope", sans-serif; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 22px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--green); }
.site-footer p { margin: 0; }

.page-main { max-width: 860px; }
.page-hero { padding: 65px 0 35px; }
.page-hero h1 { margin: 8px 0 15px; font: 800 clamp(36px, 6vw, 62px)/1.02 "Manrope", sans-serif; letter-spacing: -.055em; }
.page-hero p { max-width: 700px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.article-card { padding: clamp(24px, 5vw, 55px); border: 1px solid var(--line); border-radius: 26px; background: var(--card); box-shadow: 0 20px 60px rgba(26,47,36,.07); }
.article-card h2 { margin: 42px 0 12px; font: 800 28px/1.2 "Manrope", sans-serif; letter-spacing: -.035em; }
.article-card h2:first-child { margin-top: 0; }
.article-card h3 { margin: 28px 0 9px; font: 700 19px/1.3 "Manrope", sans-serif; }
.article-card p, .article-card li { color: #526059; font-size: 16px; line-height: 1.78; }
.article-card li + li { margin-top: 9px; }
.article-card a { color: var(--green); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--green); text-decoration: none; }
.related-list { columns: 2; gap: 30px; }
.related-list li { break-inside: avoid; }
.blog-hero { max-width: 820px; }
.blog-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: 80px; }
.blog-category { padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.58); }
.blog-category h2 { margin: 0 0 16px; font: 800 21px/1.25 "Manrope", sans-serif; letter-spacing: -.035em; }
.blog-category ul { list-style: none; margin: 0; padding: 0; }
.blog-category li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(223,223,215,.8); }
.blog-category a { color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.4; }
.blog-category a:hover { color: var(--green); }
.blog-category li span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.callout { margin: 28px 0; padding: 20px 22px; border-left: 4px solid var(--green); border-radius: 0 14px 14px 0; background: #eef4ed; }
.callout p { margin: 0; }
.contact-box { display: grid; gap: 10px; margin-top: 25px; padding: 24px; border-radius: 16px; background: #eef4ed; }
.contact-box a { color: var(--green); font-weight: 700; }
.legal-date { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .calculator-shell { grid-template-columns: 1fr; }
  .result-panel { min-height: auto; }
  .intro { margin-top: 26px; }
  .site-nav { display: none; }
}

@media (max-width: 600px) {
  .site-header, main, .site-footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 70px; }
  .currency-label { display: none; }
  .intro { margin: 27px 2px 22px; }
  .intro > p:last-child { font-size: 15px; }
  .calculator-shell { border-radius: 21px; }
  .input-panel, .result-panel { padding: 26px 20px 28px; }
  .field-grid, .cost-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: auto; }
  .payment-visual { grid-template-columns: 130px 1fr; gap: 18px; }
  .donut { width: 126px; height: 126px; }
  .donut::before { width: 90px; height: 90px; }
  .donut-center strong { font-size: 17px; }
  .info-grid, .split-content { grid-template-columns: 1fr; }
  .blog-directory { grid-template-columns: 1fr; }
  .blog-category li { grid-template-columns: 1fr; gap: 3px; }
  .related-list { columns: 1; }
  .split-content { gap: 14px; }
  .content-section { margin-top: 64px; }
}

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

/* Responsive AdSense placements */
.ad-placement {
  width: 100%;
  min-width: 0;
  min-height: 110px;
  overflow: hidden;
  text-align: center;
}

.ad-label {
  display: block;
  margin-bottom: 6px;
  color: #7a837d;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.adsbygoogle { width: 100%; }

.ad-after-header,
.ad-before-footer {
  width: min(970px, calc(100% - 40px));
  margin: 18px auto 28px;
}

.ad-before-footer { margin-top: 34px; margin-bottom: 18px; }

.article-layout {
  width: min(1540px, calc(100% - 24px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 860px) 300px;
  justify-content: center;
  align-items: start;
  gap: 24px;
}

.article-layout > .page-main { width: 100%; margin: 0; }

.ad-rail {
  position: sticky;
  top: 18px;
  min-width: 0;
  min-height: 600px;
  padding-top: 160px;
}

.ad-rail .ad-placement { min-height: 480px; }

.ad-in-content {
  min-height: 120px;
  margin: 30px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.homepage-ad {
  width: min(970px, 100%);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1599px) {
  .article-layout { display: block; width: min(100% - 40px, 860px); }
  .ad-rail { display: none; }
}

@media (max-width: 600px) {
  .article-layout { width: min(100% - 24px, 860px); }
  .ad-after-header,
  .ad-before-footer { width: min(100% - 24px, 970px); margin-top: 12px; margin-bottom: 20px; }
  .ad-in-content { min-height: 100px; margin: 24px 0; padding: 10px 0; }
}
