:root {
  color-scheme: dark;
  --ink: #f2f7f5;
  --muted: #9cb0ae;
  --faint: #68807e;
  --bg: #061317;
  --panel: #0a1d22;
  --panel-2: #0d252a;
  --line: #1b393d;
  --green: #7bea87;
  --green-deep: #0f3828;
  --amber: #f5c86d;
  --red: #ff8274;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 84% 0%, #123b3c 0, transparent 24rem), var(--bg); color: var(--ink); min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header { max-width: 1160px; margin: auto; min-height: 86px; padding: 18px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(123,234,135,.14); }
.brand { display: flex; gap: 12px; color: var(--ink); text-decoration: none; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #55be68; border-radius: 50%; box-shadow: inset 0 0 0 5px #0b2921, 0 0 25px rgba(123,234,135,.12); color: var(--green); }
.brand-mark span { font-weight: 800; font-size: 13px; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 14px; color: var(--green); letter-spacing: .08em; text-transform: uppercase; }
.brand small { font-family: Georgia, serif; font-size: 20px; margin-top: 3px; }
.status-pill { border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 12px; padding: 8px 12px; }
.status-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

main { max-width: 1160px; margin: 0 auto; padding: 58px 28px 80px; }
.hero { max-width: 850px; margin-bottom: 50px; }
.eyebrow, .step-heading p, .result-status > div > p { text-transform: uppercase; letter-spacing: .15em; color: var(--green); font-weight: 750; font-size: 11px; }
.hero h1 { margin: 12px 0 20px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(42px, 7vw, 78px); letter-spacing: -.045em; line-height: .98; }
.hero h1 em { color: var(--green); font-weight: 400; }
.hero-copy { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 700px; }
.flow-guide { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 18px; padding: 0; list-style: none; }
.flow-guide li { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 12px; }
.flow-guide li span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green-deep); color: var(--green); font-weight: 800; font-size: 11px; }
.source-note { display: inline-flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; color: var(--faint); font-size: 12px; }
.source-note strong { color: var(--ink); }

