/* ------------------------------------------------------------------ Farben & Grundwerte */
:root {
  --bg: #f5f6fa;
  --bg-soft: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --text: #18202e;
  --text-2: #3c4658;
  --muted: #6a7486;
  --border: #e2e6ee;
  --border-strong: #cfd5e1;
  --primary: #2554c7;
  --primary-hover: #1d45a8;
  --primary-soft: #e9effc;
  --primary-text: #ffffff;
  --accent: #e0902a;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --ok: #1d7a46;
  --ok-soft: #e4f5eb;
  --warn: #9a5b00;
  --warn-soft: #fdf2e0;
  --user-bubble: #2554c7;
  --user-text: #ffffff;
  --shadow-sm: 0 1px 2px rgba(20, 30, 55, .06);
  --shadow: 0 1px 3px rgba(20, 30, 55, .06), 0 6px 20px rgba(20, 30, 55, .06);
  --shadow-lg: 0 10px 40px rgba(20, 30, 55, .14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131a;
    --bg-soft: #151a23;
    --surface: #181e28;
    --surface-2: #1c2330;
    --text: #e8ecf3;
    --text-2: #c3cad6;
    --muted: #8f99aa;
    --border: #283142;
    --border-strong: #354055;
    --primary: #6f9bff;
    --primary-hover: #8cb0ff;
    --primary-soft: #1d2a46;
    --primary-text: #0b1020;
    --accent: #f0ac52;
    --danger: #ff8a7d;
    --danger-soft: #3a1f1d;
    --ok: #6fd49a;
    --ok-soft: #173326;
    --warn: #f2bd6b;
    --warn-soft: #3a2c16;
    --user-bubble: #2f5fd6;
    --user-text: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .35rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.error { color: var(--danger); margin: .35rem 0; font-size: .9rem; }
.error:empty { display: none; }
#area-form input[name="name"] { width: 17rem; }
.sprite { position: absolute; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ico.lg { width: 2rem; height: 2rem; }

/* ------------------------------------------------------------------ Formulare & Knöpfe */
input, select, textarea {
  font: inherit; color: inherit; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .75rem;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, .dropzone:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
label { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; font-weight: 550; font-size: .92rem; color: var(--text-2); }
label > input, label > select { font-weight: 400; color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: var(--radius-sm); font-weight: 550;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: .35rem .65rem; font-size: .88rem; }
.btn.block { width: 100%; padding: .7rem 1rem; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border: none; background: transparent; border-radius: var(--radius-sm); color: var(--muted);
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.link-btn { border: none; background: none; color: var(--primary); padding: .25rem .4rem; border-radius: 6px; font-size: .88rem; display: inline-flex; gap: .3rem; align-items: center; }
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.space { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 12rem; }
.push { margin-left: auto; }
.right { text-align: right !important; }

/* ------------------------------------------------------------------ Anmeldung */
.auth-view { min-height: 100%; display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; }
.auth-view.single { grid-template-columns: 1fr; }
.auth-aside {
  background: linear-gradient(155deg, #1d3f99 0%, #2554c7 55%, #3a74e0 100%);
  color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.auth-brand { font-weight: 700; font-size: 1.1rem; display: flex; gap: .6rem; align-items: center; }
.auth-brand .ico { width: 1.6rem; height: 1.6rem; }
.auth-pitch h2 { font-size: 1.7rem; line-height: 1.25; max-width: 18ch; margin-bottom: 1.5rem; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.auth-pitch li { display: flex; gap: .75rem; align-items: flex-start; opacity: .92; }
.auth-pitch li .ico { margin-top: .25rem; }
.auth-main { display: grid; place-items: center; padding: 2rem 16px; }
.auth-card { width: min(380px, 100%); }
.auth-card h1 { font-size: 1.6rem; }
.auth-card > p.muted { margin: 0 0 1.5rem; }
.auth-view.single .auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.auth-icon { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 1rem; }
.auth-icon .ico { width: 1.4rem; height: 1.4rem; }

/* ------------------------------------------------------------------ Kopfzeile */
#view-app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .55rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.brand-mark { width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); }
#tabs { display: flex; gap: .2rem; flex: 1; }
.tab {
  display: inline-flex; align-items: center; gap: .45rem; border: none; background: none;
  padding: .45rem .8rem; border-radius: var(--radius-sm); color: var(--muted); font-weight: 550;
}
.tab:hover { color: var(--text); background: var(--bg-soft); }
.tab.active { color: var(--primary); background: var(--primary-soft); }
.user-menu { display: flex; align-items: center; gap: .35rem; color: var(--text-2); font-size: .92rem; }
.avatar-sm {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--primary); font-weight: 700; font-size: .8rem; border: 1px solid var(--border);
}
#user-name { margin-right: .35rem; }

/* ------------------------------------------------------------------ Seiten */
.tab-panel { width: 100%; }
.page { max-width: 1040px; margin: 0 auto; padding: 1.75rem 16px 3rem; overflow-y: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; }

/* Upload */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 1.75rem 1rem;
  color: var(--text-2); background: var(--surface-2); cursor: pointer; margin: 0 0 1rem; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .ico.lg { color: var(--primary); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-bar { justify-content: space-between; }
.inline-label { flex-direction: row; align-items: center; gap: .6rem; margin: 0; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: .65rem 1.25rem; color: var(--muted); font-weight: 550; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.file-cell { display: flex; align-items: center; gap: .65rem; }
.file-icon { width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); font-size: .62rem; font-weight: 800; letter-spacing: .02em; }
.file-icon.pdf { background: var(--danger-soft); color: var(--danger); }
.file-icon.docx { background: var(--primary-soft); color: var(--primary); }
.file-icon.md, .file-icon.txt { background: var(--bg-soft); color: var(--text-2); }
.file-cell a { color: var(--text); font-weight: 550; text-decoration: none; overflow-wrap: anywhere; }
.file-cell a:hover { color: var(--primary); text-decoration: underline; }
.person { display: flex; align-items: center; gap: .65rem; }
.person small { display: block; color: var(--muted); }
.actions { display: flex; gap: .2rem; justify-content: flex-end; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.badge.ok, .badge.fertig { background: var(--ok-soft); color: var(--ok); }
.badge.fehler, .badge.off { background: var(--danger-soft); color: var(--danger); }
.badge.wartend, .badge.verarbeitung, .badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.verarbeitung::before { animation: pulse 1s ease-in-out infinite; }
.badge.plain { background: var(--bg-soft); color: var(--text-2); }
.badge.plain::before { display: none; }
.badge.role-admin { background: var(--primary-soft); color: var(--primary); }
.badge.role-admin::before, .badge.role-editor::before, .badge.role-user::before { display: none; }
.badge.role-editor { background: var(--warn-soft); color: var(--warn); }
.badge.role-user { background: var(--bg-soft); color: var(--text-2); }
.err-detail { color: var(--danger); font-size: .82rem; margin-top: .25rem; }

.chips { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .35rem .3rem .9rem; display: flex; gap: .45rem; align-items: center; font-weight: 550; }
.chips .count { color: var(--muted); font-weight: 400; font-size: .82rem; }
.chips .icon-btn { width: 1.6rem; height: 1.6rem; }

/* ------------------------------------------------------------------ Chat */
.chat-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: 1.5rem 16px 1rem; scroll-behavior: smooth; }
.messages > * { max-width: 820px; margin-left: auto; margin-right: auto; }

.welcome { text-align: center; padding: 3.5rem 0 1rem; }
.welcome-icon { width: 3.5rem; height: 3.5rem; margin: 0 auto 1.1rem; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #1d3f99, #3a74e0); box-shadow: var(--shadow); }
.welcome-icon .ico { width: 1.8rem; height: 1.8rem; }
.welcome h1 { font-size: 1.75rem; }
.welcome p { margin: .25rem 0 2rem; }
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; text-align: left; }
.example {
  display: flex; flex-direction: column; gap: .6rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem;
  box-shadow: var(--shadow-sm); color: var(--text-2); font-size: .92rem; line-height: 1.4; text-align: left;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.example .ico { color: var(--primary); width: 1.3rem; height: 1.3rem; }
.example:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }

.msg { display: flex; gap: .8rem; margin: 1.1rem auto; animation: rise .2s ease-out; }
.msg.user { justify-content: flex-end; }
.msg-avatar { width: 2rem; height: 2rem; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); margin-top: .1rem; }
.msg-avatar .ico { width: 1.1rem; height: 1.1rem; }
.msg-body { min-width: 0; flex: 1; }
.msg.user .msg-body { flex: 0 1 auto; max-width: 78%; }
.bubble { overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--user-bubble); color: var(--user-text); padding: .6rem 1rem; border-radius: var(--radius-lg) var(--radius-lg) 6px var(--radius-lg); box-shadow: var(--shadow-sm); }
.msg.assistant .bubble { padding: .2rem 0; color: var(--text); }
.msg.assistant .bubble > :first-child { margin-top: 0; }
.bubble p { margin: .5rem 0; }
.bubble ul, .bubble ol { margin: .5rem 0; padding-left: 1.35rem; }
.bubble li { margin: .2rem 0; }
.bubble h3 { margin: 1rem 0 .35rem; font-size: 1rem; }
.bubble code { background: var(--bg-soft); padding: .05rem .3rem; border-radius: 5px; font-size: .9em; }
.bubble strong { font-weight: 650; }
.bubble .error-box { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: .6rem .85rem; margin: 0; }
.cite {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; margin: 0 .1rem;
  font-size: .7rem; font-weight: 700; line-height: 1; border-radius: 6px; border: none;
  background: var(--primary-soft); color: var(--primary); vertical-align: .15em;
  transition: background .15s, color .15s;
}
.cite:hover { background: var(--primary); color: var(--primary-text); }

.thinking { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .92rem; padding: .35rem 0; }
.dots { display: inline-flex; gap: .25rem; }
.dots span { width: .4rem; height: .4rem; border-radius: 50%; background: var(--primary); opacity: .35; animation: dot 1.2s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
.streaming > :last-child::after { content: ""; display: inline-block; width: .45rem; height: 1em; margin-left: .15rem; vertical-align: -.15em; background: var(--primary); border-radius: 2px; animation: blink 1s steps(2) infinite; }

/* Quellen */
.sources { margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.sources-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin-bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
.source-list { display: grid; gap: .45rem; }
.source { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.source.uncited:not([open]) { opacity: .6; }
.source.uncited:not([open]):hover { opacity: 1; }
.source[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.source.flash { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.source summary { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; cursor: pointer; list-style: none; font-size: .9rem; }
.source summary::-webkit-details-marker { display: none; }
.source summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.1rem; transition: transform .15s; }
.source[open] summary::after { transform: rotate(90deg); }
.source-nr { min-width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 700; flex: none; }
.source-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.source-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.source-body { padding: 0 .75rem .75rem 2.85rem; }
.source-text { white-space: pre-wrap; color: var(--text-2); font-size: .88rem; max-height: 14rem; overflow-y: auto; background: var(--surface-2); border-radius: 6px; padding: .6rem .75rem; margin-bottom: .5rem; border-left: 3px solid var(--primary-soft); }
.source-open { font-size: .85rem; display: inline-flex; gap: .3rem; align-items: center; text-decoration: none; font-weight: 550; }
.source-open:hover { text-decoration: underline; }

/* Eingabe */
.composer-wrap { padding: .5rem 16px 1.1rem; background: linear-gradient(to bottom, transparent, var(--bg) 35%); }
.composer {
  max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: .6rem .6rem .5rem .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--primary); box-shadow: var(--shadow), 0 0 0 3px var(--primary-soft); }
.composer textarea { width: 100%; border: none; padding: .35rem 0; resize: none; min-height: 1.6rem; max-height: 12rem; background: transparent; box-shadow: none; line-height: 1.5; }
.composer textarea:focus { box-shadow: none; }
.composer-bar { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.composer-bar select { padding: .3rem .55rem; font-size: .86rem; border-radius: 999px; background: var(--surface-2); border-color: var(--border); }
.composer-bar .hint { margin-left: auto; }
.send-btn {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: none; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-text); transition: background .15s, transform .1s, opacity .15s;
}
.send-btn:hover { background: var(--primary-hover); }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { opacity: .45; cursor: default; }

/* ------------------------------------------------------------------ Dialog */
dialog {
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  width: min(520px, calc(100% - 32px)); padding: 1.5rem; box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(10, 15, 30, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 .9rem; padding: .5rem .9rem .75rem; }
legend { font-weight: 550; font-size: .92rem; color: var(--text-2); padding: 0 .3rem; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.checkbox-list label { flex-direction: row; align-items: center; font-weight: 400; margin: 0; gap: .4rem; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.checkbox-list label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.checkbox-list input, .switch input { accent-color: var(--primary); width: 1rem; height: 1rem; margin: 0; }
.switch { flex-direction: row; align-items: center; gap: .55rem; font-weight: 500; }

/* ------------------------------------------------------------------ Animationen */
@keyframes blink { 50% { opacity: 0; } }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ Kleine Bildschirme */
@media (max-width: 860px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-aside { padding: 1.5rem; }
  .auth-pitch { display: none; }
  .examples { grid-template-columns: 1fr; }
  .example { flex-direction: row; align-items: center; }
  #user-name, .composer-bar .hint { display: none; }
  #btn-new-chat { margin-left: auto; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: .5rem; padding: .5rem 16px; }
  #tabs { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .tab span { font-size: .88rem; }
  .user-menu { margin-left: auto; }
  .msg.user .msg-body { max-width: 90%; }
  .msg-avatar { display: none; }
  .welcome { padding-top: 1.5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .table th, .table td { padding: .6rem .8rem; }
  .table { min-width: 640px; }
  .file-cell a { white-space: nowrap; }
  .source-body { padding-left: .75rem; }
}
