:root {
  --navy: #1f3a5f;
  --navy-2: #2c5282;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5b6777;
  --line: #dde3ea;
  --ok: #1e7b4f;
  --ok-bg: #e5f4ec;
  --warn: #8a5a00;
  --warn-bg: #fdf3dc;
  --err: #a3261c;
  --err-bg: #fbe8e6;
  --unc: #8a5a00;
  --unc-bg: #fff1cc;
  --neg-bg: #eceff3;
  --hist-bg: #e8eefc;
  --aff-bg: #dff3e8;
  --cdi: #6b3fa0;
  --cdi-bg: #f1eafb;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-size: 14px;
       color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--navy-2); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.topbar { display: flex; align-items: center; gap: 24px; background: var(--navy); color: #fff; padding: 10px 24px; }
.brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: .3px; }
.brand span { color: #8fd3ff; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: #dbe7f5; text-decoration: none; }
.topbar nav a:hover { color: #fff; text-decoration: underline; }
.offline { font-size: 12px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 99px; }
.demo-banner { background: var(--warn-bg); color: var(--warn); padding: 8px 24px; border-bottom: 1px solid #f0dca8; font-size: 13px; }

main { padding: 20px 24px; max-width: 1500px; margin: 0 auto; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0 28px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }

.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 7px 14px;
       border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; }
.btn:hover { border-color: var(--navy-2); }
.btn.primary { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.btn.primary:hover { background: var(--navy); }
.btn.danger { color: var(--err); border-color: #e7b4ae; }
.btn.small { padding: 3px 9px; font-size: 12px; }
input[type=text], input[type=search], select { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 13px; }
input[type=search] { min-width: 340px; flex: 1; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset:disabled .sugs input { opacity: .6; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.kpis div { background: var(--bg); border-radius: 6px; padding: 10px; text-align: center; }
.kpis b { display: block; font-size: 22px; color: var(--navy); }
.kpis span { color: var(--muted); font-size: 12px; }

table { border-collapse: collapse; width: 100%; }
table.list th, table.list td, table.sugs th, table.sugs td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
table th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; }
td.c, th.c { text-align: center; width: 36px; }
.code { font-family: Consolas, "Courier New", monospace; font-weight: 600; white-space: nowrap; }
.miss { color: var(--err); }
.extra { color: var(--warn); }

.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.b-new { background: #e6eefb; color: var(--navy-2); }
.b-in_review { background: var(--warn-bg); color: var(--warn); }
.b-final { background: var(--ok-bg); color: var(--ok); }
.b-error { background: var(--err-bg); color: var(--err); }
.b-cdi { background: var(--cdi-bg); color: var(--cdi); }
.b-ai { background: #e3f1ff; color: #12558f; }
.b-learned { background: #e9f7f6; color: #0f6b63; }
.ctx-affirmed { background: var(--ok-bg); color: var(--ok); }
.ctx-uncertain { background: var(--unc-bg); color: var(--unc); }
.ctx-negated { background: var(--neg-bg); color: #4a5563; }
.ctx-history, .ctx-family { background: var(--hist-bg); color: #2b4a8a; }

.flashes { margin-bottom: 12px; }
.flash { padding: 9px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-error { background: var(--err-bg); color: var(--err); }

.case-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 12px; }
.case-grid { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 16px; align-items: start; }
.note-card { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.note { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.7; }
.legend { display: flex; gap: 8px; margin-bottom: 8px; }
.legend span { padding: 1px 8px; border-radius: 4px; }
mark.ev, .legend .ev { color: inherit; border-radius: 3px; padding: 1px 0; }
.ev-affirmed { background: var(--aff-bg); }
.ev-uncertain { background: var(--unc-bg); }
.ev-negated { background: var(--neg-bg); text-decoration: line-through; text-decoration-color: #9aa5b1; }
.ev-history, .ev-family { background: var(--hist-bg); }
.ev-cdi { background: var(--cdi-bg); }
.cdi-also { border-bottom: 2px solid var(--cdi); }
.hidden { display: none; }
.flash-mark { outline: 3px solid #f6b73c; animation: pulse 1.2s ease-out 1; }
@keyframes pulse { from { outline-color: #f6b73c; } to { outline-color: transparent; } }

table.sugs { margin-bottom: 14px; }
.sug .flag { font-size: 12px; color: var(--warn); margin-top: 3px; }
.sug .sbs { font-size: 12px; color: var(--navy-2); margin-top: 3px; }
a.evidence { color: var(--muted); font-style: italic; text-decoration: none; font-size: 12.5px; }
a.evidence:hover { color: var(--navy-2); text-decoration: underline; }
details.other summary { cursor: pointer; color: var(--muted); margin: 4px 0 10px; }
details.card summary { cursor: pointer; font-weight: 600; }

.results { list-style: none; padding: 0; margin: 6px 0 12px; max-height: 280px; overflow: auto; }
.results li { border-bottom: 1px solid var(--line); }
.results button.result { width: 100%; text-align: left; background: none; border: 0; padding: 7px 6px; cursor: pointer; font-size: 13px; }
.results button.result:hover { background: #eef4fb; }

.actions { display: flex; justify-content: flex-end; gap: 10px; margin: -4px 0 16px; }
.issue { padding: 5px 0; }
.issue-error { color: var(--err); }
.issue-warning { color: var(--warn); }
.issue-info { color: var(--navy-2); }

.cdi { border-left: 4px solid var(--cdi); background: var(--cdi-bg); padding: 8px 12px; margin-bottom: 8px; border-radius: 0 6px 6px 0; }
.cdi-title { font-weight: 600; color: var(--cdi); }
.cdi-linkage { border-left-color: #b4521e; background: #fdf0e8; }
.cdi-linkage .cdi-title { color: #b4521e; }
.cdi-items { margin: 4px 0 4px 18px; padding: 0; }
.cdi-items li { margin: 2px 0; }
.checklist td { vertical-align: top; }
.checklist ul { margin: 0; padding-left: 18px; }
.chip { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; margin: 1px; font-size: 11.5px; }
.danger-zone { border-color: #f0d3cf; }

@media (max-width: 1100px) {
  .case-grid, .grid-2 { grid-template-columns: 1fr; }
  .note-card { position: static; max-height: none; }
}

.acs { font-size: 12px; margin-top: 3px; line-height: 1.4; }
.acs-std { display: inline-block; font-weight: 600; font-size: 10.5px; padding: 0 6px; border-radius: 4px; background: #e6eefb; color: var(--navy-2); margin-right: 2px; white-space: nowrap; }
.acs-info { color: #3d4a5c; }
.acs-warn { color: var(--warn); }
.acs-warn .acs-std { background: var(--warn-bg); color: var(--warn); }
.acs-error { color: var(--err); }
.acs-error .acs-std { background: var(--err-bg); color: var(--err); }
select.cof { padding: 3px 4px; font-size: 12px; }
ul.plain li.acs { margin-bottom: 6px; font-size: 13px; }
.rules dt { font-weight: 600; margin-top: 12px; }
.rules dd { margin: 4px 0 0 0; color: var(--text); }

/* ---- v0.5: accounts, work-lists, documents, queries ---- */
.who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.who a { color: #fff; text-decoration: none; }
.role-chip { background: rgba(255,255,255,.16); border-radius: 99px; padding: 1px 9px; font-size: 11.5px; }
form.inline { display: inline; margin: 0; }
button.linkish { background: none; border: 0; color: #dbe7f5; cursor: pointer; font-size: 12.5px; text-decoration: underline; padding: 0; }
.narrow { max-width: 460px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
input[type=password], textarea { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
textarea { width: 100%; resize: vertical; }
.row.tight { margin: 4px 0; gap: 6px; }
.grow { flex: 1; min-width: 200px; }
.nowrap { white-space: nowrap; }
tr.inactive td { color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 12px; flex-wrap: wrap; }
.tab { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; }
.tab:hover { color: var(--navy-2); }
.tab.active { color: var(--navy); border-bottom-color: var(--navy-2); }
.tab .count { display: inline-block; min-width: 20px; text-align: center; background: var(--bg); border-radius: 99px; font-size: 11px; padding: 0 6px; margin-left: 2px; }
.assign-bar { background: var(--bg); padding: 6px 10px; border-radius: 6px; }
.b-admitted { background: #fde9d6; color: #9a4a00; }
.b-senior_review { background: var(--cdi-bg); color: var(--cdi); }
.b-returned { background: var(--err-bg); color: var(--err); }

.rec-high { background: var(--ok-bg); color: var(--ok); }
.rec-low { background: var(--warn-bg); color: var(--warn); }
.act-approve { background: var(--ok-bg); color: var(--ok); }
.act-modify { background: var(--warn-bg); color: var(--warn); }
.act-reject { background: var(--err-bg); color: var(--err); }
.act-none { background: var(--neg-bg); color: #4a5563; }
select.act { padding: 4px 6px; font-size: 12px; }
tr.why-row td { border-bottom: 1px solid var(--line); background: #fffaf0; padding: 4px 8px; }
tr.why-row .why label { display: inline-flex; gap: 4px; align-items: center; }
input.code-in { width: 120px; font-family: Consolas, "Courier New", monospace; }
tr.sug:has(+ tr.why-row:not(.hidden)) td { border-bottom: 0; }

.doc-index { margin: 0 0 10px; padding-left: 20px; font-size: 13px; }
.doc-index li { margin: 2px 0; }
article.doc { border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; scroll-margin-top: 12px; }
.doc-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; background: #f7f9fc; border-bottom: 1px solid var(--line); padding: 6px 10px; font-size: 12.5px; border-radius: 6px 6px 0 0; }
.doc-type { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .3px; font-size: 11.5px; }
.doc-codes { padding: 6px 10px 0; }
.doc-codes .chip { text-decoration: none; color: var(--text); }
.rec-chip-high { background: var(--ok-bg); border-color: #b7e0c8; }
.rec-chip-low { background: var(--warn-bg); border-color: #f0dca8; }
article.doc .note { padding: 8px 12px 10px; }
.ev-affirmed.conf-low { background: var(--warn-bg); border-bottom: 2px dotted var(--warn); }
.ev-affirmed.conf-high { background: var(--aff-bg); }

.query { border: 1px solid var(--line); border-left: 4px solid var(--cdi); border-radius: 0 6px 6px 0; padding: 10px 12px; margin-bottom: 10px; scroll-margin-top: 12px; }
.query.q-sent { border-left-color: #c58a00; }
.query.q-closed { border-left-color: var(--ok); }
.query.q-rejected { border-left-color: #9aa5b1; }
.query.q-flagged { border-left-color: var(--err); background: #fffafa; }
.q-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.q-pre { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; background: var(--bg); padding: 8px; border-radius: 6px; margin: 4px 0; }
.q-text summary { cursor: pointer; color: var(--muted); }
.flag-line { color: var(--err); font-weight: 600; font-size: 12.5px; margin: 4px 0; }
.hint-line { color: #12558f; font-size: 12.5px; margin: 4px 0; }
.timer { margin-left: 6px; background: var(--warn-bg); color: var(--warn); border-radius: 99px; padding: 0 8px; }
.outcome { background: var(--bg); padding: 6px 8px; border-radius: 6px; margin: 6px 0; }
.review-card { border-color: #d9c8f0; background: #fcfaff; }

/* ---- v0.6: reference bookshelf ---- */
.topbar { position: relative; }
.nav-side { border-left: 1px solid rgba(255,255,255,.25); padding-left: 14px; }
.shelf { display: flex; align-items: flex-end; gap: 3px; padding: 0 6px 0 10px; border-left: 1px solid rgba(255,255,255,.25); height: 40px; border-bottom: 3px solid #8a6a3d; }
.book { position: relative; display: flex; align-items: center; justify-content: center; width: 20px; border-radius: 2px 2px 0 0;
        text-decoration: none; color: #fff; box-shadow: inset -3px 0 0 rgba(0,0,0,.18), inset 2px 0 0 rgba(255,255,255,.15); transition: transform .12s; }
.book:hover, .book:focus { transform: translateY(-4px); outline: none; }
.spine { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9.5px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.book-1 { height: 38px; background: #7a2e2e; }          /* ACS */
.book-2 { height: 36px; background: #1f5f8b; }          /* ICD-10-AM tabular */
.book-3 { height: 33px; background: #2c7aa8; }          /* ICD-10-AM index */
.book-4 { height: 37px; background: #2e6b3f; }          /* ACHI tabular */
.book-5 { height: 34px; background: #3f8a55; }          /* ACHI index */
.book-6 { height: 38px; background: #6b4a8a; }          /* SBS tabular */
.book-7 { height: 35px; background: #8560a8; }          /* SBS index */
.book-8 { height: 36px; background: #9a6a1f; }          /* SBS coding standards */
.book-tip { display: none; position: absolute; top: 46px; right: -40px; width: 280px; z-index: 50; background: #fff; color: var(--text);
            border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 12.5px; line-height: 1.45; }
.book-tip b { display: block; color: var(--navy); margin-bottom: 4px; font-size: 13px; }
.book-tip em { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 11.5px; }
.book:hover .book-tip, .book:focus .book-tip { display: block; }
.lib-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.letters a { padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-weight: 600; }
.lib-group h3 { margin: 14px 0 4px; color: var(--navy); }
.drg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drg-grid > div { background: var(--bg); border-radius: 6px; padding: 10px; }
.pct-good { color: var(--ok); font-weight: 700; }
.pct-mid { color: var(--warn); font-weight: 700; }
.pct-bad { color: var(--err); font-weight: 700; }
.book-8 { height: 39px; background: #0f6b63; }          /* SNOMED CT */
.book-9 { height: 36px; background: #9a6a1f; }          /* SBS coding standards */

/* ---- v0.6: code sequence ---- */
.seq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seq-list { list-style: none; padding: 0; margin: 0; }
.seq-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 4px; background: #fff; }
.seq-row.pinned { background: #f1f8f4; border-color: #b7e0c8; }
.seq-n { min-width: 18px; color: var(--muted); font-size: 12px; text-align: right; }
.seq-desc { flex: 1; font-size: 12.5px; color: var(--muted); }
.seq-ctl { display: flex; gap: 3px; }
.seq-ctl .btn { padding: 1px 7px; }
.seq-ctl .btn:disabled { opacity: .3; cursor: default; }
.seq-warn { color: var(--err); font-size: 12.5px; padding: 4px 0; }
@media (max-width: 1100px) { .seq-cols { grid-template-columns: 1fr; } }

/* ---- v0.6: MRN/FIN, case groups, users ---- */
.ids { display: inline-flex; flex-direction: column; line-height: 1.25; }
.ids a { text-decoration: none; }
.ids .fin { font-size: 12px; color: var(--muted); font-family: Consolas, "Courier New", monospace; }
.fin-line { font-family: Consolas, "Courier New", monospace; color: var(--navy-2); font-weight: 600; margin-bottom: 2px; }
.tab-group { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 2px; flex-wrap: wrap; }
.tab-group .tabs { border-bottom: 0; margin: 0; }
.group-label { min-width: 110px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 0 0 10px; }
.tab-group.current .group-label { color: var(--navy); }
.tab-group + :not(.tab-group) { margin-top: 12px; }
.subnav { margin: 0 0 10px; font-size: 13px; }
#physicians input[type=text] { width: 100%; min-width: 110px; padding: 4px 6px; font-size: 12px; }
#physicians input.short { min-width: 70px; }
#physicians input.missing { border-color: #e7b4ae; background: #fffafa; }
.book-9 { height: 34px; background: #b04a6a; }          /* CDI checklist */
.book-10 { height: 36px; background: #9a6a1f; }         /* SBS coding standards */
.section-line { color: var(--navy-2); font-weight: 600; }
.service-line { margin: 2px 0; }
.pname { color: var(--text); font-family: "Segoe UI", system-ui, sans-serif; font-weight: 600; }
.drg-assigned { margin-top: 8px; }
.drg-assigned th { width: 1%; white-space: nowrap; }
tr.total-row td { font-weight: 700; border-top: 2px solid var(--line); }
.warn-text { color: var(--warn); }

/* ---- v0.7: work-list tiles and dashboard ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 12px 14px; text-decoration: none; color: var(--text); }
a.tile:hover { border-color: var(--navy-2); }
.tile-label { font-size: 12.5px; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.15; }
.tile-note { font-size: 11.5px; color: var(--muted); }
.tile-status { font-size: 11.5px; font-weight: 600; color: var(--err); }
.tile-attention { border-left: 4px solid #dc3c3d; }
.dash-head h1 .badge { vertical-align: middle; margin-left: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; background: var(--bg); padding: 10px 12px; border-radius: 6px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; }
.filters input[type=date] { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.filters input.num { width: 80px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.filter-actions { display: flex; gap: 6px; padding-bottom: 1px; }
.dash-table td.n, .dash-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: inline-flex; align-items: center; gap: 8px; min-width: 130px; }
.meter-track { position: relative; flex: 1; height: 8px; background: #dbe6f3; border-radius: 4px; overflow: hidden; min-width: 70px; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy-2); border-radius: 4px; width: 0; }
.meter-figure { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.export-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.export-bar .muted { flex: 1; min-width: 300px; }

/* ---- v0.7: audit tool ---- */
.res-pass { background: var(--ok-bg); color: var(--ok); }
.res-partial { background: var(--warn-bg); color: var(--warn); }
.res-fail { background: var(--err-bg); color: var(--err); }
.badge.big { font-size: 14px; padding: 3px 12px; }
.checklist-table td.c, .checklist-table th.c { width: 110px; }
.sample-form { margin-left: auto; }
.sample-form input[type=month] { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.audit-codes ol { padding-left: 20px; }
#missed input[name=missed_text] { width: 100%; }
input.num { width: 90px; }

/* CDI priority (label + score, never colour alone) */
.prio-high { background: var(--err-bg); color: var(--err); }
.prio-medium { background: var(--warn-bg); color: var(--warn); }
.prio-low { background: #eef1f5; color: var(--muted); }
.prio-why { max-width: 260px; }
tr.selected td { background: #f3f6fb; }
.privacy { margin-top: 12px; }
.book-11 { height: 37px; background: #4a5a6a; }         /* AR-DRG v9.0 */
.book-12 { height: 34px; background: #5d6b2e; }         /* Practice and ethics */
.doc-list { margin-top: 8px; }
.doc-cols { columns: 3 220px; margin: 6px 0; }
.doc-cols li { break-inside: avoid; }
/* Work access drop-down multi-select */
.access-cell { min-width: 230px; }
.access-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.ms { position: relative; }
.ms-button { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 210px; max-width: 320px; padding: 4px 26px 4px 6px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; position: relative; font: inherit; }
.ms-button:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 1px; }
.ms-none { color: var(--muted); font-size: 12.5px; }
.ms-chip { margin: 0; }
.ms-caret { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ms-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 320px; max-height: 340px; overflow: auto; margin: 0; padding: 4px;
  list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 32, 64, .14); }
.ms-menu li { display: grid; grid-template-columns: 18px 1fr; column-gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ms-menu li:hover, .ms-menu li:focus { background: #f1f5fb; outline: none; }
.ms-menu li[aria-selected="true"] .ms-label { font-weight: 600; }
.ms-tick { grid-row: span 2; color: var(--ok); font-weight: 700; }
.ms-help { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.test-banner { background: #5b2a86; color: #fff; text-align: center; padding: 6px 12px; font-size: 13px; letter-spacing: .2px; }
