:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --line: #e3e6eb; --line-strong: #cfd4dc;
  --text: #1b2330; --muted: #5d6878; --faint: #8a94a3;
  --accent: #2357d6; --accent-weak: #e8eefc; --accent-ink: #163a94;
  --good: #1a7f4b; --good-weak: #e6f4ec; --warn: #a15c00; --warn-weak: #fdf1df; --bad: #b42318; --bad-weak: #fdecea;
  --coach: #5b3cc4; --coach-weak: #f0ebfd;
  --mon-bg: #0d1117; --mon-panel: #161b22; --mon-line: #262d36; --mon-text: #e6edf3; --mon-muted: #8b949e;
  --hr: #3fd47e; --bp: #ff6b6b; --spo2: #4fc3f7; --rr: #ffd166; --temp: #f8a5c2; --cvp: #c9a7ff;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1c2128; --line: #2a3039; --line-strong: #3a424d;
    --text: #e6e9ee; --muted: #a2abb8; --faint: #7b8594;
    --accent: #6d95ff; --accent-weak: #1e2a45; --accent-ink: #b9ccff;
    --good: #4cc38a; --good-weak: #15301f; --warn: #f0b04a; --warn-weak: #33260f; --bad: #ff7b72; --bad-weak: #3a1715;
    --coach: #a991ff; --coach-weak: #251d40; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1c2128; --line: #2a3039; --line-strong: #3a424d;
  --text: #e6e9ee; --muted: #a2abb8; --faint: #7b8594;
  --accent: #6d95ff; --accent-weak: #1e2a45; --accent-ink: #b9ccff;
  --good: #4cc38a; --good-weak: #15301f; --warn: #f0b04a; --warn-weak: #33260f; --bad: #ff7b72; --bad-weak: #3a1715;
  --coach: #a991ff; --coach-weak: #251d40; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 650; } h3 { font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 650; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; letter-spacing: -.01em; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 2px; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { white-space: nowrap; }
#top-actions { flex-shrink: 0; flex-wrap: nowrap; }
.nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; }
.nav a.active, .nav a:hover { background: var(--surface-2); color: var(--text); }
.spacer { flex: 1; }