form { display: grid; gap: 16px; }
.step-card { position: relative; background: linear-gradient(140deg, rgba(14,40,45,.96), rgba(8,27,31,.96)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.step-heading { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.step-heading p, .step-heading h2 { margin: 0; }
.step-heading h2 { margin-top: 3px; font-family: Georgia, serif; font-weight: 400; font-size: 25px; }
.step-number { width: 42px; height: 42px; border: 1px solid #315256; border-radius: 12px; display: grid; place-items: center; color: var(--faint); font-size: 12px; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.vent-row { margin-bottom: 18px; }
.full { grid-column: 1 / -1; }
.field.full { grid-column: 1 / -1; }
.field > span, .hospital-field > label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #cfe0de; font-size: 13px; font-weight: 650; }
.field small { color: var(--faint); font-weight: 450; }
input, select { width: 100%; border: 1px solid #25464a; border-radius: 12px; background: #06171b; color: var(--ink); min-height: 52px; padding: 0 14px; outline: none; transition: border .15s, box-shadow .15s; }
input::placeholder { color: #59706f; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(123,234,135,.1); }
.input-unit { display: flex; align-items: center; border: 1px solid #25464a; border-radius: 12px; background: #06171b; overflow: hidden; }
.input-unit:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(123,234,135,.1); }
.input-unit input { border: 0; border-radius: 0; box-shadow: none; }
.input-unit b { padding: 0 13px; color: var(--faint); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }

.route-point { padding: 20px; border: 1px solid #25464a; border-radius: 16px; background: rgba(6,23,27,.58); }
.route-point-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.route-point-heading strong { font-size: 14px; color: #dce9e7; }
.route-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; min-height: 25px; padding: 0 9px; border-radius: 99px; background: var(--green-deep); color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.route-badge.destination { background: #173137; color: #b8cecb; }
.destination-point { border-color: #315256; }
.route-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.route-divider::before, .route-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.route-divider span { white-space: nowrap; }
.hospital-field { position: relative; }
.hospital-field > label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #cfe0de; font-size: 13px; font-weight: 650; }
.hospital-field small { color: var(--faint); font-weight: 450; }
.hospital-options { position: absolute; z-index: 20; top: 82px; left: 0; right: 0; max-height: 325px; overflow: auto; background: #0b2025; border: 1px solid #315256; border-radius: 14px; padding: 6px; box-shadow: 0 24px 50px rgba(0,0,0,.5); }
.hospital-option { width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 12px; border-radius: 9px; }
.hospital-option:hover, .hospital-option:focus { background: #13343a; outline: none; }
.hospital-option strong, .hospital-option span { display: block; }
.hospital-option strong { font-size: 13px; }
.hospital-option span { margin-top: 4px; font-size: 11px; color: var(--muted); }
.selected-hospital { margin-top: 9px; color: var(--muted); font-size: 12px; }

.route-button { margin-top: 18px; border: 1px solid #315256; background: transparent; color: var(--ink); padding: 11px 15px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.route-button:hover { border-color: var(--green); color: var(--green); }
.route-button:disabled { opacity: .55; cursor: wait; }
.route-icon { color: var(--green); margin-right: 7px; }
.inline-message { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.inline-message.error { color: var(--amber); }

.assumptions { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.assumptions summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.assumptions summary span { float: right; color: var(--green); }
.assumption-body { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: end; padding-top: 18px; }
.assumption-body p { color: var(--faint); font-size: 12px; line-height: 1.6; margin: 0 0 2px; }
.calculate-button { border: 0; border-radius: 14px; min-height: 64px; padding: 0 24px; background: var(--green); color: #05200d; font-weight: 850; font-size: 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 12px 32px rgba(85,190,104,.18); }
.calculate-button:hover { background: #93f19c; }

.result-panel { margin-top: 26px; border: 1px solid #3b7950; border-radius: var(--radius); overflow: hidden; background: #0a211c; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.result-panel.warning { border-color: #7a6331; background: #241d0d; }
.result-panel.danger { border-color: #7d3a36; background: #24110f; }
.result-status { display: flex; gap: 18px; align-items: center; padding: 28px; }
.status-icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #05200d; display: grid; place-items: center; font-size: 24px; font-weight: 900; }
.warning .status-icon { background: var(--amber); color: #2c1d00; }
.danger .status-icon { background: var(--red); color: #2e0703; }
.result-status h2, .result-status p { margin: 0; }
.result-status h2 { font-family: Georgia, serif; font-size: 31px; font-weight: 400; margin: 2px 0 5px; }
.result-status #statusCopy { color: var(--muted); font-size: 13px; }
.result-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(123,234,135,.16); border-bottom: 1px solid rgba(123,234,135,.16); }
.result-metrics > div { padding: 22px; border-right: 1px solid rgba(123,234,135,.12); }
.result-metrics > div:last-child { border: 0; }
.result-metrics span, .result-metrics small { display: block; color: var(--faint); font-size: 11px; }
.result-metrics strong { display: block; margin: 7px 0 3px; font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.math-strip { display: flex; flex-wrap: wrap; gap: 9px; padding: 16px 28px; font-size: 11px; color: var(--faint); }
.math-strip strong { color: var(--muted); }
.maps-link { display: block; margin: 0 28px 24px; color: var(--green); font-size: 12px; }

.safety-card { display: flex; gap: 17px; margin-top: 28px; padding: 22px; border: 1px solid #473e2c; background: rgba(51,41,20,.35); border-radius: 16px; }
.safety-mark { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--amber); border-radius: 50%; color: var(--amber); font-weight: 800; }
.safety-card h2 { margin: 0 0 7px; font-size: 14px; }
.safety-card p { margin: 0; color: #a99f88; font-size: 12px; line-height: 1.6; }
.site-footer { max-width: 1160px; margin: auto; padding: 25px 28px 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; line-height: 1.55; }
.site-footer p { margin: 0; }
.site-footer a { color: #91aaa7; text-underline-offset: 3px; }
.site-footer a:hover, .site-footer a:focus { color: var(--green); }
.footer-owner { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.support-link { margin-left: 5px; white-space: nowrap; }
.footer-terms { margin-top: 14px; max-width: 760px; }
.footer-terms summary { width: fit-content; cursor: pointer; color: #718987; }
.footer-terms p { margin-top: 8px; color: #607674; }
.footer-sources { display: flex; gap: 18px; margin-top: 16px; color: #526a68; font-size: 10px; }

@media (max-width: 760px) {
  .site-header { padding: 14px 18px; min-height: 72px; }
  .status-pill { display: none; }
  main { padding: 38px 16px 60px; }
  .hero { margin-bottom: 34px; }
  .hero h1 { font-size: clamp(38px, 12vw, 48px); line-height: 1.02; }
  .hero-copy { font-size: 16px; line-height: 1.55; }
  .flow-guide { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 20px; }
  .flow-guide li { min-height: 42px; border-radius: 12px; }
  .step-card { padding: 20px 16px; border-radius: 18px; }
  .field-grid, .field-grid.three { grid-template-columns: 1fr; gap: 15px; }
  input, select { min-height: 56px; font-size: 16px; }
  .route-point { padding: 16px; }
  .route-point-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .hospital-field > label { align-items: flex-start; flex-direction: column; gap: 3px; }
  .route-divider span { white-space: normal; text-align: center; }
  .route-button { width: 100%; min-height: 52px; }
  .assumption-body { grid-template-columns: 1fr; }
  .result-status { align-items: flex-start; padding: 22px 18px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .result-metrics > div:nth-child(2) { border-right: 0; }
  .result-metrics > div:nth-child(-n+2) { border-bottom: 1px solid rgba(123,234,135,.12); }
  .math-strip { padding: 15px 18px; }
  .maps-link { margin: 0 18px 20px; }
  .site-footer { padding: 24px 18px 36px; }
  .footer-owner { flex-direction: column; gap: 8px; }
  .support-link { display: inline-block; margin: 6px 0 0; min-height: 38px; padding: 9px 11px; border: 1px solid #29484b; border-radius: 9px; text-decoration: none; }
  .footer-sources { flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
