:root {
  color-scheme: light;
  --ink: #142d3b;
  --muted: #526975;
  --line: #d8e3e7;
  --accent: #126269;
  --pale: #edf6f5;
}
fieldset {
  display: grid;
  gap: 21px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: #f7fafb;
  font:
    16px/1.8 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
a {
  color: #12616b;
  text-underline-offset: 0.2em;
}
a:hover {
  color: #06424a;
}
.site_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px max(24px, calc((100% - 1160px) / 2));
}
.site_header > a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
main {
  max-width: 1208px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.45;
  letter-spacing: 0.015em;
  margin: 14px 0;
}
.lead {
  font-size: 18px;
  color: #37535e;
  max-width: 780px;
}
.scope_note {
  max-width: 920px;
  color: var(--muted);
  font-size: 13px;
}
.calculator_grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin: 28px 0 44px;
}
.panel {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 24px #18374606;
  min-width: 0;
}
h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 0 0 22px;
}
h3 {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 8px;
}
form {
  display: grid;
  gap: 21px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-width: 0;
}
label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 650;
  gap: 7px;
  min-width: 0;
}
input,
select,
button {
  font: inherit;
}
input,
select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid #9baeb9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
small,
.field_help {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.field_help {
  align-self: center;
}
button {
  cursor: pointer;
  border: 1px solid #a2b7c2;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 11px 15px;
  min-height: 44px;
  line-height: 1.6;
  text-align: left;
}
button:hover {
  background: var(--pale);
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 13px 18px;
}
.primary:hover {
  background: #094e55;
}
:focus-visible {
  outline: 3px solid #357ba5;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.result_panel {
  position: sticky;
  top: 20px;
  border-top: 4px solid var(--accent);
}
.result_label {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.total {
  font-size: 39px;
  font-weight: 750;
  line-height: 1.3;
  margin: 9px 0 18px;
}
.total small {
  margin-left: 5px;
  font-size: 16px;
}
.result_state {
  background: var(--pale);
  color: #15585c;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 17px;
  font-size: 14px;
}
.result_state.warning {
  background: #fff3df;
  color: #754809;
}
.result_state.error {
  background: #ffeded;
  color: #962828;
}
.line_item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.line_heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.line_heading strong {
  white-space: nowrap;
}
.line_detail {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.reason_list {
  font-size: 13px;
  padding-left: 1.5em;
}
.examples {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 22px;
  display: grid;
  gap: 9px;
}
.examples h3 {
  margin: 0;
}
.examples button {
  font-size: 13px;
}
.examples p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.reading {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.point_grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 26px;
}
.point_grid p,
details p {
  font-size: 14px;
  color: #405d69;
}
details {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
}
.sources {
  font-size: 13px;
  margin: 25px 0 18px;
}
.next_link {
  font-size: 15px;
  font-weight: 650;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 15px 0;
}
th,
td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  background: #fff;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
footer p {
  margin: 3px 0;
}
@media (max-width: 760px) {
  .site_header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 8px;
  }
  nav {
    gap: 18px;
    font-size: 12px;
  }
  main {
    padding: 24px 18px 40px;
  }
  .lead {
    font-size: 16px;
  }
  .wide_only {
    display: none;
  }
  .calculator_grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 22px;
  }
  .result_panel {
    position: static;
  }
  .panel {
    padding: 20px 18px;
  }
  .pair {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .point_grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .point_grid p {
    margin-top: 5px;
  }
  .total {
    font-size: 35px;
  }
  input,
  select {
    font-size: 16px;
  }
}
