/* ═════════════════════════════════════════════════════════════════════════
 * amara-refresh.css
 *
 * The Amara visual theme. Selectors are scoped under
 * [data-theme="amara-refresh"], which is hardcoded on the <html> element
 * in index.html, so every rule in this file applies to the whole app.
 *
 * What lives here:
 *   1. Solid petrol-teal top bar (the "Amara green")
 *   2. Outfit typography at a calmer scale
 *   3. Slightly softer radii (--rds 8 → 16)
 *   4. Teal accent on brand wordmark + search focus state
 *   5. Pattern-alert / Selected-Findings / Protocols modal polish
 *
 * Kept deliberately out of scope (still served by the classic tokens in
 * index.html's inline <style> + amara-unified.css):
 *   • Canvas / body background
 *   • Card surfaces, borders, text colours
 *   • Chip tints (sym / lab / chronic / complaint)
 *   • Pattern-alert severity colours
 *
 * ROLLBACK
 *   Remove <link rel="stylesheet" href="./amara-refresh.css"> from <head>
 *   and drop data-theme="amara-refresh" from the <html> tag. No other file
 *   depends on this layer.
 * ═════════════════════════════════════════════════════════════════════════ */

/* ─── Refresh-only tokens ──────────────────────────────────────────────── */
/* A soft travelling border, with a flat readable input surface. The mask and
   small blur stay fixed; only the gradient layers rotate, then fade away. */
[data-theme="amara-refresh"] .amara-search-cue{
  --search-orbit-teal:#0d9488;--search-orbit-violet:#8b5cf6;
  position:absolute;inset:-3px;z-index:2;border-radius:inherit;
  pointer-events:none;opacity:0;contain:layout style;
}
[data-theme="amara-refresh"] .amara-search-cue-track{
  position:absolute;inset:0;border-radius:inherit;padding:2px;overflow:hidden;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
}
[data-theme="amara-refresh"] .amara-search-cue-track--glow{inset:-1px;padding:4px;filter:blur(3px);opacity:.65;}
[data-theme="amara-refresh"] .amara-search-orbit{
  position:absolute;left:50%;top:50%;width:104%;aspect-ratio:1;
  background:conic-gradient(from 25deg,transparent 0deg,var(--search-orbit-teal) 95deg,var(--search-orbit-violet) 170deg,transparent 255deg);
  transform:translate(-50%,-50%);
}
:root[data-theme="amara-refresh"]:not(.light) .amara-search-cue{
  --search-orbit-teal:#8df0d4;--search-orbit-violet:#b79cfc;
}
[data-theme="amara-refresh"] .top .rst-reset{position:relative;overflow:visible;}
:root[data-theme="amara-refresh"] .amara-search-cue.amara-reset-cue{
  --search-orbit-teal:#ef4444;--search-orbit-violet:#fca5a5;
}
@media(prefers-reduced-motion:reduce),(forced-colors:active){
  [data-theme="amara-refresh"] .amara-search-cue{display:none;}
}
@media print{[data-theme="amara-refresh"] .amara-search-cue{display:none;}}
:root[data-theme="amara-refresh"]{
  --amara-brand:#0D6B6D;
  --amara-brand-strong:#094E4F;
  --amara-brand-soft:color-mix(in srgb, #0D6B6D 14%, transparent);
  --amara-brand-line:color-mix(in srgb, #0D6B6D 38%, transparent);
  --amara-search-focus-accent:#7c3aed;
  --amara-search-highlight-gradient:linear-gradient(105deg,var(--amara-brand-strong) 0%,var(--amara-brand) 52%,var(--acc-2) 100%);
  --amara-search-focus-gradient:linear-gradient(105deg,var(--acc-2) 0%,var(--amara-search-focus-accent) 52%,var(--amara-brand) 100%);

  --rds:16px;

  /* Amara clinical-dashboard scale. Infection Presentations is the first
     production surface migrated to this constrained design language. */
  --amara-space-1:4px;
  --amara-space-2:8px;
  --amara-space-3:12px;
  --amara-space-4:16px;
  --amara-space-5:24px;
  --amara-space-6:32px;

  --amara-type-xs:12px;
  --amara-type-sm:14px;
  --amara-type-md:16px;
  --amara-type-lg:18px;
  --amara-type-xl:20px;
  --amara-weight-regular:400;
  --amara-weight-medium:500;
  --amara-weight-semibold:600;
  --amara-weight-bold:700;
  --amara-line-tight:1.25;
  --amara-line-copy:1.5;
  --amara-measure:70ch;
  --amara-track-label:.06em;
  --amara-track-data:.04em;

  --amara-radius-sm:2px;
  --amara-radius-md:4px;
  --amara-radius-lg:8px;
  --amara-border-thin:1px;
  --amara-border-signal:3px;
  --amara-touch-target:44px;
  --amara-control-height:40px;
  --amara-ladder-column:220px;
  --amara-focus-ring:3px;

  --amara-clinical-font:'Outfit','Inter',system-ui,-apple-system,sans-serif;
  --amara-data-font:'JetBrains Mono',ui-monospace,monospace;
  --amara-clinical-ink:var(--tx);
  --amara-clinical-copy:var(--dim);
  --amara-clinical-meta:var(--fnt);
  --amara-clinical-surface:var(--sf);
  --amara-clinical-subtle:var(--sf2);
  --amara-clinical-line:var(--bd);
  --amara-clinical-line-strong:var(--bd2);
  --amara-clinical-action:var(--amara-brand);
  --amara-clinical-action-strong:var(--amara-brand-strong);
  --amara-clinical-action-soft:var(--amara-brand-soft);
  --amara-clinical-danger:var(--crit);
  --amara-clinical-warning:var(--org);
  --amara-clinical-success:var(--amara-brand);
  --amara-clinical-danger-soft:color-mix(in srgb,var(--crit) 9%,var(--sf));
  --amara-clinical-warning-soft:color-mix(in srgb,var(--org) 8%,var(--sf));
  --amara-clinical-success-soft:var(--amara-brand-soft);
  --amara-clinical-action-tint:color-mix(in srgb,var(--amara-brand) 7%,var(--sf));
}

/* ─── Typography — Outfit-forward ──────────────────────────────────────── */
[data-theme="amara-refresh"] body{
  font-family:'Outfit','Inter',system-ui,-apple-system,sans-serif;
  font-size:15px;
  line-height:1.5;
}
[data-theme="amara-refresh"] .sh{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.72rem;
  letter-spacing:0.06em;
  font-weight:600;
  text-transform:uppercase;
  margin:20px 0 10px;
}
[data-theme="amara-refresh"] .pc-input,
[data-theme="amara-refresh"] .rc-cue,
[data-theme="amara-refresh"] .sel-chip,
[data-theme="amara-refresh"] .pc-chronic-btn,
[data-theme="amara-refresh"] .proto-btn,
[data-theme="amara-refresh"] .ctx-btn,
[data-theme="amara-refresh"] .rst,
[data-theme="amara-refresh"] .a-btn{
  font-family:'Outfit','Inter',system-ui,sans-serif;
}

/* Selected Findings card — bigger, easier-to-scan label + chips */
[data-theme="amara-refresh"] .selbar-title{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.66rem;
  letter-spacing:0.08em;
}
[data-theme="amara-refresh"] .sel-chip{
  font-size:0.72rem;
  padding:7px 13px;
  line-height:1.25;
}

/* ─── Solid petrol-teal top bar — the signature "Amara green".
       Header sits a step deeper than the tab bar below, so the tab
       bar always reads as the lighter/"fresher" band in both modes. ─── */
[data-theme="amara-refresh"] .top-wrap{
  background:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] .top{
  background:var(--amara-brand-strong);
  border-bottom:none;
  padding:12px 22px;
  border-radius:0;
  box-shadow:none;
}
[data-theme="amara-refresh"] .top .logo{
  color:#fff;
}
[data-theme="amara-refresh"] .top .logo i{
  color:#B8D5D3;
}
[data-theme="amara-refresh"] .top .logo sub{
  color:rgba(255,255,255,0.65);
}
[data-theme="amara-refresh"] .top .badge{
  background:rgba(255,255,255,0.2);
  color:#fff;
  border-radius:999px;
}
[data-theme="amara-refresh"] .top .rst{
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.24);
  color:#fff;
  border-radius:999px;
  padding:0 14px;
  height:36px;
  min-height:36px;
  line-height:1;
  font-weight:500;
  display:inline-flex;
  align-items:center;
  vertical-align:middle;
}
/* Logo holds the left; the pill cluster expands across the remaining
   row and spreads the pills evenly with space-between so they aren't
   shoved against the right edge. */
[data-theme="amara-refresh"] .top{
  justify-content:flex-start;
  gap:22px;
}
[data-theme="amara-refresh"] .top .logo{
  flex:0 0 auto;
}
[data-theme="amara-refresh"] .top .top-r{
  flex:1 1 auto;
  justify-content:flex-end;
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
}
/* Icon-only header buttons (📋 Protocols, moon/sun) — no pill background,
   no border, no rounded bubble. Just the icon, blending into the solid
   teal header. Subtle hover wash for affordance. */
[data-theme="amara-refresh"] .top .rst-icon{
  background:transparent;
  border:none;
  width:36px;
  height:36px;
  min-width:36px;
  min-height:36px;
  padding:6px;
  border-radius:8px;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  vertical-align:middle;
}
[data-theme="amara-refresh"] .top .rst-icon:hover{
  background:rgba(255,255,255,0.12);
  border-color:transparent;
}
[data-theme="amara-refresh"] .top .rst-icon svg{
  width:20px;
  height:20px;
}
[data-theme="amara-refresh"] .top .rst-icon .theme-sun,
[data-theme="amara-refresh"] .top .rst-icon .theme-moon{
  display:none;
}
:root[data-theme="amara-refresh"]:not(.light) .rst-icon .theme-sun{ display:block; }
:root[data-theme="amara-refresh"].light .rst-icon .theme-moon{ display:block; }

/* Reset: solid red so it's an immediate destructive signal. */
[data-theme="amara-refresh"] .top .rst-reset{
  background:var(--priority-now, #E53935);
  border-color:#C62828;
  color:#fff;
}
[data-theme="amara-refresh"] .top .rst-reset:hover{
  background:#C62828;
  border-color:#B71C1C;
}
[data-theme="amara-refresh"] .top .rst-reset:active{
  background:#B71C1C;
  border-color:#B71C1C;
  color:#fff;
}
@media (max-width:900px){
  [data-theme="amara-refresh"] .top .top-r{
    flex:1 1 auto;
    justify-content:space-between;
    flex-wrap:wrap;
    row-gap:8px;
    gap:6px;
  }
}

[data-theme="amara-refresh"] .top .rst:hover{
  background:rgba(255,255,255,0.22);
  border-color:rgba(255,255,255,0.4);
}
[data-theme="amara-refresh"] .top .rst-reset{
  border-color:rgba(255,255,255,0.42);
}
[data-theme="amara-refresh"] .top .rst-reset:active{
  background:#E53935;
  border-color:#E53935;
  color:#fff;
}

/* ─── Teal accent — search focus + small brand bits ────────────────────── */
[data-theme="amara-refresh"] .pc-input:focus{
  border-color:var(--amara-brand);
  box-shadow:0 0 0 3px var(--amara-brand-soft);
}
[data-theme="amara-refresh"] .pc-input-wrap:focus-within .pc-search-icon{
  color:var(--amara-brand);
}

/* ─── Tab bar — standard brand teal, one step lighter than the
       deeper header above. Solid, non-diluted, so white labels + icons
       read crisply (same approach in light and dark modes). ──────────── */
[data-theme="amara-refresh"] .tab-bar{
  background:var(--amara-brand);
  border-bottom:1px solid var(--amara-brand-strong);
}
[data-theme="amara-refresh"] .tab-btn{
  color:#fff;
  background:transparent;
  border-bottom:2px solid transparent;
  opacity:1;
}
[data-theme="amara-refresh"] .tab-btn:hover{
  color:#fff;
  background:rgba(255,255,255,0.1);
}
/* Override classic's .tab-btn:active{background:var(--sf2)} which would
   flash a light surface under white text during the click. */
[data-theme="amara-refresh"] .tab-btn:active{
  background:rgba(255,255,255,0.14);
  color:#fff;
}
[data-theme="amara-refresh"] .tab-btn.active{
  color:#fff;
  background:rgba(255,255,255,0.08);
  border-bottom:2px solid #fff;
  font-weight:600;
}
[data-theme="amara-refresh"] .tab-btn.active:hover,
[data-theme="amara-refresh"] .tab-btn.active:active{
  color:#fff;
  background:rgba(255,255,255,0.14);
}

/* ─── View results available button — solid teal ───────────────────────── */
[data-theme="amara-refresh"] .rc-cue-mount{
  display:flex;
  justify-content:center;
}
[data-theme="amara-refresh"] .rc-cue{
  background:var(--amara-brand);
  border:1px solid var(--amara-brand-strong);
  color:#fff;
}
[data-theme="amara-refresh"] .rc-cue:hover{
  background:var(--amara-brand-strong);
  border-color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] .rc-cue-dot{
  background:#B8D5D3;
}
[data-theme="amara-refresh"] .rc-cue-arrow{
  color:#fff;
}
[data-theme="amara-refresh"] .rc-cue:focus-visible{
  outline:2px solid var(--amara-brand);
  outline-offset:2px;
}
/* Floating "View results" jump CTA — also solid teal */
[data-theme="amara-refresh"] .rc-jump-btn{
  --rc-jump-pulse-color:var(--amara-brand);
  --rc-jump-shadow:rgba(13,107,109,0.35);
  background:var(--amara-brand);
  border:1px solid var(--amara-brand-strong);
  color:#fff;
  box-shadow:0 6px 18px rgba(13,107,109,0.35);
}
[data-theme="amara-refresh"] .rc-jump-btn:hover{
  background:var(--amara-brand-strong);
  border-color:var(--amara-brand-strong);
}

/* ─── Radii — softer cards (classic 8px → 16px) ────────────────────────── */
[data-theme="amara-refresh"] .a-card{
  border-radius:var(--rds);
}

/* ─── Inline Protocols / Calculators pill under the search bar ────────── */
[data-theme="amara-refresh"] .pc-tools-row{
  display:flex;
  justify-content:center;
  margin-top:6px;
}
[data-theme="amara-refresh"] .pc-tool-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 18px;
  border-radius:999px;
  border:1px solid var(--amara-brand-line);
  background:var(--amara-brand-soft);
  color:var(--amara-brand);
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.68rem;
  font-weight:600;
  letter-spacing:0.02em;
  cursor:pointer;
  transition:background-color .15s, border-color .15s, color .15s;
}
[data-theme="amara-refresh"] .pc-tool-btn:hover{
  background:var(--amara-brand);
  border-color:var(--amara-brand-strong);
  color:#fff;
}
[data-theme="amara-refresh"] .pc-tool-btn:focus-visible{
  outline:2px solid var(--amara-brand);
  outline-offset:2px;
}

/* ─── How-to-use footer at the very bottom of the page ─────────────────── */
[data-theme="amara-refresh"] .amara-help-footer{
  text-align:center;
  padding:16px 14px calc(24px + env(safe-area-inset-bottom,0px));
}
[data-theme="amara-refresh"] .amara-help-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 20px;
  border-radius:999px;
  border:1px solid var(--bd2);
  background:var(--sf);
  color:var(--tx);
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.72rem;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
  transition:border-color .15s, color .15s, background-color .15s;
}
[data-theme="amara-refresh"] .amara-help-btn:hover{
  border-color:var(--amara-brand);
  color:var(--tx);
  background:var(--amara-brand-soft);
}
[data-theme="amara-refresh"] .amara-help-btn:focus-visible{
  outline:3px solid var(--amara-brand);
  outline-offset:3px;
}

/* ─── Protocols / Calculators modal — matched to the protocol-popup
       polish: readable type, generous padding, calm fade on the
       home ↔ tool view swap. ────────────────────────────────────── */
[data-theme="amara-refresh"] body.amara-acute #calcOverlay.calc-overlay{
  background:rgba(10,47,43,.34) !important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
