:root {
  color-scheme: light;
  color: #1b3026;
  background: #faf9f6;
  font: 16px/1.6 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #235943; text-underline-offset: .2em; }
.masthead {
  max-width: 48rem;
  margin: auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  border-bottom: 1px solid #dce4dc;
}
.brand { font-size: 1.25rem; font-weight: 750; text-decoration: none; }
main { max-width: 48rem; margin: auto; padding: clamp(1.25rem, 4vw, 3rem) 1rem 3rem; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 6vw, 2.8rem); margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 0 0 .85rem; }
.lead { margin: 0 0 1.5rem; }
main > section + section { margin-top: 1.75rem; }
.calculator { background: #fff; border: 1px solid #cdded1; padding: clamp(.75rem, 4vw, 1.5rem); border-radius: 1rem; }
label { display: block; font-weight: 650; margin-bottom: .35rem; }
.input-row { display: flex; flex-wrap: wrap; gap: .6rem; }
input, button { font: inherit; min-height: 2.65rem; border-radius: .55rem; padding: .45rem .7rem; }
input { min-width: 6rem; max-width: 12rem; width: 100%; border: 1px solid #668775; color: inherit; }
button { background: #235943; border: 1px solid #235943; color: white; font-weight: 650; cursor: pointer; }
:where(input, button, a):focus-visible { outline: 2px solid #155d43; outline-offset: 3px; }
#base-help { margin: .5rem 0; font-size: .875rem; color: #4b6255; }
.error { color: #9e2835; }
.result-intro { margin-top: 1.35rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .3rem; border-bottom: 1px solid #dce4dc; vertical-align: top; overflow-wrap: normal; }
thead th { background: #eaf2ec; }
tfoot { font-weight: 700; }
tfoot th, tfoot td { border-bottom: 0; }
small { color: #4b6255; }
.next { display: inline-block; font-weight: 650; }
@media (max-width: 420px) { table { font-size: .875rem; } }