/* buttons & chips */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 13px; text-align: left; line-height: 1.3; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip.small { font-size: 12px; padding: 3px 8px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--accent); color: #fff; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 650; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.good { background: var(--good-weak); color: var(--good); border-color: transparent; }
.tag.warn { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.tag.coach { background: var(--coach-weak); color: var(--coach); border-color: transparent; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd, .card summary.hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.card details:not([open]) > summary.hd { border-bottom: 0; }
summary { display: block; }
.card > .bd { padding: 10px 12px; }
.card + .card { margin-top: 10px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary .caret { display: inline-block; transition: transform .15s; color: var(--faint); }
details[open] > summary .caret { transform: rotate(90deg); }

/* page layouts */
.page { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
.case-grid { display: grid; grid-template-columns: minmax(340px, 44fr) minmax(380px, 56fr); gap: 14px; padding: 12px 16px 40px; max-width: 1560px; margin: 0 auto; align-items: start; }
.col { min-width: 0; }
.col-right { position: sticky; top: 56px; max-height: calc(100vh - 64px); overflow: auto; padding-bottom: 20px; scrollbar-width: thin; }
.col-left { padding-bottom: 20px; }
.mobile-only { display: none; }
@media (max-width: 980px) {
  .case-grid { grid-template-columns: 1fr; padding: 8px 12px 40px; }
  .col-right { position: static; max-height: none; overflow: visible; }
  .mobile-only { display: block; }
  .mini-mon { position: sticky; top: 0; z-index: 20; background: var(--mon-bg); color: var(--mon-text); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
  .mini-mon .mv { display: flex; gap: 12px; flex-wrap: wrap; font: 600 15px var(--font); font-variant-numeric: tabular-nums; }
  .mini-mon .mv span small { font-size: 10px; color: var(--mon-muted); font-weight: 600; margin-right: 3px; }
  .mini-mon .btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
  .mini-mon .btn { background: var(--mon-panel); border-color: var(--mon-line); color: var(--mon-text); }
  .mini-mon .btn.primary { background: var(--accent); border-color: var(--accent); }
}
@media (max-width: 700px) {
  .topbar { position: static; flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { padding: 4px 8px; white-space: nowrap; }
  .page { padding: 12px 12px 40px; }
  .hero h1 { font-size: 24px; }
}

/* monitor */
.monitor { background: var(--mon-bg); color: var(--mon-text); border-radius: var(--radius); padding: 10px; border: 1px solid #000; }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.vital { background: var(--mon-panel); border: 1px solid var(--mon-line); border-radius: 8px; padding: 6px 8px 4px; min-width: 0; }
.vital .lab { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--mon-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.vital .val { font: 600 26px/1.05 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.vital .val small { font-size: 13px; font-weight: 600; opacity: .85; }
.vital .sub { font-size: 10.5px; color: var(--mon-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vital canvas { width: 100%; height: 22px; display: block; margin-top: 3px; }
.vital.hr .val { color: var(--hr); } .vital.bp .val { color: var(--bp); } .vital.spo2 .val { color: var(--spo2); }
.vital.rr .val { color: var(--rr); } .vital.temp .val { color: var(--temp); } .vital.cvp .val { color: var(--cvp); } .vital.uo .val { color: #e6edf3; }
.vital.stale .val { opacity: .55; }
.mon-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--mon-muted); }

/* time bar */
.timebar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; box-shadow: var(--shadow); }
.clock { font: 650 20px/1 var(--mono); letter-spacing: -.02em; }
.clock-sub { font-size: 11px; color: var(--faint); }

/* lists */
.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .t { font: 12px var(--mono); color: var(--faint); min-width: 44px; }
.row .grow { flex: 1; min-width: 0; }
.eta { font: 12px var(--mono); color: var(--warn); }
.lab-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lab-table td, .lab-table th { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: right; font-size: 12.5px; }
.lab-table th { color: var(--faint); font-weight: 600; font-size: 11px; }
.lab-table td:first-child, .lab-table th:first-child { text-align: left; }
.flag-h { color: var(--bad); font-weight: 650; } .flag-l { color: var(--accent); font-weight: 650; }
.delta { font-size: 11px; color: var(--faint); margin-left: 3px; }
.result { padding: 8px 0; border-top: 1px solid var(--line); }
.result:first-child { border-top: 0; }
.result .rt { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.result .times { font: 11.5px var(--mono); color: var(--faint); }
.result pre, .prewrap { white-space: pre-wrap; font: inherit; margin: 4px 0 0; }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 4px; }

/* decision workspace */
.dx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dx-current { font-weight: 650; font-size: 15px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 6px; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 9px 10px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.action-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.act { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.act:hover { border-color: var(--accent); background: var(--surface); }
.act.on { border-color: var(--accent); background: var(--accent-weak); }
.act .n { font-weight: 600; }
.act .d { font-size: 11.5px; color: var(--muted); }
.act:disabled { opacity: .45; cursor: not-allowed; }
.reason { border: 1.5px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 12px; margin-top: 10px; }
.reason .q { font-weight: 650; margin: 10px 0 6px; font-size: 13px; }
.reason .q:first-of-type { margin-top: 2px; }
.pred-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.pred-row .vname { min-width: 104px; font-size: 13px; }
.dirs button { min-width: 30px; }
textarea, input[type=text] { width: 100%; font: inherit; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); resize: vertical; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .v { min-width: 64px; text-align: center; font: 600 14px var(--mono); }
.inf-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.inf-row:first-child { border-top: 0; }
.inf-row .name { flex: 1; min-width: 120px; font-weight: 600; }

/* coach */
.coach { border-left: 3px solid var(--coach); background: var(--coach-weak); border-radius: 8px; padding: 10px 12px; }
.coach + .coach { margin-top: 8px; }
.coach .who { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coach); margin-bottom: 4px; }
.coach .txt { font-weight: 550; }
.coach .fb { margin-top: 8px; padding: 8px 10px; background: var(--surface); border-radius: 7px; border: 1px solid var(--line); }
.coach .chips { margin-top: 8px; }
.msg { border-left: 3px solid var(--warn); background: var(--warn-weak); padding: 8px 10px; border-radius: 8px; }
.msg + .msg { margin-top: 6px; }

/* predictions */
.pred { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.pred + .pred { margin-top: 6px; }
.pred.matched { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.pred.mismatch { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.pred .vs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 3px; font-size: 13px; }

/* banners */
.banner { padding: 10px 14px; border-radius: var(--radius); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.bad { background: var(--bad-weak); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.banner.info { background: var(--accent-weak); color: var(--accent-ink); }

/* home */
.hero { padding: 28px 0 18px; }
.hero h1 { font-size: 30px; letter-spacing: -.02em; }
.hero p { max-width: 760px; color: var(--muted); font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tile { display: block; padding: 16px; text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--accent); }
.tile h2 { font-size: 17px; margin: 6px 0 4px; }
.loop { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 0; font-weight: 600; }
.loop span.step { padding: 3px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }

/* charts */
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100%; display: block; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* vent */
.vent { background: var(--mon-bg); color: var(--mon-text); border-radius: var(--radius); padding: 10px; }
.vent canvas { width: 100%; height: 92px; display: block; background: var(--mon-panel); border-radius: 6px; margin-bottom: 6px; }
.vent .wl { font-size: 10.5px; color: var(--mon-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; display: flex; justify-content: space-between; }
.vent-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 6px; margin-top: 6px; }
.vent-read div { background: var(--mon-panel); border: 1px solid var(--mon-line); border-radius: 7px; padding: 5px 7px; }
.vent-read b { display: block; font: 600 18px var(--font); font-variant-numeric: tabular-nums; }
.vent-read span { font-size: 10.5px; color: var(--mon-muted); text-transform: uppercase; letter-spacing: .05em; }
.vent-read .alarm b { color: #ff7b72; }
.vent-ctrls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.vctrl { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--text); }
.vctrl label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.vctrl input[type=range] { width: 100%; accent-color: var(--accent); }
.vctrl .v { font: 600 13px var(--mono); color: var(--text); }

/* debrief */
.timeline-table { width: 100%; border-collapse: collapse; }
.timeline-table td { vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); font-size: 13px; }
.timeline-table td.t { font: 12px var(--mono); color: var(--faint); white-space: nowrap; }
.ev-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; }
.ev-chip b { font-weight: 650; }
.status-done { color: var(--good); font-weight: 650; } .status-late { color: var(--warn); font-weight: 650; } .status-missing { color: var(--bad); font-weight: 650; } .status-partial { color: var(--warn); font-weight: 650; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.scrub { width: 100%; accent-color: var(--accent); }
.note { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; border: 1px dashed var(--line-strong); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.prose p { margin: 0 0 8px; } .prose ul { margin: 0 0 8px; padding-left: 18px; } .prose li { margin: 2px 0; }
.ref { font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line); }
.empty { color: var(--faint); font-size: 13px; padding: 4px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack > * + * { margin-top: 10px; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

/* POCUS clips */
.pocus-lab { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .pocus-lab { grid-template-columns: 1fr; } }
.us-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.us-lung { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
@media (max-width: 520px) { .us-lung { grid-template-columns: 1fr; } .us-lung .mm canvas.us-m { aspect-ratio: 8 / 3; } }
.us-fig { margin: 0; background: #000; border-radius: 8px; overflow: hidden; border: 1px solid var(--mon-line); }
.us-fig figcaption { font-size: 11.5px; color: var(--mon-muted); padding: 4px 8px; background: var(--mon-panel); }
canvas.us, canvas.us-m { display: block; width: 100%; aspect-ratio: 4 / 3; cursor: pointer; background: #000; }
canvas.us-m { cursor: default; aspect-ratio: 2 / 3; }
.us-fig.mm canvas.us-m { height: auto; }
ul.tight { margin: 0; padding-left: 18px; } ul.tight li { margin: 2px 0; font-size: 13.5px; }
.chip.ans-good { background: var(--good-weak); border-color: var(--good); color: var(--good); font-weight: 650; }
.chip.ans-bad { background: var(--bad-weak); border-color: var(--bad); color: var(--bad); }
.msg.good { border-left-color: var(--good); background: var(--good-weak); }
.pocus-card { margin-top: 6px; }
.pocus-card .us-grid { grid-template-columns: 1fr 1fr; }
.pocus-read { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.pocus-read .q { font-weight: 650; font-size: 13px; margin: 6px 0 4px; }

/* next-step guidance */
.guide { background: var(--coach-weak); border: 1px solid color-mix(in srgb, var(--coach) 35%, transparent); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.guide.off { display: flex; align-items: center; padding: 6px 12px; background: var(--surface); border-color: var(--line); }
.guide-top { display: flex; align-items: center; gap: 8px; }
.guide .kicker { color: var(--coach); }
.tag.guide-cat { background: var(--coach); color: #fff; border-color: transparent; }
.guide-title { font-weight: 650; margin: 4px 0 2px; }
.guide-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coach); margin-left: 5px; vertical-align: middle; }
/* monitor heartbeat */
.beat { font-style: normal; display: inline-block; animation: beat 1s ease-out infinite; color: var(--hr); font-size: 10px; margin-left: 2px; }
@keyframes beat { 0% { transform: scale(1.35); opacity: 1; } 30% { transform: scale(1); opacity: .55; } 100% { transform: scale(1); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .beat { animation: none; } }

/* Vent Lab ABG line */
.abg-bar { background: var(--mon-bg); border: 1px solid var(--mon-line); border-radius: var(--radius); padding: 8px 10px; color: var(--mon-text); position: sticky; top: 56px; z-index: 5; }
.abg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.abg-head .kicker { color: var(--mon-muted); } .abg-head .faint { color: var(--mon-muted); }
.abg-line { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.abg-cell { display: flex; flex-direction: column; align-items: flex-start; padding: 2px 4px; border-radius: 6px; }
.abg-cell span { font-size: 11px; color: var(--mon-muted); }
.abg-cell b { font: 700 19px var(--mono); }
.abg-cell i { font-style: normal; font-size: 10.5px; color: var(--mon-muted); font-family: var(--mono); }
.abg-cell i.up, .abg-cell i.down { color: #ffd166; }
.abg-cell.flag-h b { color: #ff7b72; } .abg-cell.flag-l b { color: #79c0ff; }
@media (max-width: 560px) { .abg-line { grid-template-columns: repeat(4, minmax(0, 1fr)); } .abg-cell b { font-size: 16px; } }

/* Myth Lab rounds format: full-width answer options */
.chip.opt { display: block; width: 100%; text-align: left; white-space: normal; border-radius: 10px; padding: 9px 12px; line-height: 1.35; }
.chip.opt:disabled { cursor: default; opacity: 1; }
.chip.opt.ans-bad { background: var(--bad-weak); border-color: var(--bad); color: var(--bad); }

/* ---------- graphic bedside ---------- */
.act:has(.ico) { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; }
.act .ico { grid-row: span 2; display: flex; align-items: center; justify-content: center; }
.oi-glass { fill: rgba(255,255,255,.55); stroke: var(--muted); stroke-width: 1; }
.oi-line { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; }
.oi-ecg { fill: none; stroke: #d6336c; stroke-width: 1.8; stroke-linejoin: round; }

/* infusion pumps */
.pumps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pump { display: flex; gap: 8px; padding: 8px; border-radius: 10px; background: #dfe4ec; border: 1px solid #c3cad5; color: #1b2330; }
.pump-lcd { flex: 1; min-width: 0; background: #0f2b1d; color: #7cf0a5; border-radius: 6px; padding: 6px 8px; font-family: var(--mono); box-shadow: inset 0 0 0 1px #000; }
.pump:not(.running) .pump-lcd { color: #4f7d60; }
.pump-drug { font-size: 11px; font-weight: 700; text-transform: uppercase; display: flex; justify-content: space-between; gap: 6px; }
.pump-state { font-size: 9.5px; } .pump.running .pump-state { animation: blink 1.4s infinite; }
.pump-rate { font-size: 22px; font-weight: 700; line-height: 1.2; } .pump-rate span { font-size: 10px; margin-left: 4px; font-weight: 500; }
.pump-sub { font-size: 10px; opacity: .8; min-height: 13px; }
.pump-keys { display: flex; flex-direction: column; gap: 4px; }
.pk { min-width: 64px; padding: 4px 6px; border-radius: 6px; border: 1px solid #aeb6c2; background: #f7f8fa; color: #1b2330; cursor: pointer; font-weight: 700; font-size: 12px; }
.pk:disabled { opacity: .45; cursor: default; }
.pk.go.ready { background: #2357d6; color: #fff; border-color: #2357d6; }

/* lab tracker */
.trk-list { display: flex; flex-direction: column; gap: 10px; }
.trk { display: flex; gap: 10px; align-items: flex-start; }
.trk-ico { width: 26px; display: flex; justify-content: center; padding-top: 1px; }
.trk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; }
.trk-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.trk-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 4px 0 2px; overflow: hidden; }
.trk-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #4fc3f7); transition: width .5s; }

/* result images */
.res-img { margin: 6px 0 4px; }
.res-img svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.res-img.cxr svg { max-width: 300px; }
.res-img figcaption { font-size: 11px; color: var(--faint); margin-top: 3px; }
.ecg-paper { fill: #fff5f5; } .ecg-minor { fill: none; stroke: #f5c2c7; stroke-width: .5; } .ecg-major { fill: none; stroke: #ec8a96; stroke-width: 1; }
.ecg-trace { fill: none; stroke: #111; stroke-width: 1.6; stroke-linejoin: round; } .ecg-txt { font: 600 11px var(--font); fill: #333; }
.cxr-rib { fill: none; stroke: #bdbdbd; stroke-width: 3; opacity: .28; } .cxr-clav { fill: none; stroke: #cfcfcf; stroke-width: 5; opacity: .5; stroke-linecap: round; }
.cxr-opac { fill: #e0e0e0; opacity: .62; } .cxr-line { stroke: #e0e0e0; stroke-width: 3; opacity: .55; } .cxr-kerley { stroke: #d0d0d0; stroke-width: 1; opacity: .5; }
.cxr-eff { fill: #cfcfcf; opacity: .55; } .cxr-r { font: 700 18px var(--font); fill: #f2f2f2; } .cxr-txt { font: 600 8px var(--font); fill: #bbb; letter-spacing: .08em; }

/* order toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #1b2330; color: #fff; padding: 9px 14px; border-radius: 999px; font-size: 13px; display: flex; gap: 8px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 50; animation: toast 2.6s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.trk > .grow { flex: 1; min-width: 0; }

/* =========================================================
   Smooth theme (Copilot-style): calm surfaces, soft depth,
   rounded shapes, gentle motion. Overrides the base above.
   ========================================================= */
:root {
  --bg: #f3f4f8; --surface: #ffffff; --surface-2: #f6f7fa; --line: #eceef3; --line-strong: #dde1e8;
  --text: #121826; --muted: #5f6879; --faint: #98a0ae;
  --accent: #4a6cf7; --accent-weak: #edf1ff; --accent-ink: #2a45c4;
  --radius: 18px; --shadow: 0 1px 2px rgba(18,24,38,.04), 0 8px 24px rgba(18,24,38,.06);
  --ease: cubic-bezier(.2,.8,.2,1);
  --mon-bg: #ffffff; --mon-panel: #f6f7fa; --mon-line: transparent; --mon-text: #121826; --mon-muted: #98a0ae;
  --hr: #12b76a; --bp: #f04461; --spo2: #2e90fa; --rr: #f79009; --temp: #ee46bc; --cvp: #7a5af8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c10; --surface: #15171d; --surface-2: #1c1f27; --line: #23262f; --line-strong: #2e323d;
    --text: #eef0f4; --muted: #a3aab8; --faint: #6c7383;
    --accent: #7b93ff; --accent-weak: #1d2440; --accent-ink: #c3cfff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
    --mon-bg: #15171d; --mon-panel: #1c1f27; --mon-text: #eef0f4; --mon-muted: #6c7383;
    --hr: #32d583; --bp: #fd6f8e; --spo2: #53b1fd; --rr: #fdb022; --temp: #f670c7; --cvp: #9b8afb;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c10; --surface: #15171d; --surface-2: #1c1f27; --line: #23262f; --line-strong: #2e323d;
  --text: #eef0f4; --muted: #a3aab8; --faint: #6c7383;
  --accent: #7b93ff; --accent-weak: #1d2440; --accent-ink: #c3cfff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
  --mon-bg: #15171d; --mon-panel: #1c1f27; --mon-text: #eef0f4; --mon-muted: #6c7383;
  --hr: #32d583; --bp: #fd6f8e; --spo2: #53b1fd; --rr: #fdb022; --temp: #f670c7; --cvp: #9b8afb;
}
html, body { font-size: 14.5px; letter-spacing: -.003em; }
button, .btn, .chip, .act, .tabs button, .seg button, .pk { transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease); }

/* top bar: translucent */
.topbar { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding: 10px 20px; }
.nav a { border-radius: 10px; padding: 7px 12px; }
.nav a.active { background: var(--surface); box-shadow: var(--shadow); }

/* cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd, .card summary.hd { padding: 16px 18px 6px; border-bottom: 0; }
.card > .bd { padding: 8px 18px 16px; }
.card + .card { margin-top: 14px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.case-grid { gap: 20px; padding: 18px 20px 48px; }
.kicker { letter-spacing: .06em; font-weight: 600; }

/* buttons, chips, segmented controls */
.btn { border-radius: 12px; border-color: var(--line-strong); padding: 8px 14px; }
.btn:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.btn.primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
.btn:active:not(:disabled), .chip:active, .act:active:not(:disabled) { transform: scale(.98); }
.btn.sm { border-radius: 10px; padding: 5px 11px; }
.chip { border-color: transparent; background: var(--surface-2); padding: 7px 12px; }
.chip:hover { border-color: var(--line-strong); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.seg { border: 0; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { background: transparent; border-radius: 9px; }
.seg button + button { border-left: 0; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tag { border: 0; padding: 2px 9px; font-weight: 600; }

/* tabs: pill bar */
.tabs { border-bottom: 0; padding: 12px 12px 0; gap: 4px; }
.tabs button { border-bottom: 0; border-radius: 10px; padding: 7px 12px; }
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.on { background: var(--accent-weak); color: var(--accent-ink); }

/* order tiles */
.action-list { gap: 8px; }
.act { border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); padding: 11px 12px; }
.act:hover:not(:disabled) { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.act.on { background: var(--accent-weak); border-color: var(--accent); }
.act .n { font-weight: 550; }
.act .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); }

/* monitor: calm vital cards */
.monitor { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.mon-grid { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.vital { border: 0; border-radius: 14px; padding: 10px 12px 8px; }
.vital .lab { font-size: 11px; letter-spacing: .04em; }
.vital .val { font: 500 30px/1.05 var(--font); letter-spacing: -.03em; margin-top: 4px; }
.vital .val small { font-size: 14px; font-weight: 500; }
.vital canvas { height: 28px; margin-top: 6px; }
.vital.uo .val { color: var(--text); }
.mon-foot { margin-top: 10px; font-size: 12px; }
.mon-foot a { color: var(--accent) !important; }

/* clock bar */
.timebar { border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; gap: 8px; }
.clock { font: 600 24px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* lists, log, results */
.row { border-top: 1px solid var(--line); padding: 9px 0; }
.row .t { font: 500 12px var(--font); font-variant-numeric: tabular-nums; }
.eta { font: 600 12px var(--font); color: var(--accent); font-variant-numeric: tabular-nums; }
.result { padding: 12px 0; }
.result .times { font: 11.5px var(--font); font-variant-numeric: tabular-nums; }
.lab-table td { border-bottom: 1px solid var(--line); padding: 6px 6px; font-size: 13px; }
.lab-table tr:last-child td { border-bottom: 0; }
.flag-h, .flag-l { font-weight: 600; }
.flag-h { color: var(--bad); } .flag-l { color: var(--accent); }
.lab-table td.flag-h, .lab-table td.flag-l { white-space: nowrap; }
.lab-table td.flag-h::before, .lab-table td.flag-l::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; opacity: .85; }
.new-dot { animation: pulse 1.6s var(--ease) 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* prediction checks, coach, guide */
.pred { border-radius: 14px !important; }
.coach { border-radius: 14px; }
.guide { border-radius: var(--radius); }

/* pumps blend with the theme */
.pump { background: var(--surface-2); border: 0; border-radius: 16px; color: var(--text); }
.pk { background: var(--surface); border-color: var(--line-strong); color: var(--text); border-radius: 10px; }
.pk.go.ready { background: var(--accent); border-color: var(--accent); }

/* tracker */
.trk-bar { height: 5px; background: var(--surface-2); }
.trk-bar i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #4fc3f7)); transition: width .8s var(--ease); }
.trk-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); align-items: center; padding: 0; }

/* motion: things arrive, they don't pop */
.enter { animation: enter .5s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.tabpane.enter { animation: fadein .28s var(--ease) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
details[open] > :not(summary) { animation: fadein .25s var(--ease); }
.toast { border-radius: 14px; background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); backdrop-filter: blur(10px); }
@media (prefers-reduced-motion: reduce) { .enter, .tabpane.enter, details[open] > :not(summary) { animation: none; } }
@media (max-width: 980px) {
  .case-grid { padding: 10px 12px 40px; gap: 14px; }
  .mini-mon { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
  .mini-mon .btn { background: var(--surface-2); border-color: var(--line); color: var(--text); }
}
.vent { border: 1px solid var(--line); }
.vent canvas { border-radius: 12px; }
.vent-read div { border: 0; border-radius: 12px; }

/* ---------- Neuro Lab ---------- */
.nl-pick { display: grid; gap: 12px; margin-bottom: 14px; }
.nl-title { font-size: 20px; margin-top: 4px; letter-spacing: -.015em; }
.nl-main .bd { padding: 20px; }
.nl-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.1fr); gap: 20px; margin-top: 18px; align-items: start; }
.nl-grid.quiz { grid-template-columns: minmax(0, 560px); }
.ct { margin: 0; background: #000; border-radius: 12px; overflow: hidden; }
.ct canvas { width: 100%; height: auto; display: block; }
.ct-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: #0b0d10; color: #98a2b3; font: 500 11.5px var(--font); }
.ct-bar button { background: none; border: 1px solid #344054; color: #d0d5dd; border-radius: 8px; padding: 3px 9px; font: inherit; cursor: pointer; }
.ct-bar button.on { border-color: #53b1fd; color: #84caff; }
.ct-key { list-style: none; margin: 0; padding: 4px 12px 12px; background: #0b0d10; color: #d0d5dd; font-size: 12.5px; display: grid; gap: 6px; }
.ct-key li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; line-height: 1.4; }
.ct-key b { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: #000; font-size: 10.5px; }
.nx { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nx-h { padding: 9px 14px; background: var(--surface-2); font: 600 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nx-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; font-size: 13.5px; }
.nx-k { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.nx-v.abn { color: var(--bad); font-weight: 550; }
.nx-v svg { display: block; width: 100%; max-width: 200px; height: auto; margin-bottom: 4px; }
.nx-v ul { margin: 0; padding-left: 16px; display: grid; gap: 2px; }
.nx-motor { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.nx-motor th { text-align: left; font: 600 11px var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 0 4px; }
.nx-motor td { padding: 4px 8px 4px 0; vertical-align: top; width: 42%; }
.nx-motor td:first-child { width: 16%; color: var(--muted); font-size: 12.5px; }
.nx-motor .abn { color: var(--bad); font-weight: 550; }
.nx-bar { display: block; height: 3px; border-radius: 2px; background: var(--line); margin-top: 4px; max-width: 90px; }
.nx-bar i { display: block; height: 100%; border-radius: 2px; background: var(--text); opacity: .55; }
.nx-bar.abn i { background: var(--bad); opacity: 1; }
.nx-eye { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.1; }
.nx-iris { fill: none; stroke: var(--muted); stroke-width: 1; }
.nx-pupil { fill: var(--text); }
.nx-arrow { fill: none; stroke: var(--bad); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.nx-field { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.nx-grid { fill: none; stroke: var(--line); stroke-width: .7; }
.nx-blind { fill: url(#nx-hatch); }
.nx-lbl { font: 500 9px var(--font); fill: var(--muted); }
.nl-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 14px; }
.nl-two .card + .card { margin-top: 0; }
.nl-f { padding: 9px 0; border-top: 1px solid var(--line); }
.nl-f:first-child { border-top: 0; }
.nl-f summary { font-weight: 550; }
.nl-f > div { margin: 6px 0 2px 16px; }
.nl-icu { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.nl-quiz { margin-top: 18px; }
.nl-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.chip.opt.ans-good { background: var(--good-weak); border-color: var(--good); color: var(--good); }
.nl-verdict { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.nl-verdict.good { background: var(--good-weak); color: var(--good); } .nl-verdict.bad { background: var(--bad-weak); color: var(--bad); }
@media (max-width: 760px) {
  .nl-grid, .nl-two { grid-template-columns: 1fr; }
  .nx-row { grid-template-columns: 92px 1fr; }
}
.nl-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.nl-anat { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.nl-anat-img { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; place-items: center; height: 250px; box-sizing: border-box; }
.nl-anat-img img { max-width: 100%; max-height: 226px; object-fit: contain; display: block; }
.nl-anat figcaption { font-size: 13px; color: var(--text); line-height: 1.45; }
.nl-credit { display: block; margin-top: 4px; font-size: 11px; color: var(--faint); }
.nl-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.nl-anat-img { cursor: zoom-in; transition: border-color .2s; } .nl-anat-img:hover { border-color: var(--line-strong); }
.tabs-wrap { position: relative; flex: 1; min-width: 0; width: 100%; }
.tab-arrow { position: absolute; top: 12px; bottom: 0; width: 52px; display: none; align-items: center; border: 0; padding: 0 4px; z-index: 2; cursor: pointer; background: none; }
.tab-arrow::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.tab-arrow.l { left: 0; justify-content: flex-start; } .tab-arrow.l::before { background: linear-gradient(to right, var(--surface) 45%, transparent); border-top-left-radius: 18px; }
.tab-arrow.r { right: 0; justify-content: flex-end; } .tab-arrow.r::before { background: linear-gradient(to left, var(--surface) 45%, transparent); border-top-right-radius: 18px; }
.tab-arrow { font-size: 0; }
.tab-arrow::after { content: ''; position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--surface) no-repeat center / 14px; border: 1px solid var(--line-strong); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.tab-arrow.l::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 3 5 8l5 5'/%3E%3C/svg%3E"); }
.tab-arrow.r::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3l5 5-5 5'/%3E%3C/svg%3E"); }
.tab-arrow:hover::after { border-color: var(--accent); }
.tabs-wrap.can-l .tab-arrow.l, .tabs-wrap.can-r .tab-arrow.r { display: flex; }
/* The ventilator is a device screen: always dark, like the real thing, so the colored traces read clearly. */
.vent { --mon-bg: #0b0e13; --mon-panel: #10141b; --mon-line: #1f2630; --mon-text: #e6edf3; --mon-muted: #8b949e; background: var(--mon-bg); color: var(--mon-text); border: 1px solid #000; }
.vent .vent-read b { color: var(--mon-text); }
/* Sign-in */
.signed-out .nav, .signed-out #top-actions { display: none; }
.auth-page { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .bd { padding: 28px; }
.auth-card h1 { font-size: 22px; margin: 6px 0 6px; letter-spacing: -.015em; }
.auth-form { display: grid; gap: 14px; margin-top: 18px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-form input { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.auth-form .btn.primary { justify-content: center; padding: 10px 14px; font-size: 15px; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 2px; justify-self: center; }
.auth-msg { font-size: 13px; padding: 9px 12px; border-radius: 10px; }
.auth-msg.bad { background: var(--bad-weak); color: var(--bad); } .auth-msg.good { background: var(--good-weak); color: var(--good); }
.auth-foot { margin-top: 14px; text-align: center; }
.account { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.acct-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .acct-email { display: none; } }
/* Brand */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 750; letter-spacing: -.01em; font-size: 16px; }
.auth-brand img { border-radius: 10px; }
.auth-brand b { color: var(--accent); font-weight: inherit; }
/* About the author */
.me { max-width: 920px; }
.me-hero .bd { display: flex; gap: 24px; align-items: center; padding: 28px; }
.me-hero h1 { font-size: 26px; margin: 4px 0 10px; letter-spacing: -.02em; }
.me-hero p { margin: 4px 0; }
.me-name { font-size: 18px; font-weight: 650; }
.me-photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, #4a6cf7, #7a4ff0); color: #fff; font: 700 38px var(--font); }
.me-photo img { width: 100%; height: 100%; object-fit: cover; }
.me-photo img[src$="mark.svg"] { width: 64px; height: 64px; }
.me-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 14px; }
.me-grid .card + .card { margin-top: 0; }
.me-grid > .card:last-child { grid-column: 1 / -1; }
.me-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.todo { display: inline-block; background: #fef0c7; color: #93370d; border: 1px dashed #f79009; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) { .me-hero .bd { flex-direction: column; text-align: center; } .me-grid { grid-template-columns: 1fr; } }
.brand .bt { color: var(--text); } .brand .bt span { color: var(--accent); }
.me-bio p { font-size: 16px; line-height: 1.6; margin: 0 0 10px; max-width: 62ch; }
.me-bio p:last-child { margin-bottom: 0; }
.me-hero .bd { align-items: flex-start; }
.me-grid { grid-template-columns: 1fr 1fr; }
.me-grid > .card:last-child { grid-column: auto; }
