:root {
  --ink: #24312b;
  --muted: #5d6b64;
  --green: #2f6b52;
  --green-dark: #23513e;
  --green-soft: #e9f2ec;
  --orange: #d77732;
  --cream: #fbf8f2;
  --white: #ffffff;
  --line: #d8e0da;
  --error: #a52a2a;
  --shadow: 0 14px 35px rgba(36, 49, 43, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: ui-rounded, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
a { color: var(--green-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--orange); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #f0a66f;
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--white);
}
.skip-link:focus { top: 1rem; }
.site-header {
  background: rgba(251, 248, 242, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner,
.page-shell,
.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: .65rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 45% 50% 45%;
  color: var(--white);
  background: var(--green);
  font-size: 1.15rem;
  transform: rotate(-7deg);
}
.brand-mark span { transform: rotate(7deg); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem;
}
.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: .45rem .7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { background: var(--green-soft); color: var(--green-dark); }
.site-nav a[aria-current="page"] {
  color: var(--green-dark);
  background: var(--green-soft);
}
.page-shell { padding-block: 2.5rem 4rem; }
.hero {
  max-width: 790px;
  margin-bottom: 1.8rem;
}
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--orange);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3 {
  line-height: 1.18;
  letter-spacing: -.025em;
}
h1 {
  margin: 0 0 .85rem;
  font-size: clamp(2.35rem, 7vw, 4.5rem);
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}
h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.lede {
  margin: 0;
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.18rem);
}
.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 1.4rem;
  margin: 1.5rem 0 3.5rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.calculator-title { margin-bottom: 1.1rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
label {
  display: block;
  margin-bottom: .35rem;
  font-size: .9rem;
  font-weight: 800;
}
input,
select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #aab7af;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: .65rem .75rem;
}
input:hover, select:hover { border-color: var(--green); }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: .7rem 1.2rem;
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--green-dark); color: var(--white); }
.button-secondary {
  color: var(--green-dark);
  background: var(--green-soft);
}
.button-secondary:hover { background: #d8e9de; color: var(--green-dark); }
.form-error {
  min-height: 1.5em;
  margin: .65rem 0 0;
  color: var(--error);
  font-weight: 700;
}
.result-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 1.3rem;
  border-radius: 14px;
  background: var(--green-soft);
}
.result-panel[data-state="empty"] { color: var(--muted); }
.result-kicker {
  margin: 0 0 .35rem;
  color: var(--green-dark);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.result-value {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 850;
  line-height: 1.22;
}
.result-stage {
  margin: .8rem 0 .15rem;
  font-weight: 800;
}
.result-note { margin: 0; color: var(--muted); }
.content-section {
  max-width: 820px;
  margin-block: 3.6rem;
  scroll-margin-top: 1rem;
}
.content-section-wide {
  max-width: 100%;
  margin-top: 1.5rem;
}
.content-section p:last-child { margin-bottom: 0; }
.callout,
.method-list {
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  background: #fff4e9;
}
.method-list {
  display: grid;
  gap: .45rem;
  margin: 1.2rem 0;
  padding-left: 2.6rem;
}
.text-link {
  display: inline-block;
  margin-top: .75rem;
  font-weight: 800;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
table {
  width: 100%;
  min-width: 590px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
caption {
  padding: 1rem;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
}
th, td {
  padding: .75rem .9rem;
  border-top: 1px solid var(--line);
  text-align: left;
}
thead th {
  border-top: 0;
  color: var(--white);
  background: var(--green);
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: #f4f8f5; }
.stage-badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .12rem .42rem;
  border: 1px solid #b8c9be;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.faq-list { border-top: 1px solid var(--line); }
.faq-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.faq-item p { margin: .4rem 0 0; color: var(--muted); }
.disclaimer {
  max-width: 820px;
  margin-top: 3.5rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  color: var(--muted);
  background: #f0eee8;
  font-size: .92rem;
}
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.footer-inner { display: grid; gap: 1rem; }
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-name { margin: 0; font-weight: 850; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.footer-small { margin: 0; color: var(--muted); font-size: .85rem; }
.error-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.error-page .content-section { margin: 1rem auto; }
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
  margin-top: 1.5rem;
}

@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .site-nav { justify-content: flex-start; }
  .site-nav a { min-height: 38px; padding: .35rem .55rem; font-size: .84rem; }
  .page-shell { padding-top: 1.8rem; }
  .calculator { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 430px) {
  body { font-size: 16px; }
  .header-inner, .page-shell, .footer-inner { width: min(100% - 1.2rem, 1120px); }
  .brand { font-size: .95rem; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .calculator { padding: 1rem; }
  .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
