/* Self-hosted fonts (ui-01). No request ever goes to an external font host. Latin subset; SIL OFL licences. */
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:200 800;font-stretch:100%;font-display:swap;src:url(/fonts/bricolage-grotesque-latin-var.woff2) format('woff2')}
@font-face{font-family:'Public Sans';font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/public-sans-latin-var.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ibm-plex-mono-latin-400.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/ibm-plex-mono-latin-500.woff2) format('woff2')}
:root{--bg:#F6FAFD;--surface:#fff;--surface-2:#E8F1FA;--ink:#1C2B3C;--muted:#566A7F;--line:#D8E5F0;--accent:#2271B3;--accent-soft:#E1EFFB;--alert:#C8471D;--alert-soft:#FDEDE4;--ok:#237A52;--ok-soft:#E2F5EC;--gold:#8A5A00;--gold-soft:#FFF3D6;--navy:#12324F;
--f-display:'Bricolage Grotesque','Segoe UI',system-ui,sans-serif;--f-body:'Public Sans','Segoe UI',system-ui,sans-serif;--f-mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;--accent-ink:#fff;--font:var(--f-body);--mono:var(--f-mono);--radius:8px;--tap:44px}
*{box-sizing:border-box}
html,body{margin:0;overflow-x:hidden}
body{background:var(--bg);color:var(--ink);font:16px/1.5 var(--font)}
a{color:var(--accent)}
h1,h2,h3{font-family:var(--f-display);letter-spacing:-.015em}
h1{font-size:1.5rem;margin:0}h2{font-size:1.2rem;margin:0 0 .5rem}
.mono{font-family:var(--mono)}.muted{color:var(--muted)}

/* shell */
.topbar{display:flex;align-items:center;gap:1rem;background:var(--navy);color:#fff;padding:.5rem 1rem;min-height:56px}
.brand{display:flex;align-items:center;gap:.6rem;color:#fff;text-decoration:none;font-weight:600;font-size:1.1rem}
.brand-mark{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:8px;background:var(--accent);font-weight:700}
.topbar-sub{color:#b9cde0;font-size:.9rem}
.shell{display:flex;min-height:calc(100vh - 56px)}
.sidenav{width:210px;flex:none;background:var(--navy);color:#c9dcee;padding:.75rem;display:flex;flex-direction:column;gap:3px}
.sidenav a{display:flex;align-items:center;min-height:var(--tap);padding:0 .75rem;border-radius:9px;color:#c9dcee;text-decoration:none;font-weight:500;font-size:.95rem}
.sidenav a:hover{background:rgba(255,255,255,.08);color:#fff}
.sidenav a.active,.sidenav a[aria-current]{background:rgba(255,255,255,.16);color:#fff;font-weight:700;box-shadow:inset 3px 0 0 #4A9BDB}
.content{flex:1;min-width:0;padding:1.25rem}
/* Desktop: the page itself never scrolls. Menu scrolls only if it is taller than the screen; the right side scrolls on its own. */
@media (min-width:901px){
  body{height:100vh;display:flex;flex-direction:column;overflow:hidden}
  .topbar{flex:none}
  .shell{flex:1;min-height:0}
  .sidenav{overflow-y:auto;overscroll-behavior:contain}
  .content{overflow-y:auto}
}
@media print{body{height:auto;overflow:visible}.shell{display:block}.sidenav,.topbar{display:none}.content{overflow:visible}}
@media (max-width:900px){
  .shell{flex-direction:column}
  .sidenav{width:auto;flex-direction:row;overflow-x:auto;border-bottom:1px solid var(--line);padding:.5rem}
  .sidenav a{white-space:nowrap}
  .content{padding:1rem}
}

/* components */
.page-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;margin-bottom:1rem}
.grid-2,.grid-3{display:grid;gap:1rem}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:700px){.grid-2,.grid-3{grid-template-columns:1fr}}

.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:0 1.1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);font:inherit;font-weight:600;text-decoration:none;cursor:pointer}
.btn:hover{background:var(--surface-2)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#1b5d94}
.btn-danger{background:var(--alert);border-color:var(--alert);color:#fff}.btn-danger:hover{background:#a53a16}
.btn:disabled{opacity:.55;cursor:not-allowed}

.field{display:flex;flex-direction:column;gap:.3rem;margin-bottom:.9rem}
.field label{font-weight:600;font-size:.9rem}
.field input,.field select,.field textarea{min-height:var(--tap);padding:.5rem .7rem;border:1px solid var(--line);border-radius:var(--radius);font:inherit;color:var(--ink);background:var(--surface);width:100%}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--accent);outline-offset:1px}
.field-error{color:var(--alert);font-size:.85rem}

.table{width:100%;border-collapse:collapse;background:var(--surface)}
.table th,.table td{text-align:left;padding:.6rem .75rem;border-bottom:1px solid var(--line)}
.table th{background:var(--surface-2);font-size:.85rem;color:var(--muted)}

.badge{display:inline-block;padding:.1rem .6rem;border-radius:999px;font-size:.8rem;font-weight:600;background:var(--accent-soft);color:var(--accent)}
.badge.ok{background:var(--ok-soft);color:var(--ok)}
.badge.alert{background:var(--alert-soft);color:var(--alert)}
.badge.gold{background:var(--gold-soft);color:var(--gold)}
.badge.muted{background:var(--surface-2);color:var(--muted)}

.alert-banner{background:var(--alert-soft);border:1px solid var(--alert);border-left-width:6px;color:var(--alert);border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:1rem;font-weight:600}
.topbar-user{margin-left:auto;display:flex;align-items:center;gap:.75rem;color:#fff}
.topbar-user .btn{min-height:var(--tap);padding:0 .8rem}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:1rem}
.login-card{width:100%;max-width:380px}
.diff-changed td{background:var(--gold-soft)}.diff-changed td:nth-child(2){text-decoration:line-through;color:var(--alert)}.diff-changed td:nth-child(3){color:var(--ok);font-weight:600}
.htmx-indicator{display:none}.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{display:inline-block}

/* bed board: colour + text label per state */
.bed-legend{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.bed-key{display:inline-block;padding:.15rem .7rem;border-radius:999px;font-size:.85rem;font-weight:600;border:1px solid}
.ward-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:.25rem 1rem;margin-bottom:.75rem}
.ward-count{margin-left:auto;font-weight:600;color:var(--muted)}
.bed-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.75rem}
.bed{display:flex;flex-direction:column;gap:.4rem;border:1px solid;border-left-width:6px;border-radius:var(--radius);padding:.6rem .7rem;min-height:92px}
.bed-top{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem}
.bed-state{font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.bed-patient{display:flex;flex-direction:column;gap:.1rem;color:inherit;text-decoration:none;min-height:var(--tap);font-size:.9rem}
.bed-patient:hover .bed-name{text-decoration:underline}
.bed-reserved{display:flex;flex-direction:column;gap:.1rem;font-size:.9rem}
.bed-convert,.bed-reserve,.bed-cancel-reservation{min-height:var(--tap);align-self:flex-start}
.bed-name{font-weight:700;font-size:1rem}
.bed-day{font-weight:600}
.bed-admit{min-height:var(--tap);align-self:flex-start}
.bed-reason{font-size:.85rem}
.bed-Free,.bed-key.bed-Free{background:var(--ok-soft);border-color:var(--ok);color:var(--ok)}
.bed-Occupied,.bed-key.bed-Occupied{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.bed-Cleaning,.bed-key.bed-Cleaning{background:var(--gold-soft);border-color:var(--gold);color:var(--gold)}
.bed-Blocked,.bed-key.bed-Blocked{background:var(--alert-soft);border-color:var(--alert);color:var(--alert)}
.bed-Reserved,.bed-key.bed-Reserved{background:#EFE9FA;border-color:#5B3FA0;color:#5B3FA0}
.bed .bed-patient,.bed .muted{color:var(--ink)}.bed .muted{color:var(--muted)}
.pick-row{display:flex;gap:.6rem;align-items:flex-start;padding:.55rem .6rem;border:1px solid var(--line);border-radius:var(--radius);margin-top:.4rem;min-height:var(--tap);cursor:pointer;font-weight:400}
.pick-row input{width:auto;min-height:0;margin-top:.25rem}
.pick-disabled{opacity:.7;cursor:default}

/* admission hub header + tabs */
.hub-header{margin-bottom:1rem}
.hub-name{font-size:1.35rem;font-weight:700;margin-bottom:.5rem}
.hub-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.6rem 1rem;margin:0}
.hub-facts dt{font-size:.8rem;color:var(--muted)}
.hub-facts dd{margin:0;font-weight:600}
.hub-tabs{display:flex;flex-wrap:wrap;gap:.25rem;border-bottom:2px solid var(--line);margin-bottom:1rem}
.hub-tab{min-height:44px;padding:0 1rem;display:inline-flex;align-items:center;background:none;border:0;border-bottom:3px solid transparent;font:inherit;color:var(--muted)}
.hub-tab.active{color:var(--accent);font-weight:700;border-bottom-color:var(--accent)}
.hub-tab:disabled{opacity:.55;cursor:not-allowed}

/* bed board state actions */
.bed-action summary{cursor:pointer;list-style:none;text-align:center}
.bed-action summary::-webkit-details-marker{display:none}
.bed-block-form{display:flex;flex-direction:column;gap:.4rem;margin-top:.4rem}
.bed-block-form input{width:100%}

.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* dashboard */
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin-bottom:1rem}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;display:flex;flex-direction:column;gap:.25rem;text-decoration:none;color:inherit;min-height:44px}
a.stat:hover{border-color:var(--brand,#0b6)}
.stat-num{font-size:2rem;font-weight:700;line-height:1.1}
.stat-label{font-size:.9rem;color:var(--muted,#555)}
@media (max-width:560px){.stat-grid{grid-template-columns:repeat(2,1fr)}}

/* reversed charges stay visible but struck through */
.charge-reversed td,.bill-reversed td{color:var(--muted,#555)}
.charge-reversed td:nth-child(2),.bill-reversed td:nth-child(2){text-decoration:line-through}
.charge-reversal td,.bill-reversal td{color:var(--muted,#555)}

/* critical flags (alert-01) */
.bed-flags{display:flex;gap:.25rem;flex-wrap:wrap;margin:.2rem 0}
.bed-flag{display:inline-block;padding:.05rem .4rem;border-radius:.6rem;font-size:.72rem;font-weight:700;border:1px solid var(--line);background:var(--surface-2);color:var(--ink,#1a2433)}
.bed-flag.flag-Dnr{background:#7a1020;color:#fff;border-color:#7a1020}
.bed-flag.flag-FallRisk{background:#fff1cc;border-color:#d99a00}
.bed-flag.flag-Isolation{background:#e3ddff;border-color:#6f5bd6}
.bed-flag.flag-Allergy{background:#ffe3dc;border-color:#d4502b}
#hub-flags{display:inline-flex;gap:.3rem;flex-wrap:wrap;margin-left:.5rem;vertical-align:middle}

/* ux-01: every tappable link is at least 44px tall (tablet at the bedside) */
.order-set summary{display:flex;align-items:center;gap:.5rem;min-height:var(--tap);cursor:pointer}
.order-set li a,.mut.sm a:not(.btn):not(.bt):not(.chip){display:inline-flex;align-items:center;min-height:var(--tap)}
.brand,.topbar-user a{display:inline-flex;align-items:center;min-height:var(--tap)}
.table a:not(.btn),.table th a,p a:not(.btn),.muted a:not(.btn),.hub-header a:not(.btn),#flags-link,#hub-name{display:inline-flex;align-items:center;min-height:var(--tap)}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select{min-height:var(--tap)}
.table input[type=text]{padding:.4rem .6rem;border:1px solid var(--line);border-radius:var(--radius);font:inherit}

/* vit-02: NEWS2 colours (text always shown too, not colour alone) and abnormal value cells */
.news-green{background:#e2f5ec;color:#16613f;border-color:#237a52}
.news-amber{background:#fff1cc;color:#7a4b00;border-color:#d99a00}
.news-red{background:#fbd9d3;color:#8e1d10;border-color:#b3261e}
.news-grey{background:#e8edf2;color:#44546a;border-color:#8a99ab}
.news-banner{display:flex;flex-wrap:wrap;gap:.25rem 1rem;align-items:center;border:1px solid;border-left-width:6px;border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:1rem;max-width:960px}
.news-badge,.bed-news{display:inline-block;padding:.1rem .6rem;border:1px solid;border-radius:999px;font-size:.8rem;font-weight:700}
.vital-abn{background:#ffe3dc;color:#8e1d10;font-weight:700}

/* Emergency (er-02, er-03): triage colours always come with a text label */
.er-tag{display:inline-block;padding:.15rem .7rem;border:2px solid;border-radius:999px;font-size:.85rem;font-weight:700}
.er-red{background:#fbd9d3;color:#8e1d10;border-color:#b3261e}
.er-yellow{background:#fff1cc;color:#7a4b00;border-color:#d99a00}
.er-green{background:#e2f5ec;color:#16613f;border-color:#237a52}
.er-none{background:#e8edf2;color:#44546a;border-color:#8a99ab}
tr.er-row-red td:first-child{border-left:6px solid #b3261e}
tr.er-row-yellow td:first-child{border-left:6px solid #d99a00}
tr.er-row-green td:first-child{border-left:6px solid #237a52}
tr.er-row-none td:first-child{border-left:6px solid #8a99ab}

/* er-06: police intimation reminder on the ER board (urgent also says URGENT in text) */
.er-police{margin-top:.25rem;font-size:.85rem;font-weight:600}
.er-police-urgent{padding:.1rem .4rem;border:2px solid var(--alert);border-radius:6px;color:var(--alert);font-weight:800}

/* slim scrollbars for the two scroll areas */
.sidenav{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}
.content{scrollbar-width:thin;scrollbar-color:#b6c8d9 transparent}
/* grouped menu (same pattern as the design prototype: small mono section label above each group) */
.nav-group{display:flex;flex-direction:column;gap:3px;margin-bottom:.35rem}
.nav-group:not(:has(a)){display:none}
.nav-label{font:500 .66rem/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;opacity:.6;margin:.5rem .5rem .2rem}
@media (max-width:900px){.nav-group{flex-direction:row;align-items:center;margin:0}.nav-label{display:none}}
.stat-num{font-family:var(--f-display)}
/* ui-36 floor plan view: beds with a saved column/row sit on a 12 x N grid, others flow after them */
.bed-grid.plan{grid-template-columns:repeat(12,minmax(150px,1fr));overflow-x:auto}
.bed-grid.plan .bed[style*="--gx"]{grid-column:var(--gx);grid-row:var(--gy)}

/* v3-F31: "Lock, I'm done" in the top bar of a linked ward tablet (same look as the v3 .lockbtn) */
.tb .lockbtn{display:inline-flex;align-items:center;gap:6px;border:1.5px solid #D2E0EC;background:#fff;border-radius:999px;padding:6px 12px;font:700 13px var(--f-body,inherit);color:#33485d;cursor:pointer;white-space:nowrap;flex:none;min-height:36px}
.tb .lockbtn svg{width:16px;height:16px}
.tb .lockbtn:hover{background:#EEF4FA}

/* v3-F32: idle countdown on the lock button, and the fast-switch sheet */
.tb .lockbtn small{font:600 11px var(--f-body,inherit);color:#B0791A}
.tb .lockbtn small:empty{display:none}
.scr .usr-switch{border:1.5px solid transparent;background:none;border-radius:999px;padding:3px 8px 3px 3px;cursor:pointer;color:inherit;font:inherit;min-height:36px}
.scr .usr-switch:hover{border-color:#D2E0EC;background:#F3F8FD}
.scr .usr-switch .usr-sw{font-size:11px;font-weight:600;color:#2271B3}
.sw-back{position:fixed;inset:0;background:rgba(10,30,50,.45);display:grid;place-items:center;z-index:200;padding:16px}
.sw-box{background:#fff;border-radius:16px;width:min(520px,100%);max-height:90vh;overflow:auto;padding:16px 18px;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 50px rgba(0,0,0,.3)}
.sw-head{display:flex;align-items:center;justify-content:space-between;font-size:17px}
.sw-x,.sw-link{background:none;border:0;color:#2271B3;font-weight:600;font-size:13px;cursor:pointer;padding:8px}
.sw-sub{color:#566A7F;font-size:13px}
.sw-err{background:#FFF3DD;border:1px solid #E8C37A;border-radius:10px;padding:8px 10px;font-size:13px;font-weight:600}
.sw-names{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.sw-pp{display:flex;gap:10px;align-items:center;text-align:left;border:1.5px solid #D2E0EC;border-radius:12px;padding:8px 10px;background:#fff;cursor:pointer;font:inherit}
.sw-pp:hover{border-color:#2271B3;background:#F3F8FD}
.sw-pp div{display:flex;flex-direction:column}.sw-pp span{color:#566A7F;font-size:12px}
.sw-face{display:inline-grid;place-items:center;border-radius:50%;color:#fff;font-weight:700;flex:none}
.sw-pin{display:flex;flex-direction:column;align-items:center;gap:10px}
.sw-dots{display:flex;gap:14px;margin:6px 0}.sw-dots i{width:16px;height:16px;border-radius:50%;border:2px solid #2271B3;display:block}.sw-dots i.on{background:#2271B3}
.sw-pad{display:grid;grid-template-columns:repeat(3,76px);gap:10px}
.sw-pad button{height:56px;border-radius:14px;border:1.5px solid #D2E0EC;background:#fff;font-weight:700;font-size:22px;cursor:pointer}
.sw-pad button[data-key=del]{font-size:15px}.sw-pad button:active{background:#E1EFFB}

/* v3-W13: bed map. Tiles are the v3 .bt2 tiles; the tap menu is #bed-pop; blocked and reserved look like cleaning and occupied. */
.v3 .scr .bt2.bed{display:flex;flex-direction:column;gap:0;border:1.5px solid #bcd5ee;border-left-width:1.5px;border-radius:11px;padding:8px 10px;min-height:76px;color:inherit}
.v3 .scr .bt2.bed.free{border-color:#cfe3d6}
.v3 .scr .bt2.bed.adv{border-color:#ecd38d}
.v3 .scr .bt2.bed.alert{border-color:#C8471D;border-width:2px}
.v3 .scr .bt2.bed.cln,.v3 .scr .bt2.bed.blk{border-style:dashed;border-color:#b9c9d8}
.v3 .scr .bt2.blk{background:repeating-linear-gradient(135deg,#F1F5F9,#F1F5F9 8px,#E8EEF4 8px,#E8EEF4 16px)}
.v3 .scr .bt2.blk .id{color:#566A7F}
.v3 .scr .bt2.rsv{background:#F4F0FB;border-color:#cdbfe9;border-style:dashed}
.v3 .scr .bt2.rsv .id{color:#5B3FA0}
.v3 .scr .bt2 .id{font:500 11.5px var(--f-mono);color:#2271B3;display:flex;justify-content:space-between;gap:4px;align-items:center}
.v3 .scr .bt2 .nmwrap{display:block;min-width:0}
.v3 .scr .bt2 .n,.v3 .scr .bt2 .s{display:block}
.v3 .scr .bt2 .s{white-space:normal}
.v3 .scr .bt2 .news.bed-news{border:0;padding:2px 8px;border-radius:8px;font:700 12px var(--f-mono)}
.v3 .scr .news.g{background:#E8EEF4;color:#566A7F}
.v3 .scr .bt2 .od{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#B36B00;color:#fff}
.v3 .scr .bt2 .od svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2}
.v3 .scr .bt2 .bed-flags{display:inline-flex;gap:3px;margin-left:4px}
.v3 .scr .bed-grid.bt2g{display:grid}
.v3 .scr .lit.st-blk{--bc:#7a8a99;--bg:#F1F5F9}
.v3 .scr .lit.st-rsv{--bc:#5B3FA0;--bg:#F4F0FB}
.v3 .scr .lit.bed:focus-visible,.v3 .scr .bt2.bed:focus-visible{outline:3px solid #2271B3;outline-offset:2px}
.v3 .scr .lit.bed .mid .news.g{font-size:clamp(11px,calc(var(--cx) * .27),14px)}
.bed-pop{position:fixed;z-index:90;min-width:230px;max-width:300px;background:#fff;border:1px solid #D8E5F0;border-radius:14px;box-shadow:0 20px 50px -15px rgba(0,0,0,.45);padding:6px;color:#1C2B3C}
.bed-pop h5{font:500 10px var(--f-mono);letter-spacing:.12em;text-transform:uppercase;color:#566A7F;margin:6px 8px 4px}
.bed-pop .pmeta{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:12px;color:#566A7F;margin:0 8px 6px}
.bed-pop .pi{display:flex;align-items:center;gap:10px;padding:10px;border-radius:9px;font-weight:600;font-size:13.5px;cursor:pointer;min-height:42px;color:inherit;text-decoration:none;width:100%;border:0;background:none;text-align:left;font-family:inherit}
.bed-pop .pi:hover,.bed-pop .pi:focus-visible{background:#E1EFFB;outline:none}
.bed-pop .pi svg{width:18px;height:18px;color:#566A7F;flex:none;stroke:currentColor;fill:none;stroke-width:1.8}
.bed-pop .pi small{display:block;font-weight:500;color:#566A7F;font-size:11.5px}
.bed-pop form{margin:0}
.bed-pop .pi-form{padding:8px 10px;border-top:1px solid #E1EAF2;margin-top:4px;display:flex;flex-direction:column;gap:6px;font-size:12px;color:#566A7F}
.bed-pop .pi-form input{width:100%;padding:8px;border:1px solid #bcd5ee;border-radius:8px;font:inherit}
.v3 .scr .bt2.bed .s{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3}
.v3 .scr .bt2.bed .bed-state{text-transform:none;letter-spacing:0;font-size:inherit;font-weight:600}
.v3 .scr .bt2.bed .n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v3 .scr .ward-tab .mono{margin-left:6px}
.v3 .scr .bt2 .bed-code{white-space:nowrap}
/* v3-W13: the Dose late / Discharge tag on a plan card shows its full words; it wraps or shrinks instead of being cut to "Dos..." */
.v3 .scr .lit.bed .mid u[data-plan-line]{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.15;text-align:center;font-size:clamp(9px,calc(var(--cx) * .22),14px);padding:1px 4px}
.chips a.chip,.chips a.chip:hover{text-decoration:none}
