:root {
  color-scheme: light;
  --bg: #f7f7fb;
  --surface: #fff;
  --surface-2: #eef2ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #17227a;
  --accent-2: #2563eb;
  --button-hover: #802168;
  --danger: #b42318;
  --success: #137044;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, select, summary, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button, input, select, textarea { border-radius: 8px; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.5px; }
h2 { font-size: 18px; line-height: 1.35; }
h3 { font-size: 16px; }
.workspace { width: min(1380px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 32px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.brand { display: inline-block; margin-top: 8px; color: var(--ink); text-decoration: none; font-size: 36px; font-weight: 800; line-height: 1.05; }
.role-label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.role-label select { min-width: 245px; color: var(--ink); font-size: 14px; }
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0; }
.nav-item { min-height: 38px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.nav-item.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.nav-item:not(.disabled):hover { background: var(--button-hover); border-color: var(--button-hover); color: #fff; }
.nav-item:not(.disabled):hover small { color: #fff; }
.nav-item.disabled { color: var(--muted); background: transparent; }
.nav-item small { font-size: 11px; color: var(--muted); background: #e9eaf0; padding: 1px 5px; border-radius: 4px; }
.demo-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; border: 1px solid #e2e5f2; border-radius: 8px; background: var(--surface-2); color: #4b5676; font-size: 12px; }
.demo-banner strong { font-weight: 600; }
.demo-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #8390b3; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 26px 0 20px; }
.page-heading p { margin-top: 9px; color: var(--muted); }
.monitor-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 22px; }
.monitor-hero h1 { color: var(--accent); font-size: clamp(30px,3vw,42px); letter-spacing: -.8px; }
.monitor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.monitor-actions > button { min-height: 40px; }
.collection-status { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 9px 13px; border: 1px solid #dbe9e1; border-radius: 11px; background: #f4faf6; }
.collection-status strong { color: #315f49; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.primary, .secondary { min-height: 36px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:not(:disabled):hover { background: var(--button-hover); border-color: var(--button-hover); }
.monitor-actions > .primary:disabled { opacity: .55; cursor: not-allowed; }
.secondary:not(:disabled):hover { background: var(--button-hover); border-color: var(--button-hover); color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.monitor-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin-bottom: 14px; overflow: hidden; }
.summary-stat { display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 20px; border-right: 1px solid var(--line); }
.summary-stat:last-child { border-right: 0; }
.summary-stat > div { min-width: 0; }
.summary-stat > div > span { color: var(--muted); font-size: 12px; }
.summary-stat strong { display: block; margin: 5px 0 4px; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-stat small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.summary-stat small b { color: inherit; }
.summary-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; color: var(--accent); background: #eef2ff; font-size: 17px; font-weight: 800; }
.new-mark { color: #59657d; background: #f0f2f6; }
.work-mark { color: #1d4ed8; background: #eaf2ff; }
.metric { position: relative; min-height: 132px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.metric-name { display: block; padding-right: 28px; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 12px; font-size: 32px; font-weight: 800; line-height: 1; }
.metric p { margin-top: 14px; color: var(--muted); font-size: 12px; }
.metric-icon { position: absolute; top: 16px; right: 16px; color: var(--accent); font-weight: 700; }
.metric.alert strong, .metric.alert .metric-icon { color: var(--danger); }
.metric.done strong, .metric.done .metric-icon { color: var(--success); }
.summary-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; margin-top: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.subtle, .caption, .muted { color: var(--muted); font-size: 13px; }
.caption { margin-top: 5px; }
.attention-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.attention-item:last-child { border-bottom: 0; }
.attention-item:not(:disabled):hover { background: #f9ecf5; color: var(--button-hover); }
.attention-item strong { display: block; font-size: 14px; font-weight: 600; }
.attention-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.attention-symbol { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 8px; color: var(--accent); background: var(--surface-2); font-weight: 800; }
.chevron { margin-left: auto; color: var(--muted); }
#topics { padding: 8px 16px; }
.topic-row { display: grid; grid-template-columns: 92px 1fr 24px; align-items: center; gap: 12px; min-height: 36px; color: var(--muted); }
.topic-row > :first-child { color: var(--ink); font-weight: 600; }
.topic-row > :last-child { text-align: right; }
.track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.track span { display: block; height: 100%; background: var(--accent-2); border-radius: inherit; }
.topics-panel > .caption { padding: 0 16px 16px; font-size: 12px; }
.registry { margin-top: 12px; }
.weekly-report { display:flex; align-items:center; justify-content:space-between; gap:22px; margin-bottom:14px; padding:20px 24px; border-color:#d8e5f3; background:linear-gradient(110deg,#f3f8fd,#fff 70%); }
.weekly-report h2 { margin:4px 0 5px; color:#18265c; font-size:21px; }
.weekly-report p:last-child { color:var(--muted); max-width:700px; }
.weekly-report .primary { flex:none; }
.residents-dialog { width:min(980px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:0; border:1px solid #dce3ef; border-radius:20px; box-shadow:0 24px 80px #18265c33; }
.residents-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:24px 28px 20px; border-bottom:1px solid var(--line); }
.residents-dialog-head h2 { margin:4px 0 7px; font-size:27px; }
.residents-dialog-head p:last-child { color:var(--muted); font-size:13px; }
.residents-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:22px 28px 28px; }
.resident-card { display:grid; grid-template-columns:86px minmax(0,1fr); grid-template-rows:1fr auto; gap:14px; padding:17px; border:1px solid #e0e5ef; border-radius:16px; background:#fff; }
.resident-photo { width:86px; height:86px; object-fit:cover; border-radius:14px; background:#eef2f8; }
.resident-info { min-width:0; }
.resident-title-row { display:flex; flex-wrap:wrap; align-items:center; gap:7px 10px; }
.resident-info h3 { font-size:17px; line-height:1.25; }
.resident-status { padding:3px 8px; border-radius:999px; background:#f0f2f6; color:#667085; font-size:11px; font-weight:700; white-space:nowrap; }
.resident-meta { margin-top:7px; color:#667085; font-size:12px; }
.resident-occupation { margin-top:6px; font-size:13px; font-weight:600; }
.resident-description { margin-top:4px; color:var(--muted); font-size:12px; }
.resident-social { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:42px; padding-top:12px; border-top:1px solid #edf0f5; }
.resident-social-label { margin-right:6px; color:var(--muted); font-size:12px; }
.resident-social-icon { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:10px; }
.resident-social-image { display:block; width:30px; height:30px; object-fit:contain; }
.resident-social-max .resident-social-image { width:40px; height:40px; }
.resident-social-icon.is-disconnected .resident-social-image { filter:grayscale(1); opacity:.38; }
.resident-social-icon.is-connected:hover { background:#f3eaf2; transform:translateY(-1px); }
.resident-social-icon.is-connected:focus-visible { outline:2px solid #802168; outline-offset:2px; }
.residents-dialog #closeResidents, .report-dialog #closeReport { display:flex; align-items:center; justify-content:center; line-height:0; }
.residents-dialog #closeResidents svg, .report-dialog #closeReport svg { display:block; width:17px; height:17px; }
.report-dialog { width:min(920px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:0; border:1px solid var(--line); border-radius:18px; box-shadow:0 24px 80px #18265c33; }
.report-dialog:has(.report-date-popover:not([hidden])) { min-height:min(760px,calc(100% - 24px)); }
.report-dialog-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:20px; padding:24px 28px 18px; background:#fff; border-bottom:1px solid var(--line); }
.report-dialog-head h2 { margin:4px 0 6px; font-size:26px; }
.report-period-picker { position:relative; z-index:3; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px 18px; padding:22px 28px; border-bottom:1px solid var(--line); background:linear-gradient(120deg,#f3f7ff 0%,#faf5fb 100%); }
.report-period-heading { grid-column:1/-1; display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.report-period-heading strong { color:var(--ink); font-size:16px; }
.report-period-heading span { color:var(--muted); font-size:12px; }
.report-period-fields { display:flex; min-width:0; align-items:center; gap:10px; }
.report-period-field { position:relative; display:grid; flex:1; gap:5px; min-width:0; padding:9px 12px; border:1px solid #dbe3f4; border-radius:13px; background:#fff; box-shadow:0 2px 8px #17255b08; }
.report-period-field:focus-within { border-color:#802168; box-shadow:0 0 0 3px #80216822; }
.report-period-field>span { color:#607092; font-size:11px; font-weight:700; letter-spacing:.02em; }
.report-date-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-width:0; min-height:29px; padding:0; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.report-date-trigger strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; font-weight:700; font-variant-numeric:tabular-nums; }
.report-date-trigger svg { flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.report-date-trigger:hover { color:#802168; }
.report-period-divider { color:#802168; font-size:20px; font-weight:700; }
.report-period-actions { display:flex; align-items:center; gap:8px; }
.report-period-actions button { min-height:45px; white-space:nowrap; }
.report-period-hint { grid-column:1/-1; margin:0; color:var(--muted); font-size:12px; }
.report-date-popover { box-sizing:border-box; position:absolute; top:calc(100% + 8px); left:0; z-index:20; width:min(350px,calc(100vw - 48px)); padding:15px; border:1px solid #d8e0ef; border-radius:16px; background:#fff; box-shadow:0 20px 44px #17255b29; }
.report-date-popover[hidden] { display:none; }
.report-period-fields>.report-period-field:last-child .report-date-popover { left:auto; right:0; }
.report-calendar-guide { margin-bottom:12px; padding:8px 10px; border-radius:9px; background:#f1f4fb; color:#405884; font-size:12px; font-weight:700; }
.report-calendar-guide.is-error { background:#fff1f0; color:#a5262a; }
.report-calendar-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.report-calendar-month-year { display:flex; min-width:0; align-items:center; justify-content:center; gap:5px; }
.report-calendar-month-year select,.report-calendar-month-year input { min-height:34px; border:1px solid #d9e0ee; border-radius:8px; background:#f6f8fc; color:#1b2c60; font-size:12px; font-weight:700; }
.report-calendar-month-year select { min-width:0; width:124px; padding:5px 4px; }
.report-calendar-month-year input { width:66px; padding:5px 3px; text-align:center; font-variant-numeric:tabular-nums; }
.report-calendar-month-year input::-webkit-inner-spin-button,.report-calendar-month-year input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.report-calendar-month-year input[type=number] { appearance:textfield; }
.report-calendar-nav { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid #d9e0ee; border-radius:9px; background:#fff; color:#1b2c60; font-size:25px; line-height:1; }
.report-calendar-nav:hover { border-color:#802168; color:#802168; }
.report-calendar-weekdays,.report-calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; text-align:center; }
.report-calendar-weekdays { margin-bottom:5px; color:#7d8aa4; font-size:11px; font-weight:700; }
.report-calendar-weekdays span { padding:5px 0; }
.report-calendar-day { display:grid; place-items:center; min-width:0; height:37px; padding:0; border:1px solid transparent; border-radius:9px; background:transparent; color:#27385b; font-size:13px; font-variant-numeric:tabular-nums; cursor:pointer; }
.report-calendar-day:hover { background:#edf1fa; border-color:#d8e0ef; }
.report-calendar-day.is-other { color:#a7b1c5; }
.report-calendar-day.is-in-range { background:#e8edf9; border-radius:4px; }
.report-calendar-day.is-today { border-color:#802168; }
.report-calendar-day.is-selected,.report-calendar-day.is-selected:hover { border-color:#1b2c60; background:#1b2c60; color:#fff; }
.report-calendar-time { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:13px; padding:11px 0; border-top:1px solid #e6ebf4; }
.report-calendar-time>span { color:#607092; font-size:12px; font-weight:700; }
.report-calendar-time>div { display:flex; align-items:center; gap:5px; }
.report-calendar-time input { width:44px; height:35px; padding:4px; border:1px solid #d9e0ee; border-radius:8px; background:#f6f8fc; color:#1b2c60; text-align:center; font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; }
.report-calendar-time input::-webkit-inner-spin-button,.report-calendar-time input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.report-calendar-time input[type=number] { appearance:textfield; }
.report-calendar-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.report-calendar-footer button { min-height:34px; padding:6px 10px; border:0; border-radius:8px; background:#f2f5fb; color:#405884; font-size:12px; font-weight:700; }
.report-calendar-footer button:hover { background:#e9edf8; color:#802168; }
.report-calendar-footer .report-calendar-done { background:#1b2c60; color:#fff; }
.report-calendar-footer .report-calendar-done:hover { background:#802168; color:#fff; }
.report-calendar-footer .report-calendar-done:disabled { background:#d7ddea; color:#7d8aa4; cursor:not-allowed; }
#reportMessage { padding:14px 28px 0; }
#reportItems { padding:16px 28px; }
.report-empty { padding:28px; color:var(--muted); background:#f7f9fe; border-radius:12px; }
.report-item { padding:18px 0; border-bottom:1px solid var(--line); }
.report-item:first-child { padding-top:0; }
.report-item-top { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:12px; color:var(--muted); font-size:12px; }
.report-item-top .check { color:var(--ink); font-size:14px; font-weight:700; }
.report-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
.report-title-field { grid-column:1/-1; }
.report-source-note { margin:-4px 0 14px; font-size:12px; }
.report-source-note.is-complete { color:#19765d; }
.report-source-note.is-excerpt { color:#a25e13; }
.report-item label:not(.check) { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.report-item input:not([type="checkbox"]), .report-item select, .report-item textarea { width:100%; color:var(--ink); font-size:14px; }
.report-text-label { margin-top:14px; }
.report-merge-label { margin-top:14px; }
.report-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; font-size:12px; }
.report-actions { position:sticky; bottom:0; z-index:2; display:flex; justify-content:flex-end; gap:10px; padding:14px 28px; background:#fff; border-top:1px solid var(--line); }
.report-archive { padding:20px 28px 28px; background:#f8faff; border-top:1px solid var(--line); }
.report-archive h3 { margin-bottom:12px; }
.archive-group + .archive-group { margin-top:18px; }
.archive-group-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:10px 0; color:var(--ink); }
.archive-group-head small { color:var(--muted); white-space:nowrap; }
.archive-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; border-top:1px solid var(--line); }
.archive-row strong { display:block; overflow-wrap:anywhere; }
.archive-row small { display:block; margin-top:3px; color:var(--muted); }
.archive-row-actions { display:flex; gap:8px; flex-shrink:0; }
.archive-delete { color:#a5262a; }
.count { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 7px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.mention-filters { --filter-control-height: 46px; align-items: flex-end; }
.mention-filters .tone-tabs,
.mention-filters .search,
.mention-filters .date-filter,
.mention-filters .date-presets,
.mention-filters > select,
.mention-filters .date-clear { align-self: flex-end; }
.mention-filters .tone-tabs > button,
.mention-filters .search input,
.mention-filters .date-filter input,
.mention-filters .date-presets button,
.mention-filters > select,
.mention-filters .date-clear {
  height: var(--filter-control-height);
  min-height: var(--filter-control-height);
}
.mention-filters .tone-tabs > button { padding-top: 8px; padding-bottom: 8px; }
.mention-filters .search span { top: 9px; }
input, select, textarea { min-height: 38px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 10px; max-width: 100%; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #737b8b; }
.search { flex: 1 1 300px; position: relative; }
.search span { position: absolute; left: 12px; top: 5px; color: var(--muted); font-size: 20px; }
.search input { width: 100%; padding-left: 36px; }
.date-filter { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.date-filter input { min-width: 145px; }
.date-clear { align-self: end; }
.date-presets { display:flex; align-self:end; gap:5px; }
.date-presets button { min-height:38px; padding:7px 10px; border:1px solid var(--line); background:#f7f8fc; color:var(--muted); font-size:11px; }
.date-presets button:not(:disabled):hover { background:var(--button-hover); border-color:var(--button-hover); color:#fff; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.check input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }
.table-scroll { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 1000px; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { height: 44px; color: var(--muted); background: #fafafe; font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; width: 37%; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
.case-link { display: block; text-align: left; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; line-height: 1.45; }
.case-link:hover { color:var(--button-hover); text-decoration: underline; }
.row-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); margin-top: 5px; font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; background: #eef2ff; color: var(--accent); font-size: 12px; white-space: nowrap; }
.badge.work { background: #eaf2ff; color: #1d4ed8; }
.badge.waiting { background: #fff4df; color: #8a5a10; }
.badge.resolved { background: #eaf6ef; color: var(--success); }
.overdue { color: var(--danger); }
.tiny { display: block; margin-top: 3px; font-size: 11px; }
.source-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.arrow-button, .icon-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.arrow-button:not(:disabled):hover, .icon-button:not(:disabled):hover { background:var(--button-hover); color:#fff; border-color:var(--button-hover); }
.empty { padding: 40px 16px; text-align: center; }
.empty p { color: var(--muted); margin: 8px 0 16px; }
.coverage { margin-top: 12px; }
.coverage summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; font-weight: 600; list-style: none; }
.coverage summary::-webkit-details-marker { display: none; }
.coverage summary::after { content: '+'; color: var(--muted); margin-left: auto; font-size: 20px; line-height: 1; }
.coverage[open] summary::after { content: '−'; }
.coverage > p { padding: 0 16px 16px; color: var(--muted); line-height: 1.6; }
.source-warning { margin-top: 16px; }
.coverage-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 0 16px 16px; }
.coverage-grid > span { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.coverage-grid small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); margin-top: 22px; font-size: 12px; }
.storage-warning { margin-top: 16px; padding: 12px; background: #fff4df; color: #8a5a10; border-radius: 8px; }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
dialog::backdrop { background: rgb(20 28 54 / 35%); }
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: 610px; height: 100%; max-height: 100%; max-width: 100%; padding: 0; border-width: 0 0 0 1px; }
.drawer-inner { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.dialog-head .eyebrow { margin-bottom: 9px; }
.dialog-head h2 { font-size: 24px; line-height: 1.25; }
.icon-button { flex: 0 0 32px; font-size: 24px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-grid small { display: block; color: var(--muted); margin-bottom: 5px; font-size: 12px; }
.detail-grid strong { font-size: 14px; font-weight: 600; }
.detail-block { margin: 24px 0; }
.detail-block > p, .result p { margin-top: 8px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.source-box { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--bg); font-size: 12px; overflow-wrap: anywhere; }
.source-box p { color: var(--muted); margin-top: 4px; }
.result { padding: 16px; border: 1px solid #cae5d5; background: #f0f9f4; border-radius: 8px; }
.result h3 { color: var(--success); }
.timeline { margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--line); }
.event { position: relative; margin: 0 0 20px; }
.event::before { content: ''; position: absolute; left: -21px; top: 6px; height: 8px; width: 8px; border: 2px solid white; border-radius: 50%; background: #8493bb; }
.event small { color: var(--muted); font-size: 12px; }
.event p { margin-top: 5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.editor { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.editor h3 { margin-bottom: 16px; }
.editor label, #createForm label { display: grid; align-content: start; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.editor input, .editor select, .editor textarea, #createForm input, #createForm select, #createForm textarea { width: 100%; min-width: 0; color: var(--ink); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid > * { min-width: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.create-dialog { width: 560px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); padding: 26px; border-radius: 8px; }
.create-dialog .muted { margin: 14px 0 20px; }
.error { color: var(--danger); margin: 10px 0; font-size: 13px; }
.error:empty { display: none; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 20px; max-width: calc(100% - 32px); width: max-content; border-radius: 8px; color: white; background: var(--accent); }
@media (max-width: 960px) {
  .monitor-hero { align-items:flex-start; flex-direction:column; }
  .monitor-actions { justify-content:flex-start; width:100%; }
}
@media (max-width: 1060px) {
  .summary-grid { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: repeat(3, 1fr); }
  .filters .search { flex-basis: 100%; }
  .monitor-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .summary-stat:nth-child(3) { border-right: 0; }
  .summary-stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .residents-dialog-head { padding:19px 20px 16px; }
  .residents-dialog-head h2 { font-size:24px; }
  .residents-grid { grid-template-columns:1fr; padding:16px 20px 20px; }
  .resident-card { grid-template-columns:72px minmax(0,1fr); padding:14px; gap:12px; }
  .resident-photo { width:72px; height:72px; }
  .weekly-report { align-items:stretch; flex-direction:column; padding:18px; }
  .report-dialog-head { padding:18px; }
  .report-period-picker { grid-template-columns:1fr; padding:18px; }
  .report-period-fields { flex-direction:column; align-items:stretch; }
  .report-date-popover,.report-period-fields>.report-period-field:last-child .report-date-popover { position:relative; top:auto; left:auto; right:auto; min-width:0; max-width:100%; width:100%; margin-top:10px; box-shadow:0 8px 20px #17255b17; }
  .report-calendar-head { gap:4px; }
  .report-calendar-nav { width:28px; height:30px; }
  .report-calendar-month-year { gap:4px; }
  .report-calendar-month-year select { width:90px; }
  .report-calendar-month-year input { width:55px; }
  .report-period-divider { display:none; }
  .report-period-actions { flex-wrap:wrap; }
  .report-period-actions button { flex:1; white-space:normal; }
  #reportMessage { padding:12px 18px 0; }
  #reportItems { padding:14px 18px; }
  .report-fields { grid-template-columns:1fr; }
  .report-actions { padding:12px 18px; }
  .report-actions button { flex:1; white-space:normal; }
  .report-archive { padding:18px; }
  .archive-row { align-items:flex-start; flex-direction:column; }
  .archive-row-actions { width:100%; }
  .archive-row-actions button { flex:1; }
  .workspace { width: calc(100% - 20px); padding-top: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 18px; }
  .brand { font-size: 28px; }
  .role-label { width: 100%; }
  .role-label select { width: 100%; min-width: 0; }
  .portal-nav { gap: 6px; margin: 16px 0; }
  .nav-item { padding: 8px 10px; font-size: 12px; gap: 6px; }
  .demo-banner { align-items: baseline; }
  .demo-banner > span:last-child { flex-basis: 100%; }
  .page-heading { flex-direction: column; align-items: flex-start; margin: 22px 0 16px; gap: 14px; }
  .monitor-hero { align-items: flex-start; flex-direction: column; margin-top: 22px; gap: 14px; }
  .monitor-actions { justify-content: flex-start; width: 100%; }
  .collection-status strong { white-space: normal; }
  .monitor-summary { grid-template-columns: 1fr 1fr; }
  .summary-stat:nth-child(3) { border-right: 1px solid var(--line); }
  .summary-stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .summary-stat:nth-child(even) { border-right: 0; }
  .summary-stat:nth-child(5) { grid-column: 1 / -1; border-right: 0; }
  .summary-stat { min-height: 104px; padding: 15px 13px; gap: 10px; }
  .summary-mark { flex-basis: 32px; width: 32px; height: 32px; border-radius: 10px; }
  .summary-stat strong { font-size: 25px; }
  h1 { font-size: 26px; }
  .page-heading p { font-size: 13px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 12px; min-height: 128px; }
  .metric-name { min-height: 38px; padding-right: 15px; font-size: 12px; }
  .metric-icon { right: 12px; top: 12px; }
  .metric strong { font-size: 28px; margin-top: 8px; }
  .metric p { font-size: 11px; margin-top: 10px; }
  .panel-head { flex-wrap: wrap; padding: 14px; gap: 7px; }
  .panel-head .subtle { font-size: 12px; }
  .registry .panel-head { gap: 12px; }
  .attention-item { padding: 14px; gap: 10px; }
  .filters { padding: 14px; }
  .filters > select { flex: 1 1 140px; min-width: 0; }
  .date-filter { flex: 1 1 135px; }
  .date-filter input { width: 100%; min-width: 0; }
  .date-clear { flex: 1 1 100%; }
  .check { min-height: 34px; }
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .coverage summary .badge { font-size: 11px; }
  .drawer-inner { padding: 20px; }
  .dialog-head h2 { font-size: 21px; }
  .detail-grid, .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .create-dialog { padding: 20px; }
}
/* Live local mentions feed. */
.live-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #37634e; background: #edf7f1; border: 1px solid #dbece2; border-radius: 8px; padding: 10px 14px; font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #268053; }
.sync-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; margin: -4px 0 20px; }
button:disabled { cursor: default; opacity: .5; }
.tone-tabs { display: flex; gap: 6px; }
.tone-tabs span { font-size: 12px; opacity: .8; }
.filter-note { color: var(--muted); padding: 12px 16px; font-size: 12px; border-bottom: 1px solid var(--line); }
.inbox-tabs-bar { display:flex; align-items:center; border-bottom:1px solid var(--line); padding-right:16px; }
.inbox-tabs { display:flex; gap:6px; padding:0 16px; }
.inbox-tabs button { display:flex; align-items:center; gap:7px; min-height:54px; padding:13px 16px 11px; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; color:#72809b; font-size:14px; font-weight:700; cursor:pointer; }
.inbox-tabs button:hover { color:#802168; }
.inbox-tabs button.active { border-bottom-color:#802168; color:#192766; }
.inbox-tabs button span { padding:2px 7px; border-radius:999px; background:#eef2fb; font-size:11px; font-variant-numeric:tabular-nums; }
.inbox-tabs button .unread-pill { min-width:19px; padding:2px 6px; background:#802168; color:#fff; text-align:center; font-weight:800; }
.inbox-layout { display:grid; grid-template-columns:minmax(285px,36%) minmax(0,1fr); min-height:520px; }
.inbox-sidebar { display:flex; flex-direction:column; min-width:0; border-right:1px solid var(--line); }
.inbox-list { flex:1; max-height:600px; overflow-y:auto; }
.inbox-row { border-bottom:1px solid #e8edf5; }
.inbox-row.is-selected { background:#f3f5fc; box-shadow:inset 3px 0 #802168; }
.inbox-row.is-unread { background:#faf6fb; }
.inbox-row.is-unread .inbox-row-top strong,.inbox-row.is-unread .inbox-row-text { font-weight:750; }
.inbox-row.is-unread .source-avatar { box-shadow:0 0 0 3px #f2dfef; }
.inbox-row-unread { flex:none; width:8px; height:8px; border-radius:50%; background:#802168; }
.inbox-row button { display:block; width:100%; padding:17px 18px; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.inbox-row button:hover { background:#f8f4fa; }
.inbox-row-shell { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:start; gap:14px; }
.inbox-row-content { display:grid; min-width:0; gap:8px; }
.source-avatar { position:relative; display:grid; place-items:center; width:44px; height:44px; flex:none; overflow:visible; border:1px solid #dfe5f2; border-radius:50%; background:#eaf0fa; color:#263767; font-size:17px; font-weight:800; letter-spacing:-.04em; }
.source-avatar-art { position:absolute; inset:0; display:grid; place-items:center; overflow:hidden; border-radius:50%; }
.source-avatar-art > span { overflow:hidden; max-width:38px; white-space:nowrap; }
.source-avatar.is-wordmark { font-size:10px; letter-spacing:-.055em; }
.source-avatar.tone-1 { background:#f1e9f4; color:#802168; }
.source-avatar.tone-2 { background:#e7f2f2; color:#267174; }
.source-avatar.tone-3 { background:#f9eee4; color:#95622b; }
.source-avatar.tone-4 { background:#edf0f7; color:#4b5c86; }
.source-avatar-nordstar { position:absolute; top:0; left:2px; width:auto; max-width:none; height:43px; }
.source-platform { position:absolute; right:-4px; bottom:-3px; display:grid; place-items:center; width:21px; height:21px; padding:2px; border:1px solid #e5e9f2; border-radius:7px; background:#fff; box-shadow:0 2px 6px #27375b26; }
.source-platform img { display:block; width:16px; height:16px; object-fit:contain; }
.inbox-row-top,.inbox-row-bottom { display:flex; align-items:center; gap:6px 9px; min-width:0; }
.inbox-row-top { justify-content:space-between; flex-wrap:wrap; }
.inbox-row-top strong { overflow:hidden; max-width:100%; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.inbox-row-top time { flex:none; color:#8792a9; font-size:11px; }
.inbox-row-text { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.45; font-size:13px; }
.inbox-row-bottom { flex-wrap:wrap; color:#7b879e; font-size:11px; }
.inbox-row-bottom .badge { font-size:10px; }
.inbox-thread-count { color:#802168; font-weight:750; }
.inbox-detail-loading { margin:18px 0; color:#718099; font-size:13px; }
.inbox-detail { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; min-width:0; min-height:520px; max-height:660px; overflow:hidden; background:#fff; }
.inbox-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:25px 28px 20px; border-bottom:1px solid #e8edf5; background:linear-gradient(135deg,#f7f9ff 0%,#fff 72%); }
.inbox-detail-intro { min-width:0; }
.inbox-detail-source { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.inbox-detail-source > div { display:grid; gap:3px; min-width:0; }
.inbox-detail-source strong { overflow:hidden; color:#253562; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.inbox-detail-source > div > span { color:var(--muted); font-size:11px; }
.inbox-detail-head h3 { margin:0; max-width:68ch; font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
.inbox-detail-head .inbox-detail-author { margin:9px 0 0; color:var(--muted); font-size:12px; }
.inbox-detail-head button { flex:none; }
.inbox-detail-tags { display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:12px 28px; border-bottom:1px solid #e8edf5; }
.inbox-article { min-height:0; overflow-y:auto; padding:24px 28px; }
.inbox-article h4 { margin:0 0 15px; color:#647393; font-size:12px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.inbox-article .full-mention { margin:0 0 20px; max-width:78ch; font-size:15px; line-height:1.65; }
.inbox-article.is-conversation .full-mention { width:fit-content; max-width:min(100%,78ch); padding:18px 20px; border:1px solid #e2e8f4; border-left:3px solid #802168; border-radius:0 14px 14px 0; background:#f8f9fd; }
.inbox-thread { display:grid; gap:14px; max-width:78ch; }
.inbox-thread-message { justify-self:start; max-width:min(100%,66ch); }
.inbox-thread-message small { display:block; margin:0 0 5px 12px; color:#7a879e; font-size:11px; }
.inbox-thread-message p { margin:0; padding:13px 16px; border:1px solid #e2e8f4; border-radius:6px 16px 16px 16px; background:#f8f9fd; font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.inbox-thread-message.is-outgoing { justify-self:end; }
.inbox-thread-message.is-outgoing small { text-align:right; margin-right:12px; }
.inbox-thread-message.is-outgoing p { border-color:#d9dafa; border-radius:16px 6px 16px 16px; background:#ecebfc; }
.inbox-thread-attachments { display:block; margin-top:7px; color:#657391; font-size:12px; }
.inbox-thread-note { margin:0; color:#687489; font-size:12px; }
.inbox-load-older { justify-self:center; padding:8px 14px; border:1px solid #dce3f1; border-radius:9px; background:#fff; color:#192766; font-size:12px; font-weight:700; cursor:pointer; }
.inbox-article a,.inbox-reply a { color:#192766; font-size:13px; font-weight:700; }
.inbox-excerpt-note { margin:0 0 12px; padding:10px 12px; border-radius:9px; background:#fff7e9; color:#89571d; font-size:12px; }
.inbox-reply { padding:16px 28px 18px; border-top:1px solid #e8edf5; background:#fafbff; }
.inbox-reply label { display:block; margin-bottom:8px; font-size:13px; font-weight:700; }
.inbox-reply-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.inbox-reply-title label { margin:0; }
.inbox-reply-title button { padding:6px 11px; border:1px solid #dce3f1; border-radius:9px; background:#fff; color:#192766; font-size:12px; font-weight:700; cursor:pointer; }
.inbox-reply-title button:hover { border-color:#802168; color:#802168; }
.inbox-reply textarea { display:block; width:100%; min-height:82px; max-height:180px; border-radius:10px; background:#fff; font-size:13px; }
.inbox-reply-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:10px; }
.inbox-reply-actions button { min-height:38px; }
.inbox-case-actions { display:inline-flex; align-items:center; gap:8px; margin-left:auto; }
.inbox-status-action { display:inline-flex; align-items:center; justify-content:center; width:38px; min-height:38px; padding:0; border:1px solid #dce3f1; border-radius:10px; background:#fff; font-size:25px; font-weight:700; line-height:1; cursor:pointer; }
.inbox-status-action.is-processed { color:#159451; }
.inbox-status-action.is-processed:hover,.inbox-status-action.is-processed.is-active { border-color:#159451; background:#eaf8ef; }
.inbox-status-action.is-trash { color:#da3746; }
.inbox-status-action.is-trash:hover { border-color:#da3746; background:#fff1f2; }
.inbox-status-action:disabled { cursor:default; opacity:.6; }
.inbox-trash-trigger { margin-left:auto; border:1px solid #dce3f1; border-radius:10px; background:#fff; color:#192766; padding:8px 14px; cursor:pointer; white-space:nowrap; }
.inbox-trash-dialog { width:min(680px,calc(100vw - 24px)); max-height:min(78vh,760px); border:0; border-radius:20px; padding:0; box-shadow:0 20px 60px #101a3940; }
.inbox-trash-dialog::backdrop { background:#101a3970; }
.inbox-trash-list { padding:18px 24px 28px; overflow:auto; max-height:60vh; }
.inbox-trash-item { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid #e8edf5; }
.inbox-trash-item strong { display:block; overflow-wrap:anywhere; }
.inbox-trash-item small { display:block; margin-top:6px; color:var(--muted); }
.inbox-source-action { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; margin-left:auto; border:1px solid #dce3f1; border-radius:10px; background:#fff; color:#192766; font-size:20px!important; line-height:1; text-decoration:none; }
.inbox-case-actions .inbox-source-action { margin-left:0; }
.inbox-source-action:hover { border-color:#802168; color:#802168; }
.inbox-reply-status { margin-top:9px; color:var(--muted); font-size:11px; }
.reply-templates-dialog { width:min(660px,calc(100vw - 28px)); max-height:min(82vh,780px); padding:0; border:1px solid #dfe5f0; border-radius:20px; box-shadow:0 24px 80px #14254b38; color:var(--ink); }
.reply-templates-dialog::backdrop { background:#14254b80; }
.reply-templates-head { display:flex; justify-content:space-between; gap:20px; padding:23px 26px 20px; border-bottom:1px solid #e5e9f1; }
.reply-templates-head h2 { margin:4px 0 6px; font-size:26px; }
.reply-templates-head p:last-child { margin:0; color:var(--muted); font-size:13px; }
.reply-templates-body { padding:18px 26px 24px; max-height:calc(82vh - 125px); overflow-y:auto; }
.reply-templates-list { display:grid; gap:10px; margin-bottom:14px; }
.reply-template-item { display:grid; gap:8px; padding:15px 17px; border:1px solid #e0e6f1; border-radius:13px; background:#fff; }
.reply-template-item.is-archived { opacity:.7; background:#f7f8fb; }
.reply-template-item strong { font-size:14px; }
.reply-template-item p { display:-webkit-box; margin:0; overflow:hidden; color:#63708a; font-size:13px; line-height:1.45; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:pre-wrap; }
.reply-template-actions,.reply-template-form-actions { display:flex; flex-wrap:wrap; gap:8px; }
.reply-template-actions button { min-height:32px; padding:6px 11px; font-size:12px; }
.reply-template-form { display:grid; gap:12px; padding:18px; border:1px solid #e0e6f1; border-radius:13px; background:#f8f9fd; }
.reply-template-form h3 { margin:0; font-size:16px; }
.reply-template-form label { display:grid; gap:6px; color:#526180; font-size:12px; font-weight:700; }
.reply-template-form input,.reply-template-form textarea { width:100%; border:1px solid #d8e1ef; border-radius:9px; padding:10px 12px; background:#fff; color:var(--ink); font:inherit; font-size:13px; }
.reply-template-form-actions { justify-content:flex-end; }
.inbox-placeholder { align-self:center; justify-self:center; padding:35px; color:var(--muted); text-align:center; }
.inbox-placeholder strong { display:block; margin-bottom:8px; color:var(--ink); }
.inbox-sidebar .pagination { margin-top:auto; }
.mentions-table { min-width: 880px; }
.mentions-table th:first-child, .mentions-table td:first-child { width: 48%; }
.mention-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 500; }
.badge.case-new { color: #536078; background: #eef0f4; }
.badge.case-in_progress { color: #1d4ed8; background: #eaf2ff; }
.badge.case-draft { color: #6d28d9; background: #f1eafe; }
.badge.case-answered { color: #137044; background: #eaf6ef; }
.badge.case-closed { color: #137044; background: #eaf6ef; }
.badge.case-irrelevant { color: #6b7280; background: #f3f4f6; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.pagination > div { display: flex; gap: 8px; }
.full-mention { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.review-notice { padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.case-editor { padding: 20px; border: 1px solid #dfe4f2; border-radius: 10px; background: #fafbff; }
.case-editor .primary { width: 100%; }
.case-history { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-history .event p { color: var(--ink); font-size: 13px; }
@media(max-width:680px) {
  .inbox-tabs { overflow-x:auto; padding:0 8px; }
  .inbox-tabs button { flex:none; min-height:48px; padding:9px 10px; white-space:nowrap; font-size:12px; }
  .inbox-layout { grid-template-columns:1fr; }
  .inbox-sidebar { border-right:0; border-bottom:1px solid var(--line); }
  .inbox-list { max-height:290px; }
  .inbox-detail { min-height:550px; max-height:760px; }
  .inbox-detail-head,.inbox-detail-tags,.inbox-article,.inbox-reply { padding-left:16px; padding-right:16px; }
  .inbox-detail-head { flex-wrap:wrap; gap:14px; }
  .inbox-detail-head h3 { font-size:19px; }
  .inbox-article.is-conversation .full-mention { padding:15px 16px; }
  .mention-filters { --filter-control-height: 44px; align-items: flex-end; }
  .mention-filters .tone-tabs { width:100%; }
  .mention-filters .tone-tabs > button { flex:1 1 0; justify-content:center; min-width:0; padding-left:8px; padding-right:8px; }
  .mention-filters .search { flex-basis:100%; }
  .mention-filters .date-presets { flex:1 1 100%; }
  .mention-filters .date-presets button { flex:1 1 0; }
  .sync-line { font-size:11px; }
  .live-banner > span:last-child { flex-basis:100%; }
}

@media(max-width:680px) { .metrics > .metric:last-child { grid-column: 1 / -1; min-height: 112px; } }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

.source-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0}.source-status{display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid #dce3ee;border-radius:12px}.source-status small{color:#6e7891;line-height:1.5}

[hidden]{display:none!important}.login-panel{max-width:420px;margin:12vh auto;padding:32px;background:#fff;border:1px solid #e0e2e9;border-radius:16px}.login-panel h1{margin:16px 0;font-size:38px}.login-panel label{display:block;margin:24px 0 8px}.login-panel input{box-sizing:border-box;width:100%;padding:14px;border:1px solid #d5d7e0;border-radius:8px;font:inherit}.login-panel button,#logout{padding:12px 20px;background:#1f237b;color:#fff;border:0;border-radius:8px;cursor:pointer;font:inherit}.login-panel button{width:100%}#loginError{color:#b42318;min-height:1.4em}.session-info{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.login-panel .eyebrow{font-size:12px;color:#1f237b;font-weight:700}.login-panel p{line-height:1.5}@media(max-width:500px){.login-panel{margin:8vh 16px;padding:24px}.session-info{gap:8px}}
