/* Layout: a forest green demo bar on a white page, then one platform at a time.
   Patient = phone-width app (framed on desktop, with a demo guide beside it);
   Clinician = queue + case workspace; Partners = order boards; Operations = dashboard. */
:root {
  /* CareBridge brand: white + forest green, one fixed light look */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f8f4;
  --ink: #142019;
  --muted: #55675c;
  --line: #d5e2d9;
  --forest: #1e5b3a;
  --forest-deep: #123d27;
  --forest-tint: #e3eee6;
  --on-forest: #ffffff;
  --mint: #2f7d55;
  --amber: #9a5d08;
  --amber-bg: #fbf0dc;
  --red: #b0242b;
  --red-bg: #fbe5e5;
  --blue: #285a86;
  --blue-bg: #e3edf7;
  --shadow: 0 1px 2px rgba(18, 61, 39, .06), 0 8px 24px rgba(18, 61, 39, .08);
  color-scheme: light;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-logo: "Lexend", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--forest);
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- Demo bar ---------- */
.demobar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--forest); color: var(--on-forest);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 10px;
}
.demobar-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
/* Logo wordmark: "Care" bold, "Bridge" regular, in Lexend */
.wordmark { font-family: var(--f-logo); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.wordmark b { font-weight: 400; }
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--forest); }
.lockup-lg { font-size: 2rem; }
.lockup-lg .brand-mark { width: 52px; height: 52px; }
.brand small { font-family: var(--f-body); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.platform-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.platform-tabs button {
  border: 0; background: transparent; color: var(--on-forest); opacity: .78;
  padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center;
}
.platform-tabs button:hover { opacity: 1; background: rgba(255,255,255,.08); }
.platform-tabs button[aria-current="true"] { opacity: 1; background: rgba(255,255,255,.16); }
.badge {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e0523e; color: #fff;
  font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; font-family: var(--f-mono);
}
.demo-reset { border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--on-forest); border-radius: 999px; padding: 6px 12px; font-size: .8rem; }
.demo-strip { font-size: .75rem; opacity: .75; width: 100%; }

main {
  max-width: 1280px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px 64px;
}

/* ---------- Generic UI ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.card-quiet { background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; }
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; font-weight: 650;
  display: inline-flex; gap: 8px; align-items: center; justify-content: center; line-height: 1.2; text-decoration: none;
}
.btn-primary { background: var(--forest); color: var(--on-forest); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.u-emergency { background: var(--red-bg); color: var(--red); }
.u-urgent { background: var(--amber-bg); color: var(--amber); }
.u-routine { background: var(--forest-tint); color: var(--forest); }
.u-info { background: var(--blue-bg); color: var(--blue); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: .82rem; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0;
}
textarea { resize: vertical; min-height: 84px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.choice:hover { border-color: var(--mint); }
.choice input { margin-top: 3px; accent-color: var(--forest); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--forest); background: var(--forest-tint); }
.choice .sub { display: block; font-size: .82rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { accent-color: var(--forest); width: 18px; height: 18px; margin-top: 2px; flex: none; }

.toast-host { position: fixed; z-index: 50; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--forest-deep); color: var(--on-forest); padding: 12px 14px; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; animation: rise .25s ease-out; }
.toast strong { display: block; }
@keyframes rise { from { transform: translateY(8px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Patient platform ---------- */
.patient-layout { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 40px; align-items: start; justify-content: center; }
.phone {
  background: var(--bg); border: 1px solid var(--line); border-radius: 34px; box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; height: min(860px, calc(100vh - 140px)); min-height: 620px;
  outline: 10px solid var(--surface); outline-offset: -1px;
}
.phone-top { padding: 18px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.phone-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.phone-body > * { flex-shrink: 0; }
.phone-nav { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.phone-nav button { border: 0; background: none; padding: 9px 2px 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--muted); position: relative; }
.phone-nav button[aria-current="true"] { color: var(--forest); }
.phone-nav svg { width: 22px; height: 22px; }
.phone-nav .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; background: #e0523e; border-radius: 50%; }

.guide { position: sticky; top: 90px; max-width: 520px; }
.guide h2 { font-size: 1.6rem; margin-bottom: 8px; }
.guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.guide .card-quiet { border: 1px dashed var(--line); }

.hero-card { background: var(--forest); color: var(--on-forest); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.hero-card .btn { background: var(--on-forest); color: var(--forest-deep); align-self: flex-start; }
.hero-card .pulse-line { position: absolute; right: -10px; top: 12px; width: 180px; opacity: .22; }

.dept-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dept { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.dept:hover { border-color: var(--mint); }
.dept strong { font-size: .92rem; line-height: 1.25; }
.dept span { font-size: .76rem; color: var(--muted); }

.vitals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vital { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.vital .v { font-family: var(--f-mono); font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; }
.vital .u { font-size: .7rem; color: var(--muted); }
.vital.flag { border-color: var(--amber); background: var(--amber-bg); }
.vital.flag-red { border-color: var(--red); background: var(--red-bg); }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--forest); border-radius: 999px; transition: width .3s; }

.ai-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.ai-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--forest-tint); color: var(--forest); display: grid; place-items: center; flex: none; font-weight: 700; font-size: .72rem; font-family: var(--f-mono); }

