:root {
  --ink: #1a1a1a;
  --bg: #ffffff;
  --accent: #0b5394;
  --error: #b3261e;
  --note-bg: #fff4e0;
  --statement-bg: #eef4fb;
  --selected-bg: #dcebfb;
  --line: #c9c9c9;
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 1rem;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); }
a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
fieldset { border: 1px solid var(--line); margin: 0 0 1rem; }
.field { margin-bottom: 1rem; }
.field label, .field-label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input[type="text"], .field select {
  font: inherit;
  padding: 0.45rem 0.6rem;
  width: 100%;
  max-width: 22rem;
}
.inline-inputs { display: flex; align-items: center; gap: 0.4rem; }
.inline-inputs input { max-width: 6rem; }
input[aria-invalid="true"] { border: 2px solid var(--error); }
.error { color: var(--error); margin: 0.25rem 0 0; min-height: 1.2em; }
.statement {
  background: var(--statement-bg);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
}
.stale-note, .under18-note {
  background: var(--note-bg);
  border-left: 4px solid #b26a00;
  padding: 0.6rem 0.9rem;
}
#results.stale { opacity: 0.75; }
dl div { display: flex; gap: 1rem; padding: 0.3rem 0; }
dl dt { font-weight: 600; min-width: 12rem; }
dl dd { margin: 0; }
#bmi-value { font-size: 1.6rem; font-weight: 700; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; }
tbody tr.selected { background: var(--selected-bg); font-weight: 600; }
@media (max-width: 480px) {
  dl div { flex-direction: column; gap: 0; }
  dl dt { min-width: 0; }
}
