:root {
  --surface: #fcfcfb; --surface-2: #f3f2ef; --line: #e2e0da; --ink: #0b0b0b; --ink-2: #52514e; --ink-3: #8a8983;
  --accent: #2a78d6; --bar: #2a78d6;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface);
}

/* Operator attention: source queue beside the live browser, using Radar's
   existing surfaces and status colors. The steps describe actual work. */
.capacity-action { color: inherit; text-decoration: none; display: block; border-radius: 8px; }
.capacity-action:hover { outline: 1px solid var(--accent); }
.capacity-action:focus-visible, .attention-resolve:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.attention-layout { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 3fr); gap: 20px; align-items: start; }
.attention-layout.attention-overview { display: block; }
.attention-overview .attention-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.attention-site { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; overflow-wrap: anywhere; }
.attention-site h2, .attention-workspace h2 { margin: 0; font-size: 16px; }
.attention-site .title-row { gap: 10px; flex-wrap: wrap; }
.attention-source { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; }
.attention-source > div { min-width: 0; }
.attention-source > a { flex-shrink: 0; white-space: nowrap; }
.attention-source p { margin: 3px 0 0; color: var(--ink-2); }
.attention-resolve { display: inline-block; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 6px; text-decoration: none; }
.attention-workspace { position: sticky; top: 100px; border-top: 3px solid var(--accent); }
.attention-workspace[hidden], .attention-controls[hidden], .attention-image[hidden], .attention-progress[hidden] { display: none; }
.attention-progress { display: flex; list-style: none; padding: 0; margin: 18px 0; gap: 4px; }
.attention-progress li { flex: 1; border-bottom: 3px solid var(--line); padding: 0 0 8px; color: var(--ink-2); font-size: 12px; }
.attention-progress li.current { border-color: var(--accent); color: var(--ink); font-weight: 650; }
.attention-progress li.complete { border-color: var(--good); }
.attention-clock { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.attention-image { overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.attention-image img { display: block; width: 100%; height: auto; cursor: crosshair; }
.attention-evidence { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.attention-evidence p { margin: 5px 0; }
.attention-url { overflow-wrap: anywhere; }
.attention-decisions { flex-wrap: wrap; margin: 12px 0; }
.attention-controls input { flex: 1; min-width: 180px; }
.attention-results p { padding: 8px 0; border-bottom: 1px solid var(--line); }
.source-summary { margin-bottom: 14px; }
.source-config { max-width: 720px; padding-block: 12px; }
.source-config label { display: flex; flex-direction: column; gap: 5px; }
.source-config input, .source-config select { width: 100%; min-width: 0; }
.source-health-list { display: grid; gap: 14px; }
.source-health-card { overflow-wrap: anywhere; }
.source-health-card h2 { margin: 0; }
.source-health-card .title-row { flex-wrap: wrap; gap: 10px; }
.source-health-card summary { margin: 12px 0; }
.source-error { max-width: 560px; overflow-wrap: anywhere; }
@media (max-width: 950px) {
  .attention-layout { display: flex; flex-direction: column-reverse; }
  .attention-workspace { position: static; width: 100%; }
  .attention-list { width: 100%; }
}
@media (max-width: 720px) {
  .attention-resolve { min-height: 44px; padding-block: 10px; }
  .attention-overview .attention-list { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root { --surface: #1a1a19; --surface-2: #232321; --line: #383835; --ink: #fff; --ink-2: #c3c2b7; --ink-3: #8f8e86;
          --accent: #3987e5; --bar: #3987e5; }
}
* { box-sizing: border-box; }
body { margin: 0; }
header { display: flex; gap: 14px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line);
         position: sticky; top: 0; background: var(--surface); z-index: 5; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; min-width: 0; }
nav a { padding: 4px 8px; white-space: nowrap; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
nav a.active, nav a:hover { background: var(--surface-2); color: var(--ink); }
main { padding: 20px; max-width: 1600px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 16px; } h2 { font-size: 15px; margin: 24px 0 8px; } h3 { font-size: 13px; margin: 12px 0 6px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
a { color: var(--accent); }
.muted { color: var(--ink-3); } .small { font-size: 12px; }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: 12px; white-space: nowrap; } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover { background: var(--surface-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tile .v { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; } .tile .k { color: var(--ink-2); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .grid2, .grid4 { grid-template-columns: minmax(0, 1fr); } }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
.panel > h3:first-child { margin-top: 0; }
/* Response → saved page → result: the same evidence path on every detail view. */
.evidence-chain { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; gap: 12px; margin: 18px 0; }
.evidence-chain li { border-top: 3px solid var(--accent); padding: 10px 0; overflow-wrap: anywhere; }
.evidence-chain li > span { display: block; color: var(--ink-2); font-size: 12px; margin-bottom: 5px; }
.evidence-chain a { display: inline-block; margin-right: 8px; }
.evidence-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.evidence-filters label { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.evidence-filters input, .evidence-filters select { width: 100%; min-width: 0; }
.evidence-filters .actions { grid-column: 1 / -1; }
.evidence-summary { margin: 18px 0; }
.evidence-summary h2 { margin-top: 0; }
.evidence-url { max-width: 450px; overflow-wrap: anywhere; }
.evidence-decision { margin-bottom: 10px; }
.evidence-decision summary { cursor: pointer; padding: 6px 0; }
.evidence-decision pre, .evidence-body pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }
.evidence-pagination { flex-wrap: wrap; padding-block: 14px; }
@media (max-width: 720px) {
  .evidence-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-chain { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .evidence-chain li { border-top: 0; border-left: 3px solid var(--accent); padding: 8px 12px; }
  .evidence-filters button, .evidence-pagination a { min-height: 44px; padding-block: 10px; }
}
.body { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 6px; }
.duplicate-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.duplicate-side { border-top: 3px solid var(--accent); overflow-wrap: anywhere; }
.duplicate-side + .duplicate-side { border-top-color: var(--warning); }
.duplicate-role { margin: 0 0 8px; font-weight: 650; }
.duplicate-side h2 { margin: 0 0 14px; font-size: 17px; line-height: 1.35; }
.duplicate-side .kv dd { overflow-wrap: anywhere; min-width: 0; }
.duplicate-side blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--line); background: var(--surface-2); white-space: pre-wrap; }
.duplicate-content summary { margin-top: 16px; cursor: pointer; }
.duplicate-content .body { margin-top: 10px; }
.duplicate-assessment p:last-child { margin-bottom: 0; }
.duplicate-notice { padding: 10px 12px; border-left: 3px solid var(--warning); background: var(--surface-2); }
.duplicate-decision h2 { margin-top: 0; }
.duplicate-decision .actions { gap: 10px; }
.duplicate-pair-titles { margin: 6px 0 0; overflow-wrap: anywhere; }
.duplicate-filters { margin: 16px 0; flex-wrap: wrap; }
@media (max-width: 720px) {
  .duplicate-comparison { grid-template-columns: minmax(0, 1fr); }
  .duplicate-decision .actions > button { width: 100%; min-height: 44px; white-space: normal; }
  .duplicate-filters button { min-height: 44px; }
}
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 10px; border-radius: 6px; max-height: 420px; overflow: auto; font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.badge.good::before { background: var(--good); } .badge.warning::before { background: var(--warning); }
.badge.serious::before { background: var(--serious); } .badge.critical::before { background: var(--critical); }
.badge.plain::before { display: none; }
.bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar i { display: block; height: 10px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar span { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 12px; }
.token-usage { margin: 18px 0; }
.token-usage h2, .token-chart h3 { margin: 0; }
.token-budget { font-variant-numeric: tabular-nums; }
.token-workload-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.token-workload-filter select { max-width: 100%; }
.token-workloads { margin: 18px 0; }
.token-legend { display: flex; gap: 16px; margin: 12px 0; }
.token-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
.token-legend .token-input::before { background: var(--accent); }
.token-legend .token-output::before { background: #bd7b30; }
.token-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.token-chart { min-width: 0; }
.token-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.token-chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.token-axis { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.token-grid { stroke: var(--line); stroke-width: 1; }
.token-chart .token-input { fill: var(--accent); }
.token-chart .token-output { fill: #bd7b30; }
.token-hit { fill: transparent; }
.token-bucket { cursor: crosshair; }
.token-bucket.selected .token-hit { fill: var(--ink); fill-opacity: .08; }
.token-detail { min-height: 4.5em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .token-charts { grid-template-columns: 1fr; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
input, select, textarea, button { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
textarea { width: 100%; } textarea.code { font: 12px/1.5 ui-monospace, Menlo, monospace; min-height: 560px; }
button { cursor: pointer; background: var(--surface-2); } button:hover { border-color: var(--ink-3); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.danger { color: var(--critical); }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.toast { position: fixed; bottom: 20px; right: 20px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--surface); max-width: 520px; z-index: 10; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 4px; margin: 4px 0; }
.ok { color: var(--good); } .notok { color: var(--critical); }
mark { background: color-mix(in srgb, var(--warning) 35%, transparent); color: inherit; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: 13px; } .kv dt { color: var(--ink-2); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.login { max-width: 400px; margin: 80px auto; padding: 24px; }
.login h1 { margin-bottom: 20px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form .actions { margin: 4px 0 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.wide { width: 100%; }
button.big { width: 100%; padding: 10px; font-weight: 600; }
.form .actions button.big { width: auto; padding: 8px 18px; }
.error { color: var(--critical); margin: 0; min-height: 0; } .error:empty { display: none; }
details summary { cursor: pointer; color: var(--ink-2); margin-top: 16px; } details .form { margin-top: 8px; }
nav .sep { width: 1px; background: var(--line); margin: 4px 6px; }
nav .count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 650; }
#account { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
#account .who { color: var(--ink); text-decoration: none; } #account .who:hover { text-decoration: underline; }
button.quiet { background: none; border-color: transparent; color: var(--ink-2); } button.quiet:hover { border-color: var(--line); }
.title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .title-row h1 { margin: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; font-weight: normal; }
.choice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.choice span { display: flex; flex-direction: column; }
.panel.form { max-width: 720px; margin-bottom: 16px; }
.notice { border: 1px solid var(--accent); border-radius: 8px; padding: 12px; margin-bottom: 16px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.notice p { margin: 6px 0 0; }
.secret-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.secret-row code { flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.secret-row button { flex: none; }
code.secret { font: 13px ui-monospace, Menlo, monospace; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; user-select: all; overflow-wrap: anywhere; }
.tag { margin-left: 8px; padding: 0 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
button.danger:hover { border-color: var(--critical); }

/* ---- phones ----------------------------------------------------------------------- */
#tabbar[hidden], #tabbar { display: none; }

@media (max-width: 720px) {
  :root { font-size: 15px; }
  header { padding: 8px 14px; gap: 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  header #nav, header #account { display: none; }
  header .brand { font-size: 17px; }
  header #project { margin-left: auto; max-width: 55%; }
  main { padding: 14px; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  h1 { font-size: 20px; margin-bottom: 12px; overflow-wrap: anywhere; }

  /* Fitts: everything tappable is at least 44px tall; iOS zooms into inputs under 16px */
  button, select, input, textarea { min-height: 44px; font-size: 16px; }
  button.quiet { min-height: 40px; }
  input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters > * { width: 100%; min-width: 0; }
  .filters > label { grid-column: 1 / -1; }
  /* Hick: a compact, scrollable chip row instead of five full-width buttons */
  .filters.segmented { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
  .filters.segmented > button { flex: none; width: auto; min-height: 38px; border-radius: 999px; padding: 6px 14px; }
  .actions > button { flex: 1 1 auto; }
  /* Serial position: on a phone the draft and its review (what you act on) come before the source and analysis */
  .opp-panels > :nth-child(3) { order: -2; } .opp-panels > :nth-child(4) { order: -1; }
  .title-row { flex-wrap: wrap; gap: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { margin: 24px auto; padding: 18px; border: 0; }
  .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; }
  pre, .body { max-height: 60vh; }
  .toast { left: 14px; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; }

  /* Bottom tab bar (Jakob: like every phone app; serial position: work first, More last) */
  #tabbar:not([hidden]) { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  #tabbar a, #tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 58px; padding: 6px 2px; border: 0; border-radius: 0; background: none; color: var(--ink-2);
    font-size: 11px; text-decoration: none; position: relative; }
  #tabbar .glyph { font-size: 20px; line-height: 1; }
  #tabbar .active { color: var(--accent); font-weight: 600; }
  #tabbar .count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }


}

@media (max-width: 1500px) { #account .who .muted { display: none; } }

/* identity accounts */
.notice.warn { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps .kv { margin-top: 6px; }
.big-code { font-size: 22px; letter-spacing: .15em; }
.waiting::before { content: "◌ "; display: inline-block; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog.stepup { border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-width: 380px; width: calc(100% - 32px);
  background: var(--surface); color: var(--ink); }
dialog.stepup::backdrop { background: rgb(0 0 0 / .35); }

/* grid: compact, scannable rows for large lists */
.grid { margin-bottom: 18px; }
.grid-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.grid-tools .filters { margin: 0; }
.grid-search { min-width: 240px; flex: 1 1 240px; max-width: 420px; }
.grid-count { margin-left: auto; }
.chip-count { opacity: .7; font-variant-numeric: tabular-nums; }
.grid-scroll { overflow-x: auto; }
table.compact th, table.compact td { padding: 5px 8px; }
table.compact thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
table.compact th[data-sort] { cursor: pointer; user-select: none; }
table.compact th[data-sort]:hover { color: var(--ink); }
table.compact th.sorted { color: var(--ink); }
table.compact th.sorted[data-dir=desc]::after { content: " ↓"; }
table.compact th.sorted[data-dir=asc]::after { content: " ↑"; }
table.compact td.cell { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
table.compact td.cell.wrap { white-space: normal; max-width: 640px; min-width: 280px; }
table.compact td.cell.wrap .v { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.compact td.sel, table.compact th.sel { width: 28px; }
.bulkbar { position: sticky; top: 52px; z-index: 3; display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.bulkbar[hidden] { display: none; }
@media (max-width: 720px) {
  .grid-tools .filters.segmented { margin-inline: 0; padding-inline: 0; flex: 1 1 100%; }
  .grid-search { max-width: none; min-width: 0; }
  .grid-count { margin-left: 0; }
}
/* The trace uses timestamps and durations only, never page content. */
.trace-track { position: relative; min-width: 150px; height: 12px; background: #e8e8e4; border-radius: 3px; }
.trace-track i { position: absolute; height: 100%; background: #387a69; border-radius: 3px; }
.trace-track i.error, .trace-track i.interrupted { background: #b96741; }
.trace-track i.running { background: #6382ad; }

/* Performance cards share a scale and series colors across each selected view. */
.llm-performance, .activity-analytics, .operational-capacity, .publication-calendar { --chart-surface: #f8fafc; --chart-line: #e0e5eb; --chart-ink: #172331; --chart-muted: #5b6776;
  margin-bottom: 32px; color: var(--chart-ink); }
.llm-performance > .title-row h2, .activity-analytics > .title-row h2, .operational-capacity > .title-row h2, .publication-calendar > .title-row h2 { margin: 0; font-size: 19px; }
.activity-total-label { font-size: 12px; font-weight: 400; color: var(--chart-muted); }
.performance-intro { color: var(--chart-muted); max-width: 900px; line-height: 1.7; margin: 12px 0 22px; }
.performance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.performance-stat { border: 1px solid var(--chart-line); border-radius: 10px; padding: 16px 18px; background: var(--chart-surface); }
.capacity-server .performance-stat-label, .capacity-server .performance-stat-context { overflow-wrap: anywhere; }
.performance-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--chart-muted); }
.performance-stat-value { font-size: 26px; font-weight: 550; margin: 6px 0; font-variant-numeric: tabular-nums; }
.performance-stat-context { font-size: 12px; color: var(--chart-muted); }
.performance-controls { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.llm-filters { flex: 1; margin: 0; }
.llm-filters .field { min-width: 140px; max-width: 100%; flex: 1; color: var(--chart-muted); font-weight: 450; font-size: 12px; }
.llm-filters select { max-width: 100%; width: 100%; padding: 9px 10px; background: var(--chart-surface); border-color: var(--chart-line); }
.performance-view { display: flex; border: 1px solid var(--chart-line); border-radius: 8px; padding: 3px; }
.performance-view button { border: 0; background: transparent; padding: 7px 12px; color: var(--chart-muted); }
.performance-view button[aria-pressed=true] { background: var(--chart-surface); color: var(--accent); box-shadow: 0 0 0 1px var(--chart-line); }
.performance-context { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; color: var(--chart-muted); font-size: 12px; }
.llm-capacity { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px 0 20px; }
.performance-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.activity-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.activity-analytics .performance-axis { font-size: 18px; }
.performance-card { background: var(--chart-surface); border: 1px solid var(--chart-line); border-radius: 12px; padding: 22px; min-width: 0; }
.performance-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.performance-card-head h3 { margin: 0; font-size: 17px; font-weight: 550; text-transform: none; letter-spacing: 0; color: var(--chart-ink); }
.performance-expand { font-size: 24px; border: 0; padding: 0 4px; background: transparent; line-height: 1; color: var(--chart-muted); }
.performance-description { color: var(--chart-muted); font-size: 12px; margin: 8px 0 4px; min-height: 35px; }
.performance-plot { min-height: 210px; display: grid; align-items: center; }
.performance-plot svg { display: block; width: 100%; overflow: visible; }
.performance-gridline { stroke: var(--chart-line); stroke-width: 1; }
.performance-axis { fill: var(--chart-muted); font: 12px system-ui, sans-serif; }
.performance-point:hover { r: 5; }
.performance-chart-note { font-size: 11px; color: var(--chart-muted); margin-top: 8px; }
.performance-legend { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.performance-legend li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; align-items: baseline; }
.performance-series { display: flex; gap: 9px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.performance-series i { display: block; width: 12px; flex: 0 0 12px; border-top: 3px solid var(--series-color); position: relative; top: -3px; }
.performance-legend-value { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.performance-legend-value small { display: block; color: var(--chart-muted); font-size: 11px; }
.performance-empty { text-align: center; display: grid; gap: 10px; color: var(--chart-muted); font-size: 12px; padding: 20px; }
.performance-empty strong { font-size: 15px; font-weight: 500; }
.performance-data { margin-top: 18px; border-top: 1px solid var(--chart-line); font-size: 12px; }
.performance-data summary { margin-top: 12px; color: var(--chart-muted); }
.performance-data table { margin-top: 12px; }
.performance-data td { overflow-wrap: anywhere; }
.performance-footnote, .performance-breakdown { color: var(--chart-muted); font-size: 12px; line-height: 1.6; }
.performance-breakdown { margin-top: 18px; }
.performance-dialog { --chart-surface: #f8fafc; --chart-line: #e0e5eb; --chart-ink: #172331; --chart-muted: #5b6776;
  padding: 18px; background: var(--surface); color: var(--chart-ink); border: 1px solid var(--chart-line); border-radius: 14px;
  width: min(1050px, calc(100% - 28px)); max-height: calc(100dvh - 40px); }
.performance-dialog::backdrop { background: rgb(0 0 0 / .65); }
.performance-close { display: block; margin: 0 0 12px auto; }
.llm-performance :focus-visible, .activity-analytics :focus-visible, .operational-capacity :focus-visible, .performance-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.capacity-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.operational-capacity > .title-row { flex-wrap: wrap; gap: 12px; }
.operational-capacity .performance-card > h3 { margin: 0; font-size: 17px; font-weight: 550; text-transform: none; letter-spacing: 0; color: var(--chart-ink); }
.capacity-detail { margin: -8px 0 22px; }
.capacity-detail summary { font-size: 13px; }
.capacity-legend { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; }
.capacity-legend li { display: flex; align-items: center; gap: 7px; }
.capacity-legend i { display: inline-block; width: 12px; border-top: 3px solid var(--series-color); }
.capacity-diagnostics { display: grid; gap: 22px; margin-top: 22px; }
.capacity-diagnostics td { overflow-wrap: anywhere; }
.capacity-server { border-top: 1px solid var(--chart-line); margin-top: 22px; padding-top: 12px; }
@media (prefers-color-scheme: dark) {
  .llm-performance, .activity-analytics, .operational-capacity, .publication-calendar, .performance-dialog { --chart-surface: #10161b; --chart-line: #29323a; --chart-ink: #edf1f5; --chart-muted: #a2acb6; }
}
@media (max-width: 900px) {
  .performance-charts { grid-template-columns: 1fr; }
  .performance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-controls { align-items: stretch; }
  .performance-controls .llm-filters { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .performance-stats { gap: 10px; }
  .performance-stat { padding: 14px 12px; }
  .performance-stat-value { font-size: 23px; }
  .llm-filters .field { min-width: 0; }
  .llm-filters > label { grid-column: auto; }
  .performance-view { width: 100%; }
  .performance-view button { flex: 1; }
  .performance-card { padding: 18px 14px; }
  .performance-card-head h3 { font-size: 16px; }
  .performance-plot { min-height: 185px; }
  .performance-axis { font-size: 18px; }
  .performance-legend li { font-size: 12px; }
  .performance-legend-value { max-width: 55%; }
  .performance-intro { font-size: 13px; }
  .performance-dialog { padding: 10px; }
}
.conversation-evidence { margin-top: .5rem; font-weight: normal; }
table.compact td.cell.wrap .v:has(.conversation-evidence) { display: block; -webkit-line-clamp: unset; overflow: visible; }
.conversation-evidence summary { cursor: pointer; font-size: .85rem; }
.conversation-evidence ul { padding-left: 1.25rem; margin: .5rem 0; }
.conversation-evidence li + li { margin-top: .6rem; }
.conversation-evidence p { margin: .2rem 0; overflow-wrap: anywhere; }

/* Crawler activity shares the analytics cards and stays usable on small screens. */
.crawler-activity { margin: 1.5rem 0 2rem; }
.crawler-activity .filters { flex-wrap: wrap; }
.crawler-activity .filters select { max-width: 100%; min-width: 0; }
.crawler-activity .performance-card { margin: 1rem 0; }
.crawler-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; }
.crawler-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.crawler-legend i { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; }
.crawler-plot svg { display: block; width: 100%; height: auto; max-height: 300px; cursor: pointer; }
.crawler-profile { display: block; overflow-wrap: anywhere; }
.crawler-explanation { padding: .75rem 0; }
.crawler-detail { margin-top: 1.5rem; }

/* Tables stay tables on every screen. Contain long inventories and wide metrics,
   with headings and the row identity retained while scrolling in either axis. */
.table-scroll { max-width: 100%; max-height: min(65vh, 640px); overflow: auto;
  position: relative; isolation: isolate; scrollbar-gutter: stable; margin-bottom: 12px; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-scroll table { border-collapse: separate; border-spacing: 0; }
.table-scroll thead th, .table-scroll table.compact thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 1px var(--line); }
.table-scroll td > .v { max-width: 32rem; overflow-wrap: anywhere; }
.table-scroll td.num { white-space: nowrap; }
.table-scroll th:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 720px) {
  .table-scroll { max-height: 60vh; border: 1px solid var(--line); border-radius: 6px; }
  .table-scroll table { font-size: 13px; line-height: 1.4; }
  .table-scroll th, .table-scroll td, .table-scroll table.compact td { padding: 8px; vertical-align: middle; }
  .table-scroll th { height: 44px; }
  .table-scroll td { min-width: 5rem; height: 44px; }
  .table-scroll td > .v { width: max-content; max-width: 18rem; }
  .table-scroll .lead { position: sticky; left: 0; z-index: 1; background: var(--surface);
    box-shadow: 1px 0 var(--line); }
  .table-scroll thead th.lead { z-index: 3; }
  .table-scroll td.lead > .v { width: min(40vw, 10rem); max-width: min(40vw, 10rem); }
  .table-scroll tr.click:hover .lead, .table-scroll tr.click:active .lead { background: var(--surface-2); }
  .table-scroll table.compact td.cell.wrap { min-width: 0; }
  .table-scroll .has-selection .lead { left: 44px; }
  .table-scroll .sel { position: sticky; left: 0; z-index: 1; min-width: 44px; width: 44px; background: var(--surface); }
  .table-scroll table.compact th.sel { z-index: 3; }
  .table-scroll .row-actions, .table-scroll .actions { flex-wrap: nowrap; }
  .table-scroll .row-actions button, .table-scroll .actions button { flex: none; }
  .bulkbar { flex-wrap: wrap; }
}

/* Conversations: cool paper, cobalt navigation, and a coral fit rail.
   System fonts keep the no-build UI self-contained under its existing CSP. */
body[data-screen="review"], body[data-screen="opportunity"] { background: #f3f6fa; }
.opportunity-feed, .opportunity-workspace {
  --surface: #fff; --surface-2: #f3f6fa; --line: #dfe6ed; --ink: #172b42; --ink-2: #53657a; --ink-3: #64758a;
  --accent: #3663eb; --feed-soft: #e9efff; --feed-coral: #bc4724; --feed-peach: #fff0e9; --feed-green: #197a65;
  color: var(--ink); font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 1380px; margin: 10px auto 48px;
}
.opportunity-feed [hidden], .opportunity-workspace [hidden] { display: none !important; }
.opportunity-feed :focus-visible, .opportunity-workspace :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.feed-icon { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
.feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0 30px; }
.feed-heading h1 { font: 700 36px/1.15 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -1.2px; margin: 5px 0 9px; }
.feed-heading p { color: var(--ink-2); margin: 0; }
.feed-heading .feed-eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .035em; }
.feed-table-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); white-space: nowrap; }
.feed-table-link:hover { color: var(--accent); border-color: var(--accent); }
.feed-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 248px; gap: 26px; align-items: start; }
.feed-sidebar { position: sticky; top: 115px; min-width: 0; }
.feed-section-label { font-size: 10px; letter-spacing: .12em; font-weight: 750; color: var(--ink-3); margin: 0 12px 12px; }
.feed-section-label:not(:first-child) { margin-top: 30px; }
.feed-states { display: grid; gap: 4px; }
.feed-states a, .feed-sidebar > button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; color: var(--ink-2); background: transparent; text-decoration: none; text-align: left; font-size: 13px; }
.feed-states a[aria-current="page"], .feed-sidebar > button[aria-pressed="true"] { background: var(--feed-soft); color: var(--accent); font-weight: 700; }
.feed-states a:hover, .feed-sidebar > button:hover { background: var(--feed-soft); }
.feed-sidebar > button { margin-top: 4px; }
.feed-watchlists { display: grid; gap: 3px; }
.feed-watchlists button { display: flex; gap: 9px; align-items: center; width: 100%; border: 0; border-radius: 8px; text-align: left; padding: 9px 10px; background: transparent; color: var(--ink-2); font-size: 12px; }
.feed-watchlists button > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.feed-watchlists button small { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.feed-watchlists button[aria-pressed="true"] { background: var(--surface); font-weight: 650; color: var(--ink); box-shadow: 0 1px 3px #172b4209; }
.watchlist-dot { display: grid; place-items: center; border-radius: 7px; background: var(--feed-soft); color: var(--accent); width: 24px; height: 24px; flex: 0 0 24px; font-weight: 700; }
.feed-watchlists button:nth-child(3n) .watchlist-dot { background: #e2f1ec; color: #197a65; }
.feed-watchlists button:nth-child(3n + 1) .watchlist-dot { background: var(--feed-peach); color: var(--feed-coral); }
.feed-duplicate-link { display: block; color: var(--ink-3); text-decoration: none; font-size: 12px; padding: 22px 12px; margin-top: 18px; border-top: 1px solid var(--line); }
.feed-center { min-width: 0; }
.feed-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px 15px; color: var(--ink-3); }
.feed-search:focus-within { border-color: var(--accent); }
.feed-search input { border: 0; background: transparent; width: 100%; min-width: 0; padding: 8px 2px; color: var(--ink); }
.feed-search input:focus-visible { outline-offset: 0; border-radius: 4px; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0; }
.feed-sorts { display: flex; flex-wrap: wrap; gap: 5px; }
.feed-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); padding: 7px 10px; font-size: 12px; font-weight: 600; }
.feed-action:hover { background: var(--surface-2); color: var(--accent); }
.feed-action[aria-pressed="true"], .feed-sorts button[aria-pressed="true"] { background: var(--feed-soft); color: var(--accent); }
.feed-count { color: var(--ink-3); font-size: 11px; text-align: right; }
.feed-posts { display: grid; gap: 15px; }
.feed-post { display: grid; grid-template-columns: 52px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 7px #172b4203; transition: border-color .16s, box-shadow .16s; }
.feed-post:hover { border-color: #b6c8e0; box-shadow: 0 4px 16px #172b4207; }
.feed-post:has(.feed-expanded:not([hidden])) { border-color: var(--accent); }
.feed-rail { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 15px 5px; background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); border-right: 1px solid var(--line); }
.feed-rail strong { font: 700 21px/1.3 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.6px; }
.feed-rail > span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.feed-vote { display: grid; place-items: center; height: 34px; width: 34px; border: 0; border-radius: 9px; background: transparent; padding: 6px; color: var(--ink-3); }
.feed-vote:hover:not(:disabled), .feed-vote[aria-pressed="true"] { color: var(--feed-coral); background: var(--feed-peach); opacity: 1; }
.feed-vote:first-child { margin-bottom: 4px; }
.feed-vote:last-child { margin-top: 5px; }
.feed-post-main { padding: 18px 20px 10px; min-width: 0; }
.feed-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11px; color: var(--ink-3); }
.feed-meta strong { color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.feed-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: inline-grid; place-items: center; background: var(--feed-soft); color: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 750; }
.source-avatar { width: 23px; height: 23px; flex-basis: 23px; background: var(--feed-peach); color: var(--feed-coral); font-size: 11px; }
.feed-draft-status { margin-left: auto; }
.feed-flair { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 10px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border-radius: 5px; }
.feed-flair.ready, .feed-flair.done { background: #e6f4ed; color: #19735d; }
.feed-flair.caution { background: #fff3d9; color: #8b6105; }
.feed-post h2 { font: 700 19px/1.35 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.35px; margin: 12px 0 5px; overflow-wrap: anywhere; }
.feed-post h2 a { color: var(--ink); text-decoration: none; }
.feed-post h2 a:hover { color: var(--accent); }
.feed-author { font-size: 10px; color: var(--ink-3); }
.feed-excerpt { color: var(--ink-2); font-size: 13px; line-height: 1.7; margin: 13px 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-insight { display: flex; align-items: flex-start; gap: 8px; background: var(--feed-soft); padding: 9px 11px; border-radius: 8px; font-size: 11px; line-height: 1.6; color: var(--ink-2); margin: 12px 0; overflow-wrap: anywhere; }
.feed-insight .feed-icon { width: 14px; height: 14px; flex-basis: 14px; margin-top: 2px; color: var(--accent); }
.feed-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.feed-tags a { color: var(--ink-3); font-size: 10px; border: 1px solid var(--line); padding: 5px 8px; border-radius: 5px; overflow-wrap: anywhere; }
.feed-rail, .feed-insight, .feed-tags a { text-decoration: none; }
.feed-post a:hover { text-decoration: underline; text-underline-offset: 3px; }
.feed-post a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.feed-meta a, .feed-author a, .feed-sources a { display: inline-flex; align-items: center; min-height: 24px;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.feed-meta a, .feed-author a { color: inherit; }
.feed-target-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.feed-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 10px; color: var(--ink-3); }
.feed-sources a { color: var(--ink-2); overflow-wrap: anywhere; }
.feed-post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; border-top: 1px solid var(--line); padding-top: 8px; }
.feed-post-actions > button:first-child { background: var(--feed-soft); color: var(--accent); margin-right: 4px; }
.feed-post-actions > a { margin-left: auto; font-size: 11px; color: var(--ink-3); text-decoration: none; padding: 7px 3px; }
.feed-post-actions .feed-icon { width: 15px; height: 15px; flex-basis: 15px; }
.feed-card-error:empty { display: none; }
.feed-more { display: block; margin: 20px auto; padding: 10px 20px; background: var(--surface); border-radius: 10px; color: var(--accent); font-size: 13px; }
.feed-right { display: grid; gap: 22px; }
.feed-welcome { background: var(--feed-soft); border: 1px solid #d7e2ff; border-radius: 16px; padding: 22px; }
.feed-wave { color: var(--accent); font-size: 42px; line-height: 1; display: inline-block; }
.feed-welcome h2 { font: 700 25px/1.2 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.6px; white-space: pre-line; margin: 20px 0 12px; }
.feed-welcome p { color: var(--ink-2); font-size: 12px; line-height: 1.8; }
.feed-welcome-foot { font-size: 10px; color: var(--accent); border-top: 1px solid #cfdbfa; padding-top: 14px; margin-top: 20px; }
.feed-welcome-foot .feed-icon { width: 14px; height: 14px; margin-right: 4px; }
.feed-guide { padding: 0 5px; }
.feed-guide h2 { font-size: 12px; margin: 0 0 17px; }
.feed-guide p { display: flex; gap: 10px; color: var(--ink-3); font-size: 11px; margin: 18px 0; line-height: 1.65; }
.feed-guide p > .feed-icon { color: var(--ink-2); margin-top: 2px; }
.feed-guide strong { display: block; color: var(--ink-2); font-size: 12px; margin-bottom: 2px; }
.feed-footnote { font-size: 10px; line-height: 1.8; color: var(--ink-3); padding: 14px 5px; border-top: 1px solid var(--line); margin: 0; }
.feed-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; text-align: center; padding: 48px 25px; }
.feed-empty > .feed-icon { height: 32px; width: 32px; color: var(--accent); }
.feed-empty h2 { font-size: 20px; margin: 16px 0 10px; }
.feed-empty p { color: var(--ink-2); max-width: 370px; margin: 0 auto 18px; }
.feed-undo { background: var(--feed-soft); border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; font-size: 12px; }
.feed-undo button { color: var(--accent); }
.feed-back { display: inline-block; margin-bottom: 16px; text-decoration: none; font-size: 13px; }
.feed-expanded { grid-column: 1 / -1; border-top: 1px solid var(--line); min-width: 0; }
.thread-topline { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 0; }
.thread-topline a { font-size: 11px; text-decoration: none; }
.thread-tabs { display: flex; gap: 8px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.thread-tabs button { padding: 13px 7px 11px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.thread-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); }
.thread-panels { padding: 20px; }
.thread-panels h2 { font-size: 17px; margin-top: 0; }
.thread-panels .panel, .thread-panels .panel.form { max-width: none; }
.thread-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; margin: 14px 0; }
.thread-person { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--ink-3); }
.thread-person strong { color: var(--ink); }
.thread-comment { border-left: 2px solid var(--line); margin-top: 24px; padding-left: 16px; }
.thread-privacy { color: var(--ink-3); font-size: 11px; margin-top: 0; }
.thread-start, .thread-replied { text-align: center; padding: 20px 10px; }
.thread-start h3, .thread-replied h3 { font: 700 20px "Trebuchet MS", sans-serif; color: var(--ink); text-transform: none; letter-spacing: -.3px; }
.thread-start p, .thread-replied p { font-size: 13px; color: var(--ink-2); max-width: 410px; margin: 12px auto 20px; }
.thread-reply-note { white-space: pre-line; font-style: italic; }
.thread-start button { display: inline-flex; gap: 6px; align-items: center; padding: 10px 16px; border-radius: 8px; }
.thread-replied > .feed-icon { color: var(--feed-green); height: 30px; width: 30px; }
.thread-review > summary { font-size: 12px; margin-top: 16px; }
.thread-review > .panel { margin-top: 10px; }
.thread-loading { padding: 10px 20px; color: var(--ink-3); }
.reply-composer > h3 { text-transform: none; letter-spacing: 0; font-size: 12px; }
.reply-composer textarea { font-size: 14px; line-height: 1.8; padding: 14px; resize: vertical; min-height: 160px; }
.reply-composer .reply-submit { padding: 9px 16px; border-radius: 8px; }
.reply-composer .reply-evidence summary { font-size: 12px; }
.reply-destination { color: var(--ink-2); font-size: 11px; }
.opportunity-workspace { max-width: 1120px; }
.opportunity-workspace > h1 { font: 700 30px/1.3 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.6px; max-width: 900px; }
.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 22px; }
.workspace-main { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.workspace-source { padding: 24px; border-bottom: 1px solid var(--line); }
.workspace-source .thread-text { max-height: 440px; overflow: auto; }
.workspace-aside { display: grid; gap: 16px; min-width: 0; }
.workspace-aside > .panel { background: var(--surface); padding: 18px; }
.workspace-aside h2 { margin-top: 0; }
.workspace-audit { margin-top: 24px; }
.workspace-audit > summary { font-size: 13px; }
@media (prefers-color-scheme: dark) {
  body[data-screen="review"], body[data-screen="opportunity"] { background: #141e2b; }
  .opportunity-feed, .opportunity-workspace { --surface: #1c293a; --surface-2: #182333; --line: #33445a; --ink: #edf2fa; --ink-2: #bdcbdd; --ink-3: #9daec4; --accent: #97b4ff; --feed-soft: #273859; --feed-coral: #ffb094; --feed-peach: #47342f; --feed-green: #82d5b9; }
  .feed-welcome { border-color: var(--line); } .feed-welcome-foot { border-color: var(--line); }
  .opportunity-feed button.primary, .opportunity-workspace button.primary { color: #14233c; }
  .feed-flair.ready, .feed-flair.done { background: #214239; color: #9edec2; }
  .feed-flair.caution { background: #453c28; color: #f4d590; }
}
@media (max-width: 1200px) { .feed-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 20px; } .feed-right { display: none; } }
@media (max-width: 850px) { .workspace-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .opportunity-feed, .opportunity-workspace { margin: 6px auto 20px; }
  .feed-heading { gap: 10px; margin: 12px 0 22px; }
  .feed-heading h1 { font-size: 29px; }
  .feed-heading p { font-size: 12px; }
  .feed-heading .feed-eyebrow { font-size: 9px; }
  .feed-table-link { font-size: 0; padding: 12px; }
  .feed-table-link .feed-icon { width: 18px; }
  .feed-layout { display: block; }
  .feed-sidebar { position: static; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
  .feed-sidebar .feed-section-label, .feed-duplicate-link { display: none; }
  .feed-states { display: flex; flex: 1 1 100%; overflow-x: auto; gap: 4px; }
  .feed-states a { width: auto; flex-shrink: 0; min-height: 44px; padding: 8px 11px; font-size: 12px; }
  .feed-states .feed-icon { display: none; }
  .feed-sidebar > button { flex: 0 0 auto; width: auto; margin: 0; min-height: 44px; }
  .feed-watchlists { display: flex; flex: 1; min-width: 0; overflow-x: auto; align-items: center; }
  .feed-watchlists button { width: auto; flex-shrink: 0; white-space: nowrap; padding: 7px 10px; min-height: 44px; }
  .feed-watchlists .watchlist-dot, .feed-watchlists small { display: none; }
  .feed-search input { font-size: 16px; }
  .feed-toolbar { padding: 10px 0; gap: 4px; }
  .feed-sorts { gap: 0; }
  .feed-sorts button { min-height: 44px; padding: 8px; font-size: 11px; gap: 5px; }
  .feed-count { font-size: 10px; }
  .feed-post { grid-template-columns: 43px minmax(0, 1fr); border-radius: 11px; }
  .feed-rail { padding: 10px 0; }
  .feed-vote { width: 42px; height: 44px; }
  .feed-rail strong { font-size: 19px; }
  .feed-post-main { padding: 13px 12px 8px; }
  .feed-meta { gap: 5px; font-size: 10px; }
  .feed-meta strong { max-width: 130px; }
  .feed-draft-status { margin-left: 0; }
  .feed-post h2 { font-size: 18px; margin-top: 10px; }
  .feed-excerpt { font-size: 12px; }
  .feed-insight { font-size: 11px; }
  .feed-post-actions { gap: 1px; }
  .feed-post-actions button { font-size: 10px; min-height: 44px; padding: 6px; }
  .feed-post-actions > a { padding: 12px 5px; font-size: 10px; }
  .feed-post-actions .feed-icon { width: 14px; height: 14px; flex-basis: 14px; }
  .thread-panels { padding: 14px; }
  .thread-tabs { padding: 0 12px; gap: 6px; }
  .thread-tabs button { font-size: 12px; min-height: 44px; }
  .thread-topline { padding-inline: 12px; }
  .thread-topline .feed-action { min-height: 44px; }
  .reply-composer textarea, .thread-panels textarea, .thread-panels input { font-size: 16px; }
  .workspace-source { padding: 18px; }
  .opportunity-workspace > h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { .feed-post { transition: none; } }

/* Review queue: distinct feedback, one leading action, and a calm finish. */
.feed-rail { padding-top: 24px; gap: 0; }
.feed-rail strong { color: var(--ink-2); }
.feed-rail > span { font-size: 8px; line-height: 1.5; }
.feed-context-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0 0 7px; }
.feed-context-actions .feed-action { font-size: 11px; padding: 5px 8px; font-weight: 400; }
.feed-context-actions > a { font-size: 11px; color: var(--ink-3); text-decoration: none; padding: 8px; }
.feed-context-actions > a:last-child { margin-left: auto; }
.feed-post-actions { gap: 3px; padding-block: 10px 3px; }
.feed-post-actions > .feed-reply:first-child { background: var(--accent); color: white; padding: 9px 12px; }
.feed-more-actions { margin-left: auto; position: relative; }
.feed-more-actions summary { padding: 9px; font-size: 11px; color: var(--ink-3); }
.feed-more-actions[open] { background: var(--surface-2); border-radius: 7px; }
.feed-more-actions button { display: flex; }
.reply-record-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.reply-record-dialog::backdrop { background: rgb(0 0 0 / .4); }
.reply-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.reply-record-heading h2 { margin: 0; }
.reply-record-heading button { font-size: 22px; min-width: 44px; min-height: 44px; }
.reply-record-dialog input, .reply-record-dialog textarea { width: 100%; }
.duplicate-candidates { display: grid; gap: 6px; max-height: 240px; overflow: auto; margin: 6px 0; }
.duplicate-candidate { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.duplicate-candidate[aria-selected="true"] { border-color: var(--accent); outline: 2px solid var(--accent); }
.reply-record-dialog .actions button { min-height: 44px; }
.feed-session { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.feed-session-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--feed-soft); color: var(--accent); font-size: 27px; }
.feed-session h2 { white-space: pre-line; font: 700 23px/1.25 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.5px; margin: 18px 0 24px; }
.feed-session p { font-size: 11px; color: var(--ink-3); }
.queue-progress { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; margin: 10px 0 18px; }
.queue-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 11px; color: var(--ink-2); }
.queue-progress strong { color: var(--accent); font-size: 15px; font-variant-numeric: tabular-nums; }
.feed-guide kbd { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink-2); font: 11px system-ui, sans-serif; }
.feed-guide p { align-items: center; }
.thread-next-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.thread-next-row > span { font-size: 11px; color: var(--ink-3); }
.feed-next { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); white-space: nowrap; padding: 9px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 12px; }
.thread-shared { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 11px; color: var(--ink-2); margin: 0 0 16px; }
.thread-source-peek { padding: 12px 14px; margin-bottom: 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.thread-source-peek summary { font-size: 12px; color: var(--ink-2); }
.thread-source-peek .thread-text { max-height: 250px; overflow: auto; }
.reply-heading { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.reply-heading h3 { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-2); margin: 0; }
.reply-heading .feed-flair { flex-shrink: 0; }
.reply-primary { margin-block: 14px 10px; }
.reply-primary > a { font-size: 12px; margin-left: auto; }
.reply-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.reply-secondary button { color: var(--ink-2); font-size: 11px; background: transparent; border-color: transparent; }
.reply-secondary summary, .reply-evidence summary { color: var(--ink-3); font-size: 11px; padding: 8px; }
.reply-secondary > details { margin-left: auto; }
.reply-evidence { margin-top: 8px; }
.reply-posted { background: var(--feed-soft); padding: 12px; border-radius: 8px; margin-block: 18px; }
.reply-posted summary { color: var(--accent); font-weight: 650; }
.reply-posted input { width: 100%; }
.reply-posted form { margin-top: 14px; }
.reply-posted form > button { margin-top: 12px; }
.reply-progress { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; padding: 10px 0; }
.progress-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: queue-pulse 1.8s ease-in-out infinite; flex: 0 0 8px; }
.reply-recovery { padding: 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; }
.reply-recovery pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes queue-pulse { 50% { opacity: .35; } }
@media (prefers-color-scheme: dark) { .feed-post-actions > .feed-reply:first-child { color: #14233c; } }
@media (max-width: 720px) {
  .feed-post-actions { column-gap: 2px; }
  .feed-post-actions > .feed-reply:first-child { padding: 8px; }
  .feed-context-actions button, .feed-context-actions a, .feed-more-actions summary, .feed-next, .reply-secondary button, .reply-secondary summary, .reply-posted summary { min-height: 44px; }
  .feed-more-actions summary { display: flex; align-items: center; }
  .thread-next-row { padding: 12px; }
  .thread-next-row > span { max-width: 140px; }
  .reply-heading { align-items: flex-start; flex-wrap: wrap; }
  .reply-primary > a { margin-left: 0; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) { .progress-dot { animation: none; } }

/* Application header: workspace context, primary destinations, then utilities. */
header { min-height: 64px; gap: 18px; }
header .brand { white-space: nowrap; flex: none; }
#project-switcher { flex: 0 1 190px; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
#project-switcher[hidden] { display: none; }
header #project { display: block; width: 100%; max-width: none; min-width: 0; min-height: 40px; font-size: 13px; text-overflow: ellipsis; background-color: transparent; border-color: transparent; }
header #project:hover, header #project:focus { border-color: var(--line); }
#nav { align-items: center; flex-wrap: nowrap; }
.primary-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.primary-links > li > a, .nav-more { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; min-height: 44px; font-size: 13px; white-space: nowrap; border: 0; border-radius: 6px; color: var(--ink-2); background: transparent; text-decoration: none; }
.primary-links > li > a[aria-current="page"], .nav-more.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-weight: 650; }
.nav-more:hover, .nav-more[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.nav-chevron { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 3px 0 5px; }
button[aria-expanded="true"] > .nav-chevron { transform: rotate(225deg); margin-top: 3px; }
#utilities { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
#utilities > a, #utilities > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); text-decoration: none; font-size: 12px; }
#utilities > a:hover, #utilities > a.active, #utilities > button:hover, #utilities > button.active, #utilities > button[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
#utilities .header-attention { position: relative; }
#utilities .header-attention .count { position: absolute; top: 1px; right: 0; min-width: 16px; padding: 0 4px; border-radius: 10px; background: var(--critical); color: #fff; font-size: 10px; text-align: center; }
.account-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; font-weight: 650; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
#utilities > .account-button { padding: 5px; }
header :focus-visible, .shell-popover :focus-visible, #tabbar :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 10px 14px; background: var(--surface); color: var(--accent); border: 2px solid var(--accent); border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
#main { scroll-margin-top: 80px; }
#main:focus { outline: none; }
.shell-popover { position: fixed; inset: var(--popover-top, 64px) auto auto var(--popover-left, 12px); margin: 0; padding: 0; max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--popover-top, 64px) - 16px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 32px rgb(0 0 0 / .14); }
.shell-popover:not(:popover-open) { display: none; }
.shell-popover:popover-open { display: block; }
.shell-popover::backdrop { background: transparent; }
#more { width: 520px; }
.popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.popover-heading h2 { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.popover-heading button { display: none; width: 32px; min-height: 32px; }
.nav-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; padding: 16px; }
.nav-sections > section { min-width: 0; }
.nav-sections h3 { margin: 0 8px 6px; font-size: 10px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .07em; }
.nav-sections ul, #account-menu ul { list-style: none; padding: 0; margin: 0; }
.nav-sections a { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; min-height: 36px; font-size: 13px; white-space: normal; }
.nav-sections a[aria-current="page"], #account-menu a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-weight: 650; }
.nav-sections [data-nav-group="review"] { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
#account-menu { width: 280px; padding: 6px; }
.account-identity { display: grid; gap: 3px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.account-identity strong { font-size: 13px; }
.account-identity span, .account-identity small { font-size: 12px; color: var(--ink-2); }
.account-identity small { font-size: 11px; }
#account-menu li > a, #account-menu li > button { display: flex; align-items: center; min-height: 40px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 13px; text-align: left; text-decoration: none; }
#account-menu li > a:hover, #account-menu li > button:hover { color: var(--ink); background: var(--surface-2); }
#account-menu .account-signout { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
@media (max-width: 1050px) {
  header { gap: 12px; }
  #project-switcher { flex-basis: 160px; padding-left: 12px; }
  #utilities .header-search > span { display: none; }
  #utilities { gap: 3px; }
  .primary-links > li > a, .nav-more { padding-inline: 10px; }
}
@media (max-width: 720px) {
  header { min-height: 60px; gap: 10px; }
  header #nav, #utilities .header-search { display: none; }
  #project-switcher { flex: 1; padding-left: 10px; }
  header #project { margin: 0; font-size: 16px; min-height: 44px; }
  #utilities { margin-left: 0; gap: 2px; }
  #utilities .account-button > .nav-chevron { display: none; }
  #tabbar:not([hidden]) { grid-template-columns: repeat(4, 1fr); }
  #more { inset: auto 12px calc(72px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: calc(100dvh - 100px - env(safe-area-inset-bottom)); }
  .popover-heading button { display: inline-flex; align-items: center; justify-content: center; }
  .nav-sections { gap: 16px 12px; padding: 12px; }
  .nav-sections a, #account-menu li > a, #account-menu li > button, .popover-heading button { min-height: 44px; }
}

/* Source coverage leads with the work remaining; credentials and inbox stay one tap away. */
.account-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.account-tabs a { padding: 12px 0; white-space: nowrap; color: var(--ink-2); text-decoration: none; }
.account-tabs a[aria-current="page"] { color: var(--accent); border-bottom: 3px solid var(--accent); font-weight: 650; }
.account-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.account-preparation { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 3px solid var(--accent); }
.account-preparation h2 { font-size: 16px; margin: 0; }
.account-preparation p { margin-bottom: 0; max-width: 650px; }
.account-preparation select { max-width: 340px; }
.account-row-actions { flex-wrap: wrap; gap: 10px; }
.account-results { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .account-preparation { align-items: stretch; flex-direction: column; gap: 12px; }
  .account-preparation .actions { flex-wrap: wrap; }
  .account-preparation select { width: 100%; max-width: 100%; }
  .account-tabs { gap: 16px; }
}
@media (max-width: 720px) {
  body[data-screen="sourceAccounts"] .table-scroll { overflow: visible; border: 0; max-height: none; }
  body[data-screen="sourceAccounts"] .table-scroll table { display: block; min-width: 0; width: 100%; }
  body[data-screen="sourceAccounts"] .table-scroll thead { display: none; }
  body[data-screen="sourceAccounts"] .table-scroll tbody { display: grid; gap: 12px; }
  body[data-screen="sourceAccounts"] .table-scroll tr { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
  body[data-screen="sourceAccounts"] .table-scroll td { display: block; position: static; width: auto; height: auto; overflow: visible; min-width: 0; max-width: none; white-space: normal; border: 0; overflow-wrap: anywhere; box-shadow: none; }
  body[data-screen="sourceAccounts"] .table-scroll td > .v { width: auto; max-width: none; }
  body[data-screen="sourceAccounts"] .table-scroll .actions { flex-wrap: wrap; }
  body[data-screen="sourceAccounts"] .table-scroll td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--ink-2); font-size: 12px; margin-bottom: 3px; }
}

/* Registration work uses the established Radar palette. The next-action column
   carries the operational decision; batch access stays in one visible strip. */
.registration-batch { display: flex; justify-content: space-between; align-items: start; gap: 18px; border-left: 4px solid var(--accent); }
.registration-batch h2 { margin: 0; font-size: 16px; }
.registration-batch p { margin: 6px 0; }
.registration-batch .actions { flex-shrink: 0; flex-wrap: wrap; }
.registration-scope { max-height: 180px; overflow: auto; overflow-wrap: anywhere; }
.registration-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; }
.registration-dialog h2 { font-size: 20px; margin-top: 0; }
.registration-dialog input, .registration-dialog textarea, .registration-dialog select { width: 100%; min-width: 0; }
.registration-event { border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.registration-event p { margin: 4px 0; white-space: pre-wrap; }
.registration-next { min-width: 230px; max-width: 440px; }
.registration-next p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.registration-next details { margin-bottom: 8px; }
@media (max-width: 720px) {
  .registration-batch { flex-direction: column; }
  .registration-batch .actions { width: 100%; }
}
body[data-screen="sourceAccounts"] table.compact td.cell.wrap .v {
  display: block; -webkit-line-clamp: unset; overflow: visible;
}

/* Request bursts are the focus; reuse the operations palette and typography. */
.outbound-requests { min-width: 0; }
.request-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.request-controls form { margin: 0; flex-wrap: wrap; }
.request-controls input[type=text] { width: 240px; max-width: 100%; }
.request-summary, .request-inspection { font-variant-numeric: tabular-nums; }
.request-chart { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.request-chart svg { display: block; width: 100%; height: auto; cursor: crosshair; }
.request-chart svg text { fill: var(--ink-2); font: 12px system-ui; }
.request-chart input[type=range] { width: 100%; }
.request-grid { stroke: var(--line); }
.request-mean, .request-peak { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.request-mean { stroke: var(--accent); }
.request-peak { stroke: var(--serious); stroke-dasharray: 5 3; }
.request-marker { stroke: var(--ink-3); stroke-dasharray: 2 4; }
.request-mean-label { color: var(--accent); }
.request-peak-label { color: var(--serious); }
.outbound-requests td button { overflow-wrap: anywhere; text-align: left; max-width: 100%; }

/* growth workspace */
.query-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.query-row .query-text { flex: 1 1 320px; min-width: 0; }
.plain-list { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.plain-list li { overflow-wrap: anywhere; }
.growth-status { margin: 12px 0; }
.growth-status .kv { margin: 0; }
.growth-draft .field input, .growth-draft .field textarea, .growth-draft td input { font-weight: 400; }

/* Publication calendar: one sequential blue ramp (steps 250/400/550/700); dark mode
   flips the anchor so quiet days recede into the darker surface. */
.publication-calendar { --cal-0: var(--chart-line); --cal-1: #86b6ef; --cal-2: #3987e5; --cal-3: #1c5cab; --cal-4: #0d366b; --cal-year: #86b6ef; }
@media (prefers-color-scheme: dark) {
  .publication-calendar { --cal-1: #184f95; --cal-2: #2a78d6; --cal-3: #6da7ec; --cal-4: #b7d3f6; --cal-year: #1c5cab; }
}
.publication-calendar .cal-l0 { fill: var(--cal-0); } .publication-calendar .cal-l1 { fill: var(--cal-1); }
.publication-calendar .cal-l2 { fill: var(--cal-2); } .publication-calendar .cal-l3 { fill: var(--cal-3); }
.publication-calendar .cal-l4 { fill: var(--cal-4); }
.publication-calendar .cal-future { fill: none; stroke: var(--cal-0); stroke-width: 1; }
.publication-calendar .cal-scroll { overflow-x: auto; }
.publication-calendar .cal-grid { display: block; min-width: 720px; width: 100%; max-width: 900px; height: auto; }
.publication-calendar .cal-years { display: block; width: 100%; max-width: 900px; height: auto; margin-bottom: 18px; }
.publication-calendar .cal-year-bar { fill: var(--cal-year); cursor: pointer; }
.publication-calendar .cal-year-bar.selected { fill: var(--accent); }
.publication-calendar .cal-year-hit { fill: transparent; cursor: pointer; }
.publication-calendar .cal-year-hit:focus-visible { outline: none; stroke: var(--accent); stroke-width: 2; }
.publication-calendar .cal-cell.cal-hover { stroke: var(--chart-ink); stroke-width: 1.5; }
.publication-calendar .cal-label { font-size: 10px; fill: var(--chart-muted); }
.publication-calendar .cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--chart-muted); }
.publication-calendar .cal-legend li { display: flex; align-items: center; gap: 5px; }
.publication-calendar .cal-legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.publication-calendar .cal-tip { position: fixed; z-index: 20; pointer-events: none; padding: 6px 9px; border-radius: 6px; font-size: 12px;
  background: var(--chart-surface); color: var(--chart-ink); border: 1px solid var(--chart-line); box-shadow: 0 4px 14px rgb(0 0 0 / .14); }
.publication-calendar .cal-tip strong { display: block; }
.publication-calendar > .title-row .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Sources bar chart under the calendar: one series, sorted, direct value labels. */
.publication-calendar .cal-sources { margin-top: 28px; max-width: 900px; }
.publication-calendar .cal-sources-head h3 { margin: 0; font-size: 16px; }
.publication-calendar .cal-source-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.publication-calendar .cal-source-bars li { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 88px; align-items: center; gap: 10px; font-size: 13px; }
.publication-calendar .cal-source-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chart-ink); }
.publication-calendar .cal-source-track { height: 14px; }
.publication-calendar .cal-source-track i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.publication-calendar .cal-source-bars li.other .cal-source-track i { background: var(--chart-muted); opacity: .45; }
.publication-calendar .cal-source-bars li.other .cal-source-label { color: var(--chart-muted); }
.publication-calendar .cal-source-value { font-variant-numeric: tabular-nums; color: var(--chart-ink); }
@media (max-width: 640px) { .publication-calendar .cal-source-bars li { grid-template-columns: minmax(90px, 40%) 1fr 70px; } }