.urgency-banner { border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.urgency-banner.emergency { background: var(--red); color: #fff; }
.urgency-banner.urgent { background: var(--amber-bg); color: var(--ink); border: 1.5px solid var(--amber); }
.urgency-banner.routine { background: var(--forest-tint); color: var(--ink); border: 1.5px solid var(--forest); }
.urgency-banner h3 { font-size: 1.15rem; }

.why-human { border-left: 3px solid var(--blue); background: var(--blue-bg); padding: 12px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.why-human ul { margin: 6px 0 0; padding-left: 18px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; z-index: 1; }
.timeline li.done .tdot { background: var(--forest); border-color: var(--forest); }
.timeline li.done .tdot::after { content: ""; width: 8px; height: 5px; border-left: 2px solid var(--surface); border-bottom: 2px solid var(--surface); transform: rotate(-45deg) translate(1px,-1px); }
.timeline li.now .tdot { border-color: var(--forest); box-shadow: 0 0 0 4px var(--forest-tint); }
.timeline .tt { font-weight: 600; font-size: .92rem; }

.thinking { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 12px; text-align: center; }
.thinking svg { width: 120px; }
.thinking path.trace { stroke-dasharray: 320; stroke-dashoffset: 320; animation: trace 1.3s linear infinite; }
@keyframes trace { to { stroke-dashoffset: 0; } }

.article { line-height: 1.65; }
.article p + p { margin-top: 10px; }
.ks-box { border: 1.5px dashed var(--forest); border-radius: var(--r-md); padding: 14px; background: var(--forest-tint); }

.msg { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; border: 1px solid var(--line); }
.msg .from { font-weight: 650; font-size: .85rem; }

/* ---------- Clinician platform ---------- */
.clin-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.queue { display: flex; flex-direction: column; gap: 8px; }
.queue-item { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; display: grid; grid-template-columns: 4px 1fr; gap: 12px; }
.queue-item:hover { border-color: var(--mint); }
.queue-item[aria-current="true"] { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.queue-item .stripe { border-radius: 4px; }
.stripe.emergency { background: var(--red); }
.stripe.urgent { background: var(--amber); }
.stripe.routine { background: var(--forest); }
.stripe.done { background: var(--line); }
.queue-item .qt { font-weight: 650; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; }
.filters button[aria-pressed="true"] { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.ping-banner { background: var(--forest-deep); color: var(--on-forest); border-radius: var(--r-md); padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.ping-banner .ring { width: 12px; height: 12px; border-radius: 50%; background: #5fd38f; box-shadow: 0 0 0 0 rgba(95,211,143,.6); animation: ping 1.6s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(95,211,143,0); } 100% { box-shadow: 0 0 0 0 rgba(95,211,143,0); } }
.workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ai-panel { border: 1.5px solid var(--forest); border-radius: var(--r-md); background: var(--surface); }
.ai-panel-head { background: var(--forest-tint); padding: 10px 16px; border-radius: var(--r-md) var(--r-md) 0 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-panel-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ddx { display: flex; flex-direction: column; gap: 8px; }
.ddx-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 42px; gap: 10px; align-items: center; font-size: .9rem; }
.ddx-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ddx-bar i { display: block; height: 100%; background: var(--forest); }
.flag-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.flag-list li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.flag-list li::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: .7rem; display: grid; place-items: center; margin-top: 2px; }
.qa { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.qa div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.qa div:last-child { border-bottom: 0; }
.qa dt { color: var(--muted); }
.qa dd { margin: 0; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: .84rem; background: var(--surface); cursor: pointer; }
.chip:has(input:checked) { background: var(--forest-tint); border-color: var(--forest); }
.chip input { accent-color: var(--forest); }
.rx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }

/* ---------- Partners & ops ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--forest); color: var(--on-forest); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: .9rem; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.order .oid { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi .n { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .d { font-size: .8rem; color: var(--muted); }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-track { height: 10px; background: var(--forest-tint); border-radius: 999px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--forest); border-radius: 999px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .9rem; }
.tick { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: .75rem; }
.tick.ok { background: var(--forest-tint); color: var(--forest); }
.tick.todo { background: var(--amber-bg); color: var(--amber); }
.audit { font-family: var(--f-mono); font-size: .78rem; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.audit div { display: grid; grid-template-columns: 52px 110px minmax(0, 1fr); gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }

.landing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plat-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.plat-card:hover { border-color: var(--forest); box-shadow: var(--shadow); }
.plat-card .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--forest-tint); color: var(--forest); display: grid; place-items: center; }
.plat-card .ico svg { width: 24px; height: 24px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
.flow li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; font-size: .88rem; counter-increment: f; }
.flow li::before { content: counter(f); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); color: var(--on-forest); font-weight: 700; font-size: .75rem; margin-bottom: 6px; }
.flow { padding: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .landing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .patient-layout { grid-template-columns: 1fr; }
  .guide { position: static; order: 2; }
  .phone { border-radius: var(--r-lg); outline: 0; height: auto; min-height: 0; }
  .phone-body { overflow: visible; }
  .phone-nav { position: sticky; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .clin-layout { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .platform-tabs { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .landing, .kpis, .flow { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr 80px; }
  .bar-row .bar-track { grid-column: 1 / -1; order: 3; }
  .vitals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa div { grid-template-columns: 1fr; gap: 2px; }
  .ddx-row { grid-template-columns: minmax(0, 1fr) 60px 38px; }
  .audit div { grid-template-columns: 46px minmax(0, 1fr); }
  .audit div span:nth-child(2) { display: none; }
}
