:root {
  color-scheme: light;
  --bg: #f7fbf8;
  --paper: #ffffff;
  --paper-strong: #ecf7f3;
  --ink: #16332d;
  --muted: #5e746f;
  --line: #d8e8e3;
  --teal: #117d73;
  --teal-dark: #0b5f58;
  --mint: #dff4ed;
  --rose: #fff1ef;
  --rose-line: #f2b7ad;
  --gold: #8a6a1f;
  --shadow: 0 24px 70px rgba(28, 67, 58, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(247, 251, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.site-header nav,
.actions,
.wizard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-header nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.hero,
.section,
.calculator-shell,
.result-shell,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  padding: clamp(40px, 7vw, 90px) 0;
}

.hero h1,
.section h2,
.calculator-head h2,
.result-head h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.45rem);
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.12rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  background: #fff;
  color: var(--teal-dark);
  border-color: var(--line);
}

.button.selected {
  border-color: var(--teal);
  background: var(--mint);
}

.hero-visual {
  min-height: 520px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(17, 125, 115, 0.12), rgba(244, 196, 174, 0.14)),
    repeating-linear-gradient(90deg, rgba(17, 125, 115, 0.08) 0 1px, transparent 1px 64px);
}

.paper {
  width: min(440px, 86%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.metric span {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.timeline span {
  height: 12px;
  border-radius: 999px;
  background: var(--mint);
}

.timeline span:nth-child(2) {
  width: 78%;
  background: #f9ded6;
}

.timeline span:nth-child(3) {
  width: 58%;
}

.section {
  padding: clamp(48px, 7vw, 86px) 0;
}

.section.tinted,
.warning-block,
.calculator-shell,
.result-shell {
  width: min(1180px, calc(100% - 32px));
  margin-block: 24px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(28, 67, 58, 0.07);
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head p {
  color: var(--muted);
}

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

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.grid article,
.result-cards article {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.seo-links article a {
  color: var(--teal-dark);
  text-decoration: none;
}

.seo-links article a:hover {
  text-decoration: underline;
}

.seo-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 76px) 0;
}

.seo-article {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(28, 67, 58, 0.07);
}

.seo-article h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.seo-article h2 {
  margin-top: 34px;
}

.seo-article .lead {
  color: var(--muted);
  font-size: 1.14rem;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.warning-block {
  background: var(--rose);
  border-color: var(--rose-line);
}

.calculator-head,
.result-head {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-strong);
}

.progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.2s ease;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step h3,
.result-shell h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

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

input:focus,
select:focus,
.button:focus {
  outline: 3px solid rgba(17, 125, 115, 0.22);
  outline-offset: 2px;
}

.hint,
.legal-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-errors,
.inline-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rose-line);
  border-radius: 8px;
  background: var(--rose);
  color: #6d2d23;
  font-weight: 800;
}

.wizard-actions {
  justify-content: flex-end;
  margin-top: 24px;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.result-cards article {
  min-height: 132px;
}

.result-cards span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-strong);
  color: var(--teal-dark);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 34px;
}

.cost-note {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #dfc982;
  border-radius: 8px;
  background: #fff9e7;
}

.cost-note p {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
}

.lead-box {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  margin-top: 34px;
  padding: 24px;
  border-radius: 8px;
  background: var(--paper-strong);
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
  margin-top: 12px;
  font-weight: 700;
}

.checkbox input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .split,
  .lead-box,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 380px;
  }

  .grid.four,
  .grid.five,
  .result-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero,
  .section,
  .calculator-shell,
  .result-shell,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .actions,
  .wizard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .grid.four,
  .grid.five,
  .form-grid,
  .result-cards {
    grid-template-columns: 1fr;
  }

  .section.tinted,
  .warning-block,
  .calculator-shell,
  .result-shell {
    padding: 20px;
  }
}
