:root {
  --ink: #172434;
  --muted: #6b7785;
  --line: #dfe5e8;
  --paper: #f6f8f7;
  --white: #ffffff;
  --blue: #226c8a;
  --blue-dark: #174d66;
  --blue-soft: #e8f2f5;
  --green: #1a796b;
  --green-soft: #e6f3ef;
  --coral: #c76e58;
  --shadow: 0 12px 34px rgba(22, 42, 55, .07);
  --sans: "Aptos", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Baskerville", "Georgia", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 44px)); margin: 0 auto; }

.site-header {
  background: rgba(246, 248, 247, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 20px; line-height: 1; font-weight: 400;
}
.brand strong { display: block; font-size: 14px; letter-spacing: .16em; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.top-nav { display: flex; gap: 25px; color: var(--muted); font-size: 13px; }
.top-nav a:hover, .top-nav a:focus { color: var(--blue-dark); }

.hero { padding: 68px 0 43px; display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.eyebrow { margin: 0 0 13px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 17px; font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); font-weight: 400; letter-spacing: -.045em; line-height: .98; }
h1 em { color: var(--blue); font-style: italic; }
.hero-copy { max-width: 590px; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.hero-meta { display: flex; flex: 0 0 auto; gap: 30px; padding-bottom: 3px; }
.hero-meta span { display: block; padding-left: 13px; border-left: 2px solid var(--blue); }
.hero-meta b { display: block; font-family: var(--serif); font-size: 27px; font-weight: 400; line-height: 1; }
.hero-meta small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.calculator-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 19px; align-items: stretch; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.input-card, .result-card { padding: 25px 27px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.card-heading > div { display: flex; align-items: center; gap: 12px; }
h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: -.02em; }
.step { color: var(--coral); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.step-blue { color: var(--blue); }
.required-note, .unit-note { color: var(--muted); font-size: 11px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; padding: 23px 0 22px; }
.field { min-width: 0; }
.field label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 600; }
.field label small { color: var(--muted); font-weight: 400; }
.field select, .field input, .calibration-control select {
  width: 100%; height: 39px; border: 1px solid #cad4d8; border-radius: 5px; padding: 0 11px; color: var(--ink); background: #fbfcfc;
  outline: 0; transition: border-color .15s, box-shadow .15s;
}
.field select:focus, .field input:focus, .calibration-control select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34, 108, 138, .12); }
.field input { appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.field .field-help { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.form-footer { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-top: 17px; border-top: 1px solid var(--line); }
.calibration-control { display: block; min-width: 190px; flex: 1; }
.calibration-control span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.calibration-control select { height: 38px; font-size: 12px; }
button { height: 38px; border: 0; border-radius: 5px; padding: 0 19px; color: #fff; background: var(--blue); cursor: pointer; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
button:hover, button:focus { background: var(--blue-dark); }
button span { margin-left: 7px; font-size: 17px; vertical-align: -1px; }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; }

.result-card { display: flex; flex-direction: column; border-top: 3px solid var(--green); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.status-dot i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); }
.risk-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 30px 0 23px; border-bottom: 1px solid var(--line); }
.risk-block { padding-left: 22px; border-left: 1px solid var(--line); }
.risk-block:first-child { padding-left: 0; border-left: 0; }
.risk-label { display: block; color: var(--muted); font-size: 12px; }
.risk-block strong { display: block; margin: 7px 0 4px; color: var(--green); font-family: var(--serif); font-size: 53px; font-weight: 400; letter-spacing: -.06em; line-height: .9; }
.risk-block:not(.risk-primary) strong { color: var(--blue); }
.risk-block small { color: var(--muted); font-size: 10px; }
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.score-row span, .result-details span { display: block; color: var(--muted); font-size: 11px; }
.score-row b { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; }
.score-row > div:last-child b { color: var(--blue); font-size: 12px; }
.result-details { display: grid; gap: 10px; padding: 18px 0 0; }
.result-details div { display: flex; justify-content: space-between; gap: 15px; }
.result-details b { font-size: 12px; font-weight: 600; }
.calibration-caption { margin: auto 0 0; padding-top: 24px; color: var(--muted); font-size: 11px; }

.lower-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 19px; margin-top: 19px; }
.compact-card { padding: 24px 27px 21px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 13px 8px; color: var(--muted); border-bottom: 1px solid var(--ink); font-size: 10px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 0; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; text-align: right; }
.data-table td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.calibration-table th:last-child, .calibration-table td:last-child { text-align: right; }
.calibration-table th:nth-child(2), .calibration-table td:nth-child(2) { text-align: center; }
.table-note, .calibration-intro { margin: 16px 0 0; color: var(--muted); font-size: 10px; }
.calibration-intro { max-width: 630px; margin-top: 0; padding: 17px 0 3px; line-height: 1.6; }
code { padding: 2px 4px; color: var(--blue-dark); background: var(--blue-soft); font-family: "Cascadia Mono", monospace; font-size: 10px; }

.materials { margin-top: 19px; padding: 25px 27px 10px; }
.materials-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.materials-heading .eyebrow { margin-bottom: 8px; }
.materials-heading h2 { font-size: 25px; }
.materials-heading > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.material-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.material-links a { position: relative; display: block; min-height: 76px; padding: 18px 27px 14px 0; border-right: 1px solid var(--line); }
.material-links a:not(:first-child) { padding-left: 18px; }
.material-links a:last-child { border-right: 0; }
.material-links a:nth-child(n+6) { border-top: 1px solid var(--line); }
.material-links span { display: block; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.material-links small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.material-links b { position: absolute; top: 18px; right: 13px; color: var(--coral); font-weight: 400; }
.material-links a:hover span { color: var(--coral); }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 0 38px; color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .hero { display: block; padding-top: 45px; }
  .hero-meta { margin-top: 30px; }
  .calculator-grid, .lower-grid { grid-template-columns: 1fr; }
  .material-links { grid-template-columns: repeat(3, 1fr); }
  .material-links a:nth-child(3) { border-right: 0; }
  .material-links a:nth-child(4), .material-links a:nth-child(5) { border-top: 1px solid var(--line); }
  .site-footer { display: grid; }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { height: 62px; }
  .top-nav { display: none; }
  h1 { font-size: 43px; }
  .hero-copy { font-size: 14px; }
  .hero-meta { gap: 18px; }
  .fields { grid-template-columns: 1fr; gap: 13px; }
  .input-card, .result-card, .compact-card, .materials { padding-left: 18px; padding-right: 18px; }
  .form-footer { display: block; }
  .calibration-control { margin-bottom: 14px; }
  button { width: 100%; }
  .risk-block strong { font-size: 43px; }
  .materials-heading { display: block; }
  .materials-heading > p { margin-top: 12px; text-align: left; }
  .material-links { grid-template-columns: 1fr 1fr; }
  .material-links a, .material-links a:not(:first-child) { padding-left: 0; padding-right: 18px; border-right: 0; }
  .material-links a:nth-child(odd) { border-right: 1px solid var(--line); }
  .material-links a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .material-links a:nth-child(even) { padding-left: 16px; }
}
