/* Adrenaline - Intake. Brand tokens live here; swap --brand* to match the Adrenaline family. */
:root {
  color-scheme: light;
  --brand: #c8102e;
  --brand-ink: #ffffff;
  --brand-soft: #fbe7ea;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f0efec;
  --border: #dddcd7;
  --text: #1b1b1a;
  --text-2: #52514e;
  --muted: #6d6c67;
  --accent: #2a78d6;
  --accent-soft: #e3eefb;
  --good: #0a7d0a; --good-bg: #e2f4e2;
  --warn: #8a5a00; --warn-bg: #fff2d6;
  --bad: #b42b2b; --bad-bg: #fbe4e4;
  --info: #1c5cab; --info-bg: #e3eefb;
  --track: #e8e7e3;
  --heat-0: #f0efec; --heat-1: #cde2fb; --heat-2: #86b6ef; --heat-3: #3987e5; --heat-4: #1c5cab; --heat-ink: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 8px rgba(0,0,0,.04);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #e5384f; --brand-soft: #3a1a1f;
    --bg: #121211; --surface: #1a1a19; --surface-2: #242422; --border: #383835;
    --text: #f0efec; --text-2: #c3c2b7; --muted: #9a998f;
    --accent: #5598e7; --accent-soft: #1b2b40;
    --good: #5fd35f; --good-bg: #173017; --warn: #f5c35a; --warn-bg: #3a2c0e; --bad: #f08080; --bad-bg: #3d1a1a; --info: #86b6ef; --info-bg: #1b2b40;
    --track: #2e2e2b;
    --heat-0: #242422; --heat-1: #184f95; --heat-2: #256abf; --heat-3: #3987e5; --heat-4: #86b6ef; --heat-ink: #0b0b0b;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #e5384f; --brand-soft: #3a1a1f;
  --bg: #121211; --surface: #1a1a19; --surface-2: #242422; --border: #383835;
  --text: #f0efec; --text-2: #c3c2b7; --muted: #9a998f;
  --accent: #5598e7; --accent-soft: #1b2b40;
  --good: #5fd35f; --good-bg: #173017; --warn: #f5c35a; --warn-bg: #3a2c0e; --bad: #f08080; --bad-bg: #3d1a1a; --info: #86b6ef; --info-bg: #1b2b40;
  --track: #2e2e2b;
  --heat-0: #242422; --heat-1: #184f95; --heat-2: #256abf; --heat-3: #3987e5; --heat-4: #86b6ef; --heat-ink: #0b0b0b;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* layout classes must never un-hide an element */
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: .2rem 0 .3rem; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .4rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
p { margin: .3rem 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.05rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { color: var(--bad); min-height: 1.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 64px; outline: none; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--surface); border-bottom: 3px solid var(--brand); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand-sub { color: var(--brand); font-weight: 600; }
#nav { display: flex; gap: 4px; flex: 1; }
#nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 500; }
#nav a.active, #nav a:hover { background: var(--brand-soft); color: var(--brand); }
.user { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.role { font-size: .75rem; color: var(--muted); text-transform: uppercase; margin-left: 4px; }
.banner { background: var(--warn-bg); color: var(--warn); padding: 8px 20px; font-size: .9rem; text-align: center; }

/* controls */
button, .button { font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--text-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button.link { border: none; background: none; color: var(--accent); padding: 0; }
button.wide { width: 100%; margin-top: 12px; }
select { max-width: 100%; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-width: 0; }
textarea { resize: vertical; width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--text-2); }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row.wrap { flex-wrap: wrap; margin-bottom: 16px; }
.row label { flex-direction: row; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.stack label, .stack textarea { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.narrow { max-width: 480px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .actions, td.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { font-size: .9rem; text-decoration: none; }
.empty { text-align: center; padding: 40px; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--good-bg); color: var(--good); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.grid2 > * { min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* chips */
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.st-intake, .st-changes_requested { background: var(--info-bg); color: var(--info); }
.st-ready, .st-submitted { background: var(--accent-soft); color: var(--accent); }
.st-approved { background: var(--good-bg); color: var(--good); }
.st-rejected { background: var(--bad-bg); color: var(--bad); }
.st-on_hold { background: var(--warn-bg); color: var(--warn); }
.chip.score { background: var(--brand-soft); color: var(--brand); }
.chip.role-lead { background: var(--brand-soft); color: var(--brand); }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
table.list tbody tr[data-href] { cursor: pointer; }
table.list tbody tr:hover { background: var(--surface-2); }
table.mini th, table.mini td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: top; }
tr.recommended td { background: var(--good-bg); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
progress { width: 90px; height: 8px; vertical-align: middle; accent-color: var(--brand); }

/* login */
.login { max-width: 400px; margin: 10vh auto; text-align: center; }
.login form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 16px; }

/* intake workspace */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 480px; padding: 0; }
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.messages.static { max-height: 480px; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; white-space: normal; overflow-wrap: anywhere; }
.msg p { margin: 0 0 .4rem; } .msg p:last-child { margin: 0; } .msg ul { margin: .2rem 0 .4rem; padding-left: 1.2rem; }
.msg.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); white-space: pre-wrap; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.side .card { margin-bottom: 12px; }
.side summary { cursor: pointer; list-style: none; } .side summary h2 { display: inline; }
.side summary::before { content: "▸ "; color: var(--muted); } details[open] > summary::before { content: "▾ "; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: .75rem; color: var(--brand-ink); }
.checklist li.done .tick { background: var(--good); border-color: var(--good); }
.fields { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#captured { margin-top: 10px; font-size: .9rem; }
.detail { margin-bottom: 14px; overflow-x: auto; }
.detail ul { margin: 0; padding-left: 1.2rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0; } dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: -1px; overflow-x: auto; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--text-2); border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tabs a.active { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 600; }
.tab-body { border-top-left-radius: 0; }
.charter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.charter-bar label { flex-direction: row; align-items: center; gap: 6px; }
.charter-frame { width: 100%; height: 1100px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.decision { border-left: 4px solid var(--brand); }
.decision form input { flex: 1; }
.override { display: flex; gap: 6px; } .override input { width: 160px; }
.score-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.score-head .big { font-size: 2.6rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.comment { border-bottom: 1px solid var(--border); padding: 8px 0; } .comment p { white-space: pre-wrap; margin: 2px 0; }
.comments { margin-bottom: 14px; }
.timeline { padding-left: 1.2rem; } .timeline li { margin-bottom: 6px; }

/* portfolio */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tile .value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.scorecell { display: flex; align-items: center; gap: 8px; min-width: 150px; font-variant-numeric: tabular-nums; }
svg.bar { width: 100px; height: 10px; flex: none; }
svg.bar .track { fill: var(--track); } svg.bar .fill { fill: var(--accent); }
.waves { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; }
.wave { background: var(--surface-2); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.wave h3 { margin: 0; }
.wave-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 6px; padding: 8px 10px; text-decoration: none; color: var(--text); }
.wave-card.unfunded { border-left-color: var(--border); opacity: .75; }
table.matrix th, table.matrix td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; font-size: .85rem; }
table.matrix th[scope=row] { text-align: left; white-space: nowrap; }
table.matrix td.role-lead { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
table.matrix td.role-contributor { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
table.matrix td.hot { outline: 2px solid var(--bad); outline-offset: -2px; }
.heatmap { display: inline-flex; flex-direction: column; gap: 3px; }
.hm-row { display: flex; gap: 3px; }
.hm-axis { width: 44px; text-align: center; font-size: .8rem; color: var(--muted); align-self: center; }
.hm-cell { width: 44px; height: 36px; display: grid; place-items: center; border-radius: 4px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--heat-0); border: 2px solid transparent; }
.hm-cell.sev-high { border-color: var(--bad); } .hm-cell.sev-med { border-color: var(--warn); }
.hm-cell.lvl-1 { background: var(--heat-1); } .hm-cell.lvl-2 { background: var(--heat-2); }
.hm-cell.lvl-3 { background: var(--heat-3); color: var(--heat-ink); } .hm-cell.lvl-4 { background: var(--heat-4); color: var(--heat-ink); }

/* admin */
.settings { display: flex; flex-direction: column; gap: 14px; max-width: 640px; align-items: flex-start; }
.settings label, .settings fieldset { width: 100%; }
fieldset { border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
legend { font-weight: 600; padding: 0 4px; }
td input { width: 100%; }

dialog.modal { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
dialog.modal h2 { margin: 0; }
.row.end { justify-content: flex-end; width: 100%; }
.row.center { justify-content: center; }
button.danger-fill { background: var(--bad); border-color: var(--bad); }
.demo-accounts { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; }

/* roadmap (Gantt) */
.roadmap .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--text-2); }
.roadmap .legend > span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.k-approved { background: var(--accent); } .k-proposed { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.k-hold { background: transparent; border: 1.5px dashed var(--muted); } .k-req { width: 2px; height: 14px; border-radius: 0; background: var(--text-2); }
.rm-scroll { overflow-x: auto; margin-top: 8px; }
.rm { min-width: 820px; display: flex; flex-direction: column; }
.rm-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--border); }
.rm-label { padding: 8px 10px 8px 0; min-width: 0; font-size: .9rem; }
.rm-label a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.rm-ctl { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.rm-ctl label { flex-direction: row; align-items: center; gap: 6px; }
.rm-ctl select { padding: 2px 6px; font-size: .85rem; }
.rm-quarters { display: grid; grid-template-columns: repeat(8, 1fr); }
.rm-q { border-left: 1px solid var(--border); padding: 6px 8px; font-size: .8rem; color: var(--text-2); font-weight: 600; }
.rm-head .rm-q { text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.rm-load { background: var(--surface-2); }
.rm-count { display: flex; flex-direction: column; gap: 3px; font-weight: 400; }
.rm-n { font-size: 1rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rm-count svg.meter { width: 100%; height: 8px; }
svg.meter .track { fill: var(--track); } svg.meter .fill { fill: var(--accent); } svg.meter .cap { fill: var(--text-2); }
.rm-count.over svg.meter .fill { fill: var(--bad); }
.rm-over { color: var(--bad); font-weight: 700; font-size: .78rem; }
.rm-track { position: relative; min-height: 46px; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: calc(100% / 8) 100%; }
.rm-bar { position: absolute; top: 9px; height: 24px; border-radius: 4px; background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--text);
  display: flex; align-items: center; padding: 0 8px; font-size: .78rem; white-space: nowrap; overflow: hidden; touch-action: none; user-select: none; }
.rm-bar.s-approved { background: var(--accent); color: #fff; }
.rm-bar.s-on_hold { background: transparent; border-style: dashed; border-color: var(--muted); color: var(--muted); }
.rm-bar.conflict { box-shadow: 0 0 0 2px var(--bad); }
.rm-bar.clip-start { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dotted; }
.rm-bar.clip-end { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dotted; }
.rm-bar[tabindex] { cursor: grab; } .rm-bar.dragging { cursor: grabbing; opacity: .85; z-index: 2; }
.rm-req { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--text-2); }
.rm-warn { position: absolute; left: 4px; bottom: 0; color: var(--bad); font-weight: 600; white-space: nowrap; }
.rm-track:has(.rm-warn) { min-height: 62px; }

/* approval workflow */
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }
.journey h2 .muted { font-weight: 400; }
.gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.gate { border: 1px solid var(--border); border-top: 4px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.gate-head { display: flex; align-items: center; gap: 8px; }
.gate-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex: none; }
.gate-state { font-weight: 600; margin: 2px 0; }
.gs-approved { border-top-color: var(--good); } .gs-approved .gate-dot { background: var(--good); } .gs-approved .gate-state { color: var(--good); }
.gs-current { border-top-color: var(--accent); background: var(--accent-soft); } .gs-current .gate-dot { background: var(--accent); } .gs-current .gate-state { color: var(--accent); }
.gs-hold, .gs-changes { border-top-color: var(--warn); } .gs-hold .gate-dot, .gs-changes .gate-dot { background: var(--warn); } .gs-hold .gate-state, .gs-changes .gate-state { color: var(--warn); }
.gs-rejected { border-top-color: var(--bad); } .gs-rejected .gate-dot { background: var(--bad); } .gs-rejected .gate-state { color: var(--bad); }
.gs-skipped, .gs-upcoming { opacity: .75; }
.gs-skipped .gate-state { text-decoration: line-through; }
.votes { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.v-approve { color: var(--good); font-weight: 600; } .v-reject { color: var(--bad); font-weight: 600; } .v-changes, .v-hold { color: var(--warn); font-weight: 600; }
.gate-now { margin: 12px 0 0; }
.warn-text { color: var(--bad); font-weight: 600; }
.decision .stack { align-items: stretch; }
.decision .row input { flex: 1; min-width: 200px; }
label.check { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 8px; color: var(--text); }
label.check input { margin-top: 3px; flex: none; width: auto; min-width: 0; padding: 0; }
#gates { align-items: stretch; }
.checklist-confirm { gap: 6px; }
.card-lite { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
details.group { margin-bottom: 10px; } details.group summary { cursor: pointer; } details.group .stack { margin-top: 10px; align-items: stretch; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 220px; overflow-y: auto; }
.pick.short { grid-template-columns: 1fr; max-height: 160px; }
.d-approvers summary { cursor: pointer; } .d-approvers .pick { margin: 8px 0; min-width: 220px; }
.gate-editor { display: flex; flex-direction: column; gap: 12px; }
.gate-editor h3 { display: flex; align-items: center; gap: 6px; margin: 0; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); }
.gate-editor .g-name { font-weight: 600; min-width: 220px; }
.row.between { justify-content: space-between; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; align-items: start; }
.grid3 > * { min-width: 0; }
.wf-head { margin-bottom: 14px; max-width: 900px; }
.template-row { align-items: flex-end; } .template-row label { flex: 1; min-width: 0; max-width: 100%; } .template-row select { width: 100%; }
dialog.modal.wide { width: min(620px, calc(100vw - 32px)); }
dialog.modal textarea { width: 100%; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 8px; transition: transform .2s; z-index: 20; max-width: min(90vw, 640px); }
#toast:not(.show) { visibility: hidden; }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--bad); color: #fff; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .chat { height: 70vh; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
  #nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .user .who { display: none; }
  .msg { max-width: 95%; }
}