[data-theme="amara-refresh"] .calc-modal{
  border-radius:20px;
}
[data-theme="amara-refresh"] .calc-hdr{
  padding:14px 18px;
}
[data-theme="amara-refresh"] .calc-title{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.9rem;
  color:var(--amara-brand);
  letter-spacing:0.06em;
  font-weight:600;
}
[data-theme="amara-refresh"] .calc-close{
  border-radius:999px;
  padding:7px 12px;
  min-width:44px;
  min-height:44px;
  font-family:'Outfit','Inter',system-ui,sans-serif;
}
[data-theme="amara-refresh"] .calc-body{
  padding:14px 18px 18px;
  /* subtle fade so clicking a card → view (or Back → home) feels calm */
  transition:opacity 140ms ease-out;
}
[data-theme="amara-refresh"] .calc-body.calc-body-swap{ opacity:0; }
[data-theme="amara-refresh"] .calc-search input{
  border-radius:999px;
  padding:13px 18px;
  font-family:'Outfit',system-ui,sans-serif;
  font-size:0.9rem;
  min-height:46px;
}
[data-theme="amara-refresh"] .calc-search input:focus{
  border-color:var(--amara-brand);
  box-shadow:0 0 0 3px var(--amara-brand-soft);
}
[data-theme="amara-refresh"] .calc-chip{
  border-radius:999px;
  padding:7px 14px;
  font-family:'Outfit',system-ui,sans-serif;
  font-size:0.78rem;
}
[data-theme="amara-refresh"] .calc-chip.sel{
  background:var(--amara-brand-soft);
  border-color:var(--amara-brand-line);
  color:var(--amara-brand);
}
[data-theme="amara-refresh"] .calc-grid{ gap:10px; }
[data-theme="amara-refresh"] .calc-card{
  border-radius:16px;
  padding:16px 18px;
}
[data-theme="amara-refresh"] .calc-card:hover{
  border-color:var(--amara-brand-line);
}
[data-theme="amara-refresh"] .calc-name{
  font-family:'Outfit',system-ui,sans-serif;
  font-size:0.96rem;
  line-height:1.3;
}
[data-theme="amara-refresh"] .calc-sub{
  font-size:0.78rem;
  line-height:1.5;
  margin-top:5px;
}
[data-theme="amara-refresh"] .calc-tag{
  border-radius:999px;
  font-size:0.6rem;
  padding:3px 10px;
}
[data-theme="amara-refresh"] .calc-form{ gap:12px; margin-top:14px; }
[data-theme="amara-refresh"] .calc-field{
  border-radius:14px;
  padding:12px 14px;
}
[data-theme="amara-refresh"] .calc-label{
  font-size:0.74rem;
  line-height:1.4;
  margin-bottom:8px;
}
[data-theme="amara-refresh"] .calc-field input[type="number"],
[data-theme="amara-refresh"] .calc-field select{
  border-radius:12px;
  font-family:'Outfit',system-ui,sans-serif;
  font-size:0.95rem;
  padding:11px 14px;
}
[data-theme="amara-refresh"] .calc-field input[type="number"]:focus,
[data-theme="amara-refresh"] .calc-field select:focus{
  border-color:var(--amara-brand);
  box-shadow:0 0 0 3px var(--amara-brand-soft);
  outline:none;
}
[data-theme="amara-refresh"] .calc-btn{
  background:var(--amara-brand);
  border:1px solid var(--amara-brand-strong);
  color:#fff;
  border-radius:999px;
  padding:12px 20px;
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.82rem;
  font-weight:600;
  letter-spacing:0.02em;
}
[data-theme="amara-refresh"] .calc-btn:hover{
  background:var(--amara-brand-strong);
  border-color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] .calc-back{
  color:var(--amara-brand);
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.8rem;
  font-weight:600;
  letter-spacing:0.02em;
}
[data-theme="amara-refresh"] .calc-result{
  border-radius:16px;
  padding:16px 18px;
  margin-top:14px;
}
[data-theme="amara-refresh"] .calc-result h4{
  font-size:0.9rem;
  line-height:1.3;
  margin-bottom:10px;
}
[data-theme="amara-refresh"] .calc-row{
  font-size:0.88rem;
  line-height:1.5;
  padding:4px 0;
}
[data-theme="amara-refresh"] .calc-muted,
[data-theme="amara-refresh"] .calc-break{
  font-size:0.78rem;
  line-height:1.55;
}

/* Inline score-tool cards (the ones that render inside a DX pattern
   card within Protocols & Calculators) — match the modal's input rhythm. */
[data-theme="amara-refresh"] .score-tool-name{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.92rem;
  line-height:1.3;
}
[data-theme="amara-refresh"] .score-tool-src{
  font-size:0.7rem;
  line-height:1.45;
}
[data-theme="amara-refresh"] .score-num-row{
  gap:10px;
  margin-bottom:10px;
}
[data-theme="amara-refresh"] .score-num-row label{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.82rem;
  line-height:1.4;
}
[data-theme="amara-refresh"] .score-num-row input[type="number"],
[data-theme="amara-refresh"] .score-num-row select{
  border-radius:12px;
  font-size:0.92rem;
  padding:10px 14px;
  font-family:'Outfit','Inter',system-ui,sans-serif;
}
[data-theme="amara-refresh"] .score-num-row input[type="number"]:focus,
[data-theme="amara-refresh"] .score-num-row select:focus{
  border-color:var(--amara-brand);
  box-shadow:0 0 0 3px var(--amara-brand-soft);
  outline:none;
}
[data-theme="amara-refresh"] .score-opt-btn{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.82rem;
  padding:10px 14px;
  border-radius:12px;
}
[data-theme="amara-refresh"] .score-opt-btn.on{
  background:var(--amara-brand-soft);
  border-color:var(--amara-brand-line);
  color:var(--amara-brand);
}
[data-theme="amara-refresh"] .score-reset-btn{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.74rem;
  padding:8px 14px;
  border-radius:999px;
}

/* ─── Protocol popup — stable shell, readable body, calm step swap ───── */
[data-theme="amara-refresh"] .proto-shell{
  border-radius:20px;
}
[data-theme="amara-refresh"] .proto-header{
  padding:14px 18px 10px;
}
[data-theme="amara-refresh"] .mgmt-modal-title,
[data-theme="amara-refresh"] .proto-header .mgmt-modal-title{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.9rem;
  color:var(--amara-brand)!important;
}
[data-theme="amara-refresh"] .proto-step-label{
  font-family:'JetBrains Mono',monospace;
  font-size:0.55rem;
  letter-spacing:0.1em;
}
[data-theme="amara-refresh"] .proto-body{
  padding:14px 18px 20px;
  font-family:'Outfit','Inter',system-ui,sans-serif;
}
[data-theme="amara-refresh"] .proto-prog{
  margin:0 18px 4px;
  background:color-mix(in srgb, var(--amara-brand) 10%, transparent);
}
[data-theme="amara-refresh"] .proto-prog-fill{
  background:var(--amara-brand);
}
/* Trail (breadcrumb of prior answers) — softer accent so it doesn't
   compete with the current step. */
