/* Agent HQ. One stylesheet, dark only, 8px grid, hairline borders, flat. */

:root {
  --bg: #0B0E12;
  --panel: #161B22;
  --panel-2: #1C222B;
  --border: #2A313B;
  --text: #E6E9EE;
  --muted: #8B94A3;
  --ok: #3FB950;
  --warn: #D29922;
  --bad: #F85149;
  --info: #58A6FF;
  --control: #D4A64A;
  --janitor: #3FB950;
  --paymaster: #F0883E;
  --cartographer: #2DD4BF;
  --scout: #F85149;
  --architect: #8B9BB4;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-panel: 12px;
  --r-input: 8px;
  --r-chip: 6px;
  --sidebar: 224px;
  --lift: 0 1px 0 rgba(255, 255, 255, .03);
  --red-tint: rgba(248, 81, 73, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono, time, kbd { font-family: var(--mono); font-size: .92em; }
.num, td.num, .tile-big, .tile-val { font-variant-numeric: tabular-nums; }
/* Detailed portraits: always the 512 file, downsampled smooth at every size (Gavin, 18 Oct). */
.avatar img { image-rendering: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px 16px;
}
.brand { display: block; padding: 0 8px 24px; }
.brand b { display: block; font-size: 20px; letter-spacing: .02em; }
.brand span { display: block; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-input);
  color: var(--text); border: 1px solid transparent; min-height: 44px;
}
.nav a:hover { background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--panel); border-color: var(--border); }
.nav svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.nav a[aria-current="page"] svg { color: var(--text); }
.nav .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.nav .count.live { color: var(--text); }
.sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.monogram {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none;
}
.monogram.sm { width: 32px; height: 32px; font-size: 13px; }
.me .who b { display: block; font-size: 14px; }
.me .who span { color: var(--muted); font-size: 12px; }
.me form { margin-left: auto; }
.linkbtn { background: none; border: 0; padding: 8px; color: var(--muted); cursor: pointer; border-radius: 6px; min-height: 44px; min-width: 44px; }
.linkbtn:hover { color: var(--text); background: var(--panel); }

