:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-alt: #eef4f0;
  --ink: #141818;
  --muted: #5f6c68;
  --line: #d8e0da;
  --green: #267557;
  --green-dark: #15513b;
  --sky: #4d8fc5;
  --coral: #d96854;
  --amber: #c9912e;
  --soft-coral: #fff1ed;
  --soft-green: #e8f5ee;
  --soft-sky: #e9f3fb;
  --shadow: 0 22px 70px rgba(19, 31, 28, 0.11);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body,
button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(216, 224, 218, 0.8);
  background: rgba(244, 246, 242, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand span:last-child {
  display: grid;
  gap: 1px;
}

.brand strong,
.brand small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

nav a {
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

nav a:hover,
nav a:focus-visible {
  border-color: var(--line);
  color: var(--ink);
  outline: 0;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  min-height: calc(100vh - 132px);
  padding-bottom: 18px;
}

.hero-copy {
  min-width: 0;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

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

h3 {
  margin-bottom: 9px;
  font-size: 1.18rem;
  line-height: 1.18;
}

.lede {
  max-width: 690px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.verdict-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.verdict {
  min-height: 120px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.verdict strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.verdict span {
  color: var(--muted);
  line-height: 1.4;
}

.verdict.ok {
  border-color: rgba(38, 117, 87, 0.28);
  background: var(--soft-green);
}

.verdict.warn {
  border-color: rgba(217, 104, 84, 0.35);
  background: var(--soft-coral);
}

.verdict.need {
  border-color: rgba(77, 143, 197, 0.28);
  background: var(--soft-sky);
}

.hero-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfeae5;
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.facts,
.product-grid,
.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.facts {
  margin: 12px 0 74px;
}

.facts article,
.product-grid article,
.risk-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.facts article {
  padding: 18px;
}

.facts span,
.tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.facts strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.85rem;
  line-height: 1;
}

.facts p,
.product-grid p,
.risk-grid p,
.comparison p,
footer p {
  color: var(--muted);
  line-height: 1.55;
}

.facts p,
.product-grid p,
.risk-grid p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.section-heading {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin: 0 0 20px;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sensitivity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 76px;
}

.sensitivity-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sensitivity-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sensitivity-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.55rem;
}

.sensitivity-grid strong[data-tone="positive"] {
  color: var(--green-dark);
}

.sensitivity-grid strong[data-tone="negative"] {
  color: var(--coral);
}

.sensitivity-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.7fr);
  gap: 18px;
  margin-bottom: 76px;
}

.calc-controls,
.calc-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.calc-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.calc-controls label,
fieldset {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
}

.calc-controls label {
  font-size: 0.94rem;
}

select,
input[type="number"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding-right: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.input-suffix input {
  border: 0;
  background: transparent;
}

.calc-controls small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

select {
  padding: 0 12px;
}

input[type="number"] {
  padding: 0 12px 0 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

output {
  color: var(--green-dark);
  font-weight: 800;
}

.input-prefix {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.input-prefix input {
  border: 0;
  background: transparent;
}

fieldset {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  color: var(--muted) !important;
  font-weight: 650 !important;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.calc-results {
  padding: 22px;
}

.score {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft-green);
}

.score span {
  font-size: 0.88rem;
  font-weight: 800;
}

.score strong {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.score small {
  color: var(--muted);
}

.score.negative {
  background: var(--soft-coral);
}

.score.thin {
  background: #fff7e8;
}

dl {
  display: grid;
  gap: 0;
  margin: 0;
}

dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 850;
}

dl .total {
  font-size: 1.18rem;
}

.assessment {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-grid {
  margin-bottom: 76px;
}

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

.benchmark-grid strong {
  color: var(--ink);
}

.product-grid article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 260px;
  padding: 20px;
}

.tag {
  margin-bottom: 10px;
  color: var(--green-dark);
}

.tag.danger {
  color: #a83f2f;
}

.product-grid button {
  align-self: start;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.product-grid button:hover,
.product-grid button:focus-visible {
  background: var(--green-dark);
  outline: 0;
}

.comparison {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(340px, 1.1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 76px;
}

.comparison > div {
  padding: 22px;
  border-left: 4px solid var(--green);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

th {
  background: var(--surface-alt);
  font-size: 0.88rem;
}

td:first-child {
  width: 34%;
  color: var(--ink);
  font-weight: 800;
}

td:last-child {
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.risk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 46px;
}

.risk-grid article {
  padding: 18px;
}

.risk-grid strong {
  display: block;
  margin-bottom: 8px;
}

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

footer p {
  max-width: 840px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

footer a {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .hero,
  .calculator,
  .comparison {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .facts,
  .product-grid,
  .scenario-grid,
  .sensitivity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.05rem, 12vw, 3.2rem);
    line-height: 1;
  }

  .verdict-row,
  .facts,
  .product-grid,
  .sensitivity-grid,
  .risk-grid,
  .calc-controls {
    grid-template-columns: 1fr;
  }

  .facts {
    margin-bottom: 50px;
  }

  .calculator,
  .product-grid,
  .comparison {
    margin-bottom: 54px;
  }

  .hero-visual img {
    aspect-ratio: 4 / 3;
  }

  th,
  td {
    display: block;
    width: 100% !important;
  }

  th:nth-child(2) {
    display: none;
  }

  td:first-child {
    padding-bottom: 5px;
    border-bottom: 0;
  }

  td:last-child {
    padding-top: 0;
  }
}
