:root {
  --paper: #fafaf8; --surface: #fff; --subtle: #f4f5f2;
  --ink: #262b27; --muted: #656d67; --line: #e5e8e2; --control-line: #899189;
  --green: #315f49; --accent: #e9f0e8; --dark: #263e30; --warning: #865020;
  --shadow: 0 0 0 1px #0000000d, 0 1px 2px -1px #0000000f, 0 2px 4px #00000006;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-small: .8125rem; --text-body: .875rem; --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: var(--text-body); line-height: 1.55; }
button, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, summary, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--green); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: from-font; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.7px; }
h2 { margin: 0 0 12px; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.25px; }
h3 { margin: 26px 0 10px; font-size: var(--text-body); line-height: 1.4; }
p { text-wrap: pretty; overflow-wrap: anywhere; }
code, pre { font-family: var(--mono); font-size: var(--text-small); }
code { overflow-wrap: anywhere; }
pre { padding: 16px; line-height: 1.65; background: var(--subtle); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; scrollbar-gutter: stable; }
::selection { background: #d9e9d7; color: #213b2d; }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 20; padding: 12px 18px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-inline-end: 7px; vertical-align: middle; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-block-end: 22px; }
.lede { color: var(--muted); max-width: 65ch; margin: 0; }
.eyebrow { color: var(--muted); font-size: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 7px; box-shadow: var(--shadow); background: var(--surface); font-size: var(--text-small); text-decoration: none; }
.button.primary { background: var(--dark); color: white; }
.button.tiny { min-height: 34px; padding: 6px 10px; }
.button.quiet { color: var(--muted); box-shadow: none; background: var(--subtle); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--subtle); color: var(--muted); font-size: 24px; }
.catalog-layout { display: block; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.catalog-list { border-inline-end: 1px solid var(--line); min-width: 0; }
.search { padding: 22px 20px 12px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: .75rem; color: var(--muted); }
.search input { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--control-line); border-radius: 7px; padding: 9px 10px; min-height: 38px; font-size: var(--text-small); color: var(--ink); }
input::placeholder { color: var(--muted); }
.filter-field { display: flex; align-items: center; gap: 12px; }
.table-heading { display: flex; justify-content: space-between; padding: 10px 22px; color: var(--muted); font-size: .75rem; }
#visible-count { font-variant-numeric: tabular-nums; }
.tool-rows { max-height: clamp(290px, calc(100dvh - 372px), 680px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 2px 8px 12px; }
.tool-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 67px; padding: 12px 14px; text-align: start; border: 0; border-radius: 7px; background: transparent; color: var(--ink); }
.tool-row.selected { background: var(--accent); color: var(--green); }
.tool-row .text { min-width: 0; flex: 1; }
.tool-row strong { display: block; font: 500 var(--text-small)/1.5 var(--mono); overflow-wrap: anywhere; }
.tool-row small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.5; margin-block-start: 2px; text-wrap: pretty; }
.tool-row .arrow { visibility: hidden; font-size: 20px; }
.tool-row.selected .arrow { visibility: visible; }
.detail { min-width: 0; scroll-margin-block-start: 20px; }
.detail-head { padding: 28px 30px 20px; }
.kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-name { font: 500 1.5rem/1.3 var(--mono); margin: 9px 0 12px; letter-spacing: -.5px; }
.detail-head p { margin: 0; color: var(--muted); font-size: var(--text-body); line-height: 1.65; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: 0 22px; padding-inline: 30px; border-bottom: 1px solid var(--line); }
.detail-tabs button { min-height: 44px; padding: 10px 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: var(--text-small); }
.detail-tabs button.active { color: var(--ink); border-bottom-color: var(--green); font-weight: 600; }
.detail-body { padding: 24px 30px 28px; min-height: 320px; }
.detail-body > h3:first-child { margin-block-start: 0; }
.detail-body ul { padding-inline-start: 18px; color: var(--muted); font-size: var(--text-small); line-height: 1.65; margin-block: 10px 22px; }
.detail-body li + li { margin-block-start: 8px; }
.availability { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-block-end: 24px; color: var(--muted); font-size: var(--text-small); }
.availability > span:first-child { margin-inline-end: 4px; }
.pill { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; font: .75rem/1.5 var(--mono); color: var(--green); background: var(--accent); overflow-wrap: anywhere; }
.pill.muted { color: var(--muted); background: var(--subtle); }
.tag-row, .profile-tools, .extension-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.profile-tools { margin-block: 18px 22px; }
.fact { display: grid; grid-template-columns: minmax(90px, .6fr) minmax(0, 1.4fr); gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--line); font-size: var(--text-small); }
.fact > :first-child { color: var(--muted); }
.fact code, .fact span { overflow-wrap: anywhere; }
.note { padding: 12px 15px; background: var(--subtle); border-radius: 7px; color: var(--muted); font-size: var(--text-small); margin-block: 20px; }
.note.warning { color: var(--warning); background: #fcf4e9; }
.source-note { font-size: var(--text-small); color: var(--muted); margin-block: 14px; max-width: 72ch; }
.catalog-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-block-start: 18px; color: var(--muted); font-size: .75rem; }
.catalog-footer .disclosure { margin: 0; width: 100%; }
.catalog-footer > .source-note { margin: 0; font-size: .75rem; }
details { border-block-start: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; min-height: 48px; padding-block: 12px; font-size: var(--text-small); font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; flex-shrink: 0; color: var(--muted); font-size: 18px; font-weight: 400; }
details[open] > summary::after { content: '−'; }
details > p:first-of-type { margin-block-start: 6px; }
.disclosure { margin-block-start: 28px; }
.disclosure > summary { color: var(--muted); }
.panel { background: var(--surface); box-shadow: var(--shadow); border-radius: 12px; padding: 28px; margin-block-end: 24px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-block-end: 28px; }
.grid .panel { margin: 0; }
.profile-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.profile-grid .panel { display: flex; flex-direction: column; padding: 24px; }
.profile-grid .lede { font-size: var(--text-small); }
.profile-grid details { margin-block-start: auto; }
.panel-title { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.context-card > p { min-height: 3.1em; }
.context-card details { margin-block-start: 22px; }
.context-card h3 { font-size: var(--text-small); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); }
.empty p { max-width: 48ch; margin: 12px auto 20px; font-size: var(--text-small); }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 18px; background: var(--subtle); font-size: 22px; }
.empty pre { text-align: start; }
.empty details { max-width: 600px; margin: 24px auto 0; text-align: start; }
.empty-detail { display: grid; place-content: center; min-height: 380px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-block: 28px; }
.stat > span { display: block; color: var(--muted); font-size: .75rem; }
.stat strong { display: block; margin-block-start: 7px; font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat strong.small { font-size: 1rem; }
.stat small { color: var(--muted); }
.run-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--text-small); }
.run-table th { text-align: start; padding: 16px 20px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.run-table th:first-child { width: 56%; }
.run-table td { border-block-start: 1px solid var(--line); padding: 20px; overflow-wrap: anywhere; }
.run-table th:last-child, .run-table td:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.run-table a { color: var(--green); }
.run-table .source-note { margin-block-end: 0; }
.status { color: var(--green); font-size: var(--text-small); }
.status.failed, .status.interrupted, .status.limited, .status.launch_failed { color: var(--warning); }
.event-list { padding: 0; }
.event-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 17px 22px; border-block-end: 1px solid var(--line); }
.event-row:last-child { border: 0; }
.event-seq { color: var(--muted); font: .75rem var(--mono); font-variant-numeric: tabular-nums; }
.event-row strong { font: 500 var(--text-small)/1.5 var(--mono); overflow-wrap: anywhere; }
.event-row small { display: block; margin-block-start: 5px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-block: 28px 16px; }
.toolbar h2 { margin: 0; }
.toolbar small { color: var(--muted); }
.loading { color: var(--muted); padding-block: 20px; }
#error { margin: 16px 40px; padding: 16px 20px; background: #fcf4e9; border-radius: 8px; color: var(--warning); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
dialog { width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overscroll-behavior: contain; padding: 28px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px #0003, var(--shadow); }
dialog::backdrop { background: #19201c66; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-block-end: 18px; }
.dialog-header h2 { margin-block-start: 6px; overflow-wrap: anywhere; }
dialog pre { max-height: 62dvh; }
#toast { position: fixed; inset-block-end: 24px; inset-inline-end: 24px; padding: 12px 18px; border-radius: 9px; background: var(--dark); color: white; font-size: var(--text-small); box-shadow: 0 4px 16px #0002; z-index: 10; max-width: calc(100vw - 48px); }
#toast:empty { display: none; }
a.link { color: var(--green); font-size: var(--text-small); }
.run-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-block-end: 16px; }
.run-filters input, #artifact-search { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.artifact-list { max-height: 16rem; overflow: auto; }
.artifact-row { padding-block: 12px; border-block-end: 1px solid var(--line); }
.artifact-row > code { display: block; overflow-wrap: anywhere; margin-block-end: 8px; }
.import-overview { margin-block: 24px; }
.import-overview .stats { margin-block: 20px; }
.coverage-note { margin-block: 16px; }
.trace-timeline { margin-block: 30px; }
.trace-item { margin: 0; border-block-end: 1px solid var(--line); }
.trace-item > summary { padding-block: 16px; }
.trace-item > summary small { display: block; margin-block-start: 5px; color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.trace-body { padding: 0 0 22px 18px; }
.trace-body pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow: auto; }
.trace-body .tag-row { margin-block-start: 12px; }
#more-runs { margin-block-start: 16px; }
@media (max-width: 43rem) { .run-filters { grid-template-columns: minmax(0, 1fr); } .run-filters input { font-size: 1rem; } }
@media (hover: hover) and (pointer: fine) {
  .button:hover, .icon-button:hover { background: var(--subtle); }
  .button.primary:hover { background: var(--green); }
  summary:hover, .detail-tabs button:hover { color: var(--green); }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .icon-button { transition: transform 150ms var(--ease-out); }
  .button:active:not(:focus-visible), .icon-button:active:not(:focus-visible) { transform: scale(.96); }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .panel, .catalog-layout, .button, .pill { border: 1px solid CanvasText; }
  .active, .selected, [aria-current="page"], [aria-selected="true"], [aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
@media (max-width: 66rem) {
  .detail-head, .detail-body { padding-inline: 24px; }
  .detail-tabs { padding-inline: 24px; gap: 0 16px; }
}
@media (max-width: 58rem) {
  .tool-rows { max-height: 420px; }
}
@media (max-width: 43rem) {
  .page-heading { align-items: start; flex-direction: column; gap: 16px; margin-block-end: 24px; }
  h1 { font-size: 1.5rem; }
  .catalog-list { border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .tool-rows { max-height: 240px; }
  .search { padding: 20px 20px 10px; }
  .search input { font-size: 1rem; min-height: 44px; }
  .detail-head { padding-block-start: 24px; }
  .detail-head, .detail-body { padding-inline: 20px; }
  .detail-tabs { padding-inline: 20px; gap: 0 18px; }
  .detail-body { min-height: auto; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 22px; }
  .event-list { padding: 0; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-table, .run-table tbody, .run-table tr, .run-table td { display: block; width: 100%; }
  .run-table thead { display: none; }
  .run-table tr { padding: 18px; }
  .run-table tr + tr { border-block-start: 1px solid var(--line); }
  .run-table td { border: 0; padding: 6px 0; text-align: start !important; }
  .run-table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); }
  .event-row { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 16px; }
  .event-row > button { grid-column: 2; justify-self: start; }
  #error { margin-inline: 20px; flex-wrap: wrap; }
  dialog { padding: 20px; }
  .button, .button.tiny { min-height: 44px; }
}
/* Evaluator output lives outside the recorded run. */
.evaluation-finding { padding-block: 1.25rem; border-bottom: 1px solid var(--border, #e3e5e2); }
.evaluation-finding:last-child { border-bottom: 0; }
.evaluation-finding h3 { font-size: 1rem; line-height: 1.5; }
.section-title { margin-top: 2.5rem; }

/* Compact inspection workspace, adapted from the PDF VM's trace viewer. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.review-page-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.review-shell { display: flex; flex-direction: column; height: calc(100dvh - 94px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.review-header > div { min-width: 0; }
.review-header h1 { margin: 0 0 4px; font-size: 1.125rem; letter-spacing: -.2px; }
.review-header p { margin: 0; color: var(--muted); font-size: .75rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.review-run-status { font-size: .75rem; color: var(--muted); flex-shrink: 0; }
.review-shell .warning { color: var(--warning); }
.review-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.review-metrics > div { padding: 10px 20px; border-right: 1px solid var(--line); }
.review-metrics > div:last-child { border: 0; }
.review-metrics strong { display: block; font-weight: 500; font-size: .875rem; font-variant-numeric: tabular-nums; }
.review-metrics span { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.review-tabbar { display: flex; align-items: stretch; justify-content: space-between; background: var(--subtle); border-bottom: 1px solid var(--line); }
.review-tabs { display: flex; min-width: 0; }
.review-tabs button, .review-files-button { min-height: 44px; border: 0; border-radius: 0; padding: 10px 20px; background: transparent; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.review-tabs [aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -2px var(--green); font-weight: 600; }
.review-files-button { margin-left: auto; text-decoration: underline; text-underline-offset: 4px; }
.review-workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.review-filters { min-width: 0; border-right: 1px solid var(--line); background: #fafbf9; overflow-y: auto; }
.review-filters h2 { margin: 0; padding: 16px 16px 8px; color: var(--muted); font-size: .6875rem; font-weight: 500; letter-spacing: .3px; text-transform: uppercase; }
.review-filters button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 40px; padding: 8px 16px; border: 0; background: transparent; text-align: left; font-size: .8125rem; gap: 8px; }
.review-filters button > span { overflow: hidden; text-overflow: ellipsis; }
.review-filters button small { color: var(--muted); font-variant-numeric: tabular-nums; }
.review-filters [aria-pressed=true] { background: var(--accent); color: var(--green); box-shadow: inset 2px 0 var(--green); font-weight: 500; }
.review-filters .field { padding: 14px 12px 0; }
.review-filter-note { padding: 12px 16px; font-size: .6875rem; color: var(--muted); line-height: 1.7; }
.review-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.review-controls { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding: 10px 16px; }
.review-search { flex: 1; min-width: 0; }
.review-search input, #review-file-search { width: 100%; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); padding: 8px 10px; min-height: 36px; font-size: .8125rem; }
.review-error-toggle { display: flex; align-items: center; gap: 6px; font-size: .75rem; white-space: nowrap; }
.review-error-toggle input { accent-color: var(--green); width: 15px; height: 15px; }
.review-view-meta { min-height: 38px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); font-size: .6875rem; color: var(--muted); }
.review-text-button { padding: 6px 0; border: 0; background: transparent; color: var(--green); font-size: .6875rem; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.review-panel { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.review-entry, .review-tool-group { border: 0; border-bottom: 1px solid var(--line); }
.review-entry > summary, .review-tool-group > summary { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 43px; padding: 10px 36px 10px 16px; font-size: .8125rem; font-weight: 400; }
.review-shell .review-entry > summary::after, .review-shell .review-tool-group > summary::after { content: ''; position: absolute; right: 16px; top: calc(50% - 3px); width: 5px; height: 5px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(-45deg); }
.review-shell .review-entry[open] > summary::after, .review-shell .review-tool-group[open] > summary::after { transform: rotate(45deg); }
.review-entry > summary time, .review-tool-group > summary time { color: var(--muted); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.review-entry-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; font-weight: 500; }
.review-entry-title small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-weight: 400; font-size: .6875rem; }
.review-entry-kind { color: var(--muted); font-size: .6875rem; white-space: nowrap; }
.review-entry[open] > summary, .review-tool-group[open] > summary { background: var(--subtle); }
.review-entry-body { border-top: 1px solid var(--line); padding: 14px 16px 16px; }
.review-entry-body h3 { margin: 4px 0 8px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.review-entry-body h3:not(:first-child) { margin-top: 20px; }
.review-entry-body pre { margin: 0 0 12px; padding: 12px; max-height: 48dvh; font-size: .75rem; border-radius: 4px; }
.review-entry-body details { margin-top: 12px; }
.review-entry-body summary { min-height: 38px; padding-block: 8px; font-size: .75rem; }
.review-evidence { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.review-evidence > span { color: var(--muted); font-size: .6875rem; overflow-wrap: anywhere; }
.review-inline-warning, .review-context-note { margin: 0; padding: 12px 16px; background: #fcf4e9; color: var(--warning); font-size: .75rem; }
.review-context-note { color: var(--muted); background: var(--subtle); border-bottom: 1px solid var(--line); }
.review-tool-group > summary { background: #fafbf9; grid-template-columns: 64px minmax(0, 1fr); color: var(--muted); }
.review-tool-group .review-entry { margin-left: 14px; border-left: 2px solid var(--line); }
.review-tool-group .review-entry:last-child { border-bottom: 0; }
.review-findings { padding: 20px; }
.review-findings .panel { box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 20px 0 0; }
.review-findings h2 { font-size: 1rem; }
.review-findings h3 { font-size: .875rem; }
.review-findings .toolbar { margin-top: 0; }
.review-empty { padding: 36px 24px; color: var(--muted); }
.review-empty h2 { font-size: 1rem; color: var(--ink); }
#review-more { margin: 8px 16px; align-self: start; }
.review-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: .6875rem; }
.review-technical { margin-top: 16px; }
#dialog-content:empty { display: none; }
.review-technical > summary { color: var(--muted); font-size: .75rem; }
.review-raw-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 70px; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font: .75rem/1.5 var(--mono); overflow-wrap: anywhere; }
.review-raw-row > :first-child, .review-raw-row time { color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
 .review-entry > summary:hover, .review-tool-group > summary:hover, .review-filters button:hover, .review-raw-row:hover { background: var(--subtle); }
 .review-tabs button:hover, .review-files-button:hover { color: var(--green); }
}
@media (max-width: 70rem) {
 .review-tabs button, .review-files-button { padding-inline: 14px; }
 .review-entry-title { display: block; }
 .review-entry-title small { display: block; }
}
@media (max-width: 43rem) {
 .review-shell { height: auto; max-height: none; }
 .review-header { align-items: start; gap: 12px; padding: 14px; flex-direction: column; }
 .review-header > div { max-width: 100%; }
 .review-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .review-metrics > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
 .review-metrics > div:nth-child(2n) { border-right: 0; }
 .review-tabbar { flex-wrap: wrap; }
 .review-tabs { flex: 1 0 100%; }
 .review-tabs button { flex: 1; padding-inline: 8px; font-size: .75rem; }
 .review-files-button { padding-inline: 14px; min-height: 38px; }
 .review-workspace { display: block; }
 .review-filters { border-right: 0; border-bottom: 1px solid var(--line); }
 .review-filters h2, .review-filter-note { display: none; }
 #review-kinds, #review-tools { display: flex; flex-wrap: wrap; padding: 6px; }
 #review-kinds { border-bottom: 1px solid var(--line); }
 .review-filters button { width: auto; flex: 1 1 auto; padding: 8px; min-height: 40px; font-size: .75rem; gap: 8px; }
 .review-controls { flex-wrap: wrap; gap: 10px; padding: 12px; }
 .review-search { flex-basis: 100%; }
 .review-search input, #review-file-search { font-size: 1rem; min-height: 44px; }
 .review-panel { min-height: 260px; max-height: 70dvh; }
 .review-entry > summary { grid-template-columns: 53px minmax(0, 1fr); padding: 10px 30px 10px 12px; gap: 6px 10px; }
 .review-entry-kind { grid-column: 2; }
 .review-tool-group > summary { grid-template-columns: 53px minmax(0, 1fr); padding: 10px 30px 10px 12px; }
 .review-entry-body { padding: 12px; }
 .review-view-meta { padding-inline: 12px; }
 .review-footer { padding: 10px 12px; }
 .review-text-button { min-height: 36px; }
}

/* Output inspection: reference coverage and saved PDF beside the original findings. */
.results-open.review-shell { height: auto; }
.results-open .review-workspace { display: block; }
.result-overview { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.result-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.result-title h2 { margin: 0; font-size: 1.05rem; }
.result-title p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; }
.result-title > a { font-size: .75rem; }
.result-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 20px 0 14px; }
.result-metrics strong { display: block; font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-metrics span { display: block; font-size: .75rem; color: var(--muted); }
.result-coverage { height: 7px; display: flex; gap: 2px; overflow: hidden; border-radius: 3px; }
.result-coverage > span { flex: 1; background: #dee2dc; }
.result-coverage .found { background: #417855; }
.result-coverage .partial { background: #d5a355; }
.result-coverage .missed { background: #b76c60; }
.result-scope, .result-notice { font-size: .75rem; color: var(--muted); margin: 8px 0; }
.result-method { margin-top: 12px; }
.result-method summary { font-size: .75rem; color: var(--green); }
.result-method p, .result-method td, .result-method th { font-size: .75rem; }
.result-method table { width: 100%; }
.result-method code { font-size: .6875rem; }
.result-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.15fr); height: min(820px, calc(100dvh - 170px)); min-height: 540px; }
.result-browser { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.result-list-controls { padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.result-switch { display: flex; gap: 4px; margin-bottom: 12px; background: var(--subtle); padding: 3px; border-radius: 6px; }
.result-switch button { flex: 1; border: 0; border-radius: 4px; padding: 8px; background: transparent; font-size: .75rem; color: var(--muted); }
.result-switch [aria-pressed=true] { color: var(--green); background: white; box-shadow: var(--shadow); font-weight: 600; }
#result-search { width: 100%; border: 1px solid var(--control-line); border-radius: 6px; min-height: 36px; padding: 8px 10px; font-size: .8125rem; }
.result-selects { display: flex; gap: 8px; margin-top: 10px; }
.result-selects label { flex: 1; min-width: 0; font-size: .6875rem; color: var(--muted); }
#result-count { margin: 8px 0 0; font-size: .6875rem; color: var(--muted); }
.result-items { overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; scrollbar-gutter: stable; }
.result-item { border-bottom: 1px solid var(--line); }
.result-item-select { display: block; width: 100%; border: 0; background: white; text-align: left; padding: 14px 16px; }
.result-item.selected > button { background: var(--accent); box-shadow: inset 3px 0 var(--green); }
.result-item-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .6875rem; color: var(--muted); }
.result-item-meta strong { color: var(--ink); font: 500 .75rem var(--mono); }
.result-item-title { display: block; font-size: .8125rem; line-height: 1.55; margin: 7px 0 4px; overflow-wrap: anywhere; }
.result-item-select > small { font-size: .6875rem; color: var(--muted); }
.result-badge { font-size: .625rem; padding: 2px 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); }
.result-badge.found, .result-badge.matched, .result-badge.additional { background: #e9f0e8; color: #315f49; }
.result-badge.partial, .result-badge.clarification { background: #fcf1df; color: #7c511c; }
.result-badge.missed, .result-badge.questionable { background: #f8ece8; color: #8b4639; }
.result-item-body { padding: 0 16px 18px; font-size: .8125rem; }
.result-item-body h3 { font-size: .75rem; color: var(--muted); margin: 18px 0 6px; font-weight: 500; }
.result-item-body p { margin: 6px 0 12px; }
.result-item-body blockquote { margin: 14px 0; padding: 10px 12px; border-left: 2px solid var(--control-line); background: var(--subtle); font-size: .8125rem; }
.result-item-body summary { font-size: .75rem; }
.result-caveat { padding: 12px; background: #fcf4e9; color: var(--warning); border-radius: 4px; }
.result-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0; }
.result-list-empty { padding: 16px; color: var(--muted); font-size: .8125rem; }
.result-item-review { display: grid; gap: 8px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.result-item-review label { display: grid; gap: 5px; font-size: .75rem; color: var(--muted); }
.result-item-review textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid var(--control-line); border-radius: 6px; padding: 8px; font: inherit; color: var(--ink); }
.result-item-review small { color: var(--muted); font-size: .6875rem; }
.result-document { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #eef0ec; }
.result-pdf-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #fafbf9; border-bottom: 1px solid var(--line); }
.result-pager { display: flex; gap: 6px; align-items: center; font-size: .75rem; }
.result-pager label { display: flex; align-items: center; gap: 6px; }
.result-pager input { width: 46px; min-height: 32px; border: 1px solid var(--control-line); border-radius: 4px; text-align: center; padding: 4px; }
.result-pager .button { box-shadow: none; border: 1px solid var(--line); }
#result-pdf-status { margin: 0; padding: 6px 12px; font-size: .6875rem; color: var(--muted); }
.result-canvas-scroll { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; overscroll-behavior: contain; }
#result-canvas { display: block; margin: 0 auto; background: white; box-shadow: 0 2px 8px #00000012; }
.result-pdf-caption { margin: 0; padding: 8px 12px; font-size: .6875rem; color: var(--muted); background: #fafbf9; border-top: 1px solid var(--line); }
.result-human { padding: 14px 24px; border-top: 1px solid var(--line); }
.result-human > summary { font-size: .8125rem; color: var(--green); }
.result-human p { font-size: .75rem; color: var(--muted); }
.result-human > label { display: inline-grid; gap: 5px; margin: 0 12px 12px 0; font-size: .75rem; }
.result-human input { border: 1px solid var(--control-line); border-radius: 6px; min-height: 36px; padding: 6px 10px; }
@media (hover: hover) and (pointer: fine) { .result-item-select:hover { background: var(--subtle); } }
@media (max-width: 64rem) {
 .result-layout { grid-template-columns: minmax(250px, 1fr) minmax(0, 1fr); }
 .result-selects { flex-wrap: wrap; }
 .result-metrics { gap: 10px; }
 .result-metrics strong { font-size: 1.25rem; }
}
@media (max-width: 48rem) {
 .result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
 .result-overview { padding: 16px; }
 .result-title { flex-wrap: wrap; gap: 8px; }
 .result-method { overflow-x: auto; }
 .result-human { padding: 14px 16px; }
 #result-search, .result-item-review textarea, .result-human input { font-size: 1rem; min-height: 44px; }
 .review-tabs { overflow-x: auto; }
}
@media (max-width: 40rem) {
 .result-layout { display: flex; flex-direction: column; height: auto; }
 .result-browser { border-right: 0; }
 .result-items { min-height: 260px; max-height: 55dvh; }
 .result-document { min-height: 430px; height: 65dvh; border-top: 1px solid var(--line); }
}
@media (max-width: 30rem) {
 .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .result-selects { flex-direction: column; }
}

/* A compact workspace shell with navigation local to the open section. */
:root { --sidebar-width: 240px; --header-height: 48px; }
.topbar { position: fixed; inset: 0 0 auto; z-index: 8; height: var(--header-height); display: flex; align-items: center; gap: 16px; padding: 0 22px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-wordmark { font-size: 19px; font-weight: 600; letter-spacing: -.065em; line-height: 1; }
.brand-period { color: var(--green); }
.brand:focus-visible { outline: 2px solid var(--green); outline-offset: 6px; border-radius: 2px; }
.home-back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; margin-left: -8px; border-radius: 5px; color: var(--green); text-decoration: none; font-size: .75rem; }
body:not([data-page="home"]) .topbar .brand { display: none; }
.crumb-separator { color: var(--control-line); }
#breadcrumb { color: var(--ink); font-weight: 500; }
.read-only { margin-left: auto; white-space: nowrap; }
#sidebar-toggle { display: none; }
.sidebar { position: fixed; inset: var(--header-height) auto 0 0; width: var(--sidebar-width); padding: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--subtle); }
.sidebar-heading { padding: 22px 22px 16px; flex-shrink: 0; }
.sidebar-heading .eyebrow { display: none; }
.sidebar-heading h2 { margin: 0; font-size: .9375rem; }
#sidebar-content { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 12px 16px; }
.sidebar-bottom { margin-top: auto; padding: 14px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .6875rem; }
.sidebar-bottom small { display: block; margin-top: 3px; font-size: inherit; }
main { margin-left: var(--sidebar-width); padding-top: var(--header-height); min-height: 100dvh; }
#content { padding: 22px 28px 40px; max-width: none; margin: 0 auto; }
body[data-page="home"] main { margin-left: 0; }
.sidebar-intro { margin: 0 10px 18px; color: var(--muted); font-size: .75rem; }
.section-menu { display: grid; gap: 4px; }
.section-menu a, .section-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; padding: 12px 10px; border-radius: 7px; color: var(--muted); background: transparent; text-align: left; text-decoration: none; font-size: .8125rem; }
.section-menu small { display: block; margin-top: 4px; font-size: .6875rem; font-weight: 400; color: var(--muted); }
.section-menu [aria-current="page"] { color: var(--green); background: var(--accent); font-weight: 600; }
.section-links { display: grid; gap: 3px; margin: 24px 10px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.section-links a { display: flex; justify-content: space-between; gap: 10px; padding-block: 8px; color: var(--green); font-size: .75rem; text-decoration: none; }
#sidebar-content > .field { margin: 20px 10px 0; }
.sidebar .catalog-list { display: flex; flex-direction: column; min-height: 0; flex: 1; border: 0; }
.sidebar .search { padding: 0 10px 12px; gap: 12px; }
.sidebar .filter-field { display: grid; gap: 5px; }
.sidebar .search input { background: var(--surface); border-color: #b8c0b7; min-height: 36px; padding: 7px 9px; }
.sidebar .table-heading { padding: 6px 10px 10px; font-size: .6875rem; }
.sidebar .tool-rows { flex: 1; max-height: none; min-height: 0; padding: 0; overflow-y: auto; }
.sidebar .tool-row { min-height: 58px; padding: 9px 10px; }
.catalog-layout .detail { min-height: calc(100dvh - 178px); }
.catalog-layout .detail-head { padding: 24px 28px 20px; }
.catalog-layout .detail-body { padding: 24px 28px; }
.catalog-layout .detail-head p { max-width: 100ch; }
.detail-body > pre { max-height: none; }
.profile-tool-list { margin-top: 10px; }
.profile-tool-list a { display: grid; grid-template-columns: minmax(100px, .45fr) minmax(0, 1fr) 16px; align-items: center; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; }
.profile-tool-list a > span { color: var(--muted); font-size: .8125rem; }
.profile-tool-list code { color: var(--green); }
.sidebar .run-filters { grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 0 10px; }
.sidebar .run-filters input { background: var(--surface); border-color: #b8c0b7; min-height: 36px; padding: 8px 9px; font-size: .8125rem; }
body[data-page="analysis"] h2 { scroll-margin-top: 70px; }
body[data-page="analysis"] .stats { margin-top: 20px; }
.run-detail #content { padding: 14px 18px 24px; }
.sidebar .review-page-head { display: grid; gap: 8px; margin: 0 10px 20px; }
.sidebar .review-page-head a { font-size: .75rem; }
.sidebar .review-tabbar { display: block; background: transparent; border: 0; }
.sidebar .review-tabs { display: flex; flex-direction: column; gap: 3px; overflow: visible; }
.sidebar .review-tabs button, .sidebar .review-files-button { text-align: left; min-height: 39px; padding: 9px 12px; border-radius: 6px; font-size: .8125rem; }
.sidebar .review-tabs [aria-pressed="true"] { background: var(--accent); color: var(--green); box-shadow: none; font-weight: 600; }
.sidebar .review-files-button { display: block; width: 100%; margin: 6px 0 0; text-decoration: none; }
.sidebar .review-filters { overflow: visible; border: 0; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; background: transparent; flex: none; }
.sidebar .review-filters h2 { padding: 12px 10px 6px; font-size: .6875rem; }
.sidebar .review-filters button { min-height: 35px; padding: 7px 10px; border-radius: 5px; font-size: .75rem; }
.sidebar .review-filters [aria-pressed="true"] { box-shadow: none; }
.sidebar .review-filter-note { margin-bottom: 0; padding: 12px 10px; }
.sidebar .review-filters .field { padding: 8px 10px; }
.review-run-info, .review-result-info { margin: 18px 10px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.review-run-info > h2, .review-result-info > h2 { margin: 0 0 10px; color: var(--muted); font-size: .75rem; font-weight: 500; }
.sidebar .review-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; gap: 14px 10px; }
.sidebar .review-metrics > div { padding: 0; border: 0; }
.sidebar .review-metrics span { font-size: .6875rem; }
.sidebar .review-context-note { padding: 0; margin: 16px 0 0; border: 0; font-size: .6875rem; background: transparent; }
.sidebar .result-scope, .sidebar .result-notice, .sidebar .result-method p { font-size: .6875rem; line-height: 1.65; }
.sidebar .result-method { overflow-x: auto; }
.sidebar .result-method table { min-width: 420px; }
.sidebar .result-method summary { font-size: .6875rem; min-height: 36px; }
.review-technical { margin-top: 8px; }
.review-header { padding: 12px 18px; }
.review-metrics > div { padding: 8px 18px; }
.results-open.review-shell { height: calc(100dvh - 94px); }
.results-open .review-workspace { display: flex; }
#review-results-panel { flex: 1; min-height: 0; }
.results-view { display: flex; flex-direction: column; height: 100%; }
.results-open .result-layout { flex: 1; height: auto; min-height: 220px; }
.result-overview { padding: 16px 20px 14px; }
.result-metrics { margin: 14px 0 12px; }
.result-metrics strong { font-size: 1.25rem; }
.result-human { padding: 0 20px; }
.result-human[open] { max-height: 220px; overflow: auto; flex-shrink: 0; }
.result-human > summary { min-height: 40px; padding-block: 8px; }

/* A short list of choices, without dashboard decoration. */
.workspace-home { max-width: 560px; margin: 0 auto; padding: clamp(28px, 6vh, 64px) 0; }
.workspace-home h1 { font-size: 1.625rem; font-weight: 500; margin-bottom: 24px; }
.workspace-choices { display: grid; }
.workspace-choices a { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 8px; border-bottom: 1px solid var(--line); font-size: 1rem; text-decoration: none; }
.workspace-choices a > span:last-child { color: var(--muted); font-size: .875rem; }
@media (hover: hover) and (pointer: fine) {
  .home-back:hover, .section-menu a:hover, .section-menu button:hover, .sidebar .review-tabs button:hover { background: var(--accent); color: var(--green); }
  .profile-tool-list a:hover { background: var(--subtle); }
}
@media (max-width: 66rem) {
  :root { --sidebar-width: 236px; }
  #content { padding-inline: 22px; }
  .workspace-home { padding-inline: 0; }
}
@media (max-width: 48rem) {
  .topbar { padding-inline: 16px; gap: 10px; }
  .read-only { display: none; }
  #sidebar-toggle { display: inline-flex; margin-left: auto; min-height: 32px; padding: 4px 10px; }
  main { margin-left: 0; }
  .sidebar { display: none; z-index: 7; width: min(320px, 100%); box-shadow: 12px 0 40px #263e3020; }
  .sidebar-open .sidebar { display: flex; }
  .sidebar-heading { padding-top: 18px; }
  #content { padding: 20px 16px 32px; }
  .workspace-home { padding-top: 18px; }
  .sidebar .search input, .sidebar .run-filters input { font-size: 1rem; min-height: 44px; }
  .sidebar .review-filters h2 { display: block; }
  .sidebar #review-kinds, .sidebar #review-tools { display: block; padding: 0; border: 0; }
  .sidebar .review-filters button { width: 100%; min-height: 40px; }
  .sidebar .review-filter-note { display: block; }
  .review-shell { height: calc(100dvh - 90px); min-height: 420px; }
  .review-header { padding: 12px; }
  .review-metrics > div { padding: 8px 12px; }
  .review-panel { max-height: none; }
  .run-detail #content { padding: 12px 10px 24px; }
  .results-open.review-shell { height: auto; }
  .results-view { display: block; height: auto; }
  .results-open .result-layout { height: 70dvh; min-height: 440px; }
  .catalog-layout .detail { min-height: calc(100dvh - 200px); }
  .catalog-layout .detail-head, .catalog-layout .detail-body { padding: 20px; }
  #error { margin: 12px 16px; }
}
@media (max-width: 40rem) {
  .results-open .result-layout { height: auto; min-height: 0; }
  .profile-tool-list a { grid-template-columns: minmax(0, 1fr) 16px; gap: 4px 10px; }
  .profile-tool-list a > span:nth-child(2) { grid-row: 2; grid-column: 1; }
  .profile-tool-list a > span:last-child { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width: 32rem) {
  .topbar { gap: 8px; }
  .topbar .home-back { font-size: .6875rem; gap: 4px; }
  #breadcrumb { font-size: .6875rem; }
  .topbar .brand { font-size: .75rem; }
}

/* Show the task first; reveal filters, metrics and technical controls on demand. */
body[data-page="home"] .topbar .crumb-separator, body[data-page="home"] #breadcrumb { display: none; }
.sidebar-heading { display: none; }
#sidebar-content { padding-top: 20px; }
.sidebar-intro { display: none; }
.section-menu [aria-pressed="true"] { background: var(--accent); color: var(--green); font-weight: 600; }
.tool-view { display: flex; align-items: center; gap: 12px; padding: 0 28px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.catalog-filter { border: 0; }
.catalog-filter > summary { min-height: 32px; padding: 2px 0; font-size: .75rem; color: var(--muted); }
#scroll-hint { display: none; }
.catalog-layout .detail { min-height: 0; }
.catalog-footer .disclosure { margin-top: 6px; }
.sidebar .review-page-head { margin-bottom: 12px; }
.review-more-views, .review-filter-options { margin: 12px 10px 0; }
.review-more-views > summary, .review-filter-options > summary, .review-run-info > summary, .review-result-info > summary { min-height: 42px; padding-block: 10px; color: var(--muted); font-size: .75rem; }
.review-more-views > .review-tabs { margin-inline: -10px; }
.review-more-views > a { display: block; padding: 10px 2px; font-size: .75rem; }
.review-run-info, .review-result-info { margin-top: 0; padding-top: 0; }
.review-run-info[open], .review-result-info[open], .review-filter-options[open] { padding-bottom: 14px; }
.sidebar .review-filters { margin: 0 -10px; padding: 0; border: 0; }
.sidebar .review-metrics { padding-top: 8px; }
.sidebar .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; margin: 8px 0 16px; }
.sidebar .result-metrics strong { font-size: 1rem; }
.sidebar .result-metrics span { font-size: .6875rem; }
.sidebar .review-footer { display: block; border: 0; padding: 14px 0 0; background: none; }
.sidebar .review-footer span { display: block; }
.review-entry-title small { display: none; }
.result-overview { padding: 10px 18px; }
.result-title p { margin: 0; }
.result-filter-options { border: 0; margin-top: 6px; }
.result-filter-options > summary { padding: 2px 0; min-height: 30px; font-size: .75rem; color: var(--muted); }
.result-filter-options .result-selects { margin: 6px 0 12px; }
.result-item-review { display: block; padding-top: 0; }
.result-item-review > summary { min-height: 38px; font-size: .75rem; color: var(--green); }
.result-item-review > label { margin: 8px 0 12px; }
.result-item-review > small { display: block; }
body[data-page="runs"] .run-table th:first-child { width: 78%; }
#analysis-run-list > .toolbar:empty { display: none; }
@media (hover: hover) and (pointer: fine) {
  .workspace-choices a:hover { color: var(--green); background: var(--accent); }
}
@media (max-width: 48rem) {
  .workspace-home { padding-top: 24px; }
  .workspace-home h1 { font-size: 1.5rem; }
  .tool-view { padding-inline: 20px; }
}

/* Visible choices: one click to select, native arrow-key navigation. */
.choices { min-width: 0; border: 0; padding: 0; margin: 0; }
.choices > legend { float: none; width: auto; padding: 0; margin: 0 0 7px; font-size: .6875rem; font-weight: 500; color: var(--muted); }
.choice-options { display: flex; flex-wrap: wrap; gap: 6px; }
.choices .choice { position: relative; display: block; flex: 0 1 auto; min-width: 0; margin: 0; font-size: .8125rem; cursor: pointer; }
.choices .choice input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; }
.choices .choice span { display: flex; align-items: center; min-height: 34px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); overflow-wrap: anywhere; line-height: 1.35; }
.choices .choice input:checked + span { color: var(--green); background: var(--accent); border-color: var(--green); font-weight: 600; }
.choices .choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 3px; }
.catalog-picker { margin-bottom: 18px; }
.catalog-project-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.catalog-project-row > .button { margin-top: 20px; flex-shrink: 0; }
.catalog-scope { color: var(--muted); font-size: .75rem; margin: 10px 0 0; }
.catalog-layout .detail-head { padding: 20px 28px 14px; }
.catalog-layout .detail-head p { max-width: 80ch; }
.tool-view { padding-bottom: 14px; }
.tool-view .choices > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sidebar .choices .choice { font-size: .75rem; }
.sidebar .choices .choice span { padding: 7px 9px; }
.sidebar .run-filters .choice-options { display: grid; }
.sidebar > .choices, #sidebar-content > .choices { margin: 18px 10px 0; }
.catalog-filter .choices { margin-top: 8px; }
.result-filter-options .result-selects { display: grid; gap: 14px; }
.result-pdf-toolbar { gap: 12px; flex-wrap: wrap; }
.result-pdf-toolbar .choices .choice { font-size: .6875rem; }
.result-pdf-toolbar .choices .choice span { padding: 5px 8px; min-height: 30px; }
.result-pdf-toolbar .choices > legend { margin-bottom: 4px; }
.result-pager { align-self: flex-end; min-height: 30px; }
.result-item-review .choices { margin: 8px 0 12px; }
.result-item-review .choices .choice { font-size: .75rem; }
.review-technical > .choices { margin-block: 16px; }
@media (hover: hover) and (pointer: fine) {
  .choices .choice:hover span { color: var(--green); border-color: var(--green); }
}
@media (forced-colors: active) {
  .choices .choice input:checked + span { outline: 2px solid Highlight; }
  .choices .choice input:focus-visible + span { outline: 3px dashed Highlight; outline-offset: 3px; }
}
@media (max-width: 48rem) {
  .choices .choice span, .result-pdf-toolbar .choices .choice span { min-height: 44px; }
  .catalog-project-row { flex-wrap: wrap; }
  .catalog-project-row > .button { margin-top: 0; }
  .catalog-layout .detail-head { padding: 18px 20px 14px; }
}

/* Catalogue: one compact context bar, grouped tools, visual overview. */
#catalog-toolbar:empty { display: none; }
body[data-page="catalog"] { --header-height: 64px; }
body[data-page="catalog"] .topbar { gap: 12px; }
body[data-page="catalog"] #breadcrumb, body[data-page="catalog"] .home-back { white-space: nowrap; }
#catalog-toolbar { display: flex; align-items: center; gap: 22px; min-width: 0; overflow-x: auto; padding: 6px 2px; margin-left: auto; }
#catalog-toolbar .choices { display: flex; align-items: center; flex-shrink: 0; gap: 8px; margin: 0; min-width: 0; }
#catalog-toolbar .choices > legend { float: left; margin: 0 8px 0 0; padding: 0; line-height: 32px; font-size: 11px; }
#catalog-toolbar .choice-options { flex-wrap: nowrap; gap: 4px; }
#catalog-toolbar .choice span { min-height: 32px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
body[data-page="catalog"] .catalog-picker { display: none; }
body[data-page="catalog"] #sidebar-content { padding-top: 12px; }
.tool-group + .tool-group { margin-top: 22px; }
.tool-group h2 { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 10px; font-size: 12px; font-weight: 650; color: var(--muted); }
.tool-group h2 span { font-weight: 400; font-size: 11px; }
.group-empty { padding: 0 10px; font-size: 12px; color: var(--muted); }
.tool-call-count { font-size: 11px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sidebar .tool-row { gap: 10px; }
.sidebar .tool-row strong { font-size: 13px; }
.sidebar .tool-row small { font-size: 11px; line-height: 1.45; }
body[data-page="catalog"] .detail-head { padding: 18px 24px 12px; }
body[data-page="catalog"] .tool-name { font-size: 24px; margin: 8px 0; }
body[data-page="catalog"] .detail-head p { font-size: 13px; line-height: 1.5; }
body[data-page="catalog"] .kicker { font-size: 11px; }
body[data-page="catalog"] .tool-view { padding: 0 24px 12px; }
body[data-page="catalog"] .tool-view .choice span { min-height: 30px; padding: 5px 10px; font-size: 12px; }
body[data-page="catalog"] .detail-body { padding: 20px 24px; }
.tool-diagram { margin: 0; padding: 22px; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; }
.tool-diagram figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.tool-diagram figcaption span { color: var(--muted); font-size: 11px; font-weight: 400; }
.tool-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; margin: 24px 0 6px; padding: 0; list-style: none; }
.flow-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.flow-step:not(:last-child)::after { content: '→'; position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--green); }
.flow-step-1 { background: var(--accent); border-color: #b6c9ba; }
.flow-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--green); margin-bottom: 5px; }
.flow-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.flow-step small { color: var(--muted); font-size: 11px; }
.flow-step strong { font-size: 14px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.flow-context { color: var(--muted); font-size: 12px; margin: 18px 0 0; }
.tool-overview-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0 4px; color: var(--muted); font-size: 12px; }
.tool-overview-facts strong { color: var(--ink); }
.compact-note { font-size: 11px; margin: 8px 0 14px; }
@media (max-width: 70rem) {
  #catalog-toolbar { gap: 12px; }
  #catalog-toolbar .choices > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body[data-page="catalog"] .home-back span, body[data-page="catalog"] .crumb-separator { display: none; }
}
@media (max-width: 48rem) {
  body[data-page="catalog"] #breadcrumb { display: none; }
  #catalog-toolbar { margin-left: 0; flex: 1; }
  .tool-flow { grid-template-columns: 1fr; gap: 26px; margin-top: 18px; }
  .flow-step { padding: 12px 16px; }
  .flow-step:not(:last-child)::after { content: '↓'; top: auto; bottom: -25px; left: 50%; transform: translateX(-50%); }
  .flow-icon { display: none; }
  .tool-diagram { padding: 16px; }
  .tool-diagram figcaption { flex-wrap: wrap; }
}

/* Minimal workspace: immediate navigation, animated surfaces. */
.workspace-home { max-width: 1080px; min-height: calc(100dvh - 150px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 80px; }
.workspace-home h1 { text-align: center; margin: 0 0 48px; font-size: clamp(30px, 4vw, 46px); font-weight: 500; letter-spacing: -.04em; }
.workspace-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.workspace-choices .workspace-card { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; justify-content: center; min-height: 240px; padding: 28px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); animation: card-arrive .65s cubic-bezier(.2,.8,.2,1) both; transition: transform .35s, border-color .35s, box-shadow .35s; }
.workspace-card:nth-child(2) { animation-delay: .09s !important; }
.workspace-card:nth-child(3) { animation-delay: .18s !important; }
.workspace-card h2 { z-index: 1; text-align: center; margin: 0; font-size: clamp(17px, 2vw, 23px); font-weight: 500; letter-spacing: -.02em; }
.card-orbit { position: absolute; z-index: -1; width: 220px; height: 220px; border: 1px solid #376c4c18; border-radius: 42%; background: radial-gradient(ellipse, #d9eadb70, transparent 70%); transform: translate(40%, 40%); animation: orbit-drift 14s linear infinite; transition: opacity .4s; }
.workspace-card:nth-child(2) .card-orbit { animation-delay: -5s; border-radius: 32%; }
.workspace-card:nth-child(3) .card-orbit { animation-delay: -10s; border-radius: 50%; border-width: 12px; }
.workspace-choices .workspace-card:hover, .workspace-choices .workspace-card:focus-visible { transform: translateY(-6px); border-color: #86a690; background: var(--surface); box-shadow: 0 16px 40px #233f3410; }
.workspace-choices .workspace-card:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
@keyframes card-arrive { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes orbit-drift { from { transform: translate(30%, 30%) rotate(0deg); } 50% { transform: translate(-25%, -20%) rotate(180deg); } to { transform: translate(30%, 30%) rotate(360deg); } }
@media (max-width: 38rem) {
  .workspace-home { min-height: auto; padding: 36px 0; }
  .workspace-home h1 { margin-bottom: 28px; }
  .workspace-choices { grid-template-columns: 1fr; gap: 14px; }
  .workspace-choices .workspace-card { min-height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-choices .workspace-card, .card-orbit { animation: none !important; transition: none; }
  .workspace-choices .workspace-card:hover { transform: none; }
}

/* Carry the workspace's type-led, open surfaces into the catalogue. */
body[data-page="catalog"] .topbar .brand { display: inline-flex; flex-shrink: 0; }
body[data-page="catalog"] .home-back { display: none; }
body[data-page="catalog"] .crumb-separator { display: none; }
body[data-page="catalog"] #breadcrumb { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
body[data-page="catalog"] .topbar { border-bottom-color: #233f3409; }
body[data-page="catalog"] #catalog-toolbar .choices > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body[data-page="catalog"] #catalog-toolbar .choice span { background: transparent; border-color: transparent; border-radius: 7px; color: var(--muted); }
body[data-page="catalog"] #catalog-toolbar .choice input:checked + span { background: #e8eee8; color: var(--green); border-color: #233f3412; }
body[data-page="catalog"] #catalog-toolbar .choices + .choices { border-left: 1px solid var(--line); padding-left: 14px; }
body[data-page="catalog"] .sidebar { background: var(--paper); border-right-color: #233f340b; }
body[data-page="catalog"] #sidebar-content { padding-top: 24px; }
body[data-page="catalog"] .tool-group h2 { font-size: 11px; font-weight: 500; padding-bottom: 14px; }
body[data-page="catalog"] .tool-row { border-radius: 10px; transition: background .2s; }
body[data-page="catalog"] .tool-row strong { font-family: inherit; font-weight: 500; letter-spacing: -.02em; }
body[data-page="catalog"] .tool-row small { font-size: 11px; color: var(--muted); }
body[data-page="catalog"] .tool-row.selected { background: #e9eee8; }
body[data-page="catalog"] #content { max-width: 1320px; padding: 38px clamp(22px, 4vw, 64px) 40px; }
body[data-page="catalog"] .catalog-layout { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
body[data-page="catalog"] .detail { border: 0; background: transparent; box-shadow: none; }
body[data-page="catalog"] .detail-head { padding: 24px 0 22px; text-align: center; }
body[data-page="catalog"] .kicker { justify-content: center; gap: 10px; }
body[data-page="catalog"] .kicker .pill { font-family: inherit; font-size: 10px; padding: 3px 7px; }
body[data-page="catalog"] .tool-name { font-family: inherit; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.055em; font-weight: 500; margin: 14px 0 12px; }
body[data-page="catalog"] .detail-head p { margin-inline: auto; max-width: 60ch; font-size: 13px; }
body[data-page="catalog"] .tool-view { justify-content: center; padding: 0 0 28px; border: 0; }
body[data-page="catalog"] .tool-view .choice span { border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 7px 12px; }
body[data-page="catalog"] .tool-view .choice input:checked + span { color: var(--ink); background: #233f3407; }
body[data-page="catalog"] .detail-body { padding: 0; }
body[data-page="catalog"] .tool-diagram { border: 0; background: transparent; padding: 8px 0 0; }
body[data-page="catalog"] .tool-diagram figcaption { font-weight: 400; color: var(--muted); font-size: 11px; }
body[data-page="catalog"] .tool-diagram figcaption span { display: none; }
body[data-page="catalog"] .tool-flow { gap: 18px; margin-top: 14px; }
body[data-page="catalog"] .flow-step { isolation: isolate; overflow: hidden; align-items: center; justify-content: center; text-align: center; min-height: 210px; padding: 30px 18px; border-radius: 18px; border-color: var(--line); background: var(--surface); gap: 12px; animation: card-arrive .55s cubic-bezier(.2,.8,.2,1) both; transition: transform .3s, box-shadow .3s; }
body[data-page="catalog"] .flow-step:nth-child(2) { animation-delay: .07s; }
body[data-page="catalog"] .flow-step:nth-child(3) { animation-delay: .14s; }
body[data-page="catalog"] .flow-step::after { content: none; }
body[data-page="catalog"] .flow-step strong { font-size: clamp(15px, 1.5vw, 20px); letter-spacing: -.025em; font-weight: 500; }
body[data-page="catalog"] .flow-step small { font-size: 11px; }
body[data-page="catalog"] .flow-step .card-orbit { opacity: .55; }
body[data-page="catalog"] .flow-step:nth-child(2) .card-orbit { animation-delay: -5s; }
body[data-page="catalog"] .flow-step:nth-child(3) .card-orbit { animation-delay: -10s; border-radius: 50%; }
body[data-page="catalog"] .flow-step:hover { transform: translateY(-4px); box-shadow: 0 12px 32px #233f3408; }
body[data-page="catalog"] .flow-context { text-align: center; font-size: 11px; margin-top: 18px; }
body[data-page="catalog"] .tool-overview-facts { justify-content: center; padding-top: 24px; font-size: 11px; }
body[data-page="catalog"] .compact-note { text-align: center; color: var(--muted); margin: 12px 0 28px; }
body[data-page="catalog"] .catalog-footer { margin-top: 22px; }
@media (max-width: 48rem) {
  body[data-page="catalog"] #content { padding: 20px; }
  body[data-page="catalog"] .flow-step { min-height: 140px; }
  body[data-page="catalog"] .tool-view { padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="catalog"] .flow-step { animation: none; transition: none; }
  body[data-page="catalog"] .flow-step:hover { transform: none; }
}

/* Optional third column holds catalogue context; the header stays quiet. */
body[data-page="catalog"] .sidebar .tool-row { min-height: 38px; padding: 8px 10px; }
.catalog-selection-toggle { display: inline-flex; align-items: center; gap: 14px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.catalog-selection-toggle span { font-size: 19px; line-height: 1; color: var(--muted); }
.catalog-selection-toggle[aria-expanded="true"] { background: var(--accent); }
.catalog-selection { position: fixed; top: var(--header-height); right: 0; bottom: 0; width: 260px; z-index: 7; overflow-y: auto; padding: 26px 22px; border-left: 1px solid var(--line); background: var(--paper); }
.catalog-selection[hidden] { display: none; }
.selection-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.selection-heading h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -.03em; }
.selection-heading button { border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; padding: 0 6px; }
.catalog-selection .choices { margin: 0 0 28px; }
.catalog-selection .choices legend { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.catalog-selection .choice-options { display: flex; flex-direction: column; gap: 5px; }
.catalog-selection .choice span { width: 100%; font-size: 12px; padding: 10px 12px; border-color: transparent; background: transparent; text-align: left; }
.catalog-selection .choice input:checked + span { background: var(--accent); border-color: transparent; color: var(--green); }
.selection-note { color: var(--muted); font-size: 12px; }
body[data-page="catalog"].catalog-selection-open main { margin-right: 260px; }
@media (min-width: 48rem) and (max-width: 80rem) {
  body[data-page="catalog"].catalog-selection-open .tool-flow { grid-template-columns: 1fr; }
  body[data-page="catalog"].catalog-selection-open .flow-step { min-height: 130px; }
}
@media (max-width: 48rem) {
  body[data-page="catalog"].catalog-selection-open main { margin-right: 0; }
  .catalog-selection { width: min(300px, 85vw); box-shadow: -16px 0 50px #233f3412; z-index: 9; }
}

/* A single stage demonstrates a tool on illustrative data. */
.tool-demo { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.demo-top, .demo-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; font-size: 11px; color: var(--muted); }
.demo-top > div { display: flex; gap: 12px; }
.demo-top button { border: 0; background: transparent; color: var(--green); padding: 4px; font: inherit; cursor: pointer; }
.demo-top button:disabled { color: var(--muted); cursor: default; }
.demo-scene { display: grid; place-items: center; min-height: 300px; padding: 24px clamp(16px, 4vw, 52px); background: radial-gradient(ellipse at 50% 55%, #e9f0e880, transparent 72%); }
.demo-window { width: 100%; max-width: 650px; min-width: 0; border: 1px solid #233f341c; border-radius: 10px; background: #fff; box-shadow: 0 12px 35px #233f3408; overflow: hidden; }
.demo-window-title { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.demo-dots { font-size: 7px; letter-spacing: 2px; color: #b7c3b9; }
.demo-window-state { margin-left: auto; font-size: 10px; white-space: nowrap; }
.demo-content { position: relative; min-height: 170px; padding: 20px 16px; overflow: hidden; }
.demo-before, .demo-after { transition: opacity .4s, transform .5s; }
.demo-after { position: absolute; inset: 20px 16px; opacity: 0; transform: translateY(10px); }
.demo-line { display: flex; align-items: baseline; gap: 16px; padding: 5px 7px; border-radius: 4px; font-size: 12px; line-height: 1.55; min-height: 28px; }
.demo-line > span { color: #a3ada5; font-size: 10px; flex-shrink: 0; }
.demo-line code { padding: 0; background: none; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-command { display: flex; align-items: baseline; gap: 10px; min-height: 50px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; background: #fafcf9; }
.demo-command code { background: none; padding: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.demo-cursor { height: 13px; width: 1px; flex-shrink: 0; background: var(--green); animation: demo-blink .8s steps(2) infinite; }
.demo-scan { opacity: 0; position: absolute; top: 0; bottom: 0; width: 25%; left: -30%; background: linear-gradient(90deg, transparent, #bdd5bd45, transparent); pointer-events: none; }
.tool-demo[data-step="1"] .demo-scan { opacity: 1; animation: demo-scan 1.6s ease-in-out infinite; }
.tool-demo[data-step="1"][data-kind="search"] .demo-before .demo-line:nth-child(even), .tool-demo[data-step="1"][data-kind="edit"] .demo-before .demo-line:nth-child(2) { background: #e9eee2; }
.tool-demo[data-step="2"] .demo-before { opacity: 0; transform: translateY(-10px); }
.tool-demo[data-step="2"] .demo-after { opacity: 1; transform: translateY(0); }
.tool-demo[data-step="2"] .demo-after .demo-line { background: #edf4eb; }
.tool-demo[data-step="2"] .demo-cursor { display: none; }
.tool-demo[data-kind="terminal"] .demo-line > span { display: none; }
.tool-demo[data-kind="delegate"] .demo-line { border-left: 2px solid #b9cbbd; margin-bottom: 5px; }
.demo-bottom { min-height: 60px; }
.demo-caption { margin: 0; font-size: 13px; color: var(--ink); }
.demo-step { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.demo-progress { height: 2px; background: #f0f3ee; }
.demo-progress span { display: block; height: 100%; width: 0; background: #87a38d; }
.demo-image { position: absolute; inset: 40px 50px 20px; display: flex; align-items: flex-end; gap: 15px; opacity: 0; transition: opacity .6s; }
.demo-image i { flex: 1; height: 25%; background: #adc5b1; border-radius: 4px 4px 0 0; }
.demo-image i:nth-child(2) { height: 45%; }.demo-image i:nth-child(3) { height: 35%; }.demo-image i:nth-child(4) { height: 70%; }.demo-image i:nth-child(5) { height: 90%; }
.tool-demo[data-step="2"] .demo-image { opacity: 1; }
.tool-demo[data-paused="true"] * { animation-play-state: paused !important; }
@keyframes demo-scan { to { left: 110%; } }
@keyframes demo-blink { 50% { opacity: 0; } }
@media (max-width: 48rem) {
  .demo-scene { padding: 16px 12px; }
  .demo-line { font-size: 11px; gap: 10px; }
  .demo-window-title { padding-inline: 10px; gap: 6px; }
  .demo-dots { display: none; }
  .demo-content { min-height: 210px; }
}
@media (prefers-reduced-motion: reduce) { .tool-demo * { animation: none !important; transition: none !important; } }
.demo-content { display: grid; }
.demo-before, .demo-after { grid-area: 1 / 1; min-width: 0; }
.demo-after { position: relative; inset: auto; }

/* Compact tool pages put the selected view directly beneath its title. */
body[data-page="catalog"] #content { padding: 22px 32px 32px; }
body[data-page="catalog"] .catalog-layout .detail-head { padding: 0 0 12px; text-align: left; }
body[data-page="catalog"] .tool-name { font-size: 26px; margin: 0; letter-spacing: -.035em; }
body[data-page="catalog"] .tool-view { justify-content: flex-start; padding: 0 0 16px; }
body[data-page="catalog"] .catalog-layout .detail-body { padding: 0; }
body[data-page="catalog"] .demo-scene { min-height: 240px; padding-block: 14px; }
body[data-page="catalog"] .tool-overview-facts { justify-content: flex-start; padding-top: 16px; }
body[data-page="catalog"] .compact-note { text-align: left; margin: 10px 0; }
.input-fields { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.input-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr); gap: 24px; padding: 18px 20px; }
.input-row + .input-row { border-top: 1px solid var(--line); }
.input-row p { margin: 0 0 5px; }
.input-type, .input-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.raw-schema { margin-top: 20px; }
.raw-schema summary { justify-content: flex-start; color: var(--muted); font-size: 12px; }
.raw-schema > summary::after, .raw-schema[open] > summary::after { content: none; }
.raw-schema > summary::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); }
.raw-schema[open] > summary::before { transform: rotate(45deg); }
.usage-heading { display: flex; align-items: baseline; gap: 14px; }
.usage-heading h2 { margin: 0; }
.usage-heading > span { color: var(--muted); font-size: 13px; }
.tool-run-cards { display: grid; gap: 12px; }
.tool-run-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tool-run-card header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; }
.tool-run-card header > div { min-width: 0; }
.tool-run-card header a { overflow-wrap: anywhere; font-size: 14px; }
.tool-run-card header small { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; }
.tool-run-card header > .pill, .tool-run-card header > .button { flex-shrink: 0; }
.tool-run-card summary { padding: 10px 20px; font-size: 12px; }
.tool-call-list { list-style: none; padding: 0; margin: 0; }
.tool-call-list li { display: flex; justify-content: space-between; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--line); }
.tool-call-list li > a { flex-shrink: 0; font-size: 12px; }
.argument-list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.argument-pair { display: inline-flex; align-items: baseline; gap: 8px; background: var(--subtle); padding: 5px 9px; border-radius: 5px; font-size: 12px; max-width: 100%; overflow-wrap: anywhere; }
.argument-pair > span { color: var(--muted); }
.argument-pair code { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 48rem) {
  body[data-page="catalog"] #content { padding: 18px 16px; }
  body[data-page="catalog"] .tool-name { font-size: 23px; }
  .input-row { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .tool-run-card header { padding: 16px; flex-wrap: wrap; gap: 10px; }
  .tool-call-list li { padding: 12px 16px; flex-direction: column; }
}

/* Manual scrubbing and report-shaped diagnostic examples. */
.demo-stages { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 16px 0; }
.demo-stages button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.demo-stages button small { font-size: 10px; opacity: .65; }
.demo-stages button[aria-pressed="true"] { background: var(--accent); color: var(--green); }
.demo-stages button:hover:not(:disabled) { border-color: var(--line); }
.demo-stages button:disabled { opacity: .3; cursor: default; }
.demo-stages button:focus-visible, .demo-top button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.demo-processing { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.tool-demo[data-kind="report"] .demo-content { padding: 24px; min-height: 280px; }
.tool-demo[data-kind="report"] .demo-before, .tool-demo[data-kind="report"] .demo-processing { display: flex; flex-direction: column; justify-content: center; }
.tool-demo[data-kind="report"] .demo-command { display: none; }
.tool-demo[data-kind="report"] .demo-dots { display: none; }
.tool-demo[data-kind="report"][data-step="1"] .demo-before { opacity: 0; }
.tool-demo[data-kind="report"][data-step="1"] .demo-processing { opacity: 1; transform: none; }
.tool-demo[data-kind="report"] .demo-scan { display: none; }
.dossier-identity { display: flex; align-items: center; gap: 14px; }
.dossier-identity > div { display: grid; gap: 3px; }
.dossier-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--green); font-size: 18px; }
.dossier-identity small, .dossier-identity div > span { color: var(--muted); font-size: 10px; }
.dossier-identity strong { font-size: 17px; font-weight: 500; letter-spacing: -.03em; }
.report-badge { margin-left: auto; border-radius: 20px; padding: 5px 8px; background: #f5eedf; color: #876421; font-size: 10px; }
.report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.report-metrics > div { display: flex; flex-direction: column; gap: 6px; }
.report-metrics small { font-size: 10px; color: var(--muted); }
.report-metrics strong { font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.report-alert { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px; background: #f8f4ea; border-radius: 7px; color: #79632d; font-size: 11px; }
.report-alert span { color: var(--ink); }
.report-timeline { display: grid; gap: 0; margin: 18px 0 0; }
.report-timeline > div { display: flex; gap: 18px; padding: 9px 0 9px 14px; border-left: 1px solid #b6c8bb; font-size: 11px; }
.report-timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.report-collect { display: grid; justify-items: center; gap: 22px; padding: 20px 0; text-align: center; }
.report-collect > span { color: var(--green); font-size: 18px; letter-spacing: -.03em; }
.report-collect > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.report-collect i { font-style: normal; font-size: 11px; padding: 8px 12px; background: var(--accent); border-radius: 6px; animation: collect-pulse 1.4s ease-in-out infinite alternate; }
.report-collect i:nth-child(2) { animation-delay: .2s; }.report-collect i:nth-child(3) { animation-delay: .4s; }.report-collect i:nth-child(4) { animation-delay: .6s; }
.report-collect strong { font-size: 12px; font-weight: 400; color: var(--muted); }
.report-title { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; letter-spacing: -.02em; }
.report-title > span { font-size: 10px; color: var(--muted); letter-spacing: 0; }
.report-chart { display: flex; height: 110px; align-items: flex-end; gap: 15px; margin: 20px 0; }
.report-chart > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.report-bar { width: 100%; max-width: 40px; background: #b1c8b6; border-radius: 4px 4px 0 0; transform-origin: bottom; transform: scaleY(.05); transition: transform .8s; }
.tool-demo[data-step="2"] .report-bar { transform: scaleY(1); }
.bar-0 { height: 35%; }.bar-1 { height: 51%; transition-delay: .05s; }.bar-2 { height: 43%; transition-delay: .1s; }.bar-3 { height: 70%; transition-delay: .15s; }.bar-4 { height: 58%; transition-delay: .2s; }.bar-5 { height: 78%; transition-delay: .25s; }.bar-6 { height: 88%; transition-delay: .3s; }
.report-chart small, .report-footnote { font-size: 10px; color: var(--muted); }
.report-sections { display: grid; gap: 18px; margin-top: 22px; }
.report-sections > div { display: grid; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.report-sections small { font-size: 10px; color: var(--muted); }
.report-sections strong { font-size: 13px; font-weight: 400; }
.report-table { display: grid; margin-top: 22px; font-size: 11px; }
.report-table > div { display: grid; grid-template-columns: 2fr 1fr 40px; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.report-table strong, .report-table b { font-weight: 500; }
@keyframes collect-pulse { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 48rem) {
  .tool-demo[data-kind="report"] .demo-content { padding: 16px; }
  .report-metrics { gap: 8px; }.report-metrics strong { font-size: 15px; }
  .dossier-identity { flex-wrap: wrap; }.report-badge { margin-left: 0; }
  .demo-stages { gap: 2px; }.demo-stages button { padding: 8px; }.demo-stages button small { display: none; }
}
.tool-demo[data-manual="true"] * { transition: none !important; }

/* Keep report input content balanced within the demonstration stage. */
.tool-demo[data-kind="report"] .demo-before { align-items: center; text-align: center; }
.tool-demo[data-kind="report"] .demo-before .dossier-identity { flex-direction: column; justify-content: center; gap: 12px; }
.tool-demo[data-kind="report"] .demo-before .dossier-identity > div { justify-items: center; gap: 6px; }
.tool-demo[data-kind="report"] .demo-before .report-title { justify-content: center; }
.tool-demo[data-kind="report"] .demo-before .report-sections { text-align: center; }

/* Dossier-specific choreography, drawn on one continuous canvas. */
.dossier-canvas { display: block; width: 100%; max-width: 780px; height: auto; margin: 0 auto; font-family: inherit; stroke: none; }
.dossier-canvas text { fill: var(--ink); }
.dossier-canvas .story-muted { fill: var(--muted); font-size: 11px; }
.story-sheet { fill: #fff; stroke: #dce5dc; stroke-width: 1; }
.story-divider, .story-timeline { fill: none; stroke: #dde5dd; }
.story-avatar-halo { fill: #eff4ec; }.story-avatar { fill: #e1ebdf; }
.dossier-canvas .story-avatar-letter { fill: #3d6650; font-size: 19px; }
.story-account-label { font-size: 19px; font-weight: 500; letter-spacing: -.5px; }
.story-source { fill: #fff; stroke: #dce5dc; }
.story-source-dot, [data-packet], .story-event-dot { fill: #75977c; }
.story-source-title { font-size: 12px; font-weight: 500; }
.story-check { fill: none; stroke: #6a9471; stroke-width: 1.5; }
[data-wire] { fill: none; stroke: #aec5b2; stroke-width: 1.2; stroke-dasharray: 3 5; }
.story-report-name { font-size: 18px; font-weight: 500; letter-spacing: -.5px; }
.story-alert-bg { fill: #f7f1e4; }.dossier-canvas .story-alert-label { fill: #876b31; font-size: 10px; }
.story-metric { font-size: 19px; font-weight: 500; }.story-small { font-size: 11px; }
.dossier-story .demo-caption { max-width: 65ch; }
@media (max-width: 38rem) { .dossier-story .demo-stages { flex-wrap: wrap; }.dossier-story .demo-bottom { padding: 14px; } }

/* Keep expanded source wording available without crowding the field summary. */
.copy-more { border: 0; margin-top: 4px; }
.copy-more > summary { min-height: 28px; padding: 4px 0; font-size: 12px; color: var(--green); }
.copy-more > p { max-width: 70ch; margin: 8px 0 0; font-size: 13px; line-height: 1.6; }

.recorded-tool-call { padding: 24px; margin: 20px 0; border: 1px solid var(--line, #e2e7e1); border-radius: 18px; background: #fff; }
.recorded-tool-call header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.recorded-tool-call small { color: var(--muted); }
.call-io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; }
.call-io h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 22px 0 10px; }
.call-io pre { margin: 0; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.recorded-tool-call details { margin-top: 18px; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 55rem) { .call-io { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.call-history { margin: 18px 0; }
.recorded-tool-call { padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--line, #e2e7e1); border-radius: 0; background: transparent; }
.recorded-tool-call > summary { display: flex; align-items: center; gap: 18px; padding: 14px 0; cursor: pointer; font-size: 13px; }
.recorded-tool-call .call-description { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.call-project { color: var(--muted); font-size: 12px; white-space: nowrap; }
.recorded-tool-call > summary small { font-size: 11px; white-space: nowrap; }
.recorded-tool-call[open] { padding-bottom: 18px; }
.recorded-tool-call[open] .call-description { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 55rem) { .recorded-tool-call > summary { flex-wrap: wrap; gap: 6px 14px; }.recorded-tool-call .call-description { flex-basis: 100%; } }

.input-purpose { max-width: 65ch; margin: -4px 0 20px; color: var(--muted); }
.input-purpose p { margin: 0; line-height: 1.6; }
.input-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.input-label + code { color: var(--muted); font-size: 12px; }
.raw-schema .schema-source { margin: 12px 0 0; font-size: 11px; }
.schema-source a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.schema-source a:hover { color: var(--ink); }

.tool-behavior { margin-top: 24px; }
.tool-behavior h3 { margin: 0 0 12px; font-size: 14px; }
.tool-behavior dl { margin: 0; }
.tool-behavior dl > div { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr); gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tool-behavior dt { color: var(--muted); }
.tool-behavior dd { margin: 0; line-height: 1.5; }
@media (max-width: 48rem) { .tool-behavior dl > div { grid-template-columns: 1fr; gap: 4px; } }

.definition-heading { margin: 0 0 28px; }
.definition-heading > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 10px 0; }
.definition-heading dt { color: var(--muted); font-size: 13px; }
.definition-heading dd { margin: 0; max-width: 70ch; font-size: 14px; line-height: 1.6; }
.parameters-title { font-size: 14px; font-weight: 500; margin: 0 0 12px; }
.definition-options dl { margin: 0 0 16px; }
.definition-options dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 8px 0; font-size: 13px; }
.definition-options dd { margin: 0; }
@media (max-width: 48rem) { .definition-heading > div { grid-template-columns: 1fr; gap: 4px; } }

/* One continuous surface for the complete tool definition. */
.definition-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.definition-card .definition-heading { margin: 0; }
.definition-card .definition-heading > div { padding: 20px 24px; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
.definition-card .definition-heading > div + div { border-top: 1px solid var(--line); }
.definition-parameters { padding: 20px 24px; border-top: 1px solid var(--line); }
.definition-card .parameters-title, .definition-card .definition-options h2 { color: var(--muted); font-size: 13px; font-weight: 400; margin: 0; }
.definition-card .input-fields { margin-top: 12px; border: 0; border-radius: 0; background: transparent; }
.definition-card .input-row { padding: 12px 0; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
.definition-card .input-row:last-child { padding-bottom: 0; }
.definition-card .input-row p { margin: 0; }
.definition-card .definition-options { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 20px 24px; border-top: 1px solid var(--line); }
.definition-card .definition-options dl { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
.definition-card .definition-options dl > div { display: flex; gap: 8px; padding: 0; }
.definition-card .definition-options dt { color: var(--muted); }
.definition-card > .raw-schema { margin: 0; padding: 0 24px; }
.definition-card > .raw-schema[open] { padding-bottom: 20px; }
@media (max-width: 48rem) {
  .definition-card .definition-heading > div, .definition-card .definition-options { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .definition-parameters { padding: 16px; }
  .definition-card .input-row { grid-template-columns: 1fr; gap: 6px; }
  .definition-card > .raw-schema { padding-inline: 16px; }
}

.definition-card .definition-parameters { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
.definition-card .parameter-content { min-width: 0; }
.definition-card .input-fields { margin-top: 0; }
.definition-card .input-row { grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); padding: 12px 0; }
.definition-card .input-row:first-child { padding-top: 0; }
.definition-card .definition-options dl { display: grid; gap: 14px; }
.definition-card .definition-options dl > div { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 24px; }
@media (max-width: 48rem) {
  .definition-card .definition-parameters { grid-template-columns: 1fr; gap: 14px; }
  .definition-card .input-row { grid-template-columns: 1fr; gap: 6px; }
}

.recorded-calls { padding: 0 20px 12px; }
.catalog-call { min-width: 0; border-top: 1px solid var(--line); }
.tool-run-card .catalog-call > summary { padding: 13px 0; gap: 12px; }
.catalog-call > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-call[open] > summary > span { white-space: normal; overflow-wrap: anywhere; }
.catalog-call > summary small { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.catalog-call-body { padding-bottom: 16px; }
.catalog-call-body .call-io h4 { margin-top: 4px; }
.call-io.input-only { grid-template-columns: minmax(0, 1fr); }
.call-source { display: inline-block; font-size: 11px; color: var(--muted); margin-top: 12px; }
.catalog-call > summary::after, .run-calls > summary::after { content: none; }
.catalog-call[open] > summary::after, .run-calls[open] > summary::after { content: none; }
.catalog-call > summary::before, .run-calls > summary::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(-45deg); }
.catalog-call[open] > summary::before, .run-calls[open] > summary::before { transform: rotate(45deg); }
.tool-run-card .run-calls > summary { justify-content: flex-start; }

.helper-context { margin: 4px 0 20px; }
.helper-context h4 { margin: 0 0 12px; font-size: 14px; }
.block-context { border-left: 2px solid var(--line); }
.block-excerpt { padding: 10px 16px; }
.block-excerpt small { color: var(--muted); font-size: 11px; }
.block-excerpt p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.block-excerpt.selected { background: var(--accent); box-shadow: -2px 0 var(--green); }
.helper-context > details > summary { justify-content: flex-start; font-size: 11px; color: var(--muted); }