.main { flex: 1; margin-left: var(--sidebar); padding: 24px 32px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .count { color: var(--muted); font-weight: 600; margin-left: 8px; font-size: 24px; }
.topbar, .tabbar, .sheet { display: none; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 16px 24px; box-shadow: var(--lift); }
.panel + .panel, .grid + .panel, .panel + .grid, .section + .section, .section + .panel, .panel + .section { margin-top: 16px; }
.grid > .panel, .grid > div > .panel:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; min-height: 36px; }
.panel-head h2 { font-size: 18px; }
.panel-head .sub { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 8px; }
.panel-head .meta { color: var(--muted); font-size: 13px; }
.panel-foot { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-rail { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.grid-58 { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: start; }

/* ---------- money tiles ---------- */
.tile { display: flex; flex-direction: column; gap: 12px; }
.tile-head { display: flex; align-items: baseline; gap: 12px; }
.tile-head h2 { font-size: 20px; }
.tile-head span { color: var(--muted); font-size: 13px; }
.tile-row { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.tile-main { padding-right: 24px; border-right: 1px solid var(--border); margin-right: 24px; }
.tile-big { font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.tile-big.neg, .neg { color: var(--bad); }
.tile-lbl { color: var(--muted); font-size: 13px; }
.tile-col { padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.tile-col:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.tile-val { font-size: 20px; font-weight: 600; }
.tile-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tile-foot b { font-size: 20px; }
.tile-src { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-left: auto; }
.delta { font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }

/* ---------- dots, chips, avatars ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.info { background: var(--info); }
.dot.grey { background: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--bad); }
.status.grey { color: var(--muted); }
.sev { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px; border-radius: var(--r-chip);
  border: 1px solid var(--border); font-size: 12px; line-height: 20px; white-space: nowrap; background: var(--panel-2);
}
.chip.agent { font-family: var(--mono); border-color: var(--accent, var(--border)); color: var(--text); }
.chip.agent::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--muted)); }
.chip.neutral { color: var(--muted); }
.chip.neutral b { color: var(--text); font-weight: 600; }

.avatar { position: relative; display: inline-block; flex: none; line-height: 0; }
.avatar img { display: block; box-sizing: content-box; border: 2px solid var(--accent, var(--border)); border-radius: 6px; background: var(--bg); }
.avatar.s32 img { width: 32px; height: 32px; border-width: 1px; border-radius: 4px; }
.avatar.s64 img { width: 64px; height: 64px; }
.avatar.s96 img { width: 96px; height: 96px; border-radius: 8px; }
.avatar.s112 img { width: 112px; height: 112px; border-radius: 8px; }
.avatar.s56 img { width: 56px; height: 56px; border-radius: 8px; }
.avatar.s40 img { width: 40px; height: 40px; border-radius: 6px; }
.avatar.m img { border-color: var(--border); }
.avatar.m[style*="--m-size"] img { width: var(--m-size); height: var(--m-size); border-width: 1px; border-radius: 4px; vertical-align: middle; }
.avatar.s128 img { width: 128px; height: 128px; border-radius: 8px; }
.avatar .light { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--panel); background: var(--muted); }
.avatar.s128 .light { width: 16px; height: 16px; right: -5px; bottom: -5px; }
.avatar.s96 .light, .avatar.s112 .light { width: 14px; height: 14px; right: -5px; bottom: -5px; }
.avatar.s40 .light { width: 10px; height: 10px; right: -3px; bottom: -3px; }
.avatar.s32 .light { width: 9px; height: 9px; right: -3px; bottom: -3px; border-width: 1px; }
.avatar .light.ok { background: var(--ok); }
.avatar .light.warn { background: var(--warn); }
.avatar .light.bad { background: var(--bad); }
.avatar .light.grey { background: var(--muted); }
.codename { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 14px;
  border-radius: var(--r-input); border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: #222A35; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn .spin { display: none; }
.btn[wire\:loading] .spin, .btn.loading .spin { display: inline-block; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-input); color: var(--text);
  padding: 8px 12px; min-height: 40px;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--info); outline-offset: 0; border-color: var(--info); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.input.mono { font-family: var(--mono); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238B94A3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field label { color: var(--muted); font-weight: 400; font-size: 12px; }
.error { color: var(--bad); font-size: 14px; min-height: 21px; }
input[type="checkbox"].check { width: 18px; height: 18px; accent-color: var(--text); cursor: pointer; margin: 0; }
input[type="date"].input { font-family: var(--mono); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td.n, .table th.n { font-family: var(--mono); color: var(--muted); width: 40px; }
.table .nowrap { white-space: nowrap; }
.table tr.muted td { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.list li:last-child { border-bottom: 0; }
.list .n { font-family: var(--mono); color: var(--muted); min-width: 20px; }
.list .n.sm { font-size: 13px; }
.ol { margin: 0; padding-left: 24px; }
.ol li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.ol li:last-child { border-bottom: 0; }
.ol li::marker { color: var(--muted); font-family: var(--mono); }

/* ---------- empty states ---------- */
.empty { padding: 32px 16px; text-align: left; display: flex; gap: 16px; align-items: flex-start; color: var(--muted); }
.empty svg { width: 20px; height: 20px; flex: none; stroke: var(--muted); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.empty.compact { padding: 16px 0; }

/* ---------- roster ---------- */
.roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1900px) { .roster { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.unit-card { display: flex; gap: 16px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 16px; color: var(--text); min-width: 0; }
.unit-card:hover { text-decoration: none; border-color: #3A4350; }
.unit-card .body { min-width: 0; display: flex; flex-direction: column; }
.unit-card .codename { font-size: 13px; }
.unit-card .status { font-size: 13px; margin-top: 4px; }
.unit-card .meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.unit-card .meta b { color: var(--text); font-weight: 500; }
.unit-card .chip { margin-top: 10px; align-self: flex-start; }

/* ---------- welcome (first Home load after login) ---------- */
.welcome { display: flex; gap: 16px; align-items: center; padding: 0 0 20px; margin-bottom: 4px; animation: fade-in .2s ease-out; }
.welcome h2 { font-size: 22px; font-weight: 700; }
.welcome p { margin-top: 2px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- alerts strip (top of Home, reds only) ---------- */
.alerts { display: flex; flex-direction: column; border: 1px solid rgba(248, 81, 73, .35); background: var(--red-tint); border-radius: var(--r-panel); padding: 4px 16px; margin-bottom: 16px; }
.alerts .alert-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(248, 81, 73, .18); font-size: 14px; }
.alerts .alert-row:last-child { border-bottom: 0; }
.alerts .dot { background: var(--bad); }
.alerts .who { font-family: var(--mono); color: var(--muted); font-size: 12px; min-width: 96px; }
.alerts .when { font-family: var(--mono); color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- dossier items ---------- */
.dossier { list-style: none; margin: 0; padding: 0; }
.dossier li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.dossier li:last-child { border-bottom: 0; }
.badge { flex: none; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; color: var(--text); margin-top: 1px; }
.dossier .d-title { font-weight: 500; }
.dossier .d-why { color: var(--muted); font-size: 14px; margin-top: 2px; }
.dossier .d-who { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dossier .d-who .codename { font-size: 12px; }
.hint { margin: -4px 0 0 4px; }
.expected { font-size: 14px; margin-top: 6px; }
.finding .outcome { font-size: 14px; }
.expected .muted { margin-right: 6px; }
.qrow .sev-cell { display: flex; flex-direction: column; gap: 2px; }
.qrow .tier, .finding .tier { color: var(--muted); font-size: 12px; }
.scorecard td b { font-weight: 600; }
.scorecard .delta { margin-left: 6px; }

/* ---------- archive cards (phone) ---------- */
.arc-cards { list-style: none; margin: 0; padding: 0; }
.arc-card { border-left: 1px solid var(--accent); padding: 8px 0 12px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.arc-card .arc-title { font-weight: 500; }
.arc-note { margin: 0; color: var(--muted); font-size: 14px; }
.cal .bar-st { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-left: auto; padding-left: 8px; flex: none; }
.cal .bar-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- queue ---------- */
.queue { list-style: none; margin: 0; padding: 0; }
.qrow { display: grid; grid-template-columns: 28px 24px 184px 90px 110px minmax(0, 1fr) 200px 56px; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; }
.qrow:hover { background: var(--panel-2); }
.qrow.cursor { border-left-color: var(--text); background: var(--panel-2); }
.qrow .n { font-family: var(--mono); color: var(--muted); }
.qrow .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qrow .who .codename { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.qrow .title { min-width: 0; }
.qrow .title a { font-weight: 500; text-decoration: none; }
.qrow .title a:hover { text-decoration: underline; }
.qrow .title .detail { color: var(--muted); font-size: 13px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qrow .act { color: var(--muted); font-size: 14px; }
.qrow .age { color: var(--muted); font-family: var(--mono); font-size: 13px; text-align: right; }
.qrow .biz { font-size: 13px; }
.qhead { display: grid; grid-template-columns: 28px 24px 184px 90px 110px minmax(0, 1fr) 200px 56px; gap: 12px; padding: 8px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--border); }
.qhead .age { text-align: right; }
.qnotes { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 4px 0 4px 40px; align-items: start; }
.qnotes .evidence { grid-column: 1 / -1; }
.evidence { font-family: var(--mono); font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-input); padding: 8px 12px; white-space: pre-wrap; word-break: break-word; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.snooze { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.snooze .input { width: 170px; }
.keys { color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.keys kbd { border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 11px; color: var(--text); background: var(--panel-2); }

.bulkbar { position: sticky; bottom: 0; z-index: 20; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 12px 16px; margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bulkbar .cmd { flex: 1; display: flex; gap: 8px; min-width: 280px; }
.bulkbar .sel { display: flex; gap: 8px; align-items: center; padding-left: 16px; border-left: 1px solid var(--border); flex-wrap: wrap; }
.bulkbar .sel .lbl { color: var(--muted); font-weight: 400; font-size: 13px; }
.preview { border: 1px solid var(--border); background: var(--panel-2); border-radius: var(--r-panel); padding: 12px 16px; margin-top: 12px; }
.preview ul { margin: 8px 0 12px; padding-left: 20px; }
.preview li { padding: 2px 0; }

/* ---------- finding cards (profile Intel) ---------- */
.finding { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px 12px; }
.finding .n { font-family: var(--mono); font-size: 20px; color: var(--muted); font-weight: 500; line-height: 1.25; }
.finding h3 { font-size: 17px; }
.finding .line { display: flex; gap: 16px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 14px; }
.finding .body { grid-column: 2; display: grid; gap: 10px; }
.finding .detail { color: var(--text); white-space: pre-wrap; }
.finding .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.finding .st { color: var(--muted); font-size: 13px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border: 1px solid var(--border); background: var(--panel); border-radius: var(--r-panel); padding: 4px; margin: 16px 0; overflow-x: auto; }
.tabs a, .tabs button { flex: none; padding: 8px 16px; border-radius: 8px; color: var(--muted); border: 0; background: none; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"], .tabs button[aria-current="page"] { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.tabs .count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- agent header ---------- */
.agent-head { display: flex; gap: 24px; align-items: flex-start; }
.agent-head .who h1 { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }
.agent-head .who .role { color: var(--muted); margin-top: 2px; }
.agent-head .stats { display: flex; gap: 0; margin-top: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 16px; }
.agent-head .stats div { padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--border); }
.agent-head .stats div:last-child { border-right: 0; }
.agent-head .stats .lbl { color: var(--muted); font-weight: 400; font-size: 13px; display: block; }
.agent-head .stats b { font-size: 18px; font-weight: 600; }

.rail .note { padding: 12px 0; border-bottom: 1px solid var(--border); }
.rail .note:last-child { border-bottom: 0; }
.rail .note p { white-space: pre-wrap; }
.rail .note .when { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-top: 4px; }
.rail .note.consumed { color: var(--muted); }
.rail .note.consumed p { color: var(--muted); }

/* ---------- runs ---------- */
.run-log { margin-top: 8px; }
.run-log summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.run-log pre { margin: 8px 0 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-input); padding: 12px; font-size: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; min-height: 420px; }
.chat .thread { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 8px 0; overflow-y: auto; max-height: 60vh; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.msg .meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.msg .meta b { font-size: 13px; }
.msg .meta b.codename { font-weight: 500; }
.msg .meta time { color: var(--muted); font-size: 12px; }
.msg .bubble { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-input); padding: 10px 12px; margin-top: 4px; white-space: pre-wrap; }
.composer { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.composer .input { flex: 1; }

/* ---------- briefing ---------- */
.lead { font-size: 16px; line-height: 1.6; }
.brief-col h3 { font-size: 18px; }
.brief-item { padding: 12px 0; border-top: 1px solid var(--border); }
.brief-item:first-of-type { border-top: 0; }
.brief-item .text { display: flex; gap: 10px; }
.brief-item .text .n { font-family: var(--mono); color: var(--muted); flex: none; }
.brief-item .meta { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.brief-item .textarea { margin-top: 8px; min-height: 60px; }
.brief-item .btn-row { margin-top: 8px; }
.prose { line-height: 1.6; }
.prose h1, .prose h2, .prose h3 { margin: 20px 0 8px; }
.prose h1 { font-size: 22px; } .prose h2 { font-size: 18px; } .prose h3 { font-size: 16px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 24px; }
.prose code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.prose pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-input); padding: 12px; overflow: auto; }
.prose pre code { border: 0; padding: 0; }
.prose table { border-collapse: collapse; margin: 0 0 12px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.prose blockquote { border-left: 2px solid var(--border); margin: 0 0 12px; padding-left: 12px; color: var(--muted); }

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .line { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.orc { stroke: var(--info); }
.chart .line.babygo_web { stroke: var(--text); }
.chart .line.babygo_amazon { stroke: var(--muted); stroke-dasharray: 4 3; }
.chart .pt { r: 2.5; }
.chart .pt.orc { fill: var(--info); }
.chart .pt.babygo_web { fill: var(--text); }
.chart .pt.babygo_amazon { fill: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.legend .orc i { border-color: var(--info); }
.legend .babygo_web i { border-color: var(--text); }
.legend .babygo_amazon i { border-color: var(--muted); border-top-style: dashed; }

/* ---------- assignments ---------- */
.agent-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.agent-pick label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: var(--r-input); border: 1px solid transparent; cursor: pointer; min-width: 72px; }
.agent-pick label:hover { background: var(--panel-2); }
.agent-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.agent-pick label:has(input:checked) { border-color: var(--border); background: var(--panel-2); }
.agent-pick label:has(input:focus-visible) { outline: 2px solid var(--info); }
.agent-pick .codename { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.agent-pick .codename::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--border); }
.cal .lane-head, .cal .lane-body { border-bottom: 1px solid var(--border); padding: 12px 0; min-height: 64px; }
.cal .lane-head { display: flex; gap: 12px; align-items: center; padding-right: 12px; }
.cal .lane-body { position: relative; }
.cal .axis { grid-column: 1 / -1; position: relative; height: 32px; border-bottom: 1px solid var(--border); margin-left: 200px; }
.cal .axis > span { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal .axis > span.first { transform: none; }
.cal .axis > span.last { transform: translateX(-100%); }
.cal .axis .dow { display: inline; }
.cal .today { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--text); opacity: .6; }
.cal .today-lbl { position: absolute; top: -24px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--text); }
.cal .bar { position: absolute; top: 14px; height: 36px; border: 1px solid var(--border); background: var(--panel-2); border-radius: 6px; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); min-width: 8px; }
.cal .bar::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.cal .bar:hover { border-color: var(--text); text-decoration: none; }
.cal .bar.done { color: var(--muted); }
.cal .bar.due { border-color: var(--warn); }
.cal .bar + .bar { top: 56px; }
.cal .lane-body.tall { min-height: 108px; }
.cal .lane-empty { position: absolute; left: 24px; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.cal .gridline { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); opacity: .6; }

/* ---------- settings ---------- */
.settings .panel { max-width: 720px; }
.token-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.token-row:last-child { border-bottom: 0; }
.token-row .codename { width: 140px; }
.token-row .when { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-left: auto; }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 360px; pointer-events: none; }
.toast { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-input); padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; pointer-events: auto; animation: toast-in .18s ease-out; }
.toast .dot { flex: none; }
.toast.gone { animation: toast-out .18s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 800px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.unit-line { display: flex; gap: 24px 12px; justify-content: center; flex-wrap: wrap; padding-bottom: 20px; }
.unit-line .avatar { outline: none; }
.unit-line .avatar .light { background: #3A4350; transition: background .18s ease; }
.unit-line .avatar.s96 .light, .unit-line .avatar.s112 .light { width: 14px; height: 14px; }
.unit-line .avatar.lit .light { background: var(--ok); }
.unit-line .avatar.amber .light { background: var(--warn); }
.unit-line .avatar.red .light { background: var(--bad); }
.unit-line .avatar.green .light { background: var(--ok); }
.unit-line .cn { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .15s ease; pointer-events: none; line-height: 1; }
.unit-line .cn b { color: var(--accent); font-weight: 500; }
.unit-line .avatar:hover .cn, .unit-line .avatar:focus-visible .cn, .unit-line .avatar.touched .cn { opacity: 1; }
.wordmark .readout { display: block; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 12px; letter-spacing: 0; }
.wordmark { text-align: center; }
.wordmark b { display: block; font-size: 32px; letter-spacing: .06em; }
.wordmark span { display: block; color: var(--muted); font-family: var(--mono); font-size: 13px; letter-spacing: .24em; margin-top: 4px; }
.login form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.login .input { min-height: 44px; text-align: center; font-family: var(--mono); letter-spacing: .1em; }
.login .btn { min-height: 44px; }
.login .remember { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; justify-content: center; }
.login .error { text-align: center; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .unit-line .avatar.lit .light { background: var(--ok); }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .qrow, .qhead { grid-template-columns: 28px 24px 150px 80px 100px minmax(0, 1fr) 56px; }
  .qrow .act, .qhead .act { display: none; }
}
@media (max-width: 1100px) {
  .grid-rail { grid-template-columns: 1fr; }
  .grid-58 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body { padding-bottom: 72px; overflow-x: hidden; }
  .shell { display: block; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 16px 16px 32px; }
  .page-head { margin-bottom: 16px; }
  h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 30; }
  .topbar .brand { padding: 0; }
  .topbar .brand b { font-size: 17px; }
  .topbar .brand span { font-size: 11px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--border); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; font-size: 11px; color: var(--muted); background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .count { position: absolute; top: 6px; left: calc(50% + 8px); font-size: 10px; color: var(--text); font-variant-numeric: tabular-nums; }
  .sheet { position: fixed; left: 0; right: 0; bottom: 56px; background: var(--panel); border-top: 1px solid var(--border); z-index: 29; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .sheet[hidden] { display: none; }
  .sheet.open { display: block; }
  .sheet a, .sheet button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 8px; width: 100%; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; }
  .sheet svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.5; }
  .tile-row { flex-direction: row; }
  .tile-main { border-right: 0; margin-right: 0; padding-right: 0; width: 100%; margin-bottom: 8px; }
  .tile-big { font-size: 34px; }
  .tile-col { flex: 1; padding-right: 12px; margin-right: 12px; }
  .tile-src { margin-left: 0; width: 100%; }
  .roster { display: flex; overflow-x: auto; gap: 12px; margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x proximity; }
  .unit-card { flex: 0 0 300px; scroll-snap-align: start; }
  .alerts div { border-right: 0; margin-right: 0; padding: 8px 0; width: 100%; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .qhead { display: none; }
  .qrow { grid-template-columns: 24px 24px minmax(0, 1fr); grid-template-areas: "n cb who" "n cb title" "n cb meta"; row-gap: 6px; padding: 12px 4px; }
  .qrow .n { grid-area: n; }
  .qrow .cb { grid-area: cb; }
  .qrow .who { grid-area: who; }
  .qrow .title { grid-area: title; }
  .qrow .biz, .qrow .sev, .qrow .act { display: none; }
  .qrow .age { grid-area: who; justify-self: end; }
  .qrow .meta-m { grid-area: meta; display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
  .qnotes { grid-column: 1 / -1; grid-area: auto; padding-left: 0; grid-template-columns: 1fr; }
  .bulkbar { position: fixed; left: 0; right: 0; bottom: 56px; margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); transition: bottom .12s ease-out; }
  .bulkbar.kb { bottom: var(--kb, 0px); }
  .bulkbar .sel { border-left: 0; padding-left: 0; width: 100%; }
  .bulkbar .sel .btn { flex: 1; }
  .queue-page { padding-bottom: 180px; }
  .finding { grid-template-columns: 1fr; }
  .finding .body { grid-column: 1; }
  .finding .n { font-size: 15px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { font-size: 12px; margin-top: 6px; }
  .agent-head { flex-direction: column; gap: 16px; }
  .agent-head .stats div { width: 50%; border-right: 0; margin: 0 0 12px; padding: 0; }
  .cal { grid-template-columns: 96px minmax(0, 1fr); }
  .cal .axis { margin-left: 96px; }
  .cal .lane-head .codename { font-size: 11px; }
  .cal .lane-head .avatar { display: none; }
  .cal .axis > span.minor, .cal .axis .dow { display: none !important; }
  .panel-head { flex-wrap: wrap; }
  .cal .lane-empty { font-size: 11px; left: 8px; }
  .cal .bar { font-size: 11px; padding: 0 6px; }
  .cal .bar-st { display: none; }
  .qrow .sev-cell { display: none; }
  .alerts .who { min-width: 0; }
  .filters .field { min-width: calc(50% - 4px); }
  .chat .thread { max-height: 50vh; }
  .table td, .table th { padding: 8px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .table .hide-m { display: none; }
  #toasts { left: 16px; right: 16px; bottom: calc(64px + env(safe-area-inset-bottom)); max-width: none; }
  .me { display: none; }
  .desk-only { display: none; }
}
@media (min-width: 901px) {
  .phone-only { display: none; }
  .qrow .meta-m { display: none; }
}

/* chat: thinking line while an agent works (19 Oct 2026) */
.msg.thinking .bubble { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot-pulse 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .6; } }

/* agent markdown: bullets, tables, bold (19 Oct 2026) */
.md { line-height: 1.5; white-space: normal; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md table { display: block; max-width: 100%; overflow-x: auto; font-size: 13px; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.md th { color: var(--muted); font-weight: 500; }
.bubble.md { white-space: normal; }

/* markdown inside lists: never inherit the flex row of .list li (19 Oct 2026: notes spread into columns) */
.md { overflow-wrap: anywhere; min-width: 0; }
.list .md li, .md li { display: list-item; padding: 0; border: 0; gap: 0; align-items: initial; }
.md code { white-space: normal; overflow-wrap: anywhere; }
.md pre { white-space: pre-wrap; }
.done-list li > .grow { min-width: 0; }
.note-fold { margin-top: 4px; }
.note-fold > summary { cursor: pointer; color: var(--muted); list-style-position: inside; }
.note-fold[open] > summary { margin-bottom: 6px; }
.work-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.work-item:last-child { border-bottom: 0; }
.work-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }


/* Pause agents (19 Oct 2026) */
.pause-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; border-color: rgba(210, 153, 34, .45); background: rgba(210, 153, 34, .07); }
section[aria-label="Pause agents"] .field { margin-bottom: 14px; }

/* Job title under the codename (20 Oct 2026) */
.unit-card .job { font-size: 13px; color: var(--muted); margin-top: 2px; }
.agent-head .job { color: var(--muted); margin: 2px 0 0; font-size: 15px; }

/* Dossier and Monday Briefing report (20 Oct 2026) */
.dossier-table td, .dossier-table th { white-space: nowrap; }
.dossier-table tr.total td { border-top: 1px solid var(--border); }
.dossier-table td.neg b, .dossier-table .neg { color: var(--bad); }
.dossier-biz .panel-head h3 { font-size: 16px; }
.dossier-biz .biz-line { margin: 0 0 12px; line-height: 1.5; }
.biz-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.biz-lists h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.biz-lists ol, .biz-lists ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.biz-lists li { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.biz-lists li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-lists li .num { white-space: nowrap; }
.todo-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.todo-list > li { border-top: 1px solid var(--border); padding-top: 12px; }
.todo-head { display: flex; gap: 10px; align-items: center; }
.todo-text { white-space: pre-line; margin: 6px 0 8px; }
.todo-child { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); margin-top: 6px; }
.todo-child .note-fold { flex-basis: 100%; }
@media (max-width: 720px) { .biz-lists { grid-template-columns: 1fr; } }

/* Business cards stay inside the page (20 Oct 2026) */
.dossier-biz { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dossier-biz > .panel { min-width: 0; }
.biz-lists > div { min-width: 0; }
@media (max-width: 900px) { .dossier-biz { grid-template-columns: 1fr; } }

/* Briefing spacing (20 Oct 2026): a grid after a grid gets the same gap as panels; no double rule under a column head */
.grid + .grid { margin-top: 16px; }
.brief-col .panel-head + .brief-item { border-top: 0; padding-top: 0; }

/* Lists stack in a narrow card instead of cutting product names (20 Oct 2026) */
.biz-lists { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Home: four money tiles (20 Oct 2026) */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.money-tiles .tile-big { font-size: 32px; }
.money-tiles .tile-col { padding-right: 14px; margin-right: 14px; }
.money-tiles .tile-val { font-size: 16px; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }

/* Money tiles: three figures on one row, no dividers (20 Oct 2026) */
.money-tiles .tile-row { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 4px 18px; justify-content: start; }
.money-tiles .tile-col { border: 0; padding: 0; margin: 0; }

/* Phone (20 Oct 2026): nothing wider than the screen (a wide header row zoomed the page out and pushed the tab bar off
   the bottom), a menu button in the top bar, and the menu sheet listing every page. */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .page-head { flex-wrap: wrap; gap: 12px; }
  .page-head .btn-row { flex-wrap: wrap; }
  .topbar .menu-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; }
  .topbar .menu-btn svg { width: 22px; height: 22px; }
  .sheet { max-height: calc(100vh - 120px); overflow-y: auto; }
  .sheet a[aria-current="page"] { background: var(--bg); }
}

/* Out today strip (Wallchart, 20 Oct 2026): where the alerts strip sits, neutral, one line that wraps. */
.wallchart { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border); background: var(--panel); border-radius: var(--r-panel); padding: 10px 8px 10px 16px; margin-bottom: 16px; font-size: 14px; }
.wallchart .wc-head { font-family: var(--mono); color: var(--muted); font-size: 12px; min-width: 96px; padding-top: 2px; white-space: nowrap; }
.wallchart .wc-list { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.wallchart .wc-x { display: flex; background: none; border: 0; padding: 2px; color: var(--muted); cursor: pointer; }
.wallchart .wc-x:hover { color: var(--text); }
.wallchart .wc-x svg { width: 16px; height: 16px; }

/* FCRC panel in the dossier (20 Oct 2026): orders, sessions, conversion against last week. */
.fcrc-table { margin-top: 10px; font-size: 13px; }
.fcrc-table td, .fcrc-table th { padding: 6px 8px; }

/* Home's Clearance list on a phone (20 Oct 2026): the title takes its own line, the buttons wrap under it. */
@media (max-width: 900px) {
  .wallchart .wc-head { min-width: 0; }
  .q-list li { flex-wrap: wrap; }
  .q-list li .grow { flex-basis: 100%; }
}
.fcrc-table th.right { text-align: right; }
/* Alerts on a phone (20 Oct 2026): agent and time on one line, the text full width under them. */
@media (max-width: 900px) {
  .alerts .alert-row { flex-wrap: wrap; row-gap: 4px; }
  .alerts .alert-row .grow { flex: 1 1 100%; order: 3; }
  .alerts .alert-row .when { margin-left: auto; }
}
