:root {
  --bg: #f7faf9;
  --ink: #14221f;
  --muted: #5c6f6a;
  --card: #fff;
  --line: #d7e3de;
  --brand: #0f766e;
  --brand-ink: #fff;
  --soft: #e7f4f1;
  --radius: 14px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--brand); }
header.site, footer.site, main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px;
}
header.site {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 0;
}
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 6px 0 10px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
.lead, .next { color: var(--muted); }
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  margin-top: 20px;
}
.grid.one { grid-template-columns: 1fr; }
.card, .stats > div, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card { padding: 18px; }
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
input[type="range"] { padding: 0; }
.hint { font-weight: 500; color: var(--muted); font-size: 12px; }
.stats {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}
.stats > div { padding: 12px 14px; }
.stats .em { border-color: #9ad4cc; background: var(--soft); }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 700; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.disclaimer { font-size: 12px; color: var(--muted); }
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.chk input { width: auto; }
.row2 { display: grid; gap: 8px 16px; grid-template-columns: 1fr 1fr; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 20px; }
.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--brand-ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.btn-calc {
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 12px 16px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
}
.btn-calc:hover, .btn-calc:focus-visible { filter: brightness(.92); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}
.error { min-height: 1.5em; color: #b42318; font-weight: 700; }
.result-panel { margin-top: 18px; }
.result-panel[hidden] { display: none; }
.result-panel:focus { outline: 3px solid #9ad4cc; outline-offset: 4px; }
.label { display: block; color: var(--muted); font-size: 12px; }
.stats strong { display: block; margin-top: 4px; font-size: 1.18rem; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.breadcrumb a { color: var(--brand); }
.methodology { margin-top: 24px; }
.methodology section { margin-top: 18px; }
.methodology h2 { margin-bottom: 6px; }
.related-tools { margin-top: 24px; padding: 16px; background: var(--soft); border-radius: var(--radius); }
.related-tools ul { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-left: 18px; }
.field-help { font-size: 12px; color: var(--muted); font-weight: 500; }
.recommendation { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.recommendation h3 { margin: 0 0 5px; }
.recommendation ul { margin: 8px 0 0; padding-left: 20px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 14px; }
@media (max-width: 390px) {
  header.site, footer.site, main { padding-left: 14px; padding-right: 14px; }
  .card { padding: 14px; }
  input, select, .btn-calc { min-height: 44px; }
}
footer.site { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .grid, .row2, .stats { grid-template-columns: 1fr; }
  header.site { flex-direction: column; align-items: flex-start; }
}
