:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #eef3f0;
  --text: #17201b;
  --muted: #58645d;
  --line: #d7ddd9;
  --accent: #11684a;
  --accent-strong: #0b4f38;
  --warning: #a33b18;
  --warning-bg: #fff0e8;
  --shadow: 0 18px 40px rgba(23, 32, 27, 0.08);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.hero {
  background: linear-gradient(135deg, #11241c 0%, #204f3c 55%, #d7e5c8 100%);
  color: #ffffff;
  padding: 56px 20px 44px;
}

.hero__content,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d4ead9;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero__lede {
  max-width: 760px;
  margin-bottom: 0;
  color: #edf7ef;
  font-size: 1.15rem;
}

main {
  padding: 28px 0 48px;
}

.calculator-section,
.faq,
.content-grid article,
.seo-sections article {
  margin-top: 24px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading p,
article p,
li,
details p,
footer p {
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calculator {
  display: grid;
  gap: 16px;
  padding: 20px;
}

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

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(17, 104, 74, 0.25);
  outline-offset: 2px;
  border-color: var(--accent);
}

.scenario-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.result-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 16px;
}

.result-card--wide,
.result-card--overage,
.status {
  grid-column: 1 / -1;
}

.result-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.result-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.status {
  margin: 0;
  border-radius: 8px;
  background: #eaf6ee;
  color: var(--accent-strong);
  padding: 14px 16px;
  font-weight: 800;
}

.status.is-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.content-grid,
.seo-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-grid article,
.seo-sections article,
.faq {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.seo-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.formula-list {
  display: grid;
  gap: 10px;
}

.formula-list p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 8px;
}

.faq {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 10px 0 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
}

footer p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .hero {
    padding: 42px 0 34px;
  }

  .tool-grid,
  .content-grid,
  .seo-sections,
  .results {
    grid-template-columns: 1fr;
  }

  .scenario-group {
    grid-template-columns: 1fr;
  }

  .result-card {
    min-height: auto;
  }
}
