:root {
  --bg: #f4f6f8; --surface: #fff; --surface-subtle: #f8fafb; --surface-blue: #f0f8f7;
  --line: #e3e8ed; --line-strong: #cbd5df; --text: #192b3d; --text-2: #45596b; --muted: #647689;
  --blue: #087f79; --blue-hover: #076761; --blue-soft: #e9f5f3;
  --green: #18764d; --green-soft: #edf7f0; --red: #b83439; --red-soft: #fff1f1;
  --amber: #9c6509; --amber-soft: #fff7e7; --info: #416b91;
  --topbar-height: 72px; --statusbar-height: 0px; --history-expanded-width: 252px; --history-collapsed-width: 76px;
  color: var(--text); color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; font-variant-numeric: tabular-nums;
}


* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
body.overlay-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--blue); }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #58a79f; outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 200; top: -100px; left: 20px; padding: 14px 20px; border-radius: 8px; color: #fff; background: var(--blue); }
.skip-link:focus { top: 12px; }
.application-shell { height: 100%; }
.topbar { height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 40; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 11px; }
.brand-mark svg { width: 25px; height: 25px; }
.brand > span:last-child { display: grid; gap: 3px; }
.brand strong { font-size: 17px; font-weight: 700; }
.brand small { font-size: 13px; color: var(--muted); }
.project-state { min-width: 0; display: flex; align-items: center; gap: 12px; margin-right: auto; margin-left: 36px; }
.project-state .eyebrow, .project-state > strong { display: none; }
.top-status { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; white-space: nowrap; }
.top-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.top-status.running i, .top-status.reviewing i, .top-status.ingesting i, .top-status.indexing i, .top-status.planning i, .top-status.synthesizing i, .top-status.validating i { background: var(--blue); }
.top-status.completed i { background: var(--green); }
.top-status.partial_completed i, .top-status.paused i { background: var(--amber); }
.top-status.failed i { background: var(--red); }
.top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.button:hover { border-color: #9cbab7; background: var(--surface-subtle); }
.button-primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.button-primary:hover { border-color: var(--blue-hover); background: var(--blue-hover); }
.button-quiet { border-color: var(--line); }
.button-agent { background: #fff; }
.button.is-disabled { color: #7d8b99; background: #f6f8fa; border-color: var(--line); pointer-events: none; }
.live-cost-chip { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 0 16px 0 4px; text-align: right; display: grid; gap: 4px; }
.live-cost-chip span { display: none; }
.live-cost-chip strong { font-size: 13px; color: var(--muted); font-weight: 500; }
.account-menu-wrap { position: relative; margin-left: 6px; }
.account-button { display: flex; align-items: center; gap: 7px; padding: 3px; border: 0; background: transparent; border-radius: 8px; min-height: 40px; }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #edf1f5; color: #426074; font-size: 13px; font-weight: 650; }
.account-copy { display: none; }
.account-button > svg { width: 13px; height: 13px; }
.account-menu { position: absolute; top: calc(100% + 12px); right: 0; width: 240px; padding: 8px; border: 1px solid var(--line); background: #fff; border-radius: 12px; box-shadow: 0 12px 32px #192b3d1a; }
.account-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px; }
.account-menu-head > div { display: grid; gap: 5px; }
.account-menu-head small { color: var(--muted); font-size: 13px; }
.account-menu button { width: 100%; padding: 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.account-menu button:hover { background: var(--surface-subtle); }
.account-menu button svg { width: 18px; height: 18px; }
.workspace { height: calc(100dvh - var(--topbar-height)); padding: 26px 28px 28px; margin-left: var(--history-current-width, 252px); display: grid; grid-template-columns: minmax(0, 820px); grid-template-rows: auto auto; grid-template-areas: "heading" "setup"; justify-content: center; align-content: start; gap: 20px; overflow: auto; }
.workspace-heading { grid-area: heading; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.workspace-heading > div { min-width: 0; }
.workspace-kicker { margin: 0 0 9px; color: var(--blue); font-size: 13px; font-weight: 650; letter-spacing: .08em; }
.workspace-heading h1 { margin: 0; font-size: 28px; line-height: 1.35; letter-spacing: -.025em; font-weight: 700; overflow-wrap: anywhere; }
.workspace-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.workspace-date { flex: 0 0 auto; padding-top: 31px; color: var(--muted); font-size: 13px; }
.pane { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.pane-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pane-heading h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.pane-intro { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.step-index { display: none; }
.mode-tag { font-size: 13px; padding: 5px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 6px; white-space: nowrap; }
.setup-pane { grid-area: setup; padding: 28px; overflow-y: auto; }
.setup-pane .pane-heading { padding: 0 0 24px; }
.review-form { margin-top: 24px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--text); font-size: 14px; font-weight: 600; }
.field-label small { color: var(--muted); font-size: 13px; font-weight: 400; }
.field-label b { color: var(--blue); font-size: 13px; font-weight: 500; }
.text-input, .url-input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text); background: #fff; }
.text-input::placeholder { color: #82909e; }
.upload-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.upload-field { min-width: 0; }
.drop-zone { position: relative; min-height: 150px; padding: 20px 14px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; border: 1px dashed #b6cdc9; border-radius: 12px; background: #f8fbfa; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.drop-zone:hover, .drop-zone.is-dragover { border-color: var(--blue); background: var(--blue-soft); }
.drop-zone:focus-within { outline: 3px solid #58a79f; outline-offset: 3px; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone > span:last-child { width: 100%; min-width: 0; display: grid; gap: 7px; pointer-events: none; }
.drop-zone strong { font-size: 14px; font-weight: 650; }
.drop-zone small { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.drop-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #e5f1ee; pointer-events: none; }
.drop-icon svg { width: 23px; height: 23px; }
.auto-source-note { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 22px; color: var(--muted); }
.auto-source-note > span { padding-top: 2px; color: var(--blue); }
.auto-source-note svg { width: 18px; height: 18px; }
.auto-source-note p { margin: 0; display: grid; gap: 5px; }
.auto-source-note strong { color: var(--text-2); font-size: 13px; font-weight: 600; }
.auto-source-note small { font-size: 13px; line-height: 1.6; }
.review-settings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-settings > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 13px; cursor: pointer; list-style: none; }
.review-settings > summary::-webkit-details-marker { display: none; }
.review-settings > summary > span::before { content: "+"; display: inline-block; width: 20px; color: var(--blue); font-size: 18px; vertical-align: -1px; }
.review-settings[open] > summary > span::before { content: "−"; }
.review-settings > summary small { color: var(--muted); font-size: 13px; }
.review-settings-body { padding: 0 0 18px; }
.upload-validation-note { display: flex; gap: 10px; padding: 12px; background: var(--surface-subtle); border-radius: 9px; }
.upload-validation-note > svg { width: 18px; height: 18px; color: var(--blue); flex: 0 0 auto; }
.upload-validation-note > span { display: grid; gap: 6px; }
.upload-validation-note strong { font-size: 13px; }
.upload-validation-note small { font-size: 13px; color: var(--muted); line-height: 1.7; }
.execution-mode-field { display: none; }
.execution-mode-note { margin: 14px 0; color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.reasoning-field { min-width: 0; border: 0; margin: 18px 0; padding: 0; }
.reasoning-legend { width: 100%; display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.reasoning-legend small { color: var(--muted); font-size: 13px; }
.model-reasoning-row { margin: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.model-reasoning-row > span { display: grid; gap: 4px; }
.model-reasoning-row small, .reasoning-cost-note, .estimate-preview small { color: var(--muted); font-size: 13px; }
.model-reasoning-row select { min-height: 40px; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 8px; }
.review-depth-row { display: block; }
.review-depth-row select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 10px 12px; color: var(--text); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; }
.review-depth-row select:hover { border-color: var(--blue); }
.review-depth-row select:disabled { cursor: wait; opacity: .6; }
.reasoning-cost-note { line-height: 1.75; }
.estimate-preview { display: flex; align-items: center; gap: 10px; }
.estimate-preview > span:nth-child(2) { display: grid; }
.estimate-icon svg { width: 20px; height: 20px; }
.run-button { width: 100%; min-height: 60px; margin-top: 22px; padding: 12px 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; color: #fff; background: var(--blue); border: 0; border-radius: 10px; text-align: left; }
.run-button:hover { background: var(--blue-hover); }
.run-icon { display: grid; place-items: center; }
.run-icon svg, .arrow-icon { width: 23px; height: 23px; }
.run-button > span:nth-child(2) { display: grid; gap: 5px; }
.run-button strong { font-size: 15px; }
.run-button small { color: #d3ece7; font-size: 13px; line-height: 1.4; }
.model-rack { padding-top: 18px; }
.section-caption { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.model-role-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.model-role-row strong { color: var(--text-2); font-family: ui-monospace, monospace; font-size: 13px; font-weight: 500; }
.model-row { width: 100%; min-height: 48px; margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.model-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
.model-row strong { font-size: 13px; }
.model-row small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.model-id { color: var(--blue); font-weight: 650; }
.model-open-icon { width: 15px; height: 15px; }
.model-led { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.new-review-guide { grid-area: guide; min-width: 0; overflow-y: auto; padding: 20px 10px 10px 18px; }
.guide-circuit { width: 100%; max-width: 290px; padding: 18px 0 24px; color: #5d9d97; }
.guide-circuit svg { width: 100%; stroke-width: 1.5; }
.new-review-guide h2 { margin: 12px 0 28px; font-size: 29px; font-weight: 650; line-height: 1.5; letter-spacing: -.025em; }
.review-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.review-steps li { display: flex; align-items: flex-start; gap: 13px; }
.review-steps li > span { color: var(--blue); font-size: 13px; line-height: 22px; padding: 0 6px; background: #e5efec; border-radius: 5px; }
.review-steps strong { font-size: 14px; font-weight: 600; }
.review-steps p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 6px 0 0; }
.guide-note { border-top: 1px solid var(--line-strong); padding-top: 22px; margin-top: 30px; }
.guide-note strong { color: var(--text-2); font-size: 13px; }
.guide-note p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 8px 0; }
body:not(.has-job) .findings-pane, body:not(.has-job) .viewer-pane { display: none; }
body.has-job .setup-pane, body.has-job .new-review-guide { display: none; }
body.has-job .workspace { grid-template-columns: minmax(340px, .85fr) minmax(0, 1.5fr); grid-template-rows: auto auto auto minmax(0, 1fr); grid-template-areas: "heading heading" "metrics metrics" "actions actions" "findings viewer"; gap: 16px 20px; }
.review-metrics { grid-area: metrics; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.count { min-height: 92px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-end; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; gap: 12px; }
.count:hover { border-color: #b2c6c2; }
.count > span:first-child { display: grid; gap: 11px; }
.count small { color: var(--text-2); font-size: 13px; font-weight: 500; }
.count b { font-size: 30px; font-weight: 650; line-height: 1; }
.count.critical b { color: var(--red); }
.count.warning b { color: var(--amber); }
.count.info b { color: var(--info); }
.count.pending b { color: var(--blue); }
.metric-caption { font-size: 13px; color: var(--muted); line-height: 1.5; }
.review-next-actions { grid-area: actions; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid #ead9b6; border-radius: 10px; background: #fffbf2; }
.next-action-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #d8bb80; border-radius: 50%; color: var(--amber); font-size: 13px; flex: 0 0 auto; }
.review-next-actions > div { min-width: 0; flex: 1; }
.review-next-actions strong { font-size: 13px; color: #7b540f; }
.review-next-actions p { margin: 5px 0 0; color: #7a6545; font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.review-next-actions button { padding: 8px 0 8px 10px; background: transparent; color: #7b540f; border: 0; font-size: 13px; font-weight: 600; white-space: nowrap; }
.mobile-workspace-switch { display: none; }
.findings-pane { grid-area: findings; display: flex; flex-direction: column; }
.findings-heading { flex: 0 0 auto; padding: 16px 18px; }
.findings-heading h2 { font-size: 16px; }
.status-chip { padding: 5px 9px; border-radius: 6px; background: #f0f3f6; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-chip.running, .status-chip.reviewing { color: var(--blue); background: var(--blue-soft); }
.status-chip.completed { color: var(--green); background: var(--green-soft); }
.status-chip.partial_completed, .status-chip.paused { color: var(--amber); background: var(--amber-soft); }
.status-chip.failed { color: var(--red); background: var(--red-soft); }
.summary-strip { display: none; }
.progress-block { flex: 0 0 auto; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.progress-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.progress-meta > span { min-width: 0; display: grid; gap: 6px; }
.progress-meta b { font-size: 13px; line-height: 1.5; }
.progress-meta small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress-actions { display: flex; align-items: center; gap: 10px; }
.progress-actions strong { font-size: 13px; color: var(--blue); }
.cancel-button { padding: 8px; display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 7px; color: var(--red); font-size: 13px; }
.cancel-button svg { width: 13px; height: 13px; }
.progress-track, .storage-track, .agent-budget-track { height: 5px; border-radius: 5px; background: #e8edef; overflow: hidden; }
.progress-track i, .storage-track i, .agent-budget-track i { display: block; height: 100%; background: var(--blue); transition: width .2s ease; }
.datasheet-coverage { flex: 0 0 auto; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.coverage-heading { display: flex; align-items: center; gap: 10px; }
.coverage-icon { color: var(--blue); }
.coverage-icon svg { width: 20px; height: 20px; }
.coverage-heading > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
.coverage-heading small { color: var(--muted); font-size: 13px; }
.coverage-heading strong { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.coverage-actions { display: flex; gap: 7px; align-items: center; }
.coverage-badge { color: var(--green); font-size: 13px; white-space: nowrap; }
.coverage-badge.has-missing { color: var(--amber); }
.coverage-detail-button { min-height: 32px; display: flex; align-items: center; gap: 4px; padding: 0 7px; border: 0; background: transparent; color: var(--blue); font-size: 13px; white-space: nowrap; }
.coverage-detail-button svg { width: 12px; height: 12px; }
.coverage-preview { display: none; }
.tabs { display: flex; flex: 0 0 auto; gap: 20px; height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 0 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; color: var(--muted); }
.tab.is-active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab span { padding: 2px 5px; color: var(--text-2); background: #f0f4f5; border-radius: 4px; font-size: 13px; }
.tab i { width: 5px; height: 5px; border-radius: 50%; background: #98a7b5; }
.tab i.live { background: var(--blue); }
.findings-view { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.finding-search-wrap { position: relative; margin: 14px 16px 4px; }
.finding-search-wrap > svg { position: absolute; width: 16px; height: 16px; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.finding-search-wrap input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 36px; background: #f9fafb; font-size: 13px; color: var(--text); }
.filter-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 0; gap: 10px; }
.severity-filters { display: flex; align-items: center; gap: 4px; }
.filter { min-height: 32px; border: 0; border-radius: 7px; padding: 0 10px; background: transparent; color: var(--muted); font-size: 13px; }
.filter:hover { background: var(--surface-subtle); }
.filter.is-active { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.icon-button { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); flex: 0 0 auto; }
.icon-button:hover { color: var(--blue); background: var(--blue-soft); }
.icon-button svg { width: 18px; height: 18px; }
.list-results-caption { margin: 7px 18px 9px; color: var(--muted); font-size: 13px; }
.finding-list { min-height: 0; flex: 1; padding: 0 12px 12px; overflow-y: auto; scrollbar-width: thin; }
.finding-row { display: grid; grid-template-columns: 3px minmax(0,1fr); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.finding-row:hover { border-color: #b5c9c6; }
.finding-row.is-selected { background: #f0f8f6; border-color: #81b9b1; }
.severity-rail { background: #85a1bc; }
.finding-row[data-severity="critical"] .severity-rail { background: var(--red); }
.finding-row[data-severity="warning"] .severity-rail { background: #cc9b3f; }
.finding-body { min-width: 0; padding: 13px 14px; }
.finding-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.severity-label { font-size: 13px; color: var(--info); font-weight: 600; overflow-wrap: anywhere; }
.severity-label.critical { color: var(--red); }
.severity-label.warning { color: var(--amber); }
.severity-shape { display: none; }
.finding-origin, .consensus-dots { color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.consensus-dots { display: flex; align-items: center; gap: 3px; }
.consensus-dots i { width: 5px; height: 5px; border: 1px solid var(--line-strong); border-radius: 50%; }
.consensus-dots i.on { background: var(--green); border-color: var(--green); }
.finding-body h3 { margin: 0 0 9px; color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.7; overflow-wrap: anywhere; }
.finding-body > p { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.finding-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 13px; }
.finding-meta code, .detail-tags code { color: #496073; background: #f0f4f6; padding: 3px 5px; border-radius: 4px; font: 13px/1.4 ui-monospace, "SFMono-Regular", monospace; overflow-wrap: anywhere; }
.page-ref { margin-left: auto; color: var(--blue); font-weight: 500; white-space: nowrap; }
.empty-state { min-height: 230px; height: 100%; padding: 30px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); text-align: center; gap: 10px; }
.empty-state svg { width: 45px; height: 45px; color: #9fb9b4; margin-bottom: 6px; }
.empty-state strong { color: var(--text-2); font-size: 14px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.8; max-width: 320px; overflow-wrap: anywhere; }
.empty-state button { margin-top: 10px; }
.terminal-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.terminal-header { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.terminal-header button { border: 0; background: transparent; color: var(--blue); font-size: 13px; }
.terminal-lines { min-height: 0; flex: 1; overflow: auto; padding: 16px 18px; color: var(--text-2); font: 13px/1.8 ui-monospace, monospace; overflow-wrap: anywhere; }
.terminal-lines p { margin: 0 0 8px; }
.terminal-lines .time { color: var(--muted); margin-right: 8px; }
.terminal-lines .source { color: var(--blue); }
.line-error { color: var(--red); }
.line-warning { color: var(--amber); }
.viewer-pane { grid-area: viewer; display: grid; grid-template-rows: auto minmax(180px,1fr) auto; }
.viewer-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.viewer-file { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; }
.viewer-file > svg { width: 19px; height: 19px; color: var(--blue); flex: 0 0 auto; }
.viewer-file > span { min-width: 0; display: grid; gap: 5px; }
.viewer-file small { font-size: 13px; color: var(--muted); }
.viewer-file strong { min-width: 0; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-controls { display: flex; align-items: center; gap: 2px; }
.viewer-controls .icon-button { width: 30px; height: 32px; }
.viewer-controls .icon-button svg { width: 16px; height: 16px; }
.viewer-controls .viewer-mode-button { width: 32px; color: var(--blue); }
.viewer-mode-button span { display: none; }
.viewer-mode-button[aria-pressed="true"] { background: var(--blue-soft); }
.page-control { display: flex; align-items: center; gap: 3px; min-height: 32px; font-size: 13px; }
.page-control input { width: 28px; padding: 4px 1px; border: 0; border-radius: 5px; background: #f5f7f8; text-align: center; color: var(--text); appearance: textfield; }
.page-control input::-webkit-inner-spin-button { appearance: none; }
.page-control span { color: var(--muted); white-space: nowrap; }
.toolbar-separator { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.zoom-readout { min-width: 30px; color: var(--muted); font-size: 13px; text-align: center; }
.document-stage { position: relative; min-height: 180px; overflow: hidden; background: #e9eeef; }
.viewer-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.schematic-glyph { width: 130px; color: #9ab8b2; margin-bottom: 15px; }
.schematic-glyph svg { width: 100%; }
.viewer-placeholder > span { font-size: 13px; color: var(--blue); }
.viewer-placeholder strong { margin-top: 9px; font-size: 14px; color: var(--text-2); }
.viewer-placeholder p { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 320px; }
.canvas-scroll { position: absolute; inset: 0; overflow: auto; padding: 20px; scrollbar-width: thin; }
.canvas-wrap { position: relative; width: max-content; margin: auto; line-height: 0; background: #fff; box-shadow: 0 4px 14px #192b3d12; }
#pdf-canvas { display: block; max-width: none; }
.evidence-box { position: absolute; border: 2px solid var(--red); background: #b8343910; pointer-events: none; }
.evidence-box span { position: absolute; left: -2px; top: -24px; padding: 5px 8px; line-height: 1.2; background: var(--red); color: #fff; font-size: 13px; white-space: nowrap; border-radius: 4px 4px 0 0; }
.evidence-box.page-level { border-color: var(--blue); background: #087f7906; }
.evidence-box.page-level span { top: 8px; left: 8px; max-width: calc(100% - 16px); white-space: normal; background: var(--blue); border-radius: 5px; }
.viewer-loading { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 10px; background: #eef2f2dd; color: var(--text-2); font-size: 13px; z-index: 3; }
.viewer-loading i { width: 24px; height: 24px; border: 2px solid #bed9d4; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.finding-detail { max-height: 310px; overflow-y: auto; border-top: 1px solid var(--line); background: #fff; }
.detail-rail { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 0; font-size: 13px; color: var(--muted); }
.severity-badge { padding: 5px 8px; border-radius: 5px; font-size: 13px; background: #edf2f8; color: var(--info); font-weight: 600; flex: 0 0 auto; }
.severity-badge.critical { color: var(--red); background: var(--red-soft); }
.severity-badge.warning { color: var(--amber); background: var(--amber-soft); }
.detail-content { min-width: 0; padding: 14px 20px 22px; overflow-wrap: anywhere; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-title-row h3 { margin: 0; font-size: 16px; line-height: 1.65; font-weight: 650; }
.detail-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.detail-open-button { min-height: 32px; border: 0; background: var(--blue-soft); border-radius: 7px; color: var(--blue); padding: 0 9px; display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.detail-open-button svg { width: 14px; height: 14px; }
.detail-actions .icon-button { width: 32px; height: 32px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.detail-tags code:nth-of-type(n+13) { display: none; }
.detail-tags.tags-expanded code { display: inline-block; }
.detail-more-tags { display: none; }
.detail-tags-toggle { border: 0; color: var(--blue); background: transparent; font-size: 13px; padding: 4px; }
.detail-location-card { display: flex; align-items: center; gap: 9px; padding-top: 12px; }
.detail-location-icon { display: none; }
.detail-location-card > span:nth-child(2) { display: none; }
.detail-location-card button { border: 0; background: transparent; color: var(--blue); font-size: 13px; padding: 4px 0; text-align: left; }
.detail-content > p { font-size: 13px; line-height: 1.9; color: var(--text-2); margin: 12px 0 18px; white-space: pre-line; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.evidence-grid section { min-width: 0; }
.evidence-grid section > span { font-size: 13px; color: var(--blue); font-weight: 600; }
.evidence-grid p { font-size: 13px; line-height: 1.85; color: var(--text-2); margin: 7px 0 0; white-space: pre-line; }
.viewer-pane.detail-focus .finding-detail { position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(940px,calc(100vw - 48px)); max-height: calc(100dvh - 64px); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 60px #192b3d33; }
.viewer-pane.detail-focus .detail-content { padding: 20px 28px 30px; }
.viewer-pane.detail-focus .detail-rail { padding: 24px 28px 0; }
.viewer-pane.detail-focus .detail-title-row h3 { font-size: 20px; }
.viewer-pane.detail-focus .detail-content > p, .viewer-pane.detail-focus .evidence-grid p { font-size: 14px; }
.finding-detail-backdrop { position: fixed; inset: 0; z-index: 110; background: #192b3d66; }
body.viewer-focus.has-job .workspace { grid-template-columns: 1fr; grid-template-areas: "heading" "metrics" "actions" "viewer"; }
body.viewer-focus.has-job .findings-pane { display: none; }
.statusbar { display: none; }
.drawer-backdrop { position: fixed; inset: var(--topbar-height) 0 0; z-index: 60; background: #192b3d44; }
.history-drawer { position: fixed; top: var(--topbar-height); left: 0; bottom: 0; width: 252px; display: flex; flex-direction: column; background: #f8fafb; border-right: 1px solid var(--line); z-index: 30; overflow: hidden; }
.drawer-heading { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 18px 12px; }
.drawer-heading h2 { font-size: 16px; margin: 0; }
.drawer-heading .workspace-kicker { font-size: 13px; margin-bottom: 5px; color: var(--muted); }
.drawer-heading .icon-button { width: 28px; height: 32px; }
.workspace-nav { display: grid; gap: 6px; padding: 0 14px 22px; border-bottom: 1px solid var(--line); }
.workspace-nav button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 12px; background: transparent; border: 0; border-radius: 8px; text-align: left; color: var(--text-2); font-size: 13px; }
.workspace-nav button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.workspace-nav button:hover { background: #edf2f3; }
.workspace-nav button.is-active { color: var(--blue); background: #e6f0ed; font-weight: 600; }
.workspace-nav button:disabled { opacity: .6; }
.history-search-wrap { padding: 20px 18px 12px; }
.history-search-wrap > label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.history-search-wrap > label span { font-weight: 400; }
.history-search-wrap > div { position: relative; }
.history-search-wrap svg { position: absolute; width: 15px; height: 15px; top: 12px; left: 10px; color: var(--muted); pointer-events: none; }
.history-search-wrap input { width: 100%; height: 38px; padding: 0 10px 0 31px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; color: var(--text); }
.history-list { min-height: 0; flex: 1; padding: 0 10px 16px; overflow-y: auto; scrollbar-width: thin; }
.history-item { width: 100%; display: block; position: relative; text-align: left; padding: 14px 11px; background: transparent; border: 1px solid transparent; border-radius: 9px; margin-bottom: 4px; }
.history-item:hover { background: #edf2f3; }
.history-item.is-active { background: #fff; border-color: #cbded9; }
.history-item > span:first-child { display: grid; gap: 6px; }
.history-item strong { color: var(--text); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.history-item small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.history-item small:last-child { color: var(--text-2); }
.history-risk { display: inline-flex; padding: 3px 5px; margin-top: 8px; border-radius: 4px; background: #edf1f4; color: var(--muted); font-size: 13px; }
.history-risk.completed { color: var(--green); background: var(--green-soft); }
.history-risk.partial_completed, .history-risk.paused { color: var(--amber); background: var(--amber-soft); }
.history-risk.reviewing, .history-risk.running { color: var(--blue); background: var(--blue-soft); }
.history-risk.failed { color: var(--red); background: var(--red-soft); }
.history-search-empty { color: var(--muted); font-size: 13px; line-height: 1.8; padding: 18px 10px; }
.storage-summary { flex: 0 0 auto; padding: 16px 18px; border-top: 1px solid var(--line); }
.storage-summary > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.storage-summary strong { font-size: 13px; font-weight: 500; }
.storage-summary small { display: none; }
body.history-sidebar-persistent { --history-current-width: 76px; }
body.history-sidebar-persistent.history-expanded { --history-current-width: 252px; }
.history-sidebar-persistent .history-drawer:not(.is-open) { width: 76px; }
.history-sidebar-persistent .history-drawer:not(.is-open) .drawer-heading { justify-content: center; padding: 16px 0; }
.history-sidebar-persistent .history-drawer:not(.is-open) .drawer-heading > div, .history-sidebar-persistent .history-drawer:not(.is-open) .history-search-wrap, .history-sidebar-persistent .history-drawer:not(.is-open) .history-list, .history-sidebar-persistent .history-drawer:not(.is-open) .storage-summary { display: none; }
.history-sidebar-persistent .history-drawer:not(.is-open) .workspace-nav { padding: 0 12px; border: 0; }
.history-sidebar-persistent .history-drawer:not(.is-open) .workspace-nav button { padding: 0; justify-content: center; }
.history-sidebar-persistent .history-drawer:not(.is-open) .workspace-nav button span { display: none; }
.history-sidebar-persistent .history-drawer:not(.is-open) #close-history svg { transform: rotate(180deg); }
.agent-console-backdrop, .agent-details-backdrop, .coverage-detail-backdrop, .model-output-backdrop { position: fixed; inset: 0; z-index: 90; background: #192b3d66; }
.agent-console { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px,100vw); z-index: 100; display: flex; flex-direction: column; background: #fff; transform: translateX(100%); visibility: hidden; }
.agent-console.is-open { transform: none; visibility: visible; }
.agent-console-heading { min-height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 12px; }
.agent-console-title-row { display: flex; align-items: center; gap: 12px; }
.agent-console-title-row h2 { margin: 0; font-size: 20px; }
.agent-runtime-status { padding: 5px 7px; color: var(--muted); background: #f0f3f6; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.agent-runtime-status.partial_completed, .agent-runtime-status.paused { color: var(--amber); background: var(--amber-soft); }
.agent-runtime-status.completed { color: var(--green); background: var(--green-soft); }
.agent-runtime-status.running { color: var(--blue); background: var(--blue-soft); }
.agent-console-actions { padding: 16px 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.agent-action-button { min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font-size: 13px; }
.agent-action-button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.agent-action-button svg { width: 16px; height: 16px; }
.agent-live-stats { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.agent-live-stats > span { display: grid; gap: 5px; }
.agent-live-stats small { color: var(--muted); font-size: 13px; }
.agent-live-stats strong { font-size: 13px; }
.agent-trace { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px; }
.agent-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.agent-section-heading h3 { margin: 0; font-size: 14px; }
.agent-section-heading > span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.agent-event-list { margin-top: 24px; }
.agent-event { display: grid; grid-template-columns: 44px 18px minmax(0,1fr); gap: 8px; }
.agent-event time { color: var(--muted); font-size: 13px; line-height: 20px; }
.agent-event-rail { display: flex; flex-direction: column; align-items: center; }
.agent-event-rail i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--blue); }
.agent-event-rail span { width: 1px; flex: 1; min-height: 28px; margin-top: 5px; background: var(--line); }
.agent-event-copy { padding-bottom: 24px; min-width: 0; overflow-wrap: anywhere; }
.agent-event-copy strong { font-size: 13px; line-height: 1.6; }
.agent-event-copy > p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.agent-event-detail { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 7px; }
.agent-event-detail summary { cursor: pointer; color: var(--blue); }
.agent-more-trigger { flex: 0 0 auto; width: 100%; min-height: 60px; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; background: #f8fafb; border: 0; border-top: 1px solid var(--line); font-size: 14px; text-align: left; }
.agent-more-trigger svg { width: 18px; height: 18px; }
.agent-details-dialog, .coverage-detail-dialog, .model-output-dialog { position: fixed; top: 50%; left: 50%; z-index: 100; transform: translate(-50%,-50%); width: min(920px,calc(100vw - 48px)); height: min(780px,calc(100dvh - 64px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px #192b3d33; }
.agent-details-heading, .coverage-detail-heading, .model-output-heading { min-height: 76px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.agent-details-heading h2, .coverage-detail-heading h2, .model-output-heading h2 { margin: 0; font-size: 20px; line-height: 1.5; }
.eyebrow { color: var(--muted); font-size: 13px; }
.coverage-detail-heading p, .model-output-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.agent-details-body, .coverage-detail-body, .model-output-body { min-height: 0; flex: 1; overflow: auto; padding: 0 24px 24px; overflow-wrap: anywhere; }
.agent-details-body > section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.agent-coverage-metrics, .agent-budget-metrics { margin-top: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.agent-coverage-metrics > span, .agent-budget-metrics > span { display: grid; gap: 8px; padding: 14px; background: var(--surface-subtle); border-radius: 8px; }
.agent-coverage-metrics small, .agent-budget-metrics small { color: var(--muted); font-size: 13px; }
.agent-coverage-metrics strong, .agent-budget-metrics strong { font-size: 16px; }
.agent-budget-track { margin-top: 18px; }
.agent-task-list { margin-top: 16px; display: grid; gap: 10px; }
.agent-task { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.agent-task-index { width: 26px; height: 26px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 6px; font-size: 13px; }
.agent-task-copy { min-width: 0; display: grid; gap: 6px; }
.agent-task-copy strong { font-size: 13px; line-height: 1.6; }
.agent-task-copy small { color: var(--muted); font-size: 13px; line-height: 1.7; }
.agent-task-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.agent-task-retry { min-height: 32px; border: 1px solid var(--line-strong); background: #fff; border-radius: 6px; color: var(--blue); font-size: 13px; }
.agent-gaps ul { padding-left: 18px; color: #80621e; font-size: 13px; line-height: 1.8; }
.verification-check { padding: 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.verification-check.unresolved { background: #fffbf2; border-color: #e6d6b4; }
.verification-check summary { font-size: 13px; font-weight: 600; line-height: 1.8; cursor: pointer; }
.verification-check p { font-size: 13px; line-height: 1.9; color: var(--text-2); white-space: pre-line; }
.verification-check em { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 400; }
.verification-filters { display: flex; gap: 8px; margin-top: 16px; }
.verification-filters button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 13px; }
.verification-filters button[aria-pressed="true"] { color: var(--blue); border-color: #b6d3ca; background: var(--blue-soft); }
.verification-check summary > strong { display: inline-block; color: var(--blue); font-size: 13px; font-weight: 600; margin-right: 8px; }
.verification-check.unresolved summary > strong { color: var(--amber); }
.verification-next-action { margin-top: 14px; padding: 14px; background: #fff; border: 1px solid #eee2cc; border-radius: 7px; }
.verification-next-action > strong { color: var(--amber); font-size: 13px; }
.verification-next-action p { margin: 8px 0 0; }
.verification-notes { margin-top: 14px; border-top: 1px solid #eadcbe; padding-top: 12px; }
.verification-notes > summary { color: var(--muted); font-size: 13px; font-weight: 500; }
.coverage-full-metrics, .coverage-detail-metrics, .coverage-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.coverage-preview-metric { min-width: 0; padding: 14px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.coverage-preview-metric small { color: var(--muted); font-size: 13px; }
.coverage-preview-metric b { font-size: 16px; }
.coverage-detail-section { margin-top: 24px; }
.coverage-detail-section h3 { font-size: 16px; }
.coverage-part-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.coverage-part-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.coverage-part-card h4 { margin: 0; font-size: 14px; line-height: 1.7; }
.coverage-part-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.coverage-part-title { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.coverage-part-title > span { flex: 0 0 auto; color: var(--blue); font-size: 13px; padding: 3px 5px; background: var(--blue-soft); border-radius: 4px; }
.coverage-part-title strong { font-size: 14px; line-height: 1.7; }
.coverage-part-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.coverage-reading-status { display: flex; flex-wrap: wrap; gap: 6px; }
.coverage-reading-status > span { padding: 4px 6px; border-radius: 5px; background: #f2f5f7; color: var(--muted); font-size: 13px; }
.coverage-reading-status .done { background: var(--green-soft); color: var(--green); }
.coverage-reading-status .pending { background: var(--amber-soft); color: var(--amber); }
.coverage-part-card p b { display: block; color: var(--text-2); font-size: 13px; margin-bottom: 4px; }
.coverage-part-card footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; }
.coverage-part-card footer a { display: inline-flex; gap: 5px; align-items: center; }
.coverage-part-card footer svg { width: 14px; height: 14px; }
.coverage-detail-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 24px 0 14px; }
.coverage-detail-section-heading > span { display: grid; gap: 6px; }
.coverage-detail-section-heading strong { font-size: 15px; }
.coverage-detail-section-heading small { color: var(--muted); font-size: 13px; line-height: 1.7; }
.coverage-detail-section-heading > b { font-size: 13px; color: var(--blue); }
.coverage-rag-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.coverage-rag-card > p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.coverage-part-topline { display: flex; justify-content: space-between; gap: 12px; }
.coverage-part-topline span { color: var(--muted); font-size: 13px; }
.coverage-part-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.coverage-part-tags code { font-size: 13px; color: var(--text-2); background: #f0f4f6; padding: 4px; border-radius: 4px; }
.coverage-source-link { display: inline-block; padding: 7px 0; font-size: 13px; }
.model-output-toolbar { flex: 0 0 auto; display: flex; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid var(--line); gap: 12px; }
.model-output-tabs { display: flex; gap: 8px; }
.model-output-tab, .output-copy-button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); background: #fff; color: var(--text-2); border-radius: 7px; font-size: 13px; }
.model-output-tab.is-active { color: var(--blue); background: var(--blue-soft); border-color: #bbd6cf; }
.output-copy-button { display: flex; gap: 6px; align-items: center; }
.output-copy-button svg { width: 15px; height: 15px; }
.model-output-body { padding: 20px 24px; }
.model-output-body pre { white-space: pre-wrap; font: 13px/1.8 ui-monospace,monospace; overflow-wrap: anywhere; }
.model-output-body h3 { font-size: 15px; }
.model-output-body p { font-size: 13px; line-height: 1.9; }
.toast-region { position: fixed; z-index: 180; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; box-shadow: 0 8px 28px #192b3d22; font-size: 13px; line-height: 1.7; }
.toast.error { border-color: #dba8ac; color: var(--red); }
.auth-shell { height: 100dvh; padding: 32px; display: grid; place-items: center; background: var(--bg); overflow-y: auto; }
.auth-layout { width: min(1000px,100%); display: grid; grid-template-columns: 1fr 400px; align-items: center; gap: 80px; }
.auth-ambient { display: none; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand > span:last-child { display: grid; gap: 5px; }
.auth-brand strong { font-size: 18px; }
.auth-brand small { color: var(--muted); font-size: 13px; }
.auth-copy { margin-top: 48px; }
.auth-kicker { color: var(--blue); font-size: 13px; letter-spacing: .1em; }
.auth-copy h1 { font-size: 36px; line-height: 1.5; margin: 16px 0; }
.auth-copy p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-benefits { display: grid; gap: 20px; padding: 0; list-style: none; margin: 30px 0; }
.auth-benefits li { display: flex; align-items: flex-start; gap: 12px; }
.auth-benefits svg { width: 20px; height: 20px; color: var(--blue); }
.auth-benefits li > div { display: grid; gap: 7px; }
.auth-benefits strong { font-size: 14px; }
.auth-benefits small, .auth-security-note { color: var(--muted); font-size: 13px; }
.auth-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.auth-card-heading { display: flex; align-items: center; gap: 12px; }
.auth-card-icon svg { width: 24px; height: 24px; color: var(--blue); }
.auth-card-heading h2 { font-size: 20px; margin: 0; }
.auth-card-heading p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-alert { margin-top: 16px; padding: 12px; display: flex; align-items: flex-start; gap: 10px; background: var(--red-soft); border-radius: 8px; font-size: 13px; line-height: 1.7; }
.auth-alert svg { width: 18px; height: 18px; color: var(--red); flex: 0 0 auto; }
@media (max-width: 1099px) {
  .workspace { margin-left: 0; padding: 24px; }
  .history-drawer { width: min(320px,90vw); z-index: 70; transform: translateX(-100%); visibility: hidden; }
  .history-drawer.is-open { transform: none; visibility: visible; }
  .project-state { display: none; }
  .top-actions .new-review-button { width: 40px; padding: 0; font-size: 0; gap: 0; }
  .live-cost-chip { display: none; }
  body.has-job .workspace { grid-template-columns: minmax(310px,.9fr) minmax(0,1.3fr); }
  .viewer-toolbar { flex-wrap: wrap; }
  .viewer-file { flex-basis: 100%; }
  .viewer-controls { width: 100%; justify-content: flex-end; }
  .count { padding: 14px; }
  .metric-caption { display: none; }
  .new-review-guide { padding-left: 10px; }
  .detail-title-row { flex-wrap: wrap; }
  .auth-layout { gap: 40px; }
}
@media (max-width: 760px) {
  :root { --topbar-height: 64px; }
  html, body { height: auto; min-height: 100%; }
  body { overflow-y: auto; }
  .application-shell { min-height: 100dvh; height: auto; }
  .topbar { position: sticky; top: 0; padding: 0 16px; gap: 10px; }
  .brand { gap: 9px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .project-state { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .button { width: 40px; min-height: 40px; padding: 0; font-size: 0; gap: 0; }
  .top-actions .button svg { width: 19px; height: 19px; }
  .new-review-button, .top-actions .button-agent { display: none; }
  .account-menu-wrap { margin-left: 2px; }
  .account-avatar { width: 32px; height: 32px; }
  .account-button > svg { display: none; }
  .workspace, body.has-job .workspace, body.viewer-focus.has-job .workspace { display: block; height: auto; overflow: visible; margin: 0; padding: 22px 16px 32px; }
  .workspace-heading { display: block; margin-bottom: 22px; }
  .workspace-kicker { font-size: 13px; }
  .workspace-heading h1 { font-size: 24px; }
  .workspace-heading > div > p:last-child { font-size: 13px; line-height: 1.8; }
  body.has-job .workspace-heading > div > p:last-child, .workspace-date { display: none; }
  .setup-pane { padding: 22px 18px; overflow: visible; }
  .setup-pane .pane-heading { align-items: flex-start; padding-bottom: 18px; }
  .pane-heading h2 { font-size: 18px; }
  .pane-intro { font-size: 13px; }
  .review-form { margin-top: 20px; }
  .text-input { height: 48px; font-size: 16px; }
  .upload-pair { grid-template-columns: 1fr; gap: 20px; margin-top: 22px; }
  .drop-zone { min-height: 112px; padding: 18px; flex-direction: row; justify-content: flex-start; text-align: left; }
  .drop-icon { width: 42px; height: 42px; flex: 0 0 auto; }
  .drop-zone strong { font-size: 15px; }
  .drop-zone small { font-size: 13px; }
  .review-settings > summary { min-height: 48px; }
  .review-settings > summary small { font-size: 13px; }
  .run-button { min-height: 64px; }
  .run-button strong { font-size: 16px; }
  .new-review-guide { padding: 30px 6px 0; overflow: visible; }
  .guide-circuit { display: none; }
  .new-review-guide h2 { font-size: 24px; }
  .review-steps strong { font-size: 15px; }
  .review-steps p { font-size: 13px; }
  .review-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-bottom: 14px; }
  .count { min-height: 82px; padding: 12px 10px; border-radius: 9px; justify-content: flex-start; }
  .count small { font-size: 13px; white-space: nowrap; }
  .count b { font-size: 25px; }
  .count > span:first-child { gap: 10px; }
  .review-next-actions { margin: 0 0 16px; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 13px; }
  .next-action-icon { width: 20px; height: 20px; }
  .review-next-actions strong { font-size: 13px; }
  .review-next-actions p { display: none; }
  .review-next-actions button { margin-left: 28px; min-height: 32px; padding: 4px 0; }
  .mobile-workspace-switch { position: sticky; top: var(--topbar-height); z-index: 20; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 3px; padding: 4px; margin: 0 0 16px; border: 1px solid var(--line); background: #f0f3f4; border-radius: 9px; }
  .mobile-workspace-switch button { min-height: 40px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; }
  .mobile-workspace-switch button[aria-pressed="true"] { color: var(--blue); background: #fff; font-weight: 600; }
  .findings-pane { min-height: 460px; }
  .findings-pane, .viewer-pane { scroll-margin-top: 132px; }
  .findings-heading { padding: 16px; }
  .findings-heading, .tabs { display: none; }
  .datasheet-coverage { padding: 12px 16px; }
  .coverage-heading strong { font-size: 13px; }
  .coverage-actions { gap: 4px; }
  .coverage-detail-button { min-height: 36px; padding: 0 2px; }
  .tabs { padding: 0 16px; height: 48px; }
  .finding-search-wrap input { height: 44px; font-size: 16px; }
  .finding-search-wrap > svg { top: 14px; }
  .filter { min-height: 40px; padding: 0 11px; font-size: 13px; }
  .finding-list { overflow: visible; }
  .finding-body { padding: 15px; }
  .finding-body h3 { font-size: 15px; }
  .finding-body > p { font-size: 13px; }
  .finding-origin, .severity-label { font-size: 13px; }
  .finding-meta code { font-size: 13px; }
  body.has-job .viewer-pane { display: none; }
  body.has-job.mobile-panel-evidence .findings-pane { display: none; }
  body.has-job.mobile-panel-evidence .viewer-pane { display: grid; min-height: 520px; grid-template-rows: auto 300px auto; }
  .viewer-controls .icon-button { width: 36px; height: 40px; }
  .viewer-controls { justify-content: space-between; }
  .viewer-file strong { font-size: 13px; }
  .viewer-controls .viewer-mode-button { display: none; }
  .zoom-readout { font-size: 13px; }
  .document-stage { min-height: 300px; }
  .finding-detail { max-height: none; overflow: visible; }
  .detail-rail { align-items: flex-start; padding: 18px 16px 0; }
  #detail-consensus { font-size: 13px; line-height: 1.6; text-align: right; }
  .detail-content { padding: 14px 16px 22px; }
  .detail-title-row h3 { font-size: 17px; }
  .detail-content > p { font-size: 14px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-grid p { font-size: 13px; }
  .detail-open-button { min-height: 40px; font-size: 13px; }
  .detail-actions .icon-button { width: 40px; height: 40px; }
  .viewer-pane.detail-focus .finding-detail { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); overflow-y: auto; }
  .viewer-pane.detail-focus .detail-content { padding: 18px; }
  .viewer-pane.detail-focus .detail-rail { padding: 18px 18px 0; }
  .viewer-pane.detail-focus .detail-title-row h3 { font-size: 18px; }
  .history-drawer { width: min(320px,90vw); }
  .workspace-nav button { min-height: 46px; font-size: 14px; }
  .history-search-wrap input { height: 44px; font-size: 16px; }
  .history-search-wrap svg { top: 15px; }
  .history-item strong { font-size: 14px; }
  .history-item small { font-size: 13px; }
  .history-risk { font-size: 13px; }
  .agent-console { width: 100%; }
  .agent-console-heading, .agent-console-actions { padding: 18px; }
  .agent-console-title-row h2 { font-size: 20px; }
  .agent-trace { padding: 22px 18px; }
  .agent-event-copy strong { font-size: 14px; }
  .agent-event-copy > p { font-size: 13px; }
  .agent-action-button { min-height: 44px; font-size: 13px; }
  .agent-details-dialog, .coverage-detail-dialog, .model-output-dialog { width: calc(100vw - 20px); height: calc(100dvh - 24px); }
  .agent-details-heading, .coverage-detail-heading, .model-output-heading { padding: 18px; }
  .agent-details-heading h2, .coverage-detail-heading h2, .model-output-heading h2 { font-size: 18px; }
  .agent-details-body, .coverage-detail-body, .model-output-body { padding: 0 18px 20px; }
  .agent-task { grid-template-columns: 26px minmax(0,1fr); }
  .agent-task-status, .agent-task-retry { grid-column: 2; justify-self: start; }
  .coverage-full-metrics, .coverage-detail-metrics, .coverage-metrics, .coverage-rag-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .coverage-part-grid { grid-template-columns: 1fr; }
  .model-output-toolbar { padding: 10px 18px; flex-wrap: wrap; }
  .auth-shell { padding: 22px; }
  .auth-layout { grid-template-columns: 1fr; gap: 24px; }
  .auth-copy { margin-top: 28px; }
  .auth-copy h1 { font-size: 28px; }
  .auth-benefits, .auth-security-note { display: none; }
  .auth-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Essential text remains readable after removing auxiliary prose. */
.setup-pane .pane-heading { padding-bottom: 18px; }
.review-settings { margin-top: 24px; }
.model-role-row { font-size: 14px; }
.model-role-row strong { font-size: 13px; }
.review-metrics .count { min-height: 84px; }
.finding-body h3 { font-size: 16px; line-height: 1.7; }
.finding-meta { margin-top: 12px; }
.detail-content > p, .evidence-grid p { font-size: 15px; line-height: 1.85; }
.coverage-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coverage-part-card p, .verification-check p { font-size: 14px; line-height: 1.8; }
.coverage-excluded { margin-top: 24px; }
.coverage-excluded > summary { padding: 14px 0; cursor: pointer; }
.agent-task-copy p { margin: 5px 0 0; font-size: 14px; line-height: 1.7; }
@media (max-width: 760px) {
  .review-metrics .count { min-height: 78px; padding: 12px 9px; }
  .mobile-workspace-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-next-actions { align-items: center; }
  .review-next-actions button { margin-left: 0; }
  .finding-body h3 { font-size: 16px; }
  .detail-content > p, .evidence-grid p { font-size: 15px; }
}

/* Give the result list the available height before adding auxiliary rows. */
@media (min-width: 761px) {
  body.has-job .workspace {
    padding: 16px 20px;
    grid-template-rows: auto auto minmax(380px, 1fr);
    grid-template-areas: "heading metrics" "actions actions" "findings viewer";
    gap: 12px 16px;
  }
  body.has-job .workspace-heading { align-self: center; }
  body.has-job .workspace-heading h1 { font-size: 24px; }
  body.has-job .review-metrics { gap: 8px; }
  body.has-job .review-metrics .count { min-height: 56px; padding: 10px 12px; align-items: center; }
  body.has-job .review-metrics .count > span:first-child { display: flex; align-items: baseline; gap: 8px; }
  body.has-job .review-metrics .count b { font-size: 24px; }
  body.has-job .review-next-actions { padding: 6px 12px; }
  body.viewer-focus.has-job .workspace {
    grid-template-columns: minmax(200px, .85fr) minmax(0, 1.5fr);
    grid-template-areas: "heading metrics" "actions actions" "viewer viewer";
  }
}
.result-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.result-toolbar .tabs { height: 44px; padding: 0; gap: 14px; border-bottom: 0; }
.result-toolbar .datasheet-coverage { padding: 0; border: 0; }
.result-toolbar .coverage-detail-button { min-height: 44px; padding: 0; gap: 6px; }
.result-toolbar .coverage-detail-button > svg:first-child { width: 16px; height: 16px; }
.result-toolbar .coverage-detail-button strong { font-size: 13px; font-weight: 500; }
.result-toolbar .coverage-detail-button.has-missing { color: var(--amber); }
.finding-tools { flex: 0 0 auto; display: grid; grid-template-columns: minmax(70px, 1fr) auto; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.finding-tools .finding-search-wrap { min-width: 0; margin: 0; }
.finding-tools .finding-search-wrap input { height: 36px; padding: 0 9px 0 31px; }
.finding-tools .finding-search-wrap > svg { top: 10px; left: 10px; }
.finding-tools .filter-bar { padding: 0; gap: 6px; }
.finding-tools .severity-filters { gap: 2px; }
.finding-tools .filter { padding: 0 7px; }
.finding-tools #sort-button { width: 32px; }
.finding-list { padding: 0 10px 10px; }
.finding-row { margin-bottom: 8px; }
.finding-row .finding-body { padding: 12px; }
.finding-row .finding-body h3 { margin: 0; line-height: 1.65; }
.finding-row .finding-meta { margin-top: 8px; }
.finding-meta .severity-label { margin-right: 3px; }
@media (max-width: 760px) {
  .result-toolbar .tabs { display: none; }
  .result-toolbar { justify-content: flex-end; }
  .finding-tools { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 6px; }
  .finding-tools .finding-search-wrap input { height: 44px; font-size: 16px; }
  .finding-tools .finding-search-wrap > svg { top: 14px; }
  .finding-tools .filter { min-height: 40px; padding: 0 11px; }
  .finding-tools .severity-filters { gap: 4px; }
}

/* Readable finding copy and optional original report. */
#detail-description { white-space: pre-line; }
.finding-original { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.finding-original > summary { width: fit-content; color: var(--text-2); cursor: pointer; font-size: 14px; padding: 8px 0; }
.finding-original > h3 { font-size: 16px; line-height: 1.6; margin: 12px 0; }
.finding-original > p { font-size: 15px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); }
.viewer-pane.detail-focus .detail-content > p, .viewer-pane.detail-focus .evidence-grid p { font-size: 15px; }

.reference-actions {display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--line);}
.reference-note {margin:0;color:#805000;font-size:13px;}
.reference-upload-form {padding:16px 20px;border-bottom:1px solid var(--line);background:#f5f9fc;}
.reference-upload-form fieldset {border:0;padding:0;display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.reference-upload-form legend {margin-bottom:12px;}
.reference-upload-form label {font-size:14px;}
.reference-upload-form input[type=file] {max-width:100%;}
.reference-source,.reference-search-sources { font-size: 12px; color: var(--muted,#647786); overflow-wrap:anywhere; }
.reference-source a,.reference-search-sources a { color: var(--accent,#087f79); }
.reference-search-sources ul { margin:8px 0; padding-left:18px; }
.reference-search-sources summary { cursor:pointer; }

.public-trial-intro {font-size:13px;line-height:1.8;color:#53657b;margin:16px 0;}
.public-trial-badge {font-size:12px;color:#465f85;white-space:nowrap;}
.auth-copy h1 {max-width:12em;}
@media(max-width:700px){.public-trial-badge{max-width:100px;white-space:normal;line-height:1.4}}