[data-theme="amara-refresh"] .proto-trail{
  margin-bottom:14px;
}
[data-theme="amara-refresh"] .proto-trail-step{
  font-size:0.875rem;
  font-family:'Outfit','Inter',system-ui,sans-serif;
  border-left-color:var(--amara-brand-line);
  padding:5px 0 5px 12px;
}
[data-theme="amara-refresh"] .proto-trail-ans{
  font-size:0.75rem;
  padding:2px 8px;
  border-radius:999px;
}
/* Question card — bigger headline + calmer label eyebrow. */
[data-theme="amara-refresh"] .proto-q{
  border-radius:16px;
  padding:16px 18px;
  margin-bottom:12px;
}
[data-theme="amara-refresh"] .proto-q-label{
  font-family:'JetBrains Mono',monospace;
  font-size:0.55rem;
  letter-spacing:0.1em;
  color:var(--amara-brand);
  margin-bottom:8px;
}
[data-theme="amara-refresh"] .proto-q-text{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.96rem;
  line-height:1.45;
  font-weight:500;
}
/* Info / warn insets — thinner left rule, more generous padding. */
[data-theme="amara-refresh"] .proto-info,
[data-theme="amara-refresh"] .proto-warn,
[data-theme="amara-refresh"] .proto-fn{
  border-radius:12px;
  padding:11px 14px;
  margin-bottom:12px;
  font-size:0.78rem;
  line-height:1.55;
}
/* Yes/No and choice buttons — pill shape, bigger label, clearer hover. */
[data-theme="amara-refresh"] .proto-yn{
  gap:10px;
  margin-top:14px;
}
[data-theme="amara-refresh"] .proto-y,
[data-theme="amara-refresh"] .proto-n{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.92rem;
  padding:14px 16px;
  border-radius:999px;
  border-width:1px;
  font-weight:600;
  transition:background-color .12s, border-color .12s, transform .12s;
}
[data-theme="amara-refresh"] .proto-y{
  background:color-mix(in srgb, #34d399 12%, var(--amara-surface, transparent));
  border-color:color-mix(in srgb, #34d399 55%, transparent);
}
[data-theme="amara-refresh"] .proto-n{
  background:color-mix(in srgb, #ef4444 10%, var(--amara-surface, transparent));
  border-color:color-mix(in srgb, #ef4444 55%, transparent);
}
[data-theme="amara-refresh"] .proto-y:hover{
  background:color-mix(in srgb, #34d399 22%, var(--amara-surface, transparent));
}
[data-theme="amara-refresh"] .proto-n:hover{
  background:color-mix(in srgb, #ef4444 20%, var(--amara-surface, transparent));
}
[data-theme="amara-refresh"] .proto-choices{
  gap:8px;
  margin-top:14px;
}
[data-theme="amara-refresh"] .proto-choice{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.82rem;
  padding:12px 16px;
  border-radius:14px;
  line-height:1.3;
}
[data-theme="amara-refresh"] .proto-choice:hover{
  border-color:var(--amara-brand);
  background:var(--amara-brand-soft);
}
[data-theme="amara-refresh"] .proto-choice-sub{
  font-size:0.62rem;
  margin-top:3px;
}
/* DX (diagnosis) card + workup / management blocks */
[data-theme="amara-refresh"] .proto-dx{
  border-radius:16px;
  padding:16px 18px;
  border-left:3px solid #8b5cf6;
}
[data-theme="amara-refresh"] .proto-dx-label{
  font-family:'JetBrains Mono',monospace;
  font-size:0.55rem;
  letter-spacing:0.1em;
}
[data-theme="amara-refresh"] .proto-dx-title{
  font-size:1rem;
  font-weight:600;
}
[data-theme="amara-refresh"] .proto-dx-body{
  font-size:0.78rem;
  line-height:1.6;
}
[data-theme="amara-refresh"] .proto-act{
  border-radius:16px;
  padding:16px 18px;
}
[data-theme="amara-refresh"] .proto-act-label{
  font-family:'JetBrains Mono',monospace;
  font-size:0.55rem;
  letter-spacing:0.1em;
  margin-bottom:8px;
}
[data-theme="amara-refresh"] .proto-act li{
  font-size:0.78rem;
  line-height:1.6;
  padding:3px 0 3px 16px;
}
/* End-of-protocol action row (Restart / Close / DELIRIUMS) — stable,
   equal-width pill buttons so positions don't shift across protocols. */
[data-theme="amara-refresh"] .proto-end{
  gap:10px;
  margin-top:18px;
  padding-top:12px;
  border-top:1px solid var(--amara-border);
}
[data-theme="amara-refresh"] .proto-end-btn{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.78rem;
  padding:12px 14px;
  border-radius:999px;
  font-weight:600;
}
[data-theme="amara-refresh"] .proto-end-btn.pri{
  background:var(--amara-brand);
  border-color:var(--amara-brand-strong);
  color:#fff;
}
[data-theme="amara-refresh"] .proto-end-btn.pri:hover{
  background:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] .mgmt-src{
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:0.6rem;
  margin-top:14px;
  padding-top:10px;
  color:var(--amara-text-faint, var(--fnt));
}
/* Back (top-left) / Close (top-right) — keep them visually quiet. */
[data-theme="amara-refresh"] .proto-header .mgmt-close{
  border-radius:999px;
}

@media (max-width:640px){
  [data-theme="amara-refresh"] .proto-header{ padding:12px 14px 8px; }
  [data-theme="amara-refresh"] .proto-body{ padding:12px 14px 18px; }
  [data-theme="amara-refresh"] .proto-prog{ margin:0 14px 4px; }
  [data-theme="amara-refresh"] .proto-q-text{ font-size:0.88rem; }
  [data-theme="amara-refresh"] .proto-y,
  [data-theme="amara-refresh"] .proto-n{ font-size:0.86rem; padding:13px 14px; }
  [data-theme="amara-refresh"] .proto-choice{ font-size:0.78rem; padding:11px 14px; }
  [data-theme="amara-refresh"] .proto-dx-title{ font-size:0.94rem; }
  [data-theme="amara-refresh"] .proto-act li,
  [data-theme="amara-refresh"] .proto-dx-body{ font-size:0.74rem; }
}
[data-theme="amara-refresh"] .calc-result h4,
[data-theme="amara-refresh"] .calc-label,
[data-theme="amara-refresh"] .calc-row,
[data-theme="amara-refresh"] .calc-sub,
[data-theme="amara-refresh"] .calc-muted,
[data-theme="amara-refresh"] .calc-break{
  font-family:'Outfit','Inter',system-ui,sans-serif;
}
[data-theme="amara-refresh"] .calc-actions{
  gap:10px;
  margin-top:14px;
}
[data-theme="amara-refresh"] .calc-bd{
  border-top:1px dashed var(--amara-brand-line);
}
/* The main-app protocol/calculator pills (outside the modal) pick up the
   refresh language too — pill shape, Outfit typography, teal accent. */
[data-theme="amara-refresh"] .proto-btn{
  border-radius:999px;
  font-family:'Outfit','Inter',system-ui,sans-serif;
}
[data-theme="amara-refresh"] .proto-btn:hover{
  border-color:var(--amara-brand-line);
  background:var(--amara-brand-soft);
}
[data-theme="amara-refresh"] .proto-btn-title,
[data-theme="amara-refresh"] .proto-btn-sub{
  font-family:'Outfit','Inter',system-ui,sans-serif;
}

/* ─── Dark-mode tuning for refresh brand accents ───────────────────────── */
/* Header + tab-bar colours are now identical in both modes (brand-strong
   header, brand tab-bar), so only small typography / contrast tweaks
   remain here to keep the modal text + focus rings readable on dark. */
:root[data-theme="amara-refresh"]:not(.light) .pc-input:focus{
  box-shadow:0 0 0 3px color-mix(in srgb, var(--amara-brand) 28%, transparent);
}
:root[data-theme="amara-refresh"]:not(.light) .calc-search input:focus,
:root[data-theme="amara-refresh"]:not(.light) .calc-field input[type="number"]:focus,
:root[data-theme="amara-refresh"]:not(.light) .calc-field select:focus{
  box-shadow:0 0 0 3px color-mix(in srgb, var(--amara-brand) 28%, transparent);
}
:root[data-theme="amara-refresh"]:not(.light) .calc-chip.sel{
  background:color-mix(in srgb, var(--amara-brand) 22%, transparent);
  border-color:color-mix(in srgb, var(--amara-brand) 55%, transparent);
  color:#7FB8B9;
}
:root[data-theme="amara-refresh"]:not(.light) .calc-title{
  color:#7FB8B9;
}
:root[data-theme="amara-refresh"]:not(.light) .calc-back{
  color:#7FB8B9;
}
/* Keep the "View results" surfaces at full brand brightness even in dark */
:root[data-theme="amara-refresh"]:not(.light) .rc-cue,
:root[data-theme="amara-refresh"]:not(.light) .rc-jump-btn{
  background:var(--amara-brand);
  border-color:var(--amara-brand-strong);
  color:#fff;
}
:root[data-theme="amara-refresh"]:not(.light) .rc-cue:hover,
:root[data-theme="amara-refresh"]:not(.light) .rc-jump-btn:hover{
  background:var(--amara-brand-strong);
}
:root[data-theme="amara-refresh"]:not(.light) .rc-jump-btn{
  --rc-jump-shadow:rgba(0,0,0,0.45);
}

/* ─── Mobile rhythm — shrink the Amara Acute header + tab block to
       reclaim vertical real estate. ──────────────────────────────────── */
@media (max-width:640px){
  [data-theme="amara-refresh"] body{ font-size:15px; }
  [data-theme="amara-refresh"] .top{
    padding:6px 12px;
    border-radius:0;
    min-height:0;
  }
  [data-theme="amara-refresh"] .top .logo{
    font-size:1.05rem;
    line-height:1.1;
  }
  [data-theme="amara-refresh"] .top .logo i{ font-size:0.72rem; }
  [data-theme="amara-refresh"] .top .logo sub{ display:none; }
  [data-theme="amara-refresh"] .top .rst{
    padding:5px 10px;
    font-size:0.7rem;
    min-height:30px;
  }
  [data-theme="amara-refresh"] .top .badge{
    font-size:0.55rem;
    padding:1px 6px;
  }
  [data-theme="amara-refresh"] .top-r{ gap:6px; }
  [data-theme="amara-refresh"] .tab-btn{
    padding:7px 8px;
    font-size:0.7rem;
  }
  [data-theme="amara-refresh"] .tab-btn .tab-icon{
    font-size:0.92rem;
    margin-bottom:1px;
  }
  [data-theme="amara-refresh"] .a-card{ border-radius:14px; }
  [data-theme="amara-refresh"] .calc-modal{ border-radius:16px; }
}

/* ─── Clean clinical refresh — native Acute visual layer ─────────────────
   Folded in from the visual-refresh direction as the active Amara Acute
   theme. This is intentionally not a removable override file. It keeps the
   clinical surface quiet: pale canvas, compact centered working width,
   clean cards, pill selectors, and explicit severity colours. */
:root[data-theme="amara-refresh"].light{
  --bg:#eef6f3;
  --sf:#fbfffd;
  --sf2:#f4faf7;
  --sf3:#e7f1ed;
  --bd:rgba(20,83,76,.16);
  --bd2:rgba(20,83,76,.28);
  --tx:#142f2b;
  --dim:#526b66;
  --fnt:#617670;
  --acc:#0f766e;
  --acc-2:#2563eb;
  --acc-soft:rgba(15,118,110,.10);
  --acc-ring:rgba(15,118,110,.28);
  --grn:#0f9f72;
  --ylw:#d9a21b;
  --org:#b97316;
  --red:#dc2626;
  --crit:#b91c1c;
  --lo:#2563eb;
  --hi:#dc2626;
  --rds:8px;
  --amara-brand:#0f766e;
  --amara-brand-strong:#14534c;
  --amara-brand-soft:rgba(15,118,110,.10);
  --amara-brand-line:rgba(15,118,110,.28);
  --amara-search-focus-accent:#6d28d9;
  --amara-page-top:#f9fffc;
  --amara-page-bottom:#e8f4ef;
  --amara-card-radius:8px;
  --amara-control-radius:12px;
  --amara-shadow-card:0 8px 22px rgba(20,83,76,.075),0 1px 2px rgba(20,83,76,.05);
  --amara-shadow-soft:0 14px 38px rgba(20,83,76,.10),0 2px 8px rgba(20,83,76,.06);
}
:root[data-theme="amara-refresh"]:not(.light){
  --bg:#07110f;
  --sf:#0f1917;
  --sf2:#14211f;
  --sf3:#1b2a27;
  --bd:rgba(157,199,190,.16);
  --bd2:rgba(157,199,190,.28);
  --tx:#edf7f3;
  --dim:#adc3bd;
  --fnt:#718982;
  --acc:#5eead4;
  --acc-2:#93c5fd;
  --acc-soft:rgba(94,234,212,.12);
  --acc-ring:rgba(94,234,212,.30);
  --grn:#34d399;
  --ylw:#fbbf24;
  --org:#f59e0b;
  --red:#f87171;
  --crit:#ef4444;
  --lo:#93c5fd;
  --hi:#f87171;
  --rds:8px;
  --amara-brand:#2dd4bf;
  --amara-brand-strong:#99f6e4;
  --amara-brand-soft:rgba(45,212,191,.14);
  --amara-brand-line:rgba(45,212,191,.32);
  --amara-search-focus-accent:#c084fc;
  --amara-page-top:#0b1715;
  --amara-page-bottom:#07110f;
  --amara-card-radius:8px;
  --amara-control-radius:12px;
  --amara-shadow-card:0 10px 24px rgba(0,0,0,.24),0 1px 2px rgba(0,0,0,.25);
  --amara-shadow-soft:0 16px 42px rgba(0,0,0,.34),0 2px 8px rgba(0,0,0,.28);
}
[data-theme="amara-refresh"] body.amara-acute{
  color:var(--tx);
  background:linear-gradient(180deg,var(--amara-page-top) 0%,var(--bg) 46%,var(--amara-page-bottom) 100%);
  line-height:1.45;
}
[data-theme="amara-refresh"] body.amara-acute #app{
  width:100%;
  max-width:760px;
  padding:18px 16px 16px;
}
[data-theme="amara-refresh"] body.amara-acute .top-wrap{
  background:#094E4F;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-bottom:0;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .top{
  max-width:none;
  margin:0;
  background:#094E4F;
  border-bottom:0;
  padding:12px 22px;
  border-radius:0;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .top .logo{
  color:#fff;
}
[data-theme="amara-refresh"] body.amara-acute .top .logo i{
  color:#B8D5D3;
  font-family:inherit;
  font-weight:400;
}
[data-theme="amara-refresh"] body.amara-acute .top .logo sub{
  display:inline;
  color:rgba(255,255,255,0.65);
}
[data-theme="amara-refresh"] body.amara-acute .top .rst{
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.24);
  color:#fff;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .top .rst:hover{
  background:rgba(255,255,255,0.22);
  border-color:rgba(255,255,255,0.4);
  color:#fff;
}
[data-theme="amara-refresh"] body.amara-acute .top .rst-icon{
  background:transparent;
  border:0;
  color:#fff;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .top .rst-icon:hover{
  background:rgba(255,255,255,0.12);
  border-color:transparent;
  color:#fff;
}
[data-theme="amara-refresh"] body.amara-acute .top .rst-reset{
  background:var(--priority-now, #E53935);
  border-color:#C62828;
  color:#fff;
}
[data-theme="amara-refresh"] body.amara-acute .top .rst-reset:hover{
  background:#C62828;
  border-color:#B71C1C;
  color:#fff;
}
[data-theme="amara-refresh"] body.amara-acute .sh,
[data-theme="amara-refresh"] body.amara-acute .pan-hdr,
[data-theme="amara-refresh"] body.amara-acute .acute-lane-title,
[data-theme="amara-refresh"] body.amara-acute .selbar-title,
[data-theme="amara-refresh"] body.amara-acute .help-section{
  color:var(--amara-brand);
  letter-spacing:.10em;
  font-weight:700;
}
[data-theme="amara-refresh"] body.amara-acute .sh{margin:18px 0 10px;}
[data-theme="amara-refresh"] body.amara-acute .a-card,
[data-theme="amara-refresh"] body.amara-acute .selbar,
[data-theme="amara-refresh"] body.amara-acute .acute-findings-section,
[data-theme="amara-refresh"] body.amara-acute .working-impression-panel,
[data-theme="amara-refresh"] body.amara-acute .res-card,
[data-theme="amara-refresh"] body.amara-acute .ddx,
[data-theme="amara-refresh"] body.amara-acute .alert,
[data-theme="amara-refresh"] body.amara-acute .syn-card,
[data-theme="amara-refresh"] body.amara-acute .syn-card-v2,
[data-theme="amara-refresh"] body.amara-acute .combo-workup,
[data-theme="amara-refresh"] body.amara-acute .sym-combo-wu,
[data-theme="amara-refresh"] body.amara-acute .proto-q,
[data-theme="amara-refresh"] body.amara-acute .proto-btn,
[data-theme="amara-refresh"] body.amara-acute .chronic-toggle-wrap,
[data-theme="amara-refresh"] body.amara-acute .dx-card,
[data-theme="amara-refresh"] body.amara-acute .mgmt-card,
[data-theme="amara-refresh"] body.amara-acute .ro-panel{
  background:color-mix(in srgb,var(--sf) 92%,transparent);
  border:1px solid var(--bd);
  border-radius:var(--amara-card-radius);
  box-shadow:var(--amara-shadow-card);
}
[data-theme="amara-refresh"] body.amara-acute .pc-stack{
  gap:12px;
  margin:10px 0 14px;
}
[data-theme="amara-refresh"] body.amara-acute .search-shell-stack.acute-top-control-area{
  margin-top:clamp(44px,7vh,84px);
}
[data-theme="amara-refresh"] body.amara-acute .pc-input{
  min-height:56px;
  border-radius:var(--amara-control-radius);
  background:color-mix(in srgb,var(--sf) 95%,transparent);
  border:1px solid var(--bd);
  color:var(--tx);
  font-size:.86rem;
  box-shadow:var(--amara-shadow-card);
}
[data-theme="amara-refresh"] body.amara-acute .pc-input::placeholder{color:var(--fnt);opacity:1;}
[data-theme="amara-refresh"] body.amara-acute .pc-input:focus{
  background:var(--sf);
  border-color:var(--amara-brand);
  box-shadow:0 0 0 4px var(--amara-brand-soft),var(--amara-shadow-card);
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell{
  margin-top:10px;
  min-height:0;
  padding:18px;
  border-radius:24px;
  background:color-mix(in srgb,var(--sf) 96%,transparent);
  border:1px solid transparent;
  box-shadow:var(--amara-shadow-soft);
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-search-row{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:center;
  gap:0;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap{
  width:100%;
  min-width:0;
  border:2px solid transparent;
  border-radius:999px;
  background:
    linear-gradient(var(--sf2),var(--sf2)) padding-box,
    var(--amara-search-highlight-gradient) border-box;
  box-shadow:0 7px 22px color-mix(in srgb,var(--amara-brand) 12%,transparent);
  transition:background .18s ease,box-shadow .18s ease;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap:hover{
  box-shadow:0 9px 26px color-mix(in srgb,var(--amara-brand) 16%,transparent);
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap:focus-within{
  outline:none;
  background:
    linear-gradient(var(--sf2),var(--sf2)) padding-box,
    var(--amara-search-focus-gradient) border-box;
  box-shadow:0 8px 24px color-mix(in srgb,var(--amara-search-focus-accent) 14%,transparent) !important;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap:focus-within .pc-search-icon{
  color:var(--amara-search-focus-accent);
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input{
  min-height:74px;
  border:0;
  border-radius:999px;
  background:transparent;
  box-shadow:none;
  color:var(--tx);
  font-size:1rem;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input:hover,
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input:focus{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input:focus-visible{
  outline:0;
}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox{
  top:100%;
  left:0;
  right:0;
  z-index:135;
}
@media(prefers-reduced-motion:reduce){
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap{
    transition:none;
  }
}
@media(forced-colors:active){
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap{
    border-color:CanvasText;
    background:Canvas;
    box-shadow:none !important;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap:focus-within{
    outline:3px solid Highlight;
    outline-offset:3px;
    box-shadow:none !important;
  }
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls{
  margin:0 0 8px;
  width:auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .acute-popover-wrap{
  width:auto;
  min-width:0;
  flex:0 0 auto;
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .search-shell-chip{
  width:auto;
  min-width:148px;
  max-width:min(220px,100%);
  min-height:44px;
  position:relative;
  padding:0 34px;
  justify-content:center;
  font-size:var(--amara-type-xs);
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .search-shell-label{
  width:100%;
  text-align:center;
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .search-shell-caret{
  position:absolute;
  right:14px;
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .acute-chip-badge{
  position:absolute;
  left:12px;
}
[data-theme="amara-refresh"] body.amara-acute .selected-context-controls .search-shell-chip.active{
  border-color:var(--amara-brand-line);
  background:var(--amara-brand-soft);
  color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] body.amara-acute .search-shell-label{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .search-shell-chip,
[data-theme="amara-refresh"] body.amara-acute .search-shell-submit{
  border-color:var(--bd);
  background:color-mix(in srgb,var(--sf2) 88%,transparent);
  color:var(--tx);
  box-shadow:0 1px 0 rgba(255,255,255,.36) inset;
}
[data-theme="amara-refresh"] body.amara-acute .search-shell-chip:hover,
[data-theme="amara-refresh"] body.amara-acute .search-shell-submit:hover,
[data-theme="amara-refresh"] body.amara-acute .search-shell-chip[aria-expanded="true"]{
  border-color:var(--amara-brand-line);
  background:var(--amara-brand-soft);
  color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] body.amara-acute .acute-popover{
  background:var(--sf);
  border-color:var(--bd);
  border-radius:var(--amara-control-radius);
  box-shadow:var(--amara-shadow-soft);
}
[data-theme="amara-refresh"] body.amara-acute .acute-menu-item{
  background:color-mix(in srgb,var(--sf2) 86%,transparent);
  border-color:var(--bd);
}
[data-theme="amara-refresh"] body.amara-acute .acute-menu-item:hover,
[data-theme="amara-refresh"] body.amara-acute .acute-menu-item.active{
  background:var(--amara-brand-soft);
  border-color:var(--amara-brand-line);
  color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] body.amara-acute .acute-secondary-controls{
  margin:8px 0 14px;
}
[data-theme="amara-refresh"] body.amara-acute .pc-search-icon{color:var(--amara-brand);opacity:.78;}
[data-theme="amara-refresh"] body.amara-acute .pc-clear{
  background:var(--sf2);
  color:var(--amara-brand);
  border-color:var(--bd);
}
[data-theme="amara-refresh"] body.amara-acute .pc-note,
[data-theme="amara-refresh"] body.amara-acute .acute-lane-count,
[data-theme="amara-refresh"] body.amara-acute .working-impression-title span{color:var(--fnt);}
[data-theme="amara-refresh"] body.amara-acute .pc-suggest{
  background:var(--sf);
  border:1px solid var(--bd);
  border-radius:var(--amara-control-radius);
  box-shadow:var(--amara-shadow-soft);
}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-btn{border-bottom:1px solid var(--bd);color:var(--tx);}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-btn:hover{background:var(--amara-brand-soft);}
[data-theme="amara-refresh"] body.amara-acute .acute-context-controls{
  margin:6px 0 14px;
}
[data-theme="amara-refresh"] body.amara-acute .acute-safety-note{
  margin:2px 0 10px 2px;
  padding:0 0 0 8px;
  border-left:2px solid var(--crit);
  color:var(--crit);
  font-family:'Outfit','Inter',system-ui,sans-serif;
  font-size:.58rem;
  line-height:1.35;
  transform:translateY(-14px);
}
[data-theme="amara-refresh"] body.amara-acute .acute-safety-note strong{
  font-weight:700;
}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-section,
[data-theme="amara-refresh"] body.amara-acute .working-impression-panel{margin:14px 0 16px;overflow:hidden;}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-toggle,
[data-theme="amara-refresh"] body.amara-acute .working-impression-head{
  background:linear-gradient(180deg,var(--sf),var(--sf2));
  color:var(--tx);
  padding:14px 16px;
  border-bottom:1px solid var(--bd);
}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-title strong,
[data-theme="amara-refresh"] body.amara-acute .working-impression-title strong{
  font-size:.88rem;
  color:var(--tx);
}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-title span{color:var(--dim);font-size:.54rem;}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-chevron{color:var(--amara-brand);}
[data-theme="amara-refresh"] body.amara-acute .acute-findings-body,
[data-theme="amara-refresh"] body.amara-acute .working-impression-body{padding:15px 16px 16px;}
[data-theme="amara-refresh"] body.amara-acute .acute-lane-divider{
  background:var(--bd);
  margin:16px 0;
}
[data-theme="amara-refresh"] body.amara-acute .ctx-btn,
[data-theme="amara-refresh"] body.amara-acute .trust-btn,
[data-theme="amara-refresh"] body.amara-acute .lb,
[data-theme="amara-refresh"] body.amara-acute .sel-chip,
[data-theme="amara-refresh"] body.amara-acute .pc-chip,
[data-theme="amara-refresh"] body.amara-acute .sum-chip,
[data-theme="amara-refresh"] body.amara-acute .allergy-btn,
[data-theme="amara-refresh"] body.amara-acute .pc-chronic-toggle,
[data-theme="amara-refresh"] body.amara-acute .acute-search-toggle,
[data-theme="amara-refresh"] body.amara-acute .acute-search-chip{
  border-radius:999px;
  border:1px solid var(--bd);
  background:color-mix(in srgb,var(--sf) 82%,transparent);
  color:var(--dim);
  box-shadow:0 1px 0 rgba(255,255,255,.42) inset;
}
[data-theme="amara-refresh"] body.amara-acute .ctx-btn.sel,
[data-theme="amara-refresh"] body.amara-acute .trust-btn.sel,
[data-theme="amara-refresh"] body.amara-acute .lb.on,
[data-theme="amara-refresh"] body.amara-acute .sel-chip.sym,
[data-theme="amara-refresh"] body.amara-acute .sel-chip.lab,
[data-theme="amara-refresh"] body.amara-acute .sel-chip.complaint,
[data-theme="amara-refresh"] body.amara-acute .pc-chip.active,
[data-theme="amara-refresh"] body.amara-acute .pc-chronic-toggle.active{
  background:var(--amara-brand-soft);
  border-color:var(--amara-brand-line);
  color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] body.amara-acute .sel-chip.trust{
  background:color-mix(in srgb,#14b8a6 12%,var(--sf));
  border-color:color-mix(in srgb,#14b8a6 38%,var(--bd));
  color:color-mix(in srgb,#0f766e 86%,var(--tx));
}
[data-theme="amara-refresh"] body.amara-acute .sel-chip.patient{
  background:color-mix(in srgb,#f43f5e 10%,var(--sf));
  border-color:color-mix(in srgb,#f43f5e 34%,var(--bd));
  color:color-mix(in srgb,#be123c 86%,var(--tx));
}
[data-theme="amara-refresh"] body.amara-acute .patient-factor-remove:hover{
  background:color-mix(in srgb,#be123c 16%,transparent);
  color:color-mix(in srgb,#be123c 96%,var(--tx));
}
[data-theme="amara-refresh"] body.amara-acute .lb.hi.on,
[data-theme="amara-refresh"] body.amara-acute .tag-hi,
[data-theme="amara-refresh"] body.amara-acute .sum-hi{background:color-mix(in srgb,var(--hi) 9%,var(--sf));border-color:color-mix(in srgb,var(--hi) 24%,var(--bd));color:var(--hi);}
[data-theme="amara-refresh"] body.amara-acute .lb.lo.on,
[data-theme="amara-refresh"] body.amara-acute .tag-lo,
[data-theme="amara-refresh"] body.amara-acute .sum-lo{background:color-mix(in srgb,var(--lo) 9%,var(--sf));border-color:color-mix(in srgb,var(--lo) 24%,var(--bd));color:var(--lo);}
[data-theme="amara-refresh"] body.amara-acute .lb.pos.on,
[data-theme="amara-refresh"] body.amara-acute .tag-act,
[data-theme="amara-refresh"] body.amara-acute .sum-ok{background:color-mix(in srgb,var(--grn) 9%,var(--sf));border-color:color-mix(in srgb,var(--grn) 24%,var(--bd));color:var(--grn);}
[data-theme="amara-refresh"] body.amara-acute button.allergy-btn{
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .allergy-btn.active,
[data-theme="amara-refresh"] body.amara-acute .allergy-btn[aria-pressed="true"]{
  background:var(--amara-brand-soft);
  border-color:var(--amara-brand-line);
  color:var(--amara-brand-strong);
}
[data-theme="amara-refresh"] body.amara-acute .lb.crit.on,
[data-theme="amara-refresh"] body.amara-acute .tag-crit,
[data-theme="amara-refresh"] body.amara-acute .sum-crit{background:color-mix(in srgb,var(--crit) 10%,var(--sf));border-color:color-mix(in srgb,var(--crit) 28%,var(--bd));color:var(--crit);}
[data-theme="amara-refresh"] body.amara-acute .working-live,
[data-theme="amara-refresh"] body.amara-acute .working-news{
  border-radius:999px;
  padding:4px 9px;
  border:1px solid var(--bd);
  background:var(--sf);
}
[data-theme="amara-refresh"] body.amara-acute .working-live{color:var(--grn);border-color:color-mix(in srgb,var(--grn) 24%,var(--bd));}
[data-theme="amara-refresh"] body.amara-acute .working-news{color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .working-news strong{color:var(--amara-brand);}
[data-theme="amara-refresh"] body.amara-acute .res-card,
[data-theme="amara-refresh"] body.amara-acute .dx-card,
[data-theme="amara-refresh"] body.amara-acute .comb-row,
[data-theme="amara-refresh"] body.amara-acute .syn-card,
[data-theme="amara-refresh"] body.amara-acute .syn-card-v2{
  border-left-width:4px;
  border-left-color:var(--amara-brand-line);
}
[data-theme="amara-refresh"] body.amara-acute .res-name,
[data-theme="amara-refresh"] body.amara-acute .ddx-name,
[data-theme="amara-refresh"] body.amara-acute .syn-name,
[data-theme="amara-refresh"] body.amara-acute .comb-top,
[data-theme="amara-refresh"] body.amara-acute .dx-card-title{color:var(--tx);font-weight:700;}
[data-theme="amara-refresh"] body.amara-acute .res-row,
[data-theme="amara-refresh"] body.amara-acute .ddx-body,
[data-theme="amara-refresh"] body.amara-acute .syn-desc,
[data-theme="amara-refresh"] body.amara-acute .alert-body,
[data-theme="amara-refresh"] body.amara-acute .comb-match,
[data-theme="amara-refresh"] body.amara-acute .dx-card-body{color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .alert{border-left-color:var(--org);}
[data-theme="amara-refresh"] body.amara-acute .alert.red,
[data-theme="amara-refresh"] body.amara-acute .dx-card.red{border-left-color:var(--red);}
[data-theme="amara-refresh"] body.amara-acute .alert.crit,
[data-theme="amara-refresh"] body.amara-acute .dx-card.crit,
[data-theme="amara-refresh"] body.amara-acute .syn-card.crit{border-left-color:var(--crit);}
/* ─── Next Actions — pathology-first accordion ───────────────────────── */
[data-theme="amara-refresh"] body.amara-acute .na-section{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-sh{
  appearance:none;
  width:100%;
  min-height:var(--amara-touch-target);
  margin:var(--amara-space-5) 0 var(--amara-space-2);
  padding:var(--amara-space-2);
  display:flex;
  align-items:center;
  gap:var(--amara-space-2);
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--amara-clinical-action);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  letter-spacing:var(--amara-track-label);
  text-align:left;
  text-transform:uppercase;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-sh .ddx-arrow{
  flex:none;
  font-size:var(--amara-type-xs);
}
[data-theme="amara-refresh"] body.amara-acute .na-section-title{
  flex:1 1 auto;
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-sh:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-action-control:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-tool-link:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-origin-shortcut:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-focus-clear:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .acute-evidence-origin-link:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:var(--amara-radius-sm);
}
[data-theme="amara-refresh"] body.amara-acute .na-focus-toolbar{
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-1) var(--amara-space-2);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:var(--amara-space-2);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-reference-pathway-banner{
  min-width:0;
  padding:var(--amara-space-2);
  display:grid;
  gap:var(--amara-space-1);
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-left:3px solid var(--amara-clinical-action);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-focus-context{
  min-width:0;
  display:grid;
  gap:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .na-focus-kicker{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-focus-name{
  min-width:0;
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-focus-clear{
  appearance:none;
  flex:none;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-1) var(--amara-space-2);
  border:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-ink);
  font:inherit;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-window-heading{
  min-height:var(--amara-control-height);
  margin:0;
  padding:var(--amara-space-2) var(--amara-space-2) var(--amara-space-1);
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:var(--amara-space-2);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-window-heading > span:first-child{
  flex:1 1 14rem;
  min-width:0;
  overflow-wrap:normal;
  word-break:normal;
}
[data-theme="amara-refresh"] body.amara-acute .na-window-heading.na-window-now{
  color:var(--amara-clinical-danger);
}
[data-theme="amara-refresh"] body.amara-acute .na-window-count{
  flex:0 1 auto;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:normal;
  color:inherit;
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  font-variant-numeric:tabular-nums;
  letter-spacing:var(--amara-track-data);
}
@media(max-width:600px){
  [data-theme="amara-refresh"] body.amara-acute .na-window-heading{
    flex-direction:column;
    align-items:stretch;
    gap:4px;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-window-heading > span:first-child{
    flex-basis:auto;
  }
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-group{
  min-width:0;
  max-width:100%;
  margin:0 0 var(--amara-space-1);
  overflow:visible;
  border:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:var(--amara-radius-lg);
  background:var(--amara-clinical-surface);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-group.is-open{
  margin-bottom:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-heading{
  min-width:0;
  margin:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle{
  /* Keep the clipped status label inside its heading, including when collapsed. */
  position:relative;
  appearance:none;
  width:100%;
  min-width:0;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-1) var(--amara-space-2);
  display:grid;
  grid-template-columns:var(--amara-type-xl) minmax(0,1fr) auto;
  align-items:center;
  gap:var(--amara-space-2);
  border:0;
  border-radius:var(--amara-radius-lg);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle:hover{
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-chevron{
  width:var(--amara-type-xl);
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  text-align:center;
  transform-origin:center;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-chevron.is-open{
  transform:rotate(90deg);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-label{
  min-width:0;
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-count,
[data-theme="amara-refresh"] body.amara-acute .na-pathology-meta{
  min-width:0;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  font-variant-numeric:tabular-nums;
  letter-spacing:var(--amara-track-data);
  text-align:right;
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-count{
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-status{
  position:absolute;
  top:0;
  left:0;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-panel{
  min-width:0;
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-panel[hidden]{
  display:none;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-window{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-window + .na-pathology-window{
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-window-actions{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-group{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-group + .na-purpose-group{
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-heading{
  min-height:var(--amara-control-height);
  margin:0;
  padding:var(--amara-space-1) var(--amara-space-2);
  display:flex;
  align-items:center;
  border-bottom:var(--amara-border-thin) solid var(--amara-clinical-line);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  letter-spacing:var(--amara-track-label);
  text-transform:uppercase;
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-escalation .na-purpose-heading{
  background:var(--amara-clinical-danger-soft);
  color:var(--amara-clinical-danger);
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-immediate .na-purpose-heading{
  background:var(--amara-clinical-success-soft);
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-potential .na-purpose-heading{
  background:var(--amara-clinical-warning-soft);
  color:var(--amara-clinical-warning);
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-monitoring .na-purpose-heading{
  background:var(--amara-clinical-action-soft);
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row{
  min-width:0;
  min-height:var(--amara-touch-target);
  padding:0;
  display:grid;
  grid-template-columns:var(--amara-touch-target) minmax(0,1fr) auto;
  align-items:start;
  gap:var(--amara-space-1);
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-tool{
  grid-template-columns:minmax(0,1fr) auto;
  padding-left:var(--amara-space-3);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reference,
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reference.is-tool{
  grid-template-columns:minmax(72px,auto) minmax(0,1fr) auto;
  padding-left:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-reference-badge{
  max-width:92px;
  margin:var(--amara-space-2) 0 0 var(--amara-space-2);
  padding:2px 6px;
  align-self:start;
  border:var(--amara-border-thin) solid var(--amara-clinical-action);
  border-radius:999px;
  color:var(--amara-clinical-action-strong);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  text-align:center;
  white-space:normal;
}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-window-actions > .na-action-row:first-child{
  border-top:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-purpose-heading + .na-action-row{
  border-top:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-status-marker{
  width:var(--amara-touch-target);
  min-width:var(--amara-touch-target);
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-1);
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:start;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-align:center;
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-status-marker.is-conditional{
  color:var(--amara-clinical-warning);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-status-marker.is-review{
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-conditional{
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-conditional-review{
  border-left-color:var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-review-required{
  grid-template-columns:minmax(0,1fr) auto;
  padding-left:var(--amara-space-3);
  border-left:var(--amara-border-signal) solid var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-control{
  appearance:none;
  width:var(--amara-touch-target);
  min-width:var(--amara-touch-target);
  height:var(--amara-touch-target);
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-3);
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:var(--amara-radius-md);
  background:transparent;
  color:var(--amara-clinical-meta);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-control:hover{
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-affordance{
  width:var(--amara-type-xl);
  height:var(--amara-type-xl);
  flex:none;
  fill:none;
  stroke:currentColor;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-copy{
  min-width:0;
  padding:var(--amara-space-1) 0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-condition{
  min-width:0;
  margin:var(--amara-space-1) 0;
  padding:var(--amara-space-1) var(--amara-space-2);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:var(--amara-space-1);
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-warning-soft);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-condition strong{
  color:var(--amara-clinical-warning);
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-tool .na-action-copy{
  padding-block:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-line{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-text{
  flex:1 1 auto;
  min-width:0;
  color:var(--amara-clinical-ink);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-text-content{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-copy:not(.is-expanded) .na-action-text.is-compact{
  display:block;
  max-height:none;
  overflow:visible;
  -webkit-line-clamp:unset;
  line-clamp:unset;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-copy.is-expanded .na-action-text.is-compact{
  display:block;
  max-height:none;
  overflow:visible;
  -webkit-line-clamp:unset;
  line-clamp:unset;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-bar{
  min-width:0;
  margin-top:var(--amara-space-1);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--amara-space-1) var(--amara-space-3);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-bar.is-empty{
  display:none;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle{
  appearance:none;
  min-height:28px;
  margin:0;
  padding:0 var(--amara-space-2);
  border:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-action);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle:hover,
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle:focus-visible{
  color:var(--amara-clinical-action-strong);
  text-decoration:underline;
  text-decoration-thickness:var(--amara-border-thin);
  text-underline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle:focus-visible{
  outline:2px solid var(--amara-clinical-action);
  outline-offset:2px;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-bar .na-action-shortcuts{
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-detail-bar .na-origin-shortcut{
  margin-top:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-shortcuts{
  max-width:100%;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0 var(--amara-space-4);
}
[data-theme="amara-refresh"] body.amara-acute .na-origin-shortcut{
  appearance:none;
  max-width:100%;
  min-height:28px;
  margin:var(--amara-space-1) 0 0;
  padding:0;
  display:inline-flex;
  align-items:center;
  gap:var(--amara-space-1);
  border:0;
  border-radius:var(--amara-radius-sm);
  background:transparent;
  color:var(--amara-clinical-action);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-origin-shortcut:hover{
  color:var(--amara-clinical-action-strong);
  text-decoration:underline;
  text-decoration-thickness:var(--amara-border-thin);
  text-underline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-link{
  appearance:none;
  width:100%;
  min-width:0;
  min-height:var(--amara-touch-target);
  margin:0;
  padding:var(--amara-space-1) 0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:var(--amara-space-1) var(--amara-space-2);
  border:0;
  border-radius:var(--amara-radius-sm);
  background:transparent;
  color:var(--amara-clinical-ink);
  font-family:var(--amara-clinical-font);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-link:hover{
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-kind{
  color:var(--amara-clinical-action);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-title{
  min-width:0;
  color:currentColor;
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-open-label{
  color:var(--amara-clinical-action);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-tool-note{
  grid-column:2 / -1;
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-attribution{
  min-width:0;
  margin-top:var(--amara-space-1);
  display:flex;
  align-items:center;
  gap:var(--amara-space-1);
  flex-wrap:wrap;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source{
  appearance:none;
  max-width:100%;
  min-width:0;
  min-height:var(--amara-touch-target);
  padding:0 var(--amara-space-1);
  display:inline-flex;
  align-items:center;
  gap:var(--amara-space-1);
  border:0;
  border-radius:var(--amara-radius-sm);
  background:transparent;
  color:var(--amara-clinical-meta);
  font:inherit;
  text-align:left;
  overflow:hidden;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source:hover{
  background:transparent;
  color:var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source:active{
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-destination{
  flex:none;
  color:currentColor;
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  letter-spacing:var(--amara-track-data);
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-label{
  flex:1 1 auto;
  min-width:0;
  color:var(--amara-clinical-copy);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-decoration:none;
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source:hover .na-attribution-label,
[data-theme="amara-refresh"] body.amara-acute .na-attribution-source:focus-visible .na-attribution-label{
  color:var(--amara-clinical-action-strong);
  text-decoration:underline;
  text-decoration-thickness:var(--amara-border-thin);
  text-underline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-arrow{
  flex:none;
  color:currentColor;
  font-size:var(--amara-type-xs);
}
[data-theme="amara-refresh"] body.amara-acute .na-attribution-static{
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id],
[data-theme="amara-refresh"] body.amara-acute [data-lab-detail-id],
[data-theme="amara-refresh"] body.amara-acute [data-pattern-alert-links],
[data-theme="amara-refresh"] body.amara-acute [data-pattern-ref]{
  scroll-margin-top:calc(var(--amara-touch-target) + var(--amara-space-4));
}
[data-theme="amara-refresh"] body.amara-acute .na-focused-action-destination{
  border-radius:var(--amara-radius-md);
  scroll-margin-top:calc(var(--amara-touch-target) + var(--amara-space-4));
}
[data-theme="amara-refresh"] body.amara-acute .next-action-origin-target{
  position:relative;
  outline:2px solid var(--acc-2);
  outline-offset:2px;
  box-shadow:
    0 7px 22px color-mix(in srgb,var(--amara-brand) 12%,transparent),
    0 0 0 1px color-mix(in srgb,var(--amara-brand) 8%,transparent);
}
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)){
  [data-theme="amara-refresh"] body.amara-acute .next-action-origin-target{
    outline:none;
  }
  [data-theme="amara-refresh"] body.amara-acute .next-action-origin-target::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:4;
    padding:2px;
    border-radius:inherit;
    background:var(--amara-search-highlight-gradient);
    pointer-events:none;
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite:xor;
    mask-composite:exclude;
  }
}
@media(forced-colors:active){
  [data-theme="amara-refresh"] body.amara-acute .next-action-origin-target{
    outline:3px solid Highlight;
    outline-offset:3px;
    box-shadow:none;
  }
  [data-theme="amara-refresh"] body.amara-acute .next-action-origin-target::after{
    display:none;
  }
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done .na-action-text{
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done .na-action-clinical-text{
  text-decoration:line-through;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done .na-action-check{
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance{
  min-width:0;
  padding:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger{
  appearance:none;
  max-width:100%;
  min-height:var(--amara-touch-target);
  margin:0;
  padding:var(--amara-space-1) var(--amara-space-2);
  display:inline-flex;
  align-items:center;
  gap:var(--amara-space-1);
  overflow:hidden;
  border:var(--amara-border-thin) solid currentColor;
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-action);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger.gap{
  color:var(--amara-clinical-warning);
}
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger:hover{
  background:var(--amara-clinical-surface);
}
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger-label{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-source-evidence-trigger-icon{
  flex:none;
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .na-row-provenance{
  min-width:var(--amara-touch-target);
  padding-inline:var(--amara-space-1);
  border-color:transparent;
  background:transparent;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .na-row-provenance.gap{
  background:transparent;
}
[data-theme="amara-refresh"] body.amara-acute .acute-evidence-origin-link{
  appearance:none;
  width:100%;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--amara-space-2);
  border:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-action);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  text-align:left;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .acute-evidence-origin-link:hover{
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-next-action-unavailable{
  padding:var(--amara-space-2);
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-copy);
}
@media (pointer:coarse),(max-width:700px){
  [data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle{
    min-height:var(--amara-touch-target);
  }
}
@media print{
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-panel[hidden]{
    display:block !important;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-text.is-compact{
    display:block !important;
    max-height:none !important;
    overflow:visible !important;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle{
    display:none !important;
  }
}
[data-theme="amara-refresh"] body.amara-acute .help-overlay,
[data-theme="amara-refresh"] body.amara-acute .mgmt-overlay{
  background:rgba(10,47,43,.34);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
[data-theme="amara-refresh"] body.amara-acute .help-modal,
[data-theme="amara-refresh"] body.amara-acute .mgmt-modal{
  background:var(--sf);
  color:var(--tx);
  border:1px solid var(--bd);
  border-radius:var(--amara-control-radius);
  box-shadow:var(--amara-shadow-soft);
}
[data-theme="amara-refresh"] body.amara-acute .help-hdr,
[data-theme="amara-refresh"] body.amara-acute .mgmt-hdr{
  border-bottom:1px solid var(--bd);
  background:var(--sf2);
}
@media(max-width:520px){
  [data-theme="amara-refresh"] body.amara-acute #app{padding:14px 10px 12px;}
  [data-theme="amara-refresh"] body.amara-acute .top{padding-inline:12px;}
  [data-theme="amara-refresh"] body.amara-acute .pc-input{min-height:54px;}
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle{
    grid-template-columns:var(--amara-type-xl) minmax(0,1fr);
    grid-template-rows:auto auto;
    align-items:start;
    gap:var(--amara-space-1) var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-chevron{
    grid-column:1;
    grid-row:1 / span 2;
    align-self:center;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-label{
    grid-column:2;
    grid-row:1;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-count{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    max-width:100%;
    white-space:normal;
    text-align:left;
    overflow-wrap:normal;
  }
  /* Keep evidence controls out of the instruction's horizontal space. */
  [data-theme="amara-refresh"] body.amara-acute .na-action-row{
    grid-template-columns:var(--amara-touch-target) minmax(0,1fr);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row > .na-action-copy{
    grid-column:2;
    grid-row:1;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row > .na-action-provenance{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    max-width:100%;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row:is(.is-tool,.is-review-required):not(.is-reference):not(.is-guidance){
    grid-template-columns:minmax(0,1fr);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row:is(.is-tool,.is-review-required):not(.is-reference):not(.is-guidance) > :is(.na-action-copy,.na-action-provenance){
    grid-column:1;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-condition{
    grid-template-columns:minmax(0,1fr);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reference,
  [data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reference.is-tool,
  [data-theme="amara-refresh"] body.amara-acute .na-action-row.is-guidance{
    grid-template-columns:auto minmax(0,1fr);
    gap:0 var(--amara-space-2);
    padding-bottom:var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-reference-badge{
    grid-column:1;
    grid-row:1;
    justify-self:start;
    margin:var(--amara-space-2) var(--amara-space-2) 0;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row:is(.is-reference,.is-guidance) .na-action-copy{
    width:100%;
    min-width:0;
    grid-column:1 / -1;
    grid-row:2;
    padding:var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-row:is(.is-reference,.is-guidance) .na-action-provenance{
    grid-column:2;
    grid-row:1;
    justify-self:end;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-action-detail-toggle{
    min-height:var(--amara-touch-target);
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-findings-toggle,
  [data-theme="amara-refresh"] body.amara-acute .working-impression-head{padding:13px 14px;}
  [data-theme="amara-refresh"] body.amara-acute .acute-findings-body,
  [data-theme="amara-refresh"] body.amara-acute .working-impression-body{padding:14px;}
}

/* ─── Mobile Acute header proportions — keep solid bar compact. ───────── */
@media(max-width:640px){
  [data-theme="amara-refresh"] body.amara-acute .top{
    padding:6px 12px;
    min-height:0;
    gap:14px;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .logo{
    font-size:1.05rem;
    line-height:1.1;
    white-space:nowrap;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .logo i{
    font-size:0.72rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .logo sub{
    display:none;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .top-r{
    gap:6px;
    flex-wrap:nowrap;
    justify-content:flex-end;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .rst{
    height:40px;
    min-height:40px;
    padding:8px 10px;
    font-size:0.7rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .rst-icon{
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    padding:9px;
    border-radius:8px;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .rst-icon svg{
    width:18px;
    height:18px;
  }
}
@media(max-width:520px){
  [data-theme="amara-refresh"] body.amara-acute .top{
    padding:6px 10px;
    gap:10px;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .logo{
    font-size:1rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .top-r{
    gap:4px;
  }
  [data-theme="amara-refresh"] body.amara-acute .top .rst-reset{
    padding-inline:9px;
  }
}

/* Compact shell for tablet / narrow-desktop widths. This keeps the submit
   arrow on the same row instead of wrapping below the context controls. */
@media(max-width:1100px) and (min-width:641px){
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell{
    min-height:0;
    padding:16px;
    gap:12px;
    border-radius:22px;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-search-row{
    grid-template-columns:minmax(0,1fr);
    gap:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input{
    min-height:64px;
    font-size:.9rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox{
    right:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls{
    width:100%;
    display:grid;
    grid-template-columns:minmax(92px,.78fr) minmax(154px,1.15fr) minmax(170px,1.25fr);
    gap:10px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls .acute-popover-wrap{
    width:100%;
    min-width:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls{
    width:auto;
    display:flex;
    grid-template-columns:none;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls .acute-popover-wrap{
    width:auto;
    flex:0 0 auto;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls .search-shell-chip{
    width:auto;
    min-width:148px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-chip{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:0 10px;
    gap:5px;
    font-size:.58rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-submit{
    width:52px;
    min-width:52px;
    height:52px;
  }
}

/* Mobile search-shell context controls: keep Trust/Ward/Patient aligned and
   keep viewport-anchored menus inside the installed webapp screen. */
@media(max-width:640px){
  [data-theme="amara-refresh"] body.amara-acute .search-shell-stack.acute-top-control-area{
    margin-top:clamp(28px,5vh,44px);
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell{
    min-height:0;
    padding:14px;
    gap:12px;
    border-radius:22px;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-search-row{
    grid-template-columns:minmax(0,1fr);
    gap:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input{
    min-height:58px;
    font-size:.8rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox{
    right:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls{
    width:100%;
    display:grid;
    grid-template-columns:minmax(70px,.78fr) minmax(112px,1.15fr) minmax(124px,1.25fr);
    gap:7px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:6px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls .acute-popover-wrap{
    width:100%;
    min-width:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-chip{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:0 8px;
    gap:5px;
    font-size:.56rem;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls .acute-popover-wrap,
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls .search-shell-chip{
    width:100%;
    max-width:none;
    min-width:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls .search-shell-chip{
    justify-content:center;
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-popover{
    min-width:0;
    max-width:calc(100vw - 20px);
    max-width:calc(100dvw - 20px);
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-popover.is-anchored{
    left:var(--acute-popover-left);
    right:auto !important;
    width:var(--acute-popover-width);
    max-width:calc(100vw - 20px);
    max-width:calc(100dvw - 20px);
  }
  [data-theme="amara-refresh"] body.amara-acute .acute-menu-item span:first-child{
    min-width:0;
    white-space:normal;
    overflow-wrap:anywhere;
  }
}

@media(max-width:420px){
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls{
    grid-template-columns:minmax(64px,.75fr) minmax(106px,1.16fr) minmax(116px,1.24fr);
    gap:6px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-context-controls.selected-context-controls{
    grid-template-columns:minmax(0,1fr);
    gap:5px;
  }
  [data-theme="amara-refresh"] body.amara-acute .search-shell-chip{
    min-height:44px;
    padding:0 6px;
    gap:4px;
    font-size:.52rem;
  }
}

/* ─── Infection Presentations — glance-first clinical dashboard ─────────
   Ranked summaries are the default view. Source detail, rationale and the
   treatment ladder remain available on demand without competing with the
   initial clinical signal. Every visual value resolves through the scale
   above; risk colour is paired with a glyph and text label. */
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-section-toggle{
  appearance:none;
  width:100%;
  min-height:var(--amara-touch-target);
  display:flex;
  align-items:center;
  gap:var(--amara-space-2);
  margin:var(--amara-space-5) 0 var(--amara-space-2);
  padding:0;
  border:0;
  background:transparent;
  color:var(--amara-clinical-action-strong);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  letter-spacing:var(--amara-track-label);
  line-height:var(--amara-line-tight);
  text-align:left;
  text-transform:uppercase;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-section-hint{
  margin-left:auto;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  letter-spacing:0;
  text-transform:none;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-panel{
  margin:0;
  padding:var(--amara-space-2) 0 0;
  border:0;
  background:transparent;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:baseline;
  gap:var(--amara-space-1) var(--amara-space-3);
  margin:0 0 var(--amara-space-3);
  padding:var(--amara-space-2) var(--amara-space-3);
  border:0;
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-policy-label{
  color:var(--amara-clinical-ink);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .infection-policy-note,
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy small{
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy small{
  grid-column:1 / -1;
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-variant-numeric:tabular-nums;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy a{
  grid-column:1 / -1;
  color:var(--amara-clinical-action-strong);
  font-weight:var(--amara-weight-semibold);
  overflow-wrap:anywhere;
  text-underline-offset:var(--amara-space-1);
}

[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card{
  --infection-risk-color:var(--amara-clinical-line-strong);
  margin:0;
  overflow:hidden;
  border:0;
  border-left:var(--amara-border-signal) solid var(--infection-risk-color);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-ink);
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card + .infection-presentation-card{
  margin-top:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .infection-more-presentations{
  margin-top:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .infection-more-presentations > summary{
  box-sizing:border-box;
  min-height:var(--amara-touch-target);
  display:flex;
  align-items:center;
  padding:var(--amara-space-2) var(--amara-space-3);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-action-strong);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .infection-more-presentations > summary:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:calc(-1 * var(--amara-focus-ring));
}
[data-theme="amara-refresh"] body.amara-acute .infection-more-presentations-list{
  display:grid;
  gap:var(--amara-space-2);
  padding-top:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .infection-more-presentations-list .infection-presentation-card + .infection-presentation-card{
  margin-top:0;
}
[data-theme="amara-refresh"] body.amara-acute .infection-risk-critical{
  --infection-risk-color:var(--amara-clinical-danger);
}
[data-theme="amara-refresh"] body.amara-acute .infection-risk-intermediate{
  --infection-risk-color:var(--amara-clinical-warning);
}
[data-theme="amara-refresh"] body.amara-acute .infection-risk-lower,
[data-theme="amara-refresh"] body.amara-acute .infection-risk-unassessed{
  --infection-risk-color:var(--amara-clinical-line-strong);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card[open]{
  background:var(--amara-clinical-action-tint);
}
[data-theme="amara-refresh"] body.amara-acute summary.infection-presentation-card-toggle{
  list-style:none;
}
[data-theme="amara-refresh"] body.amara-acute summary.infection-presentation-card-toggle::-webkit-details-marker{
  display:none;
}
[data-theme="amara-refresh"] body.amara-acute summary.infection-presentation-card-toggle::marker{
  content:'';
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-toggle{
  box-sizing:border-box;
  min-height:var(--amara-touch-target);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:var(--amara-space-3);
  padding:var(--amara-space-3) var(--amara-space-4);
  cursor:pointer;
  color:var(--amara-clinical-ink);
  background:transparent;
  font-family:var(--amara-clinical-font);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
  -webkit-tap-highlight-color:transparent;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-review{
  color:var(--amara-clinical-action-strong);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .infection-review-open,
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card[open] .infection-review-closed{
  display:none;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card[open] .infection-review-open{
  display:inline;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-summary{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:baseline;
  gap:var(--amara-space-1) var(--amara-space-3);
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-rank{
  grid-row:1 / span 2;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-heading{
  min-width:0;
  color:var(--amara-clinical-ink);
  font-size:var(--amara-type-md);
  font-weight:var(--amara-weight-semibold);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-meta{
  display:flex;
  min-width:0;
  align-items:center;
  justify-content:flex-end;
  gap:var(--amara-space-2);
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
}
[data-theme="amara-refresh"] body.amara-acute .infection-risk-label{
  color:var(--infection-risk-color);
  font-family:var(--amara-data-font);
  font-weight:var(--amara-weight-bold);
  letter-spacing:var(--amara-track-data);
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .infection-source-context{
  color:var(--amara-clinical-meta);
  font-weight:var(--amara-weight-medium);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-signal-context{
  grid-column:2 / -1;
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-detail{
  display:grid;
  gap:var(--amara-space-3);
  padding:var(--amara-space-3) var(--amara-space-4) var(--amara-space-4);
  background:var(--amara-clinical-surface);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-overview,
[data-theme="amara-refresh"] body.amara-acute .infection-criterion-note,
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-note,
[data-theme="amara-refresh"] body.amara-acute .infection-dose-flag{
  max-width:var(--amara-measure);
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-evidence-summary,
[data-theme="amara-refresh"] body.amara-acute .infection-against-summary{
  max-width:var(--amara-measure);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-evidence-summary strong,
[data-theme="amara-refresh"] body.amara-acute .infection-against-summary strong{
  color:var(--amara-clinical-ink);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .infection-timing{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:var(--amara-space-2) var(--amara-space-3);
  align-items:baseline;
  max-width:var(--amara-measure);
  padding:var(--amara-space-2) var(--amara-space-3);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-timing-label{
  color:var(--amara-clinical-ink);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  white-space:nowrap;
}

[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section{
  margin:0;
  border:0;
  border-radius:var(--amara-radius-sm);
  background:transparent;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section + .infection-guideline-section{
  margin-top:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section > summary,
[data-theme="amara-refresh"] body.amara-acute .infection-source-safety > summary{
  box-sizing:border-box;
  min-height:var(--amara-touch-target);
  display:flex;
  align-items:center;
  padding:var(--amara-space-2) var(--amara-space-3);
  cursor:pointer;
  color:var(--amara-clinical-copy);
  background:var(--amara-clinical-subtle);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
  -webkit-tap-highlight-color:transparent;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section > summary::marker,
[data-theme="amara-refresh"] body.amara-acute .infection-source-safety > summary::marker{
  color:var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section[open] > summary{
  color:var(--amara-clinical-action-strong);
  background:var(--amara-clinical-action-tint);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-toggle:hover,
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section > summary:hover{
  background:var(--amara-clinical-action-tint);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-section-toggle:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-toggle:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-section > summary:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy a:focus-visible,
[data-theme="amara-refresh"] body.amara-acute :is(a,button).infection-criterion-status:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-link:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-source-stamp:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .infection-band-select:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:calc(-1 * var(--amara-focus-ring));
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-body{
  display:grid;
  min-width:0;
  gap:var(--amara-space-3);
  padding:var(--amara-space-3);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-ladder{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--amara-ladder-column)),1fr));
  gap:var(--amara-space-2);
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band{
  min-width:0;
  display:grid;
  align-content:start;
  gap:var(--amara-space-2);
  padding:var(--amara-space-3);
  border:0;
  border-left:var(--amara-border-signal) solid var(--amara-clinical-line-strong);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band.suggested{
  border-left-color:var(--amara-clinical-action);
  background:var(--amara-clinical-action-tint);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band.selected-for-next-actions{
  border-left-color:var(--amara-clinical-success);
  background:var(--amara-clinical-success-soft);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--amara-space-2);
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band-title{
  min-width:0;
  color:var(--amara-clinical-ink);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band-definition{
  color:var(--amara-clinical-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-band-select,
[data-theme="amara-refresh"] body.amara-acute .infection-linked-presentation-action{
  min-height:var(--amara-control-height);
  border-radius:var(--amara-radius-sm);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .infection-band-select.active{
  border-color:var(--amara-clinical-success);
  background:var(--amara-clinical-success);
  color:var(--amara-clinical-surface);
}
[data-theme="amara-refresh"] body.amara-acute .infection-factor-resolution{
  padding:var(--amara-space-2);
  border:0;
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-warning-soft);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-factor-resolution.is-resolved,
[data-theme="amara-refresh"] body.amara-acute .infection-factor-resolution.is-selected{
  border-left-color:var(--amara-clinical-success);
  background:var(--amara-clinical-success-soft);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-factor-impact{
  padding:var(--amara-space-3);
  border:0;
  border-left:var(--amara-border-signal) solid var(--amara-clinical-line-strong);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-factor-impact.is-resolved{
  border-left-color:var(--amara-clinical-success);
  background:var(--amara-clinical-success-soft);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-factor-impact.is-withheld{
  border-left-color:var(--amara-clinical-warning);
  background:var(--amara-clinical-warning-soft);
}
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band.factor-routed{
  border-left-color:var(--amara-clinical-success);
}
[data-theme="amara-refresh"] body.amara-acute .infection-other-source-branches{
  min-width:0;
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
}
[data-theme="amara-refresh"] body.amara-acute .infection-other-source-branches > summary{
  min-height:var(--amara-control-height);
  display:flex;
  align-items:center;
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .infection-other-source-branches-body{
  opacity:.72;
}
[data-theme="amara-refresh"] body.amara-acute .infection-next-action-factor-impact{
  display:block;
  margin-top:var(--amara-space-2);
  padding:var(--amara-space-2);
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-warning-soft);
  color:var(--amara-clinical-copy);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-guidance{
  border-left-color:var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .na-guidance-badge{
  border-color:var(--amara-clinical-action);
  background:var(--amara-clinical-action-soft);
  color:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .infection-criterion-status{
  display:inline-flex;
  max-width:100%;
  align-items:center;
  gap:var(--amara-space-1);
  padding:var(--amara-space-1) var(--amara-space-2);
  border:var(--amara-border-thin) solid var(--amara-clinical-line-strong);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-criterion-status[data-status="met"]{
  border-color:var(--amara-clinical-success);
  color:var(--amara-clinical-success);
}
[data-theme="amara-refresh"] body.amara-acute .infection-regimen-row > .infection-criterion-status{
  justify-self:end;
}
[data-theme="amara-refresh"] body.amara-acute :is(a,button).infection-criterion-status{
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .infection-regimen-row{
  display:grid;
  grid-template-columns:minmax(var(--amara-ladder-column),.34fr) minmax(0,1fr);
  align-items:start;
  gap:var(--amara-space-2) var(--amara-space-3);
  min-width:0;
  padding:var(--amara-space-2) 0;
  border:0;
  border-top:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:0;
  background:transparent;
  color:var(--amara-clinical-ink);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
/* A source-band card is already a narrow grid column. Stack its regimen
   label above the medicine so a second fixed-width label cannot crush dosing. */
[data-theme="amara-refresh"] body.amara-acute .infection-guideline-band .infection-regimen-row{
  grid-template-columns:minmax(0,1fr);
}
[data-theme="amara-refresh"] body.amara-acute .infection-regimen-row.source-factor-match{
  border-left:var(--amara-border-signal) solid var(--amara-clinical-success);
  padding-left:var(--amara-space-2);
  background:var(--amara-clinical-success-soft);
}
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-sequence{
  display:grid;
  min-width:0;
  gap:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-item{
  min-width:0;
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-condition{
  margin-bottom:var(--amara-space-1);
  color:var(--amara-clinical-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-note,
[data-theme="amara-refresh"] body.amara-acute .infection-criterion-note{
  margin-top:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .infection-regimen-operator{
  width:fit-content;
  padding:0 var(--amara-space-1);
  border:0;
  border-radius:var(--amara-radius-sm);
  color:var(--amara-clinical-action-strong);
  background:var(--amara-clinical-action-soft);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-bold);
  letter-spacing:var(--amara-track-data);
}
[data-theme="amara-refresh"] body.amara-acute .infection-medicine-link{
  display:inline-flex;
  max-width:100%;
  align-items:center;
  color:var(--amara-clinical-action-strong);
  overflow-wrap:anywhere;
  text-underline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .infection-source-stamp{
  display:inline-flex;
  max-width:var(--amara-measure);
  align-items:center;
  gap:var(--amara-space-1);
  width:fit-content;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
  text-decoration:underline;
  text-underline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .infection-stale-banner,
[data-theme="amara-refresh"] body.amara-acute .infection-pending,
[data-theme="amara-refresh"] body.amara-acute .infection-verify-caveat,
[data-theme="amara-refresh"] body.amara-acute .infection-treatment-gate{
  padding:var(--amara-space-2) var(--amara-space-3);
  border:0;
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-warning-soft);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-pending{
  border-left-color:var(--amara-clinical-line-strong);
  background:var(--amara-clinical-subtle);
}
[data-theme="amara-refresh"] body.amara-acute .infection-stale-banner{
  color:var(--amara-clinical-ink);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .infection-verify-caveat{
  max-width:var(--amara-measure);
}
[data-theme="amara-refresh"] body.amara-acute .infection-spaced{
  margin-top:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .infection-support-block{
  display:grid;
  gap:var(--amara-space-2);
  margin-top:var(--amara-space-2);
  padding:var(--amara-space-3);
  border:0;
  border-radius:var(--amara-radius-sm);
  background:var(--amara-clinical-subtle);
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .infection-support-block-title{
  color:var(--amara-clinical-ink);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .infection-support-block .combo-wu-list,
[data-theme="amara-refresh"] body.amara-acute .infection-support-block .combo-wu-item{
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-sm);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .infection-support-block .abx-policy-badge{
  box-sizing:border-box;
  min-height:var(--amara-control-height);
  max-width:100%;
  display:inline-flex;
  align-items:center;
  padding:var(--amara-space-1) var(--amara-space-2);
  border-radius:var(--amara-radius-sm);
  color:var(--amara-clinical-action-strong);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-tight);
  white-space:normal;
  overflow-wrap:anywhere;
}
[data-theme="amara-refresh"] body.amara-acute .infection-band-notes,
[data-theme="amara-refresh"] body.amara-acute .infection-source-safety-list{
  margin:0;
  padding-left:var(--amara-space-5);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-reference-card{
  padding:var(--amara-space-3);
}
[data-theme="amara-refresh"] body.amara-acute .infection-presentation-reference-title{
  margin:0 0 var(--amara-space-2);
  color:var(--amara-clinical-ink);
  font-size:var(--amara-type-md);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .connected-clinical-view-tags{
  display:flex;
  flex-wrap:wrap;
  gap:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .connected-infection-presentation-link{
  min-height:var(--amara-touch-target);
  max-width:100%;
  padding:var(--amara-space-1) var(--amara-space-2);
  font-size:var(--amara-type-xs);
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:left;
}

/* Narrow phones and short landscape viewports keep the same hierarchy with
   a single column and ward-safe touch targets. */
@media(max-width:700px), (max-height:700px){
  [data-theme="amara-refresh"] body.amara-acute .infection-presentations-section-toggle{
    margin-top:var(--amara-space-4);
    font-size:var(--amara-type-sm);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentations-section-hint{
    max-width:40%;
    text-align:right;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy{
    grid-template-columns:minmax(0,1fr);
    gap:var(--amara-space-1);
    margin-bottom:var(--amara-space-2);
    padding:var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy small{
    grid-column:auto;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-policy-note{
    display:none;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-policy-note--trust-isolation{
    display:block;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-card + .infection-presentation-card{
    margin-top:var(--amara-space-1);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-toggle{
    min-height:var(--amara-touch-target);
    grid-template-columns:minmax(0,1fr) auto;
    gap:var(--amara-space-2);
    padding:var(--amara-space-2) var(--amara-space-3);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-summary{
    grid-template-columns:auto minmax(0,1fr);
    gap:var(--amara-space-1) var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-heading{
    font-size:var(--amara-type-sm);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-card-meta{
    grid-column:2;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:var(--amara-space-1) var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-signal-context{
    grid-column:2;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-presentation-detail{
    gap:var(--amara-space-2);
    padding:var(--amara-space-2) var(--amara-space-3) var(--amara-space-3);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-timing,
  [data-theme="amara-refresh"] body.amara-acute .infection-guideline-band-header,
  [data-theme="amara-refresh"] body.amara-acute .infection-guideline-ladder,
  [data-theme="amara-refresh"] body.amara-acute .infection-regimen-row{
    grid-template-columns:minmax(0,1fr);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-guideline-band-header{
    display:grid;
    align-items:start;
    gap:var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-band-select{
    width:100%;
    min-height:var(--amara-touch-target) !important;
    white-space:normal;
    text-align:left;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-guideline-section > summary{
    min-height:var(--amara-touch-target);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-guideline-body{
    grid-template-columns:minmax(0,1fr);
    gap:var(--amara-space-2);
    padding:var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-regimen-row > .infection-criterion-status{
    justify-self:start;
  }
  [data-theme="amara-refresh"] body.amara-acute :is(a,button).infection-criterion-status,
  [data-theme="amara-refresh"] body.amara-acute :is(a,button).infection-source-stamp,
  [data-theme="amara-refresh"] body.amara-acute .infection-medicine-link,
  [data-theme="amara-refresh"] body.amara-acute .infection-presentations-policy a,
  [data-theme="amara-refresh"] body.amara-acute .infection-linked-presentation-action{
    min-height:var(--amara-touch-target);
    display:inline-flex;
    align-items:center;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-source-stamp{
    width:auto;
  }
  [data-theme="amara-refresh"] body.amara-acute .infection-support-block .abx-policy-badge{
    min-height:var(--amara-touch-target);
  }
}

/* ─── Pattern Alerts — glance / drill-down split ──────────────────────── */
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-header{
  display:flex;
  align-items:baseline;
  gap:var(--amara-space-2);
  margin:var(--amara-space-5) 0 var(--amara-space-1);
  color:var(--amara-clinical-ink);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-header .ddx-arrow{
  margin:0;
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-title{
  min-width:0;
  flex:1;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-meta,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-disclaimer{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  letter-spacing:0;
  line-height:var(--amara-line-copy);
  text-transform:none;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-disclaimer{
  margin:0 0 var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-list{
  display:grid;
  gap:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card{
  --pattern-alert-signal:var(--org);
  position:relative;
  overflow:hidden;
  border:var(--amara-border-thin) solid var(--amara-clinical-line);
  border-radius:var(--amara-radius-lg);
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-ink);
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card[data-severity-tier="danger"]{
  --pattern-alert-signal:var(--amara-clinical-danger);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card[data-severity-tier="warning"]{
  --pattern-alert-signal:var(--org);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-severity-bar{
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  width:var(--amara-border-signal);
  background:var(--pattern-alert-signal);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-toggle{
  appearance:none;
  display:grid;
  gap:var(--amara-space-1);
  width:100%;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-3) var(--amara-space-3) var(--amara-space-3) var(--amara-space-4);
  border:0;
  background:transparent;
  color:inherit;
  font-family:var(--amara-clinical-font);
  text-align:start;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-toggle:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-section-header:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:calc(var(--amara-space-1) * -1);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-line-one{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:baseline;
  gap:var(--amara-space-2);
  min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-severity-glyph{
  color:var(--pattern-alert-signal);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-bold);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-name{
  min-width:0;
  overflow:hidden;
  color:inherit;
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-overflow:ellipsis;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-fraction{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  font-variant-numeric:tabular-nums;
  line-height:var(--amara-line-tight);
  text-align:end;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-chevron{
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-tight);
  transform:rotate(0);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-chevron.open{
  transform:rotate(90deg);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-evidence-line{
  min-width:0;
  overflow:hidden;
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-regular);
  line-height:var(--amara-line-tight);
  text-overflow:ellipsis;
  white-space:nowrap;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-expanded{
  display:grid;
  gap:var(--amara-space-3);
  padding:0 var(--amara-space-3) var(--amara-space-3) var(--amara-space-4);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-against{
  appearance:none;
  width:100%;
  min-height:var(--amara-control-height);
  padding:var(--amara-space-2) var(--amara-space-3);
  border:0;
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-copy);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
  text-align:start;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-against strong{
  color:var(--amara-clinical-ink);
  font-weight:var(--amara-weight-semibold);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card .pattern-next-action-link{
  appearance:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--amara-space-2);
  width:100%;
  min-height:var(--amara-touch-target);
  margin:0;
  padding:var(--amara-space-2) var(--amara-space-3);
  border:var(--amara-border-thin) solid var(--amara-clinical-action-strong);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-action);
  color:var(--amara-clinical-surface);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-sm);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
  text-align:start;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card .pattern-next-action-link:hover,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card .pattern-next-action-link:focus-visible{
  background:var(--amara-clinical-action-strong);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-tertiary{
  display:flex;
  align-items:center;
  gap:var(--amara-space-3);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-tertiary-link{
  appearance:none;
  display:inline-flex;
  align-items:center;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-1) 0;
  border:0;
  background:transparent;
  color:var(--amara-clinical-action);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  text-decoration:underline;
  text-underline-offset:var(--amara-space-1);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-against:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-tertiary-link:focus-visible,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-restore:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown{
  padding:0 var(--amara-space-3) var(--amara-space-3) var(--amara-space-4);
  color:var(--amara-clinical-copy);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-panel{
  border-color:var(--amara-clinical-border);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-surface);
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-panel-header{
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-2) var(--amara-space-3);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-panel-title,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-dynamic-label{
  color:var(--amara-clinical-ink);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-panel-count,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-criterion-summary{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-criteria-list{
  border-color:var(--amara-clinical-border);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-item.dynamic{
  border-color:var(--amara-clinical-border);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-criterion-toggle{
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-2) var(--amara-space-3);
}
/* Explicit slots keep enhanced chevrons, state and clinical text aligned. */
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle{
  grid-template-columns:18px 18px minmax(0,1fr) auto;
  gap:8px;
  align-items:start;
  text-align:left;
}
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle > :is([data-ui-chevron],.ro-criterion-chevron){grid-column:1;grid-row:1;margin-top:3px;}
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle > .ro-state-icon{grid-column:2;grid-row:1;margin-top:3px;}
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle > .ro-dynamic-main{grid-column:3;grid-row:1;justify-self:stretch;text-align:left;gap:4px;}
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle > .ro-state-badge{grid-column:4;grid-row:1;justify-self:start;max-width:100%;white-space:normal;}
[data-theme="amara-refresh"] body.amara-acute .ro-dynamic-label{font-size:16px;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .ro-criterion-summary{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .ro-panel-heading{flex-wrap:wrap;}
[data-theme="amara-refresh"] body.amara-acute .ro-state-control{min-width:0;}
@media(max-width:640px){
  [data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle{grid-template-columns:18px 18px minmax(0,1fr);}
  [data-theme="amara-refresh"] body.amara-acute .ro-criterion-toggle > .ro-state-badge{grid-column:3;grid-row:2;}
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-criterion-detail{margin-left:12px;margin-right:12px;padding:10px;}
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-state-badge{
  font-family:var(--amara-data-font);
  font-size:11px;
  text-transform:none;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-criterion-detail{
  margin:0 var(--amara-space-3) var(--amara-space-2) 38px;
  padding:var(--amara-space-2) var(--amara-space-3);
  border-color:var(--amara-clinical-border);
  background:var(--amara-clinical-subtle);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown :is(.ro-clinical-detail,.ro-evidence,.ro-next,.ro-source-links,.ro-state-control label,.ro-state-select,.ro-panel-note,.ro-guidance-disclosure>summary,.ro-source-disclosure>summary,.ro-undo-btn){
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown .ro-panel-note{
  border-color:var(--amara-clinical-border);
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown :is(.ro-guidance-disclosure>summary,.ro-source-disclosure>summary,.ro-undo-btn){
  color:var(--amara-clinical-action);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-fallback{
  border-left:var(--amara-border-signal) solid var(--amara-clinical-warning);
  background:var(--amara-clinical-warning-soft);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card[data-pattern-state="excluded"]{
  background:var(--amara-clinical-subtle);
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-card[data-pattern-state="excluded"] :is(.pattern-alert-severity-glyph,.pattern-alert-name){
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-excluded-zone{
  display:grid;
  gap:var(--amara-space-2);
  margin-block-start:var(--amara-space-4);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-excluded-toggle{
  appearance:none;
  min-height:var(--amara-touch-target);
  padding:var(--amara-space-2) 0;
  border:0;
  background:transparent;
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  text-align:start;
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-excluded-list{
  display:grid;
  gap:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-excluded-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-restore{
  appearance:none;
  min-height:var(--amara-control-height);
  padding:var(--amara-space-1) var(--amara-space-2);
  border:var(--amara-border-thin) solid var(--amara-clinical-line-strong);
  border-radius:var(--amara-radius-md);
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-meta);
  font-family:var(--amara-clinical-font);
  font-size:var(--amara-type-xs);
  font-weight:var(--amara-weight-medium);
  line-height:var(--amara-line-tight);
  cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-reference-meta,
[data-theme="amara-refresh"] body.amara-acute .connected-clinical-view-tags{
  display:flex;
  flex-wrap:wrap;
  gap:var(--amara-space-2);
  margin-top:var(--amara-space-2);
  color:var(--amara-clinical-meta);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-reference-meta span + span::before,
[data-theme="amara-refresh"] body.amara-acute .connected-clinical-view-tag + .connected-clinical-view-tag::before{
  content:'·';
  margin-inline-end:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-rule-summary{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .searched-pattern-reference-section,
[data-theme="amara-refresh"] body.amara-acute .searched-pattern-reference-section *{
  font-size:var(--amara-type-xs) !important;
}
[data-theme="amara-refresh"] body.amara-acute .searched-pattern-reference-section .pan-hdr,
[data-theme="amara-refresh"] body.amara-acute .searched-pattern-reference-card strong{
  font-size:var(--amara-type-sm) !important;
}
[data-theme="amara-refresh"] body.amara-acute .searched-pattern-reference-section .ddx-arrow{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-size:var(--amara-type-xs) !important;
}

[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog{
  display:flex;
  flex-direction:column;
  width:calc(100% - var(--amara-space-6));
  max-width:var(--amara-measure);
  max-height:calc(100dvh - var(--amara-space-6));
  overflow:hidden;
  border-radius:var(--amara-radius-lg);
  background:var(--amara-clinical-surface);
  color:var(--amara-clinical-ink);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog *{
  font-size:var(--amara-type-xs) !important;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog:focus-visible{
  outline:var(--amara-focus-ring) solid var(--amara-clinical-action);
  outline-offset:0;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-header{
  padding:var(--amara-space-3) var(--amara-space-4);
  border-bottom:var(--amara-border-thin) solid var(--amara-clinical-line);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-header .mgmt-modal-title,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-zone-title{
  color:var(--amara-clinical-ink);
  font-size:var(--amara-type-sm) !important;
  font-weight:var(--amara-weight-semibold);
  line-height:var(--amara-line-tight);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog .pattern-criteria-dialog-intro{
  padding:var(--amara-space-3) var(--amara-space-4) 0;
  color:var(--amara-clinical-meta);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-body,
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-content{
  display:grid;
  gap:var(--amara-space-4);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-body{
  min-height:0;
  overflow-y:auto;
  padding:var(--amara-space-3) var(--amara-space-4) var(--amara-space-4);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-zone{
  display:grid;
  gap:var(--amara-space-2);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-zone :is(h3,p,dl,dt,dd){
  margin:0;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-data{
  display:grid;
  gap:var(--amara-space-1);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-data > div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:baseline;
  gap:var(--amara-space-3);
  padding:var(--amara-space-1) 0;
  border-bottom:var(--amara-border-thin) solid var(--amara-clinical-line);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-data dt{
  color:var(--amara-clinical-meta);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-data dd{
  color:var(--amara-clinical-ink);
  font-family:var(--amara-data-font);
  font-variant-numeric:tabular-nums;
  text-align:end;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-detail-reason-step{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:var(--amara-space-2);
  color:var(--amara-clinical-copy);
  line-height:var(--amara-line-copy);
}
[data-theme="amara-refresh"] body.amara-acute .pattern-detail-reason-number{
  color:var(--amara-clinical-meta);
  font-family:var(--amara-data-font);
  font-variant-numeric:tabular-nums;
}
[data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog :is(.searched-pattern-criteria,.searched-pattern-criteria-head,.searched-pattern-criterion-group,.acute-evidence-panel,.pattern-trust-guidance){
  border-radius:var(--amara-radius-md);
}

@media(max-width:700px), (max-height:700px){
  [data-theme="amara-refresh"] body.amara-acute .na-origin-shortcut{
    min-height:var(--amara-touch-target);
    margin-top:0;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-tool-link{
    grid-template-columns:minmax(0,1fr) auto;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-tool-kind,
  [data-theme="amara-refresh"] body.amara-acute .na-tool-title{
    grid-column:1;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-tool-open-label{
    grid-column:2;
    grid-row:1 / span 2;
    align-self:center;
  }
  [data-theme="amara-refresh"] body.amara-acute .na-tool-note{
    grid-column:1 / -1;
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-toggle{
    padding:var(--amara-space-2) var(--amara-space-2) var(--amara-space-2) var(--amara-space-3);
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-expanded,
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-ruleout-drilldown{
    padding-inline:var(--amara-space-3) var(--amara-space-2);
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-card .pattern-next-action-link{
    align-items:flex-start;
    flex-direction:column;
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-excluded-row{
    grid-template-columns:minmax(0,1fr);
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-restore{
    justify-self:start;
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-dialog{
    width:calc(100% - var(--amara-space-4));
    max-height:calc(100dvh - var(--amara-space-4));
  }
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-header,
  [data-theme="amara-refresh"] body.amara-acute .pattern-alert-details-body{
    padding-inline:var(--amara-space-3);
  }
}

/* Keep electrolyte tools with their condition and wrap complete clinical copy. */
.na-electrolyte-guidelines { margin: 12px 0 18px; padding: 12px; border: 1px solid var(--brd); border-radius: 10px; }
.na-electrolyte-guidelines > strong { display: block; margin-bottom: 8px; }
.na-electrolyte-guidelines .na-origin-shortcut { white-space: normal; overflow-wrap: anywhere; }
.na-guideline-context, .na-discovered-references { font-size: 0.8rem; line-height: 1.5; }
.na-guideline-context { display: block; margin-top: 8px; color: var(--dim); }
.na-discovered-references { margin-top: 8px; overflow-wrap: anywhere; }
.na-discovered-references summary { cursor: pointer; }
.na-discovered-references li { margin: 8px 0; }

/* Rows have different affordances; references must never size the auto evidence column. */
[data-theme="amara-refresh"] body.amara-acute .na-action-row > .na-discovered-references { grid-column: 1 / -1; min-width: 0; margin: 0 8px 10px; }

.na-management-availability { margin: 12px 0; padding: 12px; border-left: 3px solid var(--org); background: var(--s2); line-height: 1.5; }
.na-management-availability p { margin: 6px 0; }
/* Keep source destinations readable alongside continuing protocol branches. */
.proto-step-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.proto-step-sources .a-btn {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

/* Pattern search: keep every authored clinical/laboratory reference accessible. */
.searched-ddx-reference-safety{margin:4px 0 10px;padding:8px 10px;line-height:1.5;}
.pattern-linked-finding-heading{font-weight:700;color:var(--acc);margin:14px 0 8px;font-size:.66rem;}
.pattern-linked-finding-group .working-impression-detail-card-toggle{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;white-space:normal;text-align:left;}
.pattern-linked-finding-group .working-impression-detail-card-toggle .tag{max-width:100%;white-space:normal;overflow-wrap:break-word;}
.pattern-linked-role{font-size:.46rem;color:var(--dim);font-weight:500;}
.pattern-linked-criteria-context{display:grid;gap:5px;margin:8px 0;line-height:1.5;}
.pattern-linked-detail-link{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:break-word;text-align:left;margin:6px 0;}

/* Shared natural-height disclosures; content remains mounted during transitions. */
[data-theme="amara-refresh"] [data-ui-disclosure]{min-height:48px;cursor:pointer;}
[data-theme="amara-refresh"] button[data-ui-disclosure]{font:inherit;text-align:left;color:inherit;}
[data-theme="amara-refresh"] button.sh[data-ui-disclosure]{width:100%;border:0;background:transparent;color:var(--amara-clinical-action);}
[data-theme="amara-refresh"] [data-ui-chevron]{display:inline-block;vertical-align:middle;margin-right:8px;transform-origin:center;}
[data-theme="amara-refresh"] [data-ui-collapse]{min-width:0;}
[data-theme="amara-refresh"] details[data-ui-native] > summary{list-style:none;cursor:pointer;}
[data-theme="amara-refresh"] details[data-ui-native] > summary::-webkit-details-marker{display:none;}
[data-theme="amara-refresh"] details[data-ui-native] > summary::before,
[data-theme="amara-refresh"] details[data-ui-native] > summary::after{content:none;}
[data-theme="amara-refresh"] details[data-ui-native] > summary > button{width:100%;padding:6px 0;border:0;background:transparent;color:inherit;font:inherit;display:flex;align-items:center;gap:4px;}
[data-theme="amara-refresh"] body.amara-acute .na-sh{display:flex;align-items:center;gap:8px;}
[data-theme="amara-refresh"] body.amara-acute .na-sh .na-count-pill{margin-left:auto;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-group,
[data-theme="amara-refresh"] body.amara-acute .na-pathology-group.is-open{margin-bottom:8px;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-panel{border-top:0;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-count{display:flex;align-items:center;gap:8px;white-space:normal;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-meta{padding:0 12px 8px;text-align:left;}
[data-theme="amara-refresh"] .na-count-pill{display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:4px 8px;border-radius:20px;background:var(--sf2);color:var(--dim);font:12px/1.5 var(--amara-data-font);white-space:nowrap;transition:all .2s;}
[data-theme="amara-refresh"] .na-count-pill.has-completed{background:var(--na-accent-tint);color:var(--na-accent);}
[data-theme="amara-refresh"]{--na-accent:#076b53;--na-accent-tint:#e0f3eb;--na-row:#f9fafb;--na-border:#c9d5d1;}
[data-theme="amara-refresh"] body.amara-acute .na-action-row{min-height:52px;border:1px solid var(--na-border);border-radius:4px;background:var(--na-row);margin:4px 0;transition:background-color .16s,border-color .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-text{font-weight:500;}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done{background:var(--na-accent-tint);border-color:var(--na-accent);}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done .na-action-text,
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-done .na-action-clinical-text{color:var(--na-accent);font-weight:600;text-decoration:none;opacity:1;}
[data-theme="amara-refresh"] body.amara-acute .na-action-check{min-width:48px;min-height:52px;padding:13px;color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .na-action-check .na-action-affordance{width:22px;height:22px;overflow:visible;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-check rect{fill:transparent;stroke:var(--dim);stroke-width:1px;rx:3px;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-check path{stroke:#001a12;opacity:0;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-check[aria-checked="true"] rect{fill:var(--na-accent);stroke:var(--na-accent);}
[data-theme="amara-refresh"] body.amara-acute .na-action-check[aria-checked="true"] path{opacity:1;}
:root[data-theme="amara-refresh"]:not(.light),
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute{
  --bg:#000;--sf:#0b0b0b;--sf2:#0b0b0b;--sf3:#0b0b0b;--tx:#f5f5f5;--dim:#bfbfbf;--fnt:#b3b3b3;--bd:#333;--bd2:#555;
  --amara-clinical-ink:#f5f5f5;--amara-clinical-copy:#bfbfbf;--amara-clinical-meta:#b3b3b3;
  --amara-clinical-surface:#0b0b0b;--amara-clinical-subtle:#0b0b0b;--amara-clinical-line:#333;--amara-clinical-line-strong:#555;
  --amara-clinical-action:#8df0d4;--amara-clinical-action-strong:#8df0d4;
  --na-accent:#8df0d4;--na-accent-tint:#10221d;--na-row:#0b0b0b;--na-border:#333;
  background:#000;
}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute{background:#000;background-image:none;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.a-card,.working-impression-panel,.working-impression-head,.acute-findings-section,.acute-search-shell,.pc-stack,.search-shell-stack,.na-section,.na-pathology-group,.na-pathology-toggle,.mgmt-box,.help-box){background:#0b0b0b;background-image:none;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.hdr,.app-header){background:#0b0b0b;background-image:none;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute .na-action-check[aria-checked="true"] path{stroke:#001a12;}
:root[data-theme="amara-refresh"].light body.amara-acute .na-action-check[aria-checked="true"] path{stroke:#fff;}
@media(max-width:600px){
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle{grid-template-columns:18px minmax(0,1fr) auto;}
  [data-theme="amara-refresh"] body.amara-acute .na-pathology-count{flex-wrap:wrap;justify-content:flex-end;max-width:100px;}
}
@media(prefers-reduced-motion:reduce){
  [data-theme="amara-refresh"] [data-ui-collapse],
  [data-theme="amara-refresh"] [data-ui-chevron],
  [data-theme="amara-refresh"] :is(.na-count-pill,.na-action-row,.na-action-affordance,.na-action-check rect,.na-action-check path){transition:none!important;animation:none!important;}
  html{scroll-behavior:auto!important;}
}
@media print{
  [data-theme="amara-refresh"] [data-ui-collapse]{grid-template-rows:1fr!important;opacity:1!important;transition:none!important;}
}
[data-theme="amara-refresh"] [data-ui-inner] > .inf-group-body{max-height:none;overflow:visible;transition:none;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-count{grid-column:3;grid-row:1;justify-self:end;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-meta:empty{display:none;}
[data-theme="amara-refresh"] body.amara-acute .na-pathology-toggle{min-height:48px;align-items:center;grid-template-rows:auto;}
/* Floating menus are overlays, so use a discrete display fade rather than moving document content. */
[data-theme="amara-refresh"] .acute-popover{opacity:1;transition:opacity .22s ease,display .22s allow-discrete;}
[data-theme="amara-refresh"] .acute-popover[hidden]{opacity:0;}
@starting-style{[data-theme="amara-refresh"] .acute-popover:not([hidden]){opacity:0;}}
@media(prefers-reduced-motion:reduce){[data-theme="amara-refresh"] .acute-popover{transition:none!important;}}
[data-theme="amara-refresh"] .na-review-legend{margin:0;padding:0 12px 12px;font-size:13px;line-height:1.5;color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check{min-width:48px;min-height:52px;padding:13px;color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check .na-action-affordance{width:22px;height:22px;overflow:visible;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check rect{fill:transparent;stroke:var(--dim);stroke-width:1px;rx:3px;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check path{stroke:#001a12;opacity:0;transition:all .16s;}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check[aria-checked="true"] rect{fill:var(--na-accent);stroke:var(--na-accent);}
[data-theme="amara-refresh"] body.amara-acute .na-action-review-check[aria-checked="true"] path{opacity:1;}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reviewed{background:var(--na-accent-tint);border-color:var(--na-accent);}
[data-theme="amara-refresh"] body.amara-acute .na-action-row.is-reviewed :is(.na-action-text,.na-action-clinical-text){color:var(--na-accent);font-weight:600;text-decoration:none;opacity:1;}
:root[data-theme="amara-refresh"].light body.amara-acute .na-action-review-check[aria-checked="true"] path{stroke:#fff;}
@media(prefers-reduced-motion:reduce){[data-theme="amara-refresh"] .na-action-review-check :is(rect,path){transition:none!important;}}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.top-wrap,.top,.na-purpose-heading,.na-action-condition){background:#0b0b0b;background-image:none;}

/* One shared heading layout for CliniSense and LabSense selectors. */
[data-theme="amara-refresh"] body.amara-acute button.finding-panel-header{
  display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:10px;
  width:100%;min-width:0;min-height:48px;margin:2px 0;padding:10px 8px;
  border:0;border-radius:4px;background:transparent;color:var(--amara-clinical-action);
  font:600 15px/1.4 var(--amara-clinical-font);letter-spacing:.01em;text-transform:none;text-align:left;
}
[data-theme="amara-refresh"] .finding-panel-header > [data-ui-chevron]{grid-column:1;grid-row:1;margin:0;width:18px;height:18px;}
[data-theme="amara-refresh"] .finding-panel-label{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left;}
[data-theme="amara-refresh"] .finding-panel-icon{flex:0 0 auto;font-size:16px;}
[data-theme="amara-refresh"] .finding-panel-count{grid-column:3;grid-row:1;justify-self:end;min-width:26px;padding:2px 6px;border-radius:20px;background:var(--na-accent-tint);color:var(--na-accent);font:12px/1.5 var(--amara-data-font);text-align:center;}
[data-theme="amara-refresh"] body.amara-acute .finding-panel-header:hover{background:var(--sf2);}
[data-theme="amara-refresh"] body.amara-acute .finding-panel-header:focus-visible{outline:2px solid var(--amara-clinical-action);outline-offset:1px;}

/* Dark-mode text tokens and selected controls must work on dark surfaces. */
:root[data-theme="amara-refresh"]:not(.light),
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute{
  --acc:#a3c4ff;--hi:#ff9696;--crit:#ff9696;--red:#ff9696;--lo:#9bc8ff;
  --grn:#8df0d4;--org:#ffd18a;--ylw:#ffe08a;
  --amara-clinical-danger:#ff9696;--amara-clinical-warning:#ffd18a;--amara-clinical-success:#8df0d4;
}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.pan-hdr,.acute-lane-title,.acute-findings-chevron,.working-news strong){color:#8df0d4;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.lb,.ctx-btn,.trust-btn,.allergy-btn){color:#ededed;box-shadow:none;background:#0b0b0b;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.lb.on,.ctx-btn.sel,.trust-btn.sel,.allergy-btn.active,.allergy-btn[aria-pressed="true"],.pc-chip.active,.pc-chronic-toggle.active,.sel-chip.sym,.sel-chip.lab,.sel-chip.complaint,.acute-menu-item.active,.search-shell-chip.active){color:#8df0d4;border-color:#63bea6;background:#10221d;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.lb.hi.on,.lb.crit.on,.tag-hi,.tag-crit,.sum-hi,.sum-crit){color:#ff9696;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.lb.lo.on,.tag-lo,.sum-lo){color:#9bc8ff;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.lb.pos.on,.tag-act,.sum-ok){color:#8df0d4;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute .sel-chip.patient{color:#ffb4d1;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute .sel-chip.trust{color:#8df0d4;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.patient-factor-remove:hover,.acute-menu-item.active .acute-menu-check){color:#fff;}

/* Converted legacy headers keep the original flat disclosure appearance. */
[data-theme="amara-refresh"] button[data-ui-converted]{appearance:none;border:0;background:transparent;border-radius:0;box-shadow:none;padding:6px 0;}
[data-theme="amara-refresh"] button[data-ui-converted]:focus-visible{outline:2px solid var(--amara-clinical-action);outline-offset:2px;}
[data-theme="amara-refresh"] body.amara-acute button.ddx-row{display:block;width:100%;min-width:0;min-height:48px;text-align:left;font-family:var(--amara-clinical-font);font-size:16px;font-weight:400;line-height:1.5;color:var(--tx);white-space:normal;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] .ddx-context-note{margin:2px 0 8px;padding:0 8px;font-size:14px;line-height:1.5;color:var(--dim);overflow-wrap:anywhere;}
[data-theme="amara-refresh"] .searched-pattern-reference-card button[data-ui-converted]{font-family:var(--amara-clinical-font);line-height:1.4;}
[data-theme="amara-refresh"] [data-ui-inner] > .ddx-detail{display:block;}
/* Bright controls in dark mode need dark ink, including their icons. */
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.rc-cue,.rc-jump-btn){background:#8df0d4;color:#001a12;border-color:#8df0d4;box-shadow:none;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.rc-cue,.rc-jump-btn):hover{background:#b5f7e4;color:#001a12;border-color:#b5f7e4;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute :is(.rc-cue-arrow,.rc-cue-label,.rc-jump-label){color:inherit;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute .rc-cue-dot{background:#001a12;}

/* Next Actions: instruction first; one compact state and source area below it. */
[data-theme="amara-refresh"] body.amara-acute :is(#sec-next-actions,.na-section) .na-action-row{
  grid-template-columns:48px minmax(0,1fr);gap:0 4px;padding:10px 12px 10px 0;align-items:start;
}
[data-theme="amara-refresh"] body.amara-acute :is(#sec-next-actions,.na-section) .na-action-row > .na-action-control{
  grid-column:1;grid-row:1;min-height:48px;margin-top:-10px;
}
[data-theme="amara-refresh"] body.amara-acute :is(#sec-next-actions,.na-section) .na-action-row > .na-action-copy{
  grid-column:2;grid-row:1;width:auto;min-width:0;padding:0;
}
[data-theme="amara-refresh"] body.amara-acute :is(#sec-next-actions,.na-section) .na-action-row > .na-action-provenance{
  grid-column:2;grid-row:2;justify-self:stretch;min-width:0;max-width:100%;margin-top:4px;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-text{
  font-size:16px;font-weight:600;line-height:1.5;
}
[data-theme="amara-refresh"] body.amara-acute .na-provenance-heading{
  display:flex;flex-wrap:wrap;align-items:center;gap:0 12px;min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-provenance-heading :is(.na-reference-badge,.na-review-label,.na-action-status-marker){
  display:inline;align-self:auto;width:auto;min-width:0;max-width:100%;min-height:0;
  margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--dim);
  font:500 12px/1.5 var(--amara-clinical-font);white-space:normal;text-align:left;
}
[data-theme="amara-refresh"] body.amara-acute .na-provenance-heading .na-action-origin-details{
  flex-basis:100%;min-width:0;
}
[data-theme="amara-refresh"] body.amara-acute .na-provenance-heading .na-row-provenance{
  min-height:44px;padding:0;gap:6px;border:0;border-radius:0;background:transparent;
  font:600 13px/1.5 var(--amara-clinical-font);white-space:normal;overflow:visible;
  text-decoration:underline;text-underline-offset:3px;
}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance .na-discovered-references{
  min-width:0;margin:0;padding:0;color:var(--dim);font:400 13px/1.5 var(--amara-clinical-font);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance .na-discovered-references > summary,
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance .na-discovered-references > summary > button{
  min-height:44px;white-space:normal;color:var(--amara-clinical-action-strong);
  font:600 13px/1.5 var(--amara-clinical-font);
}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance .na-discovered-references :is(p,ul){margin-block:6px;}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance .na-discovered-references ul{padding-inline-start:18px;}

:root[data-theme="amara-refresh"].light body.amara-acute .na-provenance-heading .na-row-provenance.gap{color:#805500;}

/* Inapplicable actions share the existing disclosure rhythm; branch controls remain reachable. */
[data-theme="amara-refresh"] body.amara-acute .na-unmet-toggle{
  display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:4px 0;
  border:0;background:transparent;color:var(--amara-clinical-ink);text-align:left;
  font:600 15px/1.4 var(--amara-clinical-font);cursor:pointer;
}
[data-theme="amara-refresh"] body.amara-acute .na-unmet-toggle[hidden]{display:none;}
[data-theme="amara-refresh"] body.amara-acute .na-unmet-toggle [data-ui-chevron]{color:var(--amara-clinical-action);}
[data-theme="amara-refresh"] body.amara-acute .na-unmet-status{display:block;color:var(--dim);font-size:13px;font-weight:400;}
[data-theme="amara-refresh"] body.amara-acute .na-unmet-toggle:focus-visible{outline:2px solid var(--amara-clinical-action);outline-offset:3px;}
[data-theme="amara-refresh"] body.amara-acute .na-criterion-body{display:grid;min-width:0;transition:grid-template-rows .32s cubic-bezier(.4,0,.2,1),opacity .22s ease;}
[data-theme="amara-refresh"] body.amara-acute .na-criterion-body > [data-ui-inner]{min-height:0;min-width:0;overflow:hidden;}
[data-theme="amara-refresh"] body.amara-acute .na-action-provenance[hidden]{display:none;}
@media print{
  [data-theme="amara-refresh"] body.amara-acute .na-action-provenance[hidden]{display:block;}
}

/* Clinical detail uses the same typography and disclosure rhythm in every specialty. */
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id]{
  min-width:0;
  padding:12px;
  box-shadow:none;
}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id][data-clinical-result-type="chronic-context"]{border-left-color:var(--amara-clinical-action)!important;}
[data-theme="amara-refresh"] body.amara-acute .working-impression-detail-card-toggle{
  display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:52px;
  padding:8px 0;border:0;background:transparent;text-align:left;
  color:var(--amara-clinical-ink)!important;font-family:var(--amara-clinical-font);
}
[data-theme="amara-refresh"] body.amara-acute .working-impression-detail-card-toggle > [data-ui-chevron]{margin:0;flex:none;color:var(--amara-clinical-action);}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-heading-copy{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:6px 10px;min-width:0;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-title{min-width:0;font-size:18px;font-weight:650;line-height:1.35;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-heading-copy .tag{margin:0;font-size:11px;line-height:1.4;white-space:normal;max-width:100%;}
[data-theme="amara-refresh"] body.amara-acute .working-impression-detail-card-body{min-width:0;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-compact-detail{gap:12px;margin:8px 0 0;min-width:0;}
[data-theme="amara-refresh"] body.amara-acute :is(.clinisense-compact-summary,.clinisense-point-list li){font:400 16px/1.5 var(--amara-clinical-font);color:var(--amara-clinical-ink);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-point-list{padding-left:20px;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-point-list li{margin-bottom:6px;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block{padding:8px 12px;border:0;border-left:3px solid var(--amara-clinical-action);border-radius:0;background:transparent;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.urgent{border-left-color:var(--red);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.avoid{border-left-color:var(--org);}
[data-theme="amara-refresh"] body.amara-acute :is(.clinisense-quick-title,.clinisense-detail-section-title){margin-bottom:6px;font:650 14px/1.4 var(--amara-clinical-font);letter-spacing:0;text-transform:none;color:var(--amara-clinical-ink);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.urgent .clinisense-quick-title{color:var(--red);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.avoid .clinisense-quick-title{color:var(--org);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure{margin:0;border:0;border-top:1px solid var(--amara-clinical-border);border-radius:0;background:transparent;min-width:0;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure > summary{min-width:0;padding:0;min-height:48px;color:var(--amara-clinical-action);font:600 16px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure > summary > button{min-width:0;min-height:48px;padding:12px 0;gap:10px;line-height:1.4;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure > summary > button [data-ui-chevron]{margin:0;flex:none;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure > summary:hover{background:transparent;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure > summary > button:focus-visible{outline:2px solid var(--amara-clinical-action);outline-offset:-2px;border-radius:4px;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-disclosure-body{min-width:0;gap:12px;padding:0 0 12px 0;border:0;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-detail-section{padding-top:4px;min-width:0;}
[data-theme="amara-refresh"] body.amara-acute :is(.clinisense-compact-detail,.clinisense-standard-finding) .res-row{font:400 16px/1.5 var(--amara-clinical-font);color:var(--amara-clinical-meta);overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .clinisense-standard-finding > .res-row{padding:8px 0!important;background:transparent!important;border-radius:0!important;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-actions-link{
  display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:52px;
  margin:0;padding:8px 0;border:0;border-radius:0;background:transparent;
  color:var(--amara-clinical-action);font-family:var(--amara-clinical-font);text-align:left;
}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-actions-link:hover{background:transparent;text-decoration:underline;text-underline-offset:3px;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-actions-copy{display:grid;gap:2px;flex:1;min-width:0;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-actions-title{font:600 16px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-actions-description{font:400 14px/1.4 var(--amara-clinical-font);color:var(--amara-clinical-meta);}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] :is(.ddx-row,.ddx-wit,.ddx-src){max-width:100%;min-width:0;overflow-wrap:anywhere;white-space:normal;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-row{font-family:var(--amara-clinical-font);font-size:16px;line-height:1.5;padding:10px 4px!important;text-align:left;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-detail{margin-left:0;margin-right:0;padding:8px;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] :is(.ddx-wit,.ddx-src){font-size:14px;line-height:1.5;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] :is(.ddx-cat,.mgmt-btn){font-size:14px;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .mgmt-btn{min-height:44px;max-width:100%;white-space:normal;}
@media(max-width:520px){
  [data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id]{padding:10px;}
  [data-theme="amara-refresh"] body.amara-acute .clinical-detail-heading-copy{display:grid;justify-items:start;gap:6px;}
  [data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block{padding:8px 10px;}
}
/* Specialty labels follow accessible clinical colours in both themes. */
[data-theme="amara-refresh"] body.amara-acute{--detail-urgent:#b4232f;--detail-caution:#805500;--detail-positive:#076b53;}
:root[data-theme="amara-refresh"]:not(.light) body.amara-acute{--detail-urgent:#ff9aa1;--detail-caution:#ffd28a;--detail-positive:#8df0d4;}
[data-theme="amara-refresh"] body.amara-acute .clinical-detail-heading-copy .tag{color:var(--amara-clinical-action);background:transparent;border-color:var(--amara-clinical-border);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.urgent{border-left-color:var(--detail-urgent);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.urgent .clinisense-quick-title{color:var(--detail-urgent);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.avoid{border-left-color:var(--detail-caution);}
[data-theme="amara-refresh"] body.amara-acute .clinisense-quick-block.avoid .clinisense-quick-title{color:var(--detail-caution);}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row{font:400 16px/1.5 var(--amara-clinical-font);overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .working-impression-detail-card-body > .res-row{padding:8px 0!important;background:transparent!important;border-radius:0!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row[style*="--red"]{color:var(--detail-urgent)!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row strong[style*="--grn"]{color:var(--detail-positive)!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row strong[style*="--ylw"]{color:var(--detail-caution)!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row strong:is([style*="#06b6d4"],[style*="#5b8af5"]){color:var(--amara-clinical-action)!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-row{font-weight:400;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .inf-time{font:600 12px/1.4 var(--amara-data-font);color:var(--amara-clinical-meta);background:transparent;white-space:normal;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .res-row > span:not(.tag){font-size:14px!important;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-cat{background:transparent;color:var(--amara-clinical-action);font:600 14px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-cat.rf{color:var(--detail-urgent);}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-wit{color:var(--amara-clinical-ink);background:transparent;}
[data-theme="amara-refresh"] body.amara-acute [data-clinical-detail-id] .ddx-src{color:var(--amara-clinical-meta);}

/* ABG results: clinical meaning and cause-to-investigation pairs stay readable on phones. */
[data-theme="amara-refresh"] .abg-clinical-review{margin:12px 0;padding:12px 0;border-top:1px solid var(--bd);font:400 15px/1.5 var(--amara-clinical-font);color:var(--tx);}
[data-theme="amara-refresh"] .abg-clinical-review h4{font-size:16px;color:var(--tx);}
[data-theme="amara-refresh"] .abg-clinical-review p{margin-top:8px;}
[data-theme="amara-refresh"] .abg-clinical-review[data-urgent="true"]{border-left:3px solid var(--red);padding-left:10px;}
[data-theme="amara-refresh"] .abg-cause-panel{border:0;border-top:1px solid var(--bd);border-radius:0;background:var(--sf);}
[data-theme="amara-refresh"] .abg-cause-panel>summary{min-height:48px;font:600 16px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] .abg-cause-panel .abg-cause-summary-copy{font-size:14px;color:var(--dim);}
[data-theme="amara-refresh"] .abg-cause-panel :is(.abg-cause-summary,.abg-cause-item,.abg-cause-caveat,.abg-cause-intro){font:400 15px/1.5 var(--amara-clinical-font);color:var(--dim);}
[data-theme="amara-refresh"] .abg-cause-intro{margin:8px 0;}
[data-theme="amara-refresh"] .abg-cause-panel .abg-cause-title{font:650 16px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] .abg-cause-differential{margin:10px 0;padding:8px 0;border-top:1px solid var(--bd);font:400 15px/1.5 var(--amara-clinical-font);color:var(--tx);overflow-wrap:anywhere;}
[data-theme="amara-refresh"] .abg-cause-differential p{margin:4px 0 0;color:var(--dim);}
[data-theme="amara-refresh"] .abg-cause-references{display:flex;flex-wrap:wrap;gap:0 14px;margin-top:8px;}
[data-theme="amara-refresh"] .abg-cause-references a{display:inline-flex;align-items:center;min-height:44px;max-width:100%;font:500 14px/1.45 var(--amara-clinical-font);color:var(--amara-clinical-action-strong);text-decoration:underline;overflow-wrap:anywhere;}
@media(max-width:520px){[data-theme="amara-refresh"] .abg-cause-list{padding-inline:4px;}[data-theme="amara-refresh"] .abg-cause-panel>summary{flex-wrap:wrap;}[data-theme="amara-refresh"] .abg-cause-panel .abg-cause-summary-copy{flex-basis:100%;margin-left:0;text-align:left;}}

[data-theme="amara-refresh"] .abg-cause-heading{display:grid;gap:4px;flex:1;min-width:0;text-align:left;}
[data-theme="amara-refresh"] .abg-cause-heading .abg-cause-summary-title{font:600 16px/1.4 var(--amara-clinical-font);white-space:normal;}
[data-theme="amara-refresh"] .abg-cause-heading .abg-cause-summary-copy{margin:0;text-align:left;font-weight:400;}

/* ABG validation belongs to its input, outside the narrow value column. */
[data-theme="amara-refresh"] .abg-input-feedback{min-width:0;max-width:100%;margin:0 12px 10px;padding:10px 12px;border-left:3px solid var(--amara-clinical-action);background:transparent;color:var(--tx);font:400 15px/1.5 var(--amara-clinical-font);overflow-wrap:anywhere;white-space:normal;}
[data-theme="amara-refresh"] .abg-input-feedback[data-state="withheld"]{border-left-color:var(--detail-caution,#b57700);}
[data-theme="amara-refresh"] .abg-input-feedback strong{display:block;font-weight:600;}
[data-theme="amara-refresh"] .abg-input-feedback p{margin:4px 0 0;color:var(--dim);}
[data-theme="amara-refresh"] .abg-section-feedback-status{display:block;margin-top:4px;color:var(--tx);font:600 14px/1.4 var(--amara-clinical-font);}
[data-theme="amara-refresh"] .abg-input-section[data-ui-native] .abg-section-chevron{display:none;}
/* A transient completion notice; it does not move the page or collect data. */
#amaraChecklistNotice{position:absolute;top:calc(100% + 8px);right:12px;left:12px;margin-inline:auto;max-width:620px;display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--sf);color:var(--tx);border:1px solid var(--na-accent);border-radius:12px;font-size:15px;box-shadow:0 3px 12px #0002;}
#amaraChecklistNotice>span{flex:1;font-weight:600;}
#amaraChecklistNotice button{appearance:none;font:inherit;min-width:44px;min-height:44px;padding:8px;border:1px solid var(--bd);border-radius:10px;background:var(--sf);color:var(--tx);cursor:pointer;}
#amaraChecklistNotice button:focus-visible{outline:2px solid var(--na-accent);outline-offset:2px;}

/* A single connected search surface, with flat suggestion rows and no layout animation. */
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-search-row.has-suggestions .pc-input-wrap{border-radius:24px 24px 0 0;background:var(--sf);border-color:var(--na-accent);border-bottom-color:var(--bd);box-shadow:none!important;transition:none;}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox:not(:empty){top:calc(100% - 1px);border:2px solid var(--na-accent);border-top:0;border-radius:0 0 24px 24px;background:var(--sf);overflow:hidden;padding:6px;box-shadow:0 8px 12px #0002;}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox[hidden]{display:none!important;}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-suggest{display:block;max-height:min(var(--suggest-height,360px),52dvh);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
[data-theme="amara-refresh"] body.amara-acute .pc-suggest-hint{padding:8px 12px 4px;font-size:11px;letter-spacing:.06em;color:var(--fnt);}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-btn{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;width:100%;min-height:52px;margin:0;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--tx);box-shadow:none;transform:none;transition:none;text-align:left;}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-btn:is(:hover,:focus-visible,[aria-selected="true"]){background:var(--amara-brand-soft);outline:none;box-shadow:inset 3px 0 var(--na-accent);transform:none;}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-label{font-size:16px;font-weight:600;line-height:1.35;align-items:flex-start;}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-title{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-meta{white-space:normal;overflow:visible;text-align:left;font-size:12px;line-height:1.4;padding-left:26px;color:var(--fnt);}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-showall{display:block;min-height:44px;width:100%;border:0;background:transparent;color:var(--na-accent);font-size:14px;}
[data-theme="amara-refresh"] body.amara-acute .pc-suggest-empty{padding:14px 12px;font-size:15px;color:var(--fnt);}
@media(forced-colors:active){.pc-sug-btn[aria-selected="true"]{outline:2px solid Highlight!important;}}

[data-theme="amara-refresh"] body.amara-acute .pc-sug-meta{font-family:inherit;font-weight:400;text-transform:none;letter-spacing:0;}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-input-wrap:focus-within .pc-search-icon{color:var(--na-accent);}

/* Missing/contradictory findings describe alert state, not checklist work. */
.na-status-notes{display:grid;gap:12px;margin:12px 0;}
.na-status-note{padding:12px 0 12px 12px;border-left:2px solid var(--bd2);color:var(--tx);font-size:15px;line-height:1.5;min-width:0;overflow-wrap:anywhere;}
.na-status-note>strong{display:block;font-weight:600;}
.na-status-note p{margin:6px 0;color:var(--dim);font-weight:400;}
[data-theme="amara-refresh"] body.amara-acute .na-status-note .na-origin-shortcut{min-height:44px;white-space:normal;text-align:left;}

/* Search and audit scenarios share one bounded, touch-scrollable list. */
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell #pcSuggestBox:not(:empty){display:block;max-height:none;}
[data-theme="amara-refresh"] body.amara-acute .acute-search-shell .pc-suggest{touch-action:pan-y;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;}
[data-theme="amara-refresh"] body.amara-acute .pc-sug-btn.amara-study-scenario-option{grid-template-columns:minmax(0,1fr);font:600 16px/1.4 var(--amara-clinical-font);}

/* Selection is indicated by checked state, never a sticky touch hover. */
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item){min-height:52px;gap:12px;padding:12px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--tx);font:500 16px/1.4 var(--amara-clinical-font);box-shadow:none;touch-action:pan-y;transition:background-color .12s ease,border-color .12s ease,transform .12s ease;}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item)[aria-checked="false"]{background:transparent;color:var(--tx);border-color:transparent;}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item)[aria-checked="true"]{background:var(--amara-brand-soft);color:var(--na-accent);border-color:var(--na-accent);font-weight:600;}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-check,.acute-menu-check){display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;min-width:22px;width:22px;height:22px;border:1px solid var(--dim);border-radius:6px;color:transparent;background:transparent;font:700 16px/1 var(--amara-clinical-font);}
[data-theme="amara-refresh"] body.amara-acute [aria-checked="true"]>:is(.filter-sidebar-check,.acute-menu-check){background:var(--na-accent);border-color:var(--na-accent);color:var(--sf);}
[data-theme="amara-refresh"] body.amara-acute a.acute-menu-item .acute-menu-check{border:0;color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .filter-sidebar-options{gap:4px;}
[data-theme="amara-refresh"] body.amara-acute .filter-sidebar-title{font-size:20px;}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-sub,.filter-sidebar-note){font-size:14px;line-height:1.5;color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item):active{transform:scale(.985);}
[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item):focus-visible{outline:2px solid var(--na-accent);outline-offset:2px;}
@media(hover:hover) and (pointer:fine){
  [data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item)[aria-checked="false"]:hover{background:var(--sf2);border-color:var(--bd);}
}

/* Matching anchored menus for Trust, Ward content and Patient factors. */
[data-theme="amara-refresh"] body.amara-acute .acute-popover{padding:8px;border:1px solid var(--bd2);border-radius:16px;background:var(--sf);box-shadow:0 6px 16px #0002;touch-action:pan-y;transition:none;}
[data-theme="amara-refresh"] body.amara-acute .acute-popover-title{position:sticky;top:-8px;z-index:1;padding:12px 10px;background:var(--sf);color:var(--tx);font:600 16px/1.4 var(--amara-clinical-font);letter-spacing:0;text-transform:none;}
[data-theme="amara-refresh"] body.amara-acute .acute-popover-note{padding:12px 10px;font:400 14px/1.5 var(--amara-clinical-font);color:var(--dim);}
[data-theme="amara-refresh"] body.amara-acute .acute-menu-label{padding:12px 10px 6px;color:var(--dim);font:600 13px/1.4 var(--amara-clinical-font);letter-spacing:0;text-transform:none;}
[data-theme="amara-refresh"] body.amara-acute .acute-menu-grid{gap:4px;}
[data-theme="amara-refresh"] body.amara-acute .acute-menu-section+.acute-menu-section{border-top:1px solid var(--bd);}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton){display:flex;justify-content:flex-start;min-height:48px;padding:10px 18px;border-radius:999px;font:500 15px/1.35 var(--amara-clinical-font);gap:8px;}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton) .search-shell-label{white-space:normal;text-align:left;overflow:visible;}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton) .search-shell-caret{position:static;margin-left:auto;color:inherit;}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton):not(.active):not([aria-expanded="true"]){background:var(--sf);color:var(--tx);border-color:var(--bd2);}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton):is(.active,[aria-expanded="true"]){background:var(--amara-brand-soft);color:var(--na-accent);border-color:var(--na-accent);}
[data-theme="amara-refresh"] body.amara-acute :is(#trustMenuButton,#wardMenuButton,#patientMenuButton):disabled{color:var(--dim);opacity:1;cursor:default;}
[data-theme="amara-refresh"] body.amara-acute #searchScopeButton:not(.active):not([aria-expanded="true"]){background:var(--sf);color:var(--tx);border-color:var(--bd2);}

/* Compact shortcut in its own row after selected findings; never an overlay. */
[data-theme="amara-refresh"] body.amara-acute .rc-cue-mount{display:none;}
[data-theme="amara-refresh"] body.amara-acute #rcJumpMount{position:static;inset:auto;display:flex;justify-content:center;width:100%;margin:8px 0 12px;padding:0;transform:none;opacity:1;z-index:auto;pointer-events:auto;transition:none;}
[data-theme="amara-refresh"] body.amara-acute #rcJumpMount[hidden]{display:none;}
[data-theme="amara-refresh"] body.amara-acute .rc-jump-btn{width:auto;max-width:100%;min-width:0;min-height:44px;font:600 14px/1.4 var(--amara-clinical-font);padding:10px 20px;animation:none;box-shadow:none;}
@media(prefers-reduced-motion:reduce){[data-theme="amara-refresh"] body.amara-acute :is(.filter-sidebar-option,.acute-menu-item){transition:none;}}


/* Branch facts update in place; the notice never enters the page layout. */
html.amara-criterion-updating,html.amara-criterion-updating *{overflow-anchor:none!important;scroll-behavior:auto!important;}
[data-theme="amara-refresh"] .criterion-update-notice{position:fixed;z-index:240;right:max(12px,env(safe-area-inset-right));width:min(380px,calc(100vw - 24px));padding:16px 18px 12px;border:1px solid var(--bd2);border-left:3px solid var(--na-accent,var(--grn));border-radius:14px;background:var(--sf);color:var(--tx);box-shadow:0 8px 32px #0003;font:400 14px/1.45 var(--amara-clinical-font);animation:criterion-notice-in .18s ease-out;}
[data-theme="amara-refresh"] .criterion-update-notice[data-placement="top"]{top:var(--criterion-notice-top);}
[data-theme="amara-refresh"] .criterion-update-notice[data-placement="bottom"]{bottom:max(16px,env(safe-area-inset-bottom));}
[data-theme="amara-refresh"] .criterion-update-title{display:block;font-size:16px;font-weight:600;}
[data-theme="amara-refresh"] .criterion-update-counts{margin:2px 0 10px;color:var(--dim);}
[data-theme="amara-refresh"] .criterion-update-summary{margin:0;font-weight:600;}
[data-theme="amara-refresh"] .criterion-update-source{margin:3px 0 8px;color:var(--dim);overflow-wrap:anywhere;}
[data-theme="amara-refresh"] .criterion-update-controls{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;}
[data-theme="amara-refresh"] .criterion-update-controls button{min-height:44px;padding:8px 12px;border:1px solid var(--bd2);border-radius:8px;background:var(--sf2);color:var(--tx);font:600 14px/1.35 var(--amara-clinical-font);cursor:pointer;}
[data-theme="amara-refresh"] .criterion-update-controls button:first-child:not(:last-child){color:var(--na-accent,var(--grn));border-color:currentColor;}
[data-theme="amara-refresh"] .criterion-update-controls button:focus-visible{outline:2px solid var(--na-accent,var(--grn));outline-offset:3px;}
[data-theme="amara-refresh"] .criterion-change-target{outline:2px solid var(--na-accent,var(--grn));outline-offset:2px;}
@keyframes criterion-notice-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){[data-theme="amara-refresh"] .criterion-update-notice{animation:none;}}
@media(forced-colors:active){[data-theme="amara-refresh"] .criterion-update-notice{border:2px solid CanvasText;background:Canvas;color:CanvasText;}}
[data-theme="amara-refresh"] .criterion-update-detail{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:0 0 8px;overflow-wrap:anywhere;}
[data-theme="amara-refresh"] .criterion-update-notice{max-height:calc(50dvh - 24px);overflow-y:auto;}
