:root {
  color-scheme: light;
  --ink: #1e2a24;
  --muted: #607067;
  --line: #d7ded7;
  --paper: #f7f8f4;
  --white: #ffffff;
  --green: #1f6f50;
  --green-dark: #134b38;
  --coral: #d76f4f;
  --gold: #b8872d;
  --shadow: 0 18px 45px rgba(31, 48, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-grid {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--green);
}

.nav {
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
}

.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(19, 75, 56, 0.9), rgba(19, 75, 56, 0.58)),
    url("https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: end;
  padding: 72px 0 56px;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 22px 0 12px;
  font-size: 1rem;
}

.hero-copy p:not(.eyebrow) {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
}

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

.button.primary {
  color: var(--white);
  background: var(--green);
}

.hero .button.primary {
  background: var(--coral);
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel > div,
.result-main,
.result-grid > div,
.mini-card {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel strong,
.result-main strong {
  display: block;
  margin: 4px 0;
  font-size: 2rem;
  line-height: 1;
}

.metric-label,
.hero-panel span:last-child,
.result-grid span,
.mini-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel .metric-label,
.hero-panel span:last-child {
  color: rgba(255, 255, 255, 0.72);
}

.ad-band {
  padding: 24px 0;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed #a5b0a8;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.ad-slot span,
.ad-slot code {
  display: block;
}

.ad-slot code {
  margin-top: 4px;
  color: var(--green-dark);
}

.workspace,
.content-grid,
.guide {
  padding: 42px 0;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.calculator,
.results,
.guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.calculator,
.results {
  padding: 26px;
}

.calculator {
  display: grid;
  gap: 18px;
}

label,
legend {
  color: var(--ink);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented,
.check-grid {
  display: grid;
  gap: 10px;
  margin-top: 9px;
}

.segmented {
  grid-template-columns: repeat(3, 1fr);
}

.check-grid {
  grid-template-columns: repeat(2, 1fr);
}

.segmented label,
.check-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
}

.segmented input,
.check-grid input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.results {
  position: sticky;
  top: 92px;
}

.result-main {
  border-color: rgba(31, 111, 80, 0.18);
  background: #edf6f1;
  box-shadow: none;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.result-grid > div {
  border-color: var(--line);
  background: var(--paper);
  box-shadow: none;
}

.result-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.ad-rectangle {
  min-height: 250px;
  margin: 18px 0;
}

.project-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.project-list li {
  padding-left: 4px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.content-grid article {
  padding-top: 10px;
}

.content-grid p,
.guide p,
.site-footer p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.mini-card {
  border-color: var(--line);
  background: var(--white);
  box-shadow: none;
}

.mini-card strong,
.mini-card span {
  display: block;
}

.mini-card span {
  margin-top: 6px;
}

.ad-skyscraper {
  min-height: 600px;
}

.guide {
  margin-bottom: 42px;
  padding: 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .header-grid,
  .hero-grid,
  .calculator-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .header-grid {
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    gap: 28px;
    padding: 58px 0 36px;
  }

  .results {
    position: static;
  }

  .ad-column {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .segmented,
  .check-grid,
  .cards,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .calculator,
  .results,
  .guide {
    padding: 20px;
  }
}
