:root {
  --navy: #1f3864;
  --navy-2: #2e74b5;
  --navy-ink: #14254a;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1c2330;
  --muted: #5b6474;
  --line: #dde3ec;
  --line-2: #edf1f6;
  --red: #b3261e;
  --red-bg: #fbe4e4;
  --red-line: #e8b4b4;
  --orange: #a54b00;
  --orange-bg: #fff0dc;
  --orange-line: #f1c78e;
  --yellow-bg: #fff2cc;
  --yellow-line: #e8d48f;
  --green: #2d6a2f;
  --green-bg: #e2efda;
  --blue-bg: #e4ecf8;
  --gray-bg: #f2f2f2;
  --focus: #2e74b5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 37, 74, .04), 0 4px 16px rgba(20, 37, 74, .06);
  --shadow-hover: 0 2px 4px rgba(20, 37, 74, .06), 0 10px 28px rgba(31, 56, 100, .14);
  font-size: 17px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased; min-width: 1100px;
}
a { color: var(--navy-2); }
a:hover { color: var(--navy); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
strong { font-weight: 650; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; color: #fff;
  background: linear-gradient(100deg, #182d52 0%, #1f3864 45%, #27508f 100%);
  box-shadow: 0 2px 12px rgba(15,30,60,.18);
}
.topbar-inner { max-width: 1440px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 14.5px; letter-spacing: .5px; }
.brand-name { font-weight: 700; font-size: 19px; }
.brand-sub { font-size: 13.5px; opacity: .75; display: block; margin-top: -2px; }
.nav { display: flex; gap: 4px; background: rgba(255,255,255,.07); padding: 4px; border-radius: 999px; }
.nav a { color: #dfe7f5; text-decoration: none; padding: 6px 16px; border-radius: 999px; font-size: 16px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 650; }
.nav a.soon { opacity: .55; }
.topbar .spacer { flex: 1; }
.topbar .tools a { color: #dfe7f5; font-size: 15px; text-decoration: none; margin-left: 18px; }
.topbar .tools a:hover { color: #fff; text-decoration: underline; }

.step0 { background: #fdecea; border-bottom: 1px solid #f3c9c4; color: #5a1410; }
.step0-inner { max-width: 1440px; margin: 0 auto; padding: 9px 32px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.step0 b.stop { color: #fff; background: var(--red); border-radius: 999px; padding: 1px 12px; font-size: 14px; letter-spacing: .4px; white-space: nowrap; }

.step0 .sep { color: var(--red-line); }

/* ---------- layout ---------- */
main { max-width: 1360px; margin: 0 auto; padding: 32px 32px 80px; }
.crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy-2); text-decoration: underline; }
h1 { font-size: 34px; color: var(--navy-ink); margin: 0 0 6px; line-height: 1.15; letter-spacing: -.4px; font-weight: 750; }
h2 { font-size: 23px; color: var(--navy-ink); margin: 36px 0 14px; letter-spacing: -.2px; font-weight: 700; }
h3 { font-size: 19px; color: var(--navy); margin: 22px 0 10px; font-weight: 650; }
h4 { font-size: 16.5px; color: var(--navy); margin: 14px 0 6px; }
.lede { color: var(--muted); margin: 0 0 18px; font-size: 18px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head .grow { flex: 1; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 22px 24px; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.with-toc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.toc { position: sticky; top: 112px; font-size: 15.5px; max-height: calc(100vh - 130px); overflow: auto; }
.toc a { display: block; padding: 6px 12px; border-radius: 8px; border-left: 3px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--navy); background: #fff; }
.toc .toc-title { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 6px 10px; font-weight: 600; }

/* ---------- buttons, badges ---------- */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 16px; font-weight: 550; transition: border-color .15s, background .15s, box-shadow .15s; font-size: 15.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--navy-2); color: var(--navy); box-shadow: 0 2px 8px rgba(31,56,100,.1); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(31,56,100,.25); }
.btn.primary:hover { background: var(--navy-ink); color: #fff; }
.btn.small { padding: 4px 11px; font-size: 14px; border-radius: 8px; }
.btn.copied { background: var(--green-bg); border-color: #9cc28b; color: var(--green); }
.badge { display: inline-block; font-size: 13px; font-weight: 650; padding: 3px 11px; border-radius: 999px; letter-spacing: .2px; vertical-align: middle; white-space: nowrap; }
.badge.draft { background: var(--yellow-bg); color: #7a5b00; border: 1px solid var(--yellow-line); }
.badge.approved { background: var(--green-bg); color: var(--green); border: 1px solid #a9cf98; }
.badge.soon { background: #eceff4; color: var(--muted); border: 1px solid var(--line); }
.badge.proposed { background: #efe7fb; color: #5b2a9c; border: 1px solid #d3c1ef; }
.badge.emerg { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line); }
.badge.urgent { background: var(--yellow-bg); color: #7a5b00; border: 1px solid var(--yellow-line); }
.tag-proposed { background: #efe7fb; color: #5b2a9c; border-radius: 4px; padding: 0 4px; font-size: .92em; }
.tag-decision { background: #fff3cd; color: #7a5b00; border-radius: 4px; padding: 0 4px; font-size: .88em; }

/* ---------- search ---------- */
.search-wrap { margin: 0 0 26px; }
.search-box { display: flex; gap: 10px; align-items: stretch; }
.search-box textarea {
  flex: 1; resize: vertical; min-height: 58px; max-height: 160px; padding: 16px 20px; font: inherit; font-size: 18px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); box-shadow: var(--shadow);
}
.search-box textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(46,116,181,.15); }
.search-box .btn.primary { padding: 0 30px; font-size: 17px; font-weight: 650; border-radius: var(--radius); }
.search-meta { display: flex; gap: 20px; align-items: center; font-size: 14.5px; color: var(--muted); margin-top: 8px; padding-left: 4px; }
.search-meta label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.phi-warn { color: #7a3b00; }
.phi-warn b { color: var(--red); }

.results { margin-top: 10px; }
.answer { padding: 16px 18px; }
.answer .summary { font-size: 17.5px; margin: 0 0 12px; }
.answer .cite { margin: 0 1px 0 2px; font-size: 13px; vertical-align: super; color: var(--navy-2); font-weight: 600; cursor: pointer; text-decoration: none; }
.quote { border-left: 4px solid #b9c8e0; background: #f8fafd; padding: 10px 16px; margin: 10px 0; border-radius: 0 10px 10px 0; }
.quote .q { white-space: pre-wrap; }
.quote .src { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.quote .src a { color: var(--muted); }
.quote .why { font-size: 14px; color: var(--navy-2); margin-bottom: 2px; font-weight: 600; }
.quote.red { border-left-color: var(--red); background: var(--red-bg); }
.redbox { border: 1.5px solid var(--red-line); background: #fdf1f0; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.redbox > .hd { color: var(--red); font-weight: 700; margin-bottom: 4px; }
.notice { padding: 12px 18px; border-radius: var(--radius); background: #eef3fb; border: 1px solid #c9d8ee; color: var(--navy-ink); font-size: 16px; margin-bottom: 10px; }
.notice.warn { background: var(--yellow-bg); border-color: var(--yellow-line); color: #5c4400; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--navy-2); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- home ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 34px 0 34px 40px; margin-bottom: 30px; overflow: hidden; background: #fff; }
.home-hero h1 { font-size: 40px; margin-bottom: 4px; }
.home-hero .search-wrap { margin: 18px 0 0; }
.home-hero .search-box textarea { background: #f8fafd; }
.hero-art { width: 100%; height: auto; display: block; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%); mask-image: linear-gradient(90deg, transparent 0, #000 12%); max-height: 300px; object-fit: contain; object-position: right center; }
@media print { .hero-art { display: none; } .home-hero { display: block; padding: 0; } }
.tier911 { border: 1.5px solid #ecb8b3; background: #fdf1f0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tier911 > .hd, .tierED > .hd { padding: 12px 20px; font-weight: 750; font-size: 17.5px; letter-spacing: .1px; display: flex; justify-content: space-between; align-items: baseline; }
.tier911 > .hd { color: #fff; background: linear-gradient(90deg, #a8231c, #c8372d); }
.tierED { border: 1.5px solid #f0cf9f; background: #fff7ec; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tierED > .hd { background: linear-gradient(90deg, #c46f12, #dc8a2c); color: #fff; }
.tier-list { margin: 0; padding: 14px 22px 16px 40px; }
.tier-list li { margin: 7px 0; }
.tier-note { padding: 0 22px 14px; font-size: 15.5px; }
.src-chip { font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.spec-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.spec-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.spec-card:not(.soon):hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.spec-card .head { padding: 18px 22px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #f7f9fd, #fff); display: flex; align-items: center; gap: 10px; }
.spec-card .head a.name { font-size: 21px; font-weight: 750; color: var(--navy); text-decoration: none; flex: 1; }
.spec-card .head a.name:hover { text-decoration: underline; }
.spec-card .body { padding: 18px 22px; display: grid; gap: 16px; }
.spec-card .mini h5 { margin: 0 0 4px; font-size: 13.5px; text-transform: uppercase; letter-spacing: .5px; }
.spec-card .mini.r h5 { color: var(--red); }
.spec-card .mini.o h5 { color: var(--orange); }
.spec-card .mini ul { margin: 0; padding-left: 18px; font-size: 15.5px; }
.spec-card .mini li { margin: 3px 0; }
.spec-card .mini.r { border-left: 4px solid var(--red); padding-left: 14px; }
.spec-card .mini.o { border-left: 4px solid #d98a2b; padding-left: 14px; }
.spec-card .foot { margin-top: auto; padding: 14px 22px; background: #fafbfd; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; }
.spec-card.soon { opacity: .75; }
.spec-card.soon .body { color: var(--muted); font-size: 16px; }
.more-toggle { font-size: 14px; background: none; border: none; color: var(--navy-2); padding: 0; text-decoration: underline; }

/* ---------- specialty / disease ---------- */
.disease-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.disease-tile { display: block; padding: 16px 20px; transition: box-shadow .2s, transform .2s, border-color .2s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.disease-tile:hover { border-color: #9db6dc; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.disease-tile b { display: block; color: var(--navy-ink); font-size: 18px; font-weight: 700; }
.disease-tile span { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.filter { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; width: 340px; background: #fff; }
.filter:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(46,116,181,.15); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 4px 0 26px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 16px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--navy); }
.tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }
.section-block { margin-bottom: 28px; scroll-margin-top: 120px; }
section, [id^="p-"], #conditions, #redflags, #levels, #routing, #sbar { scroll-margin-top: 130px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; }
.sec-head h2, .sec-head h3 { margin-bottom: 8px; }
.sec-src { font-size: 13.5px; color: var(--muted); }
.sec-src a { color: var(--muted); }
.pref-note { font-size: 15.5px; background: #eef3fb; border: 1px solid #d3e0f2; border-radius: 10px; padding: 10px 16px; margin: 0 0 12px; color: var(--navy-ink); }

/* ---------- rendered document content ---------- */
.doc p { margin: 6px 0; }
.doc ul { margin: 6px 0; padding-left: 22px; }
.doc li { margin: 3px 0; }
.doc .box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; background: #fafbfd; }
.doc table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 12px 0; font-size: 16px; background: #fff; border: 1px solid #d5dde9; border-radius: 10px; overflow: hidden; }
.doc th, .doc td { border-bottom: 1px solid #e3e8f0; border-right: 1px solid #e3e8f0; padding: 10px 14px; vertical-align: top; text-align: left; }
.doc tr > :last-child { border-right: none; }
.doc tbody tr:last-child > * { border-bottom: none; }
.doc th { background: var(--blue-bg); color: var(--navy-ink); font-weight: 650; font-size: 15.5px; }
.doc td p:first-child, .doc th p:first-child { margin-top: 0; }
.doc td p:last-child { margin-bottom: 0; }
.doc td ul { padding-left: 18px; margin: 2px 0; }
.doc .xref { color: var(--navy-2); text-decoration: none; border-bottom: 1px dotted var(--navy-2); }
.doc .phrase-ref, .phrase-ref { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: .9em; color: var(--navy); background: #e8eef8; border-radius: 4px; padding: 0 4px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.phrase-ref:hover { background: #d4e0f3; }
.row-flag td:first-child { font-weight: 600; }

/* ---------- smartphrase cards ---------- */
.phrases { display: grid; gap: 12px; }
.phrase { border: 1px solid #d3deef; border-radius: 12px; box-shadow: var(--shadow); background: #fff; overflow: hidden; }
.phrase > .hd { background: #f1f5fb; padding: 11px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.phrase.emerg > .hd { background: var(--red-bg); }
.phrase.urgent > .hd { background: var(--yellow-bg); }
.phrase .nm { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-weight: 700; color: var(--navy); white-space: nowrap; }
.phrase.emerg .nm { color: var(--red); }
.phrase .uw { flex: 1; font-size: 14.5px; color: var(--muted); font-style: italic; }
.phrase .bd { padding: 14px 18px; border-top: 1px solid #e1e8f3; font-size: 16px; display: none; }
.phrase.open .bd { display: block; }
.phrase .bd p { margin: 3px 0; }
.chev { transition: transform .15s; color: var(--muted); font-size: 13.5px; }
.phrase.open .chev { transform: rotate(90deg); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq-item > .hd { padding: 13px 18px; display: flex; gap: 10px; align-items: baseline; cursor: pointer; }
.faq-item .n { color: var(--muted); font-size: 14px; min-width: 34px; }
.faq-item .qq { font-weight: 600; flex: 1; }
.faq-item .cat { font-size: 13.5px; color: var(--muted); }
.faq-item .bd { display: none; border-top: 1px solid var(--line-2); padding: 16px 18px; }
.faq-item.open .bd { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.faq-item .bd h5 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.faq-item .bd .rf { background: #fdf1f0; border-radius: 10px; padding: 10px 14px; }
.faq-item .bd p { margin: 0 0 4px; }

/* ---------- flows ---------- */
.flow { padding: 22px 24px; }
.flow-step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.flow-step:first-of-type { border-top: none; }
.flow-step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.flow-step.done .num { background: #8fa3c4; }
.flow-step .check { font-weight: 600; margin-bottom: 8px; }
.flow-step .choices { display: flex; gap: 8px; margin-bottom: 6px; }
.flow-out { border-radius: 10px; padding: 12px 16px; margin-top: 4px; background: #f6f8fb; border: 1px solid var(--line); }
.flow-out.yes { background: #f3f8ef; border-color: #bcd8ad; }
.flow-out.no { background: #f7f7f7; }
.flow-out h6 { margin: 0 0 3px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.flow-out p { margin: 2px 0; }
.flow-end { margin-top: 10px; font-size: 15.5px; color: var(--muted); }

/* ---------- SBAR ---------- */
.sbar { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.sbar label { display: block; font-weight: 650; color: var(--navy); margin: 10px 0 4px; }
.sbar label small { font-weight: 400; color: var(--muted); }
.sbar textarea, .sbar input, .sbar select { width: 100%; font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sbar textarea { min-height: 64px; resize: vertical; }
.sbar pre { white-space: pre-wrap; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-height: 300px; margin: 0; }

/* ---------- feedback ---------- */
.fb { display: inline-flex; gap: 6px; align-items: center; font-size: 14.5px; color: var(--muted); }
.fb button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; }
.fb button:hover { border-color: var(--navy-2); }
.fb button.on { background: var(--blue-bg); border-color: var(--navy-2); }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 25, 45, .45); display: grid; place-items: center; z-index: 100; }
.modal { width: 540px; background: #fff; border-radius: 18px; padding: 24px 28px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal h3 { margin-top: 0; }
.modal textarea { width: 100%; min-height: 110px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pop { position: fixed; z-index: 90; width: 560px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #b7c7e3; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy-ink); color: #fff; padding: 8px 16px; border-radius: 6px; font-size: 16px; z-index: 200; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% 10%, #2e74b5 0%, transparent 60%), linear-gradient(160deg, #14254a, #1f3864 50%, #27508f); min-width: 0; }
.login-card { width: 420px; background: #fff; border-radius: 20px; padding: 36px 36px 28px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 25px; }
.login-card p { color: var(--muted); font-size: 16px; }
.login-card input { width: 100%; font: inherit; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0 16px; }
.login-card label { font-weight: 600; font-size: 15px; color: var(--navy-ink); }
.login-card .btn { width: 100%; justify-content: center; padding: 13px; border-radius: 12px; font-size: 17px; }
.login-error { color: var(--red) !important; font-weight: 600; }
.login-foot { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* ---------- admin ---------- */
.admin table { border-collapse: collapse; width: 100%; font-size: 15.5px; background: #fff; }
.admin th, .admin td { border-bottom: 1px solid var(--line-2); padding: 6px 8px; text-align: left; vertical-align: top; }
.admin th { color: var(--muted); font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: .4px; }
.stat { font-size: 29.5px; font-weight: 700; color: var(--navy); }
.stat-label { font-size: 13.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* ---------- print ---------- */
.print-foot { display: none; }
@media print {
  body { background: #fff; min-width: 0; font-size: 11.5pt; }
  .topbar, .step0, .search-wrap, .no-print, .toc, .fb, .page-actions, .tabs, .filter { display: none !important; }
  main { padding: 0; max-width: none; }
  .with-toc { display: block; }
  .card { box-shadow: none; }
  .phrase .bd, .faq-item .bd { display: block !important; }
  .faq-item .bd { grid-template-columns: 1fr 1fr 1fr; display: grid !important; }
  a { color: inherit; text-decoration: none; }
  .print-foot { display: block; margin-top: 24px; font-size: 9pt; color: #555; border-top: 1px solid #999; padding-top: 6px; }
  .section-block, .phrase, .faq-item, tr { break-inside: avoid; }
}

mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 2px; }
.hit-lines { margin: 4px 0 0; padding-left: 0; list-style: none; }
.hit-lines li { margin: 3px 0; white-space: pre-wrap; }

/* ---------- concern trees ---------- */
.concern-box { margin-bottom: 22px; border: none; background: linear-gradient(135deg, #1f3864 0%, #2c5592 100%); color: #fff; box-shadow: 0 8px 28px rgba(31,56,100,.22); }
.concern-box h2 { color: #fff !important; }
.concern-box .lede { color: #cfdcf0; }
.concern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.concern-tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border: 1px solid transparent; border-radius: 12px; background: #fff; color: var(--navy-ink); font-weight: 650; font-size: 17px; line-height: 1.35; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.concern-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.16); color: var(--navy); }
.concern-tile span { color: #fff; background: var(--navy-2); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 15px; }
.tree { display: grid; gap: 16px; }
#outcome { scroll-margin-top: 130px; }
.tree-step { padding: 22px 26px; }
.tree-step.current { border: 1.5px solid #9db6dc; box-shadow: 0 8px 28px rgba(31,56,100,.12); }
.tree-step.done { opacity: .7; padding: 14px 26px; }
.tree-step.done .tree-items { display: none; }
.tree-q { font-weight: 700; font-size: 20px; color: var(--navy-ink); display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tree-q .num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
.tree-items { display: grid; gap: 10px; margin-bottom: 18px; }
.ref { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 16px; background: #fafbfd; }
.ref table { margin: 4px 0; }
.ref .sec-src { margin-top: 2px; }
.s0-911 { border-left: 4px solid var(--red); padding-left: 12px; }
.s0-ed { border-left: 4px solid #d98a2b; padding-left: 12px; }
.choices { display: flex; gap: 12px; }
.choices .btn { padding: 12px 28px; font-size: 17px; font-weight: 650; border-radius: 12px; min-width: 120px; justify-content: center; }
.yes-btn { background: var(--red) !important; border-color: var(--red) !important; color: #fff !important; }
.yes-btn:hover { background: #8f1c16 !important; }
.tree-opts { display: grid; gap: 10px; }
.tree-opt { text-align: left; padding: 14px 20px; border: 1px solid #d3deef; border-radius: 12px; background: #f5f8fd; transition: background .15s, border-color .15s; color: var(--ink); font-size: 16.5px; }
.tree-opt:hover { background: var(--blue-bg); border-color: var(--navy-2); }
.tree-ans { font-weight: 600; color: var(--navy-2); }
.outcome { overflow: hidden; }
.outcome .lv { padding: 18px 26px; font-size: 22px; font-weight: 800; letter-spacing: .2px; color: #fff; }
.lv-emerg { background: var(--red); }
.lv-ed { background: #c0461b; }
.lv-urgent { background: #b07d00; }
.lv-time { background: #8a6d1f; }
.lv-routine { background: var(--navy-2); }
.lv-nurse { background: var(--green); }
.lv-other { background: #5b6474; }
@media print { .tree-step.done .tree-items { display: none; } }

.request-box { margin-bottom: 22px; border: 1px solid #dfe6f1; background: #fff; }
.request-box.compact { margin-top: 0; }
.concern-tile.req { background: #f5f8fd; box-shadow: none; border-color: #dfe6f1; }
.concern-tile.req:hover { background: #fff; border-color: #9db6dc; box-shadow: var(--shadow-hover); }
.local-ref { border: 1px solid #d9cdf0; background: #faf7ff; }
.local-ref h5 { margin: 2px 0 4px; font-size: 16px; color: #4b2a86; }
.local-tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #5b2a9c; background: #efe7fb; border-radius: 999px; padding: 2px 10px; }

/* ---------- specialty icons (generated in Canva, hosted locally) ---------- */
.spec-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; box-shadow: 0 1px 3px rgba(31,56,100,.12); }
.spec-icon.md { width: 60px; height: 60px; border-radius: 16px; margin-top: 2px; }
.spec-icon.lg { width: 72px; height: 72px; border-radius: 18px; }
.page-head { align-items: center; }
.spec-card .head { gap: 14px; }
.spec-card.soon .spec-icon { filter: grayscale(.6); opacity: .8; }
@media print { .spec-icon { display: none; } }

/* ---------- search right under the concern box ---------- */
.under-concern { margin: -4px 0 22px; }
.under-concern .search-wrap { margin: 0; }

/* ---------- 911 / ED panels ---------- */
.tier911, .tierED { background: #fff !important; box-shadow: 0 4px 18px rgba(168,35,28,.08); }
.tier911 { border: 1px solid #f0c9c4 !important; }
.tierED { border: 1px solid #f2d6ad !important; box-shadow: 0 4px 18px rgba(196,111,18,.08); }
.tier911 > .hd, .tierED > .hd { justify-content: flex-start !important; align-items: center !important; gap: 12px; padding: 14px 22px !important; }
.tier-ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.tier911 .tier-ic { color: #b3261e; }
.tierED .tier-ic { color: #c46f12; }
.tier-list { list-style: none; padding: 6px 24px 8px !important; }
.tier-list li { position: relative; margin: 0 !important; padding: 12px 0 12px 30px; border-bottom: 1px solid #f7e4e1; }
.tierED .tier-list li { border-bottom-color: #f8ead6; }
.tier-list li:last-child { border-bottom: none; }
.tier-list li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: #c8372d; box-shadow: 0 0 0 4px #fbe2df; }
.tierED .tier-list li::before { background: #dc8a2c; box-shadow: 0 0 0 4px #fcebd3; }
.tier-note { margin: 0; padding: 14px 24px !important; background: #fdf3f2; border-top: 1px solid #f3d3cf; }
.tierED .tier-note { background: #fff8ee; border-top-color: #f5e0c0; }
.tier-list .src-chip { background: #f5f7fb; }
@media print { .tier-ic { display: none; } }

/* ---------- side notes ---------- */
sup.nref { font-size: 11px; font-weight: 600; color: #8a93a6; background: #eef1f6; border-radius: 999px; padding: 0 5px; margin-left: 2px; cursor: pointer; vertical-align: super; line-height: 1; }
sup.nref:hover { background: var(--blue-bg); color: var(--navy); }
.page-notes { margin: 40px 0 0; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14.5px; color: var(--muted); }
.page-notes summary { cursor: pointer; font-weight: 650; color: var(--navy-ink); }
.page-notes ol { margin: 10px 0 0; padding-left: 24px; }
.page-notes li { margin: 4px 0; border-radius: 6px; padding: 1px 4px; transition: background .4s; }
.page-notes li.flash { background: #fff3c4; }
@media print { sup.nref, .page-notes { display: none; } }

/* ---------- collapsible sections ---------- */
details.xsec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 14px; scroll-margin-top: 130px; }
details.xsec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 22px; }
details.xsec > summary::-webkit-details-marker { display: none; }
details.xsec > summary h2, details.xsec > summary h3 { margin: 0; flex: 1; }
details.xsec > summary::after { content: "Show"; font-size: 14px; font-weight: 600; color: var(--navy-2); background: #eef3fb; border-radius: 999px; padding: 4px 14px; }
details.xsec[open] > summary::after { content: "Hide"; }
details.xsec[open] > summary { border-bottom: 1px solid var(--line-2); }
details.xsec > summary:hover { background: #fafbfd; border-radius: var(--radius); }
.xsec-body { padding: 8px 22px 18px; }
.xsec-body > .section-block:first-child > .sec-head h3:first-child { margin-top: 10px; }
@media print { details.xsec > summary::after { display: none; } }

.nonurgent-note { margin: -6px 0 16px; padding: 10px 16px; border-radius: 10px; background: #eef6ee; border: 1px solid #cfe3cb; color: #2d5a2f; font-size: 15.5px; }

.tierSD { margin-top: 16px; background: #fff; border: 1px solid #ecd9a3; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 18px rgba(176,125,0,.08); }
.tierSD > .hd { padding: 12px 22px; font-weight: 750; font-size: 17px; color: #fff; background: linear-gradient(90deg, #a87900, #c89a1e); }
.tierSD .tier-list li::before { background: #c89a1e; box-shadow: 0 0 0 4px #f7ecc9; }
.grid.cols-2 + .tierSD { margin-top: 16px; }
.local-li .src-chip { background: #efe7fb; color: #5b2a9c; border-color: #d9cdf0; }

/* tick boxes on red-flag / criteria items */
.tick-item { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; border-radius: 10px; }
.tick-item > input { width: 20px; height: 20px; margin: 14px 0 0 4px; flex: none; accent-color: var(--red); cursor: pointer; }
.tick-item > .ref { flex: 1; }
.tick-item.on > .ref { border-color: #e8a6a0; background: #fdf1f0; }
@media print { .tick-item > input { display: none; } }
