  :root { color-scheme:light; --ink:#1e293b; --muted:#64748b; --faint:#94a3b8; --line:#dfe5ec; --soft:#f6f8fa; --panel:#fff; --lime:#6c9f25; --lime-soft:#edf6df; --blue:#376fcb; --blue-soft:#eaf2ff; --amber:#b96918; --amber-soft:#fff4df; --violet:#7753b5; --violet-soft:#f2ecfb; --red:#b94040; --red-soft:#fff0f0; --drawer-width:380px; }
  * { box-sizing:border-box; }
  html, body { margin:0; min-width:320px; min-height:100%; font:14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color:var(--ink); background:#fff; }
  button, summary { font:inherit; }
  button:focus-visible, summary:focus-visible { outline:3px solid rgba(55,111,203,.25); outline-offset:2px; }
  /* The Drawer is an overlay that reserves space at wide viewports instead of
     a grid column, so opening it cannot reflow the lanes underneath it. */
  body { --drawer-inset:0px; }
  body.drawer-open { --drawer-inset:var(--drawer-width); }
  /* Session View is a fixed overlay with its own scroller. Without locking the
     root scroller, a wheel gesture near the overlay edge scrolls a Workbench the
     reviewer cannot see. Programmatic reveal still works, and the Workbench keeps
     its offset for when the overlay closes. */
  html:has(body.session-open) { overflow:hidden; }
  .visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .app { min-height:100vh; display:grid; grid-template-columns:270px minmax(0,1fr); margin-right:var(--drawer-inset); }
  .app.picker-collapsed { grid-template-columns:46px minmax(0,1fr); }
  .scope-picker { position:sticky; top:0; height:100vh; min-width:0; border-right:1px solid var(--line); background:#fafbfc; display:flex; flex-direction:column; z-index:2; }
  .brand { min-height:66px; position:relative; padding:16px 42px 14px 18px; border-bottom:1px solid var(--line); }
  .brand strong { display:block; font-size:18px; letter-spacing:-.025em; }
  .brand span { color:var(--muted); font-size:11px; }
  .picker-toggle { position:absolute; top:14px; right:9px; border:1px solid #d8dee6; border-radius:6px; padding:4px 6px; color:#556274; background:#fff; cursor:pointer; font-size:8px; font-weight:700; }
  .picker-toggle .expand-label { display:none; }
  .app.picker-collapsed .brand { min-height:100vh; padding:9px 5px; border-bottom:0; }
  .app.picker-collapsed .brand-copy, .app.picker-collapsed .mode-tabs, .app.picker-collapsed .picker-panel, .app.picker-collapsed .picker-footer { display:none; }
  .app.picker-collapsed .picker-toggle { position:sticky; top:9px; right:auto; width:34px; min-height:104px; margin:0 auto; writing-mode:vertical-rl; }
  .app.picker-collapsed .picker-toggle .collapse-label { display:none; }
  .app.picker-collapsed .picker-toggle .expand-label { display:inline; }
  .mode-tabs { margin:14px; padding:3px; display:grid; grid-template-columns:1fr 1fr; gap:3px; border:1px solid var(--line); border-radius:10px; background:#fff; }
  .mode-tabs button { border:0; border-radius:7px; padding:8px 7px; color:#596477; background:transparent; cursor:pointer; font-size:11px; }
  .mode-tabs button.active { color:#fff; background:#263244; font-weight:700; box-shadow:0 3px 8px rgba(15,23,42,.13); }
  .picker-panel { display:none; min-height:0; overflow:auto; padding:0 11px 18px; }
  .picker-panel.active { display:block; }
  .picker-heading { margin:4px 6px 10px; display:flex; justify-content:space-between; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
  .capability-tree, .tree-children { margin:0; padding:0; list-style:none; }
  .capability-tree { padding-bottom:4px; }
  .tree-item { position:relative; min-width:0; }
  .tree-line { min-width:0; display:grid; grid-template-columns:20px minmax(0,1fr); align-items:stretch; }
  .tree-children { position:relative; margin-left:10px; padding-left:10px; border-left:1px solid #d9e1e9; }
  .tree-children > .tree-item::before { content:""; position:absolute; top:22px; left:-10px; width:9px; border-top:1px solid #d9e1e9; }
  .tree-item.collapsed > .tree-children { display:none; }
  .tree-branch-toggle, .tree-branch-spacer { width:20px; min-height:42px; display:grid; place-items:center; align-self:stretch; }
  .tree-branch-toggle { padding:0; border:0; color:#6f7d8f; background:transparent; cursor:pointer; }
  .tree-branch-toggle span { display:block; font-size:13px; transition:transform .14s ease; }
  .tree-item.collapsed > .tree-line .tree-branch-toggle span { transform:rotate(-90deg); }
  .tree-row { width:100%; min-height:44px; position:relative; padding:6px 5px; display:grid; grid-template-columns:15px minmax(0,1fr) auto; gap:7px; align-items:start; border:0; border-radius:8px; color:#344155; background:transparent; text-align:left; cursor:pointer; }
  .tree-row:hover { background:#f0f3f7; }
  .tree-row.active { background:#eaf0f7; color:#172033; }
  .tree-item.feature > .tree-line { margin-top:3px; }
  .tree-row.feature .tree-copy strong { font-size:11px; font-weight:750; }
  .tree-row.story .tree-copy strong { font-weight:600; }
  .tree-check { width:14px; height:14px; margin-top:2px; display:grid; place-items:center; border:1.5px solid #a5b1c0; border-radius:4px; color:#fff; background:#fff; font-size:10px; font-weight:900; line-height:1; }
  .tree-check.complete { border-color:var(--lime); background:var(--lime); }
  .tree-check.todo { border-color:#91a0b2; background:#fff; }
  .tree-check.neutral { width:8px; height:8px; margin:5px 3px 0; border-radius:50%; background:#fff; }
  .tree-row.active .tree-check { border-color:var(--blue); box-shadow:0 0 0 2px rgba(55,111,203,.14); }
  .tree-copy { min-width:0; }
  .tree-copy strong, .tree-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tree-copy strong { font-size:11px; }
  .tree-copy small { margin-top:2px; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.05em; }
  .tree-row .evidence { margin-top:0; }
  .evidence { display:inline-flex; align-items:center; width:max-content; border-radius:999px; padding:2px 6px; font-size:8px; font-style:normal; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
  .evidence.declared, .evidence.explicit { color:#39700d; background:var(--lime-soft); }
  .evidence.observed, .evidence.observed-overlap { color:#2358a0; background:var(--blue-soft); }
  .evidence.file-context { color:#5b4693; background:var(--violet-soft); }
  .evidence.candidate { color:#8a4b10; background:var(--amber-soft); }
  .evidence.unmapped, .evidence.contextual, .evidence.commit-change { color:#5d6675; background:#eef1f4; }
  .date-grid { display:grid; gap:6px; }
  .date-cell { width:100%; padding:8px; display:grid; grid-template-columns:42px 1fr; align-items:center; gap:0 8px; border:1px solid transparent; border-radius:8px; color:var(--ink); background:transparent; text-align:left; cursor:pointer; }
  .date-cell:hover, .date-cell.active { background:#fff; border-color:var(--line); box-shadow:0 3px 10px rgba(15,23,42,.05); }
  .date-cell span { grid-row:1/3; display:flex; align-items:baseline; gap:5px; }
  .date-cell small { color:var(--muted); font-size:9px; text-transform:uppercase; }
  .date-cell strong { font-size:18px; }
  .date-cell em { color:var(--muted); font-size:10px; font-style:normal; }
  .picker-empty { margin:14px 8px; color:var(--muted); font-size:11px; }
  .picker-footer { margin-top:auto; padding:12px 16px 15px; border-top:1px solid var(--line); color:var(--muted); font-size:9px; }
  .workspace { min-width:0; }
  .workspace-header { min-height:42px; position:sticky; top:0; z-index:3; padding:5px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); background:#fff; }
  .workspace-breadcrumb { min-width:0; flex:1; display:flex; align-items:center; gap:7px; color:var(--muted); font-size:10px; }
  .workspace-breadcrumb span, .workspace-breadcrumb strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .workspace-breadcrumb i { color:#b1bac6; font-style:normal; }
  .workspace-breadcrumb strong { color:var(--ink); font-size:11px; }
  .workspace-header-meta, .scope-metrics, .metric { display:flex; align-items:center; }
  .workspace-header-meta { flex:none; gap:9px; }
  .scope-metrics { gap:0; }
  .metric { gap:3px; padding:0 7px; border-left:1px solid var(--line); white-space:nowrap; }
  .metric[hidden] { display:none; }
  .metric strong { color:var(--ink); font-size:11px; line-height:1; }
  .metric span { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.04em; }
  .metric-short { display:none; }
  .window-badge { border:1px solid var(--line); border-radius:999px; padding:4px 8px; color:var(--muted); background:#fff; font-size:9px; white-space:nowrap; }
  .workspace-scroll { padding:10px 12px 48px; overflow-x:auto; }
  .workbench-list { min-width:730px; display:grid; gap:14px; }
  .workbench { overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--panel); box-shadow:0 10px 28px rgba(15,23,42,.045); }
  .workbench-head { min-height:52px; padding:8px 12px; display:flex; justify-content:space-between; gap:14px; align-items:center; border-bottom:1px solid var(--line); background:#fbfcfd; }
  .workbench-head small { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
  .workbench-head h3 { margin:2px 0 0; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:13px; font-weight:700; }
  .workbench-head .meta { margin-top:2px; color:var(--muted); font-size:9px; }
  .head-actions { display:flex; align-items:center; gap:8px; }
  .workbench-object-select { min-width:0; max-width:100%; padding:0; border:0; color:inherit; background:transparent; text-align:left; cursor:pointer; }
  .prepare-button { min-height:30px; border:1px solid #cad6e6; border-radius:7px; padding:6px 9px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:10px; font-weight:700; }
  .card-collapse { width:26px; min-height:26px; border:1px solid #d8dee6; border-radius:6px; color:#536174; background:#fff; cursor:pointer; font-size:12px; line-height:1; }
  .workbench.card-collapsed .workbench-grid { display:none; }
  .scope-index { display:flex; }
  .scope-index[hidden] { display:none; }
  .scope-index select { max-width:200px; border:1px solid var(--line); border-radius:7px; padding:3px 6px; color:#3f4a58; background:#fff; font-size:9px; }
  .lane-more { width:100%; margin-top:4px; border:1px dashed #cad6e6; border-radius:7px; padding:7px 9px; color:#244f86; background:#f8fbff; cursor:pointer; font-size:9px; font-weight:700; }
  .workbench-grid { min-width:730px; display:grid; grid-template-columns:minmax(180px,var(--prompt-width,28%)) 5px minmax(300px,1fr) 5px minmax(240px,var(--delivery-width,31%)); }
  .lane { min-width:0; padding:13px; border-right:1px solid var(--line); }
  .lane:last-child { border-right:0; }
  .lane-empty .empty-state { padding:0; border:0; background:transparent; text-align:left; font-size:10px; }
  .prompt-lane { grid-column:1; }
  .activity-lane { grid-column:3; }
  .delivery-lane { grid-column:5; }
  .lane-resizer { position:relative; z-index:1; width:5px; cursor:col-resize; background:#f7f9fb; touch-action:none; }
  .lane-resizer::after { content:""; position:absolute; inset:0 1px; background:#dfe5ec; transition:background .12s ease; }
  .lane-resizer:hover::after, .lane-resizer.resizing::after { background:#7da0cf; }
  .lane-resizer.prompt { grid-column:2; }
  .lane-resizer.delivery { grid-column:4; }
  .lane-title { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:11px; }
  .lane-title strong { font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
  .lane-title span { color:var(--muted); font-size:9px; }
  .intent-card { width:100%; margin-bottom:8px; padding:9px 10px; border:1px solid #e3e8ee; border-left:3px solid #8aa7cb; border-radius:7px; color:inherit; background:#fbfcfe; text-align:left; cursor:pointer; }
  .intent-card p { margin:0; font-size:11px; line-height:1.5; }
  .intent-card small { display:block; margin-top:5px; color:var(--muted); font-size:8px; }
  .intent-card.declared-intent { border-left-color:var(--lime); background:#fbfdf8; }
  .activity-summary { padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--soft); }
  .activity-total { display:flex; justify-content:space-between; align-items:baseline; }
  .activity-total strong { font-size:20px; }
  .activity-total span { color:var(--muted); font-size:9px; }
  .family-bars { margin-top:9px; display:grid; gap:5px; }
  .family-row { display:grid; grid-template-columns:105px minmax(0,1fr) 30px; gap:7px; align-items:center; color:var(--muted); font-size:9px; }
  .family-row > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .family-track { height:5px; overflow:hidden; border-radius:999px; background:#e2e7ed; }
  .family-fill { height:100%; min-width:2px; border-radius:999px; background:var(--violet); }
  .activity-details { margin-top:9px; border-top:1px solid var(--line); }
  .commit-bridge { margin:9px 0 0; padding:8px 9px; border-left:3px solid var(--amber); color:#714317; background:var(--amber-soft); font-size:9px; line-height:1.5; }
  .commit-bridge.linked { border-left-color:#16805b; color:#155f48; background:#edf8f3; }
  .activity-details > summary { min-height:34px; padding:8px 2px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; color:#35445a; font-size:10px; font-weight:700; }
  .activity-details > summary small { color:var(--muted); font-size:8px; font-weight:500; }
  .activity-actions { display:flex; flex-wrap:wrap; gap:7px; padding:2px 2px 9px; }
  .activity-action { min-height:28px; border:1px solid #cad6e6; border-radius:7px; padding:5px 9px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:9px; font-weight:700; }
  .activity-action:hover { background:#eaf2ff; }
  .activity-action.primary { color:#fff; border-color:#2f5fa8; background:#376fcb; }
  .activity-action.primary:hover { background:#2f5fa8; }
  .trace-target { min-width:0; border-top:1px solid var(--line); }
  .chart-card { min-width:0; color:#526072; }
  .chart-toolbar { padding:7px 2px 5px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:9px; }
  .chart-basis { border-radius:5px; padding:2px 6px; color:#2358a0; background:var(--blue-soft); font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
  .chart-basis.fallback { color:#8a4b10; background:var(--amber-soft); }
  .chart-range { color:var(--muted); font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .chart-reset { margin-left:auto; border:1px solid #cad6e6; border-radius:6px; padding:3px 7px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:9px; font-weight:700; }
  .chart-reset[disabled] { border-color:var(--line); color:var(--faint); background:#fbfcfd; cursor:default; }
  /* The chart is laid out to the container width, so nothing is parked off
     screen behind a nested horizontal scrollbar. */
  .activity-chart { display:block; width:100%; max-width:100%; touch-action:none; }
  .chart-row-alt { fill:#f4f6f8; }
  .chart-lane-line { stroke:#dde3ea; }
  .chart-grid-line { stroke:#edf0f4; }
  .chart-axis-line { stroke:#cfd7e1; }
  .chart-lane-label { fill:#526072; font-size:10px; font-weight:700; }
  .chart-tick, .chart-axis-label { fill:#8a96a6; font-size:9px; }
  .chart-axis-label { font-weight:700; }
  .chart-ribbon-base { fill:#e9edf3; }
  .chart-ribbon-block { cursor:pointer; }
  .chart-ribbon-block:hover, .chart-ribbon-block:focus { outline:none; stroke:#163f77; stroke-width:2; }
  .chart-ribbon-label { fill:#41506a; }
  .chart-gap rect { fill:rgba(148,163,184,.13); }
  .chart-gap-label { fill:#8a96a6; font-size:8px; font-style:italic; }
  .chart-gap.compressed rect { fill:rgba(148,163,184,.22); stroke:#aeb8c5; stroke-width:1; stroke-dasharray:2 2; }
  .chart-gap.compressed .chart-gap-label { fill:#687587; font-size:7px; font-weight:800; }
  .chart-gap-break { fill:none; stroke:#7f8b9b; stroke-width:1.4; }
  .chart-lane, .chart-gap, .chart-grid-line, .chart-tick, .chart-axis-line, .chart-axis-label { pointer-events:none; }
  .chart-bin, .chart-mark, .chart-commit { cursor:pointer; }
  .chart-bin:hover, .chart-bin:focus, .chart-mark:hover, .chart-mark:focus, .chart-commit:hover, .chart-commit:focus { outline:none; }
  .chart-bin:hover, .chart-bin:focus, .chart-mark:hover, .chart-mark:focus { stroke:#163f77; stroke-width:2; }
  .chart-commit-line { stroke:#16805b; stroke-width:1; stroke-dasharray:3 2; opacity:.65; pointer-events:none; }
  .chart-commit-marker { fill:#16805b; stroke:#fff; stroke-width:1.5; }
  .chart-commit:hover, .chart-commit:focus { stroke:#163f77; stroke-width:2.5; }
  .chart-surface { fill:transparent; cursor:crosshair; }
  .chart-brush { fill:rgba(55,111,203,.16); stroke:#376fcb; stroke-width:1; pointer-events:none; }
  .chart-inspector { min-height:36px; margin-top:4px; padding:7px 9px; display:grid; gap:2px; border:1px solid #e6ebf0; border-radius:7px; background:var(--soft); font-size:9px; }
  .chart-inspector strong { overflow:hidden; color:#2d3b4f; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
  .chart-inspector span { color:var(--muted); }
  .chart-legend { padding:7px 2px; display:flex; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:8px; }
  .chart-legend span { display:inline-flex; align-items:center; gap:5px; }
  .chart-warning { color:#8a4b10; }
  .legend-dot { width:8px; height:8px; display:inline-block; border-radius:2px; background:var(--blue); }
  .legend-dot.failed { background:var(--red); }
  .legend-dot.gap { background:rgba(148,163,184,.45); }
  .legend-dot.between { background:#e9edf3; box-shadow:inset 0 0 0 1px #cbd3de; }
  .legend-dot.commit { border-radius:1px; background:#16805b; transform:rotate(45deg); }
  .chart-empty { padding:18px; color:var(--muted); text-align:center; font-size:9px; }
  .commit-card { margin-bottom:8px; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
  .commit-head { width:100%; padding:8px 9px; border:0; color:inherit; background:#fbfcfd; text-align:left; cursor:pointer; }
  .commit-head-line { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .commit-id { display:inline-flex; align-items:center; gap:5px; }
  .commit-head code { color:#305886; font:700 10px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .commit-head p { margin:3px 0 0; font-size:10px; line-height:1.4; }
  .commit-stats { margin-top:4px; color:var(--muted); font-size:8px; }
  .commit-card-compact { background:#fbfcfd; }
  .commit-card > summary { list-style:none; }
  .commit-card > summary::-webkit-details-marker { display:none; }
  .commit-card-compact .commit-head { padding:5px 8px; }
  .commit-card-compact .commit-head-line.compact { min-height:22px; display:grid; grid-template-columns:10px auto minmax(72px,1fr) auto auto; gap:6px; }
  .commit-chevron { color:#7b8797; font-size:15px; line-height:1; transition:transform .12s ease; }
  .commit-card[open] .commit-chevron { transform:rotate(90deg); }
  .commit-subject { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
  .commit-card-compact .commit-stats { margin:0; white-space:nowrap; }
  .commit-card-compact .file-tree .empty-state { padding:12px; border-radius:6px; font-size:9px; }
  .file-tree { padding:6px 8px 7px; border-top:1px solid var(--line); }
  .folder { margin:4px 0 2px; color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
  .file-row { width:100%; min-height:25px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; align-items:center; padding:3px 2px 3px 8px; border:0; border-left:1px solid #d9e0e7; color:inherit; background:transparent; text-align:left; cursor:pointer; }
  .file-row code { overflow:hidden; color:#35445a; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; text-overflow:ellipsis; white-space:nowrap; }
  .file-row .delta { color:var(--muted); font-size:8px; }
  .delivery-title-copy { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; flex:1; }
  .delivery-toggle { min-width:32px; border:1px solid #d8dee6; border-radius:6px; padding:4px 6px; color:#536174; background:#fff; cursor:pointer; font-size:8px; font-weight:700; }
  .delivery-toggle .closed-label { display:none; }
  .workbench.delivery-collapsed .workbench-grid { grid-template-columns:minmax(180px,var(--prompt-width,26%)) 5px minmax(480px,1fr) 0 46px; }
  .workbench.delivery-collapsed .lane-resizer.delivery { display:none; }
  .workbench.delivery-collapsed .delivery-lane { padding:8px 5px; }
  .workbench.delivery-collapsed .delivery-content, .workbench.delivery-collapsed .delivery-title-copy, .workbench.delivery-collapsed .delivery-lane.lane-empty .lane-title, .workbench.delivery-collapsed .delivery-lane.lane-empty .empty-state { display:none; }
  .workbench.delivery-collapsed .delivery-toggle { width:34px; min-height:92px; margin:0 auto; padding:7px 4px; writing-mode:vertical-rl; text-orientation:mixed; }
  .workbench.delivery-collapsed .delivery-toggle .open-label { display:none; }
  .workbench.delivery-collapsed .delivery-toggle .closed-label { display:inline; }
  .workbench.activity-expanded .activity-lane { background:#fcfdff; }
  .empty-state { padding:28px; border:1px dashed #cfd7e1; border-radius:10px; color:var(--muted); background:#fbfcfd; text-align:center; font-size:11px; }
  /* Emphasis is additive: the selected and related objects gain weight and
     nothing else is dimmed, so a trace stays readable while it is explained. */
  [data-selectable] { transition:box-shadow .14s ease, background-color .14s ease; }
  body.has-evidence-selection [data-selectable].selection-related { background-color:rgba(55,111,203,.055); box-shadow:inset 3px 0 0 rgba(55,111,203,.5); }
  body.has-evidence-selection [data-selectable].selection-selected { background-color:rgba(55,111,203,.08); box-shadow:0 0 0 2px rgba(55,111,203,.75), 0 5px 16px rgba(55,111,203,.16); }
  .chart-mark.selection-related { stroke:#2b5fa8; stroke-width:2; }
  .chart-mark.selection-selected { stroke:#163f77; stroke-width:3; }
  .chart-commit.selection-related { stroke:#2b5fa8; stroke-width:2.5; }
  .chart-commit.selection-selected { stroke:#163f77; stroke-width:3; }
  .evidence-drawer { position:fixed; top:0; right:0; width:min(var(--drawer-width),100%); height:100vh; z-index:40; display:flex; flex-direction:column; border-left:1px solid var(--line); background:#fff; box-shadow:-12px 0 32px rgba(15,23,42,.12); }
  .evidence-drawer[hidden] { display:none; }
  .evidence-drawer-head { min-height:78px; padding:15px 15px 13px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
  .evidence-drawer-head small { color:var(--blue); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }
  .evidence-drawer-head h2 { margin:3px 0 0; font-size:17px; letter-spacing:-.02em; }
  .evidence-drawer-close { border:1px solid var(--line); border-radius:7px; padding:5px 8px; color:#526072; background:#fff; cursor:pointer; font-size:9px; }
  .evidence-drawer-body { min-height:0; flex:1; overflow:auto; padding:14px 15px 18px; }
  .evidence-overview { padding:11px; border:1px solid var(--line); border-radius:10px; background:var(--soft); }
  .evidence-overview code { display:block; overflow:hidden; margin-top:5px; color:#365b88; text-overflow:ellipsis; white-space:nowrap; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .evidence-section { margin-top:18px; }
  .evidence-section h3 { margin:0 0 8px; color:#596579; font-size:9px; text-transform:uppercase; letter-spacing:.09em; }
  .evidence-section ul { margin:0; padding-left:18px; color:#4f5b6b; font-size:10px; line-height:1.55; }
  .evidence-path { display:grid; gap:5px; }
  .evidence-path-row { display:grid; grid-template-columns:12px minmax(0,1fr); gap:7px; align-items:start; color:#344155; font-size:10px; }
  .evidence-path-row::before { content:""; width:7px; height:7px; margin-top:4px; border:2px solid #fff; border-radius:50%; background:var(--blue); box-shadow:0 0 0 1px #aebdce; }
  .evidence-path-row.edge { color:var(--muted); font-size:9px; font-weight:700; }
  .evidence-path-row.edge::before { width:1px; height:15px; margin:0 0 0 3px; border:0; border-radius:0; background:#cbd5e1; box-shadow:none; }
  .evidence-related-list { display:grid; gap:12px; }
  /* Grouping with a per-type cap keeps Turns and Tool Calls reachable on a
     commit-heavy Session instead of losing them to one flat top-ten list. */
  .evidence-related-group { display:grid; gap:5px; }
  .evidence-related-group h4 { margin:0; display:flex; align-items:center; justify-content:space-between; gap:8px; color:#596579; font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
  .evidence-related-group h4 em { color:var(--muted); font-size:9px; font-style:normal; letter-spacing:0; }
  .evidence-related { width:100%; padding:7px 8px; display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid var(--line); border-radius:7px; color:#3e4a5a; background:#fff; text-align:left; cursor:pointer; font-size:9px; }
  .evidence-related span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .evidence-related-more { color:var(--muted); font-size:8px; }
  .evidence-limitations { padding:9px 10px; border-left:3px solid var(--amber); color:#714317; background:var(--amber-soft); font-size:10px; line-height:1.5; }
  .evidence-source { color:var(--muted); font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .evidence-drawer-actions { padding:11px 15px; display:flex; gap:8px; border-top:1px solid var(--line); background:#fbfcfd; }
  .evidence-drawer-actions button { min-height:32px; flex:1; border:1px solid #cad6e6; border-radius:7px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:9px; font-weight:700; }
  .evidence-copy-status { margin-top:7px; color:#39700d; font-size:9px; }
  .modal-backdrop { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:20px; background:rgba(15,23,42,.44); }
  .modal-backdrop[hidden] { display:none; }
  .continuation-modal { width:min(680px,100%); max-height:min(720px,90vh); overflow:auto; border-radius:12px; background:#fff; box-shadow:0 24px 80px rgba(15,23,42,.3); }
  .modal-head { padding:14px 16px; display:flex; justify-content:space-between; gap:12px; align-items:center; border-bottom:1px solid var(--line); }
  .modal-head h2 { margin:0; font-size:15px; }
  .modal-close { border:1px solid var(--line); border-radius:6px; padding:5px 8px; background:#fff; cursor:pointer; }
  .modal-body { padding:15px 16px 17px; }
  .modal-note { padding:9px 10px; border-left:3px solid var(--amber); color:#714317; background:var(--amber-soft); font-size:10px; }
  .context-block { margin:12px 0 0; padding:11px; overflow:auto; border:1px solid var(--line); border-radius:8px; color:#334155; background:#f8fafc; white-space:pre-wrap; font:10px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
  .session-view { position:fixed; inset:0 var(--drawer-inset) 0 0; z-index:20; overflow:auto; overscroll-behavior:contain; color:#20242b; background:#fff; }
  .session-view[hidden] { display:none; }
  .session-nav { min-height:46px; position:sticky; top:0; z-index:2; padding:8px 18px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid #e4e7eb; background:rgba(255,255,255,.97); backdrop-filter:blur(10px); }
  .session-crumbs { min-width:0; display:flex; align-items:center; gap:8px; color:#747b85; font-size:11px; }
  .session-crumbs strong { overflow:hidden; color:#252a31; text-overflow:ellipsis; white-space:nowrap; }
  .session-close, .session-context-button { border:1px solid #d7dce2; border-radius:7px; padding:6px 9px; color:#374151; background:#fff; cursor:pointer; font-size:10px; font-weight:700; }
  .session-shell { width:min(1440px,100%); margin:0 auto; padding:12px 18px 36px; }
  .session-titlebar { min-height:42px; margin-bottom:8px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
  .session-titlebar h2 { margin:0; font-size:18px; letter-spacing:-.02em; }
  .session-meta { margin-top:3px; display:flex; flex-wrap:wrap; gap:4px 9px; align-items:center; color:#747b85; font-size:9px; }
  .session-platform { border-radius:6px; padding:3px 6px; color:#9a4f0e; background:#fff0d9; font:700 9px ui-monospace,SFMono-Regular,Menlo,monospace; text-transform:uppercase; }
  .session-axis-panel { position:sticky; top:46px; z-index:3; margin:0 0 10px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; }
  .session-axis-panel > summary { min-height:28px; padding:5px 9px; display:flex; align-items:baseline; justify-content:space-between; gap:10px; list-style:none; cursor:pointer; color:#4a5565; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
  .session-axis-panel > summary::-webkit-details-marker { display:none; }
  .session-axis-panel > summary small { color:#8a929d; font-weight:600; text-transform:none; letter-spacing:0; }
  .session-axis-panel > summary em { margin-left:5px; color:#8a929d; font-size:8px; font-style:normal; font-weight:600; text-transform:none; letter-spacing:0; }
  .session-axis-panel > summary::after { content:"⌄"; margin-left:6px; color:#7b8490; transition:transform .12s ease; }
  .session-axis-panel[open] > summary::after { transform:rotate(180deg); }
  .session-axis { padding:0 8px 4px; }
  .session-axis .chart-inspector { display:none; }
  .session-axis .chart-card { overflow:visible; }
  .chart-compact .chart-toolbar { padding:3px 1px 1px; font-size:8px; }
  .chart-compact .chart-legend { display:none; }
  .chart-compact .chart-lane-label { font-size:8px; }
  .chart-compact .chart-tick, .chart-compact .chart-axis-label { font-size:8px; }
  .session-layout { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:12px; align-items:start; }
  .session-timeline { display:grid; gap:9px; }
  .session-turn { display:grid; gap:0; overflow:hidden; border:1px solid #dfe3e8; border-radius:8px; background:#fff; }
  .session-turn-head { min-height:28px; padding:5px 9px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid #edf0f3; color:#7a8492; background:#fbfcfe; font-size:8px; text-transform:uppercase; letter-spacing:.06em; }
  .session-turn-head strong { color:#4a5565; }
  .session-event { position:relative; border:0; border-bottom:1px solid #edf0f3; border-radius:0; background:#fff; box-shadow:none; }
  .session-turn > .session-event:last-child { border-bottom:0; }
  button.session-event { width:100%; padding:0; color:inherit; text-align:left; cursor:pointer; }
  .session-event::before { display:none; }
  .session-event-head { min-height:31px; padding:6px 9px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid #edf0f3; }
  .session-event-head strong { font-size:10px; }
  .session-event-head span { color:#858e9a; font-size:8px; }
  .session-event-body { padding:7px 9px; font-size:11px; line-height:1.45; }
  .session-event-body p { margin:0; }
  .session-event.prompt, .session-event.response { display:grid; grid-template-columns:104px minmax(0,1fr) 72px; align-items:start; }
  .session-event.prompt .session-event-head, .session-event.response .session-event-head { display:contents; }
  .session-event.prompt .session-event-head strong, .session-event.response .session-event-head strong { grid-column:1; grid-row:1; min-height:100%; padding:8px 9px; background:#fbfcfe; }
  .session-event.prompt .session-event-head span, .session-event.response .session-event-head span { grid-column:3; grid-row:1; padding:8px 9px 8px 0; text-align:right; }
  .session-event.prompt .session-event-body, .session-event.response .session-event-body { grid-column:2; grid-row:1; min-width:0; }
  .session-event.intermediate { padding:7px 9px; display:grid; grid-template-columns:96px minmax(0,1fr); gap:8px; background:#fffdf9; }
  .session-event.intermediate .session-note-label { margin:0; color:#9a651d; font-size:8px; font-weight:700; }
  .session-event.intermediate p { margin:0; font-size:10px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
  .session-prose p { white-space:pre-wrap; overflow-wrap:anywhere; }
  .session-warning { border-radius:5px; padding:2px 5px; color:#9a4f0e; background:#fff0d9; font-weight:700; }
  .session-unavailable { border-style:dashed; color:#727b87; background:#fafbfc; }
  /* No nested scroll box: overflow rows are revealed in place so the page keeps
     one scrollbar and the wheel is never captured mid-trace. */
  .session-call-list { display:grid; }
  .session-call-more { margin:6px 10px 9px; border:1px solid #cad6e6; border-radius:7px; padding:6px 9px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:9px; font-weight:700; }
  details.session-event.tools > summary { cursor:pointer; list-style:none; }
  details.session-event.tools > summary::-webkit-details-marker { display:none; }
  details.session-event.tools > summary::after { content:"⌄"; margin-left:3px; color:#7b8490; transition:transform .12s ease; }
  details.session-event.tools[open] > summary::after { transform:rotate(180deg); }
  .session-tool-row, .session-tool-run > summary { width:100%; min-height:32px; padding:4px 9px; display:grid; grid-template-columns:58px minmax(120px,1fr) 86px; gap:3px 7px; align-items:center; border:0; border-top:1px solid #edf0f3; color:inherit; background:#fff; text-align:left; cursor:pointer; font-size:8px; }
  .session-tool-run > summary { list-style:none; background:#fbfcfe; }
  .session-tool-run > summary::-webkit-details-marker { display:none; }
  .session-tool-run[open] > summary { border-bottom:1px solid #edf0f3; }
  .session-tool-run .session-tool-row { padding-left:22px; background:#fff; }
  .session-tool-id { color:#8a94a2; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .session-tool-row code, .session-tool-run > summary code { overflow:hidden; color:#344155; text-overflow:ellipsis; white-space:nowrap; }
  .session-tool-copy { min-width:0; display:flex; align-items:baseline; gap:7px; }
  .session-tool-copy strong { color:#344155; font-size:10px; }
  .session-tool-copy code { color:#8a94a2; font-size:8px; }
  .session-tool-failed { border-radius:4px; padding:1px 4px; color:#8f2f2f; background:var(--red-soft); font-size:8px; font-style:normal; font-weight:700; }
  /* An absolute clock stamp is what makes otherwise identical redacted rows
     distinguishable from one another. */
  .session-tool-time { display:flex; flex-direction:column; align-items:flex-end; gap:1px; }
  .session-tool-time code { color:#5c6675; font-size:9px; }
  .session-tool-time small { color:#8a94a2; font-size:8px; }
  .session-tool-detail, .session-tool-file { grid-column:2/4; }
  .session-tool-detail { color:#596579; white-space:normal; overflow-wrap:anywhere; }
  .session-tool-file { color:#376fcb; }
  .session-outside .session-outside-note { margin:0 0 8px; padding:9px 10px; border-left:3px solid var(--amber); color:#714317; background:var(--amber-soft); font-size:10px; line-height:1.5; }
  .session-bulk { margin-top:8px; display:flex; gap:6px; }
  .session-bulk button { flex:1; border:1px solid #d8dde3; border-radius:7px; padding:5px 6px; color:#3f4a58; background:#fff; cursor:pointer; font-size:9px; }
  .session-sidebar { position:sticky; top:56px; overflow:hidden; display:grid; gap:0; border:1px solid #dfe3e8; border-radius:8px; background:#fff; }
  .session-sidebar section { padding:9px 10px; border-bottom:1px solid #edf0f3; }
  .session-sidebar section:last-child { border-bottom:0; }
  .session-sidebar h3 { margin:0 0 7px; font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
  .jump-select { width:100%; border:1px solid #d8dde3; border-radius:6px; padding:6px 7px; color:#384252; background:#fff; font-size:9px; }
  .session-filter-list { display:grid; gap:5px; }
  .session-filter { display:grid; grid-template-columns:15px minmax(0,1fr) auto; gap:6px; align-items:center; color:#3f4752; font-size:9px; }
  .session-filter.subtype { margin-left:22px; color:#747d89; font-size:9px; }
  .session-filter input { width:14px; height:14px; margin:0; accent-color:#3f4a58; }
  .session-filter em { color:#9199a4; font-style:normal; }
  .session-hidden { display:none !important; }
  .session-turn-head .turn-select { padding:2px 5px; border:1px solid transparent; border-radius:5px; color:#4a5565; background:transparent; cursor:pointer; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
  .session-file-list { display:grid; gap:5px; padding:9px 11px; }
  .session-file-list button { padding:5px 7px; overflow:hidden; border:1px solid #e3e8ee; border-radius:6px; color:#376fcb; background:#fbfcfe; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .session-mode-tabs { width:max-content; margin:0 0 8px; padding:2px; display:flex; gap:2px; border:1px solid #dfe3e8; border-radius:7px; background:#f5f7fa; }
  .session-mode-tabs button { min-width:64px; min-height:26px; border:0; border-radius:5px; color:#687383; background:transparent; cursor:pointer; font-size:9px; font-weight:800; }
  .session-mode-tabs button[aria-selected="true"] { color:#fff; background:#263244; box-shadow:0 3px 8px rgba(15,23,42,.16); }
  .session-mode-tabs button:focus-visible, .replay-index-tabs button:focus-visible, .replay-event-list button:focus-visible, .replay-file-list button:focus-visible, .replay-controls button:focus-visible, .replay-stage-files button:focus-visible, .replay-explain:focus-visible, .replay-rail-mark:focus-visible { outline:2px solid #376fcb; outline-offset:2px; }
  .session-mode-panel[hidden] { display:none; }
  .replay-shell { min-width:0; }
  .replay-boundary { margin-bottom:14px; padding:10px 12px; display:flex; align-items:baseline; gap:10px 16px; border:1px solid #dbe6f5; border-left:3px solid #376fcb; border-radius:8px; color:#526072; background:#f7faff; font-size:10px; line-height:1.5; }
  .replay-boundary strong { flex:none; color:#244f86; }
  /* The index column tracks the real layout width instead of the viewport, so a
     narrow window or an open Drawer narrows the column rather than stacking it
     under the stage where the sticky transport would cover it. */
  .replay-layout { display:grid; grid-template-columns:minmax(0,1fr) clamp(220px,26%,320px); align-items:start; gap:16px; }
  .replay-stage { min-width:0; display:grid; align-content:stretch; }
  .replay-event-card { min-height:280px; overflow:hidden; display:flex; flex-direction:column; border:1px solid #dfe3e8; border-top:3px solid #7a8797; border-radius:12px; background:#fff; box-shadow:0 10px 28px rgba(15,23,42,.07); }
  .replay-event-card.prompt { border-top-color:#4f73b6; }
  .replay-event-card.intermediate { border-top-color:#b27627; }
  .replay-event-card.response { border-top-color:#258675; }
  .replay-event-card.tool-call { border-top-color:#7658b5; }
  .replay-event-card.commit { border-top-color:#6c9f25; }
  .replay-event-card > header { min-height:70px; padding:15px 17px 12px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid #edf0f3; }
  .replay-event-card > header small { color:#687383; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
  .replay-event-card > header h3 { margin:4px 0 0; color:#252a31; font-size:17px; letter-spacing:-.015em; overflow-wrap:anywhere; }
  .replay-event-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
  .replay-status, .replay-availability, .replay-excerpt { border-radius:5px; padding:3px 6px; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
  .replay-status.failed { color:#8f2f2f; background:var(--red-soft); }
  .replay-availability { color:#714317; background:var(--amber-soft); }
  .replay-excerpt { color:#5a6675; background:#eef1f4; }
  .replay-event-meta { min-height:34px; padding:8px 17px; display:flex; flex-wrap:wrap; align-items:center; gap:7px 12px; color:#7a8492; background:#fbfcfd; font-size:9px; }
  .replay-event-meta code { color:#596579; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-event-body { flex:1; padding:18px 17px; overflow:auto; color:#344155; font-size:12px; line-height:1.65; }
  .replay-event-body p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
  .replay-stage-files { padding:0 17px 16px; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  .replay-stage-files strong { margin-right:2px; color:#687383; font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
  .replay-stage-files button { max-width:100%; padding:4px 7px; overflow:hidden; border:1px solid #dbe6f5; border-radius:6px; color:#376fcb; background:#f7faff; cursor:pointer; text-overflow:ellipsis; white-space:nowrap; }
  .replay-stage-files code { font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-event-card > footer { min-height:48px; padding:9px 17px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid #edf0f3; color:#7a8492; background:#fbfcfd; font-size:9px; }
  .replay-explain { border:1px solid #cad6e6; border-radius:7px; padding:6px 9px; color:#244f86; background:#f5f9ff; cursor:pointer; font-size:9px; font-weight:800; }
  /* The index keeps its own readable height instead of stretching to match the
     stage, so a short evidence body cannot shrink the event list. */
  .replay-index { min-width:0; height:430px; overflow:hidden; display:flex; flex-direction:column; border:1px solid #dfe3e8; border-radius:10px; background:#fff; }
  /* Underline tabs, unlike the pill mode tabs, so panel switching does not read
     as a second Trace/Replay control. */
  .replay-index-tabs { padding:0 6px; display:grid; grid-template-columns:1fr 1fr; gap:0; border-bottom:1px solid #e6e9ed; background:#fff; }
  .replay-index-tabs button { min-height:34px; border:0; border-bottom:2px solid transparent; border-radius:0; color:#7a8492; background:transparent; cursor:pointer; font-size:10px; font-weight:700; }
  .replay-index-tabs button span { margin-left:4px; color:#929aa5; font-size:8px; }
  .replay-index-tabs button[aria-selected="true"] { color:#244f86; border-bottom-color:#376fcb; font-weight:800; }
  .replay-index-body { min-height:0; flex:1; overflow:auto; }
  .replay-event-list, .replay-file-list { display:grid; }
  .replay-event-list button, .replay-file-list button { width:100%; min-width:0; border:0; border-bottom:1px solid #edf0f3; color:#3f4752; background:#fff; text-align:left; cursor:pointer; }
  .replay-event-list button { min-height:50px; padding:7px 9px; display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:8px; align-items:center; }
  .replay-event-list button:hover, .replay-file-list button:hover { background:#f7faff; }
  .replay-event-list button.replay-current { box-shadow:inset 4px 0 0 #244f86; background:#e2ecfb; }
  .replay-event-list button.replay-current .replay-event-copy strong { color:#1d3f6d; font-weight:800; }
  .replay-event-list button.replay-current .replay-event-kind { color:#3a5f92; font-weight:700; }
  .replay-event-order { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; color:#687383; background:#edf0f3; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-current .replay-event-order { color:#fff; background:#244f86; }
  .replay-event-copy { min-width:0; display:grid; gap:3px; }
  .replay-event-copy strong, .replay-event-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .replay-event-copy strong { font-size:9px; }
  .replay-event-copy small { color:#858e9a; font-size:8px; font-weight:500; }
  .replay-event-kind { color:#858e9a; font-size:8px; text-transform:capitalize; }
  .replay-file-list button { min-height:48px; padding:8px 10px; display:grid; gap:4px; }
  .replay-file-list code { overflow:hidden; color:#376fcb; text-overflow:ellipsis; white-space:nowrap; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-file-list span { color:#858e9a; font-size:8px; }
  .replay-transport { position:sticky; bottom:0; z-index:2; margin-top:16px; padding:12px 14px; border:1px solid #d9dfe6; border-radius:11px; background:rgba(255,255,255,.98); box-shadow:0 -8px 24px rgba(15,23,42,.08); backdrop-filter:blur(10px); }
  .replay-rail-head { margin-bottom:8px; display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
  .replay-rail-head strong { color:#4a5565; font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
  .replay-rail-head span { color:#7a8492; font-size:8px; }
  .replay-rail { min-height:30px; }
  .replay-rail-track { height:12px; position:relative; overflow:visible; border-radius:6px; background:#edf0f3; }
  .replay-rail-fill { position:absolute; inset:0; border-radius:inherit; background:linear-gradient(90deg,#eef3fa,#f1f4f8); }
  .replay-rail-mark { min-width:2px; height:12px; position:absolute; top:0; z-index:1; margin:0; padding:0; border:0; border-radius:1px; background:#7a8797; cursor:pointer; }
  .replay-rail-mark.prompt { background:#4f73b6; }
  .replay-rail-mark.intermediate { background:#b27627; }
  .replay-rail-mark.response { background:#258675; }
  .replay-rail-mark.tool-call { background:#7658b5; }
  .replay-rail-mark.commit { background:#6c9f25; }
  .replay-rail-mark.failed { box-shadow:0 0 0 2px #b94a48; }
  .replay-rail-mark.replay-current { z-index:2; box-shadow:0 0 0 2px #fff,0 0 0 4px #244f86; }
  .replay-rail-cursor { width:2px; height:20px; position:absolute; z-index:3; top:-4px; background:#20242b; transform:translateX(-1px); pointer-events:none; }
  .replay-rail-labels { margin-top:5px; display:flex; justify-content:space-between; color:#929aa5; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
  /* The rail encodes event type as colour, so the colours need a named legend. */
  .replay-rail-legend { margin-top:7px; display:flex; flex-wrap:wrap; gap:4px 12px; color:#7a8492; font-size:8px; }
  .replay-rail-legend span { display:inline-flex; align-items:center; gap:4px; }
  .replay-rail-legend span::before { content:""; width:8px; height:8px; border-radius:2px; background:#7a8797; }
  .replay-rail-legend .prompt::before { background:#4f73b6; }
  .replay-rail-legend .intermediate::before { background:#b27627; }
  .replay-rail-legend .response::before { background:#258675; }
  .replay-rail-legend .tool-call::before { background:#7658b5; }
  .replay-rail-legend .commit::before { background:#6c9f25; }
  .replay-rail-legend .failed::before { border:2px solid #b94a48; background:#fff; }
  .replay-sequence-rail { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; color:#858e9a; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-sequence-rail div { height:8px; border-radius:4px; background:repeating-linear-gradient(90deg,#aeb8c5 0,#aeb8c5 3px,#edf0f3 3px,#edf0f3 7px); }
  .replay-controls { margin-top:10px; display:flex; align-items:center; gap:7px; }
  .replay-controls > button, .replay-speeds button { min-height:30px; border:1px solid #d7dce2; border-radius:7px; color:#455163; background:#fff; cursor:pointer; font-size:9px; font-weight:800; }
  .replay-controls > button { padding:5px 9px; }
  .replay-controls .replay-play { color:#fff; border-color:#2f5fa8; background:#376fcb; }
  .replay-controls kbd { margin-left:4px; border:1px solid currentColor; border-radius:3px; padding:1px 3px; opacity:.62; font:7px ui-monospace,SFMono-Regular,Menlo,monospace; }
  .replay-position { min-width:0; margin-left:4px; overflow:hidden; color:#687383; text-overflow:ellipsis; white-space:nowrap; font-size:8px; }
  .replay-speeds { margin-left:auto; display:flex; gap:3px; }
  .replay-speeds button { min-width:30px; padding:4px 6px; }
  .replay-speeds button[aria-pressed="true"] { color:#244f86; border-color:#9eb8dc; background:#eef5ff; }
  @media (max-width:1080px) { .window-badge { display:none; } }
  /* Below three-lane width the lanes stack instead of forcing a 730px page to
     scroll sideways, which is what starved the activity chart of room. */
  @media (max-width:1100px) {
    .workspace-scroll { overflow-x:visible; }
    .workbench-list { min-width:0; }
    .workbench-grid, .workbench.delivery-collapsed .workbench-grid { min-width:0; display:block; }
    .lane { border-right:0; border-bottom:1px solid var(--line); }
    .lane:last-child { border-bottom:0; }
    .lane-resizer { display:none; }
    .workbench.delivery-collapsed .delivery-lane { padding:13px; }
    .workbench.delivery-collapsed .delivery-title-copy { display:flex; }
    .workbench.delivery-collapsed .delivery-toggle { width:auto; min-height:0; margin:0; padding:4px 6px; writing-mode:horizontal-tb; }
  }
  /* A side Drawer reduces the Workbench's available width before the viewport
     itself reaches the normal stacking breakpoint. Stack only while the side
     Drawer is open so no lane sits underneath it. */
  @media (min-width:1101px) and (max-width:1199px) {
    body.drawer-open .workbench-list { min-width:0; }
    body.drawer-open .workbench-grid, body.drawer-open .workbench.delivery-collapsed .workbench-grid { min-width:0; display:block; }
    body.drawer-open .lane { border-right:0; border-bottom:1px solid var(--line); }
    body.drawer-open .lane:last-child { border-bottom:0; }
    body.drawer-open .lane-resizer { display:none; }
    body.drawer-open .workbench.delivery-collapsed .delivery-lane { padding:13px; }
    body.drawer-open .workbench.delivery-collapsed .delivery-title-copy { display:flex; }
    body.drawer-open .workbench.delivery-collapsed .delivery-toggle { width:auto; min-height:0; margin:0; padding:4px 6px; writing-mode:horizontal-tb; }
  }
  @media (max-width:760px) { body.drawer-open { --drawer-inset:0px; } .app { display:block; margin-right:0; } .scope-picker { position:relative; width:100%; height:auto; max-height:340px; border-right:0; border-bottom:1px solid var(--line); } .picker-footer { display:none; } .workspace-header { position:relative; padding:5px 9px; } .workspace-breadcrumb span:first-child, .workspace-breadcrumb i:first-of-type, .window-badge { display:none; } .workspace-header-meta { gap:0; } .metric { padding:0 4px; } .metric .metric-label { display:none; } .metric .metric-short { display:inline; } .workspace-scroll { padding:8px 7px 36px; } .workbench { overflow-x:auto; } .evidence-drawer { position:fixed; inset:auto 0 0; top:auto; width:100%; height:min(72vh,620px); z-index:41; border-top:1px solid var(--line); border-left:0; border-radius:16px 16px 0 0; box-shadow:0 -18px 50px rgba(15,23,42,.18); } .evidence-drawer-head { min-height:62px; padding:11px 14px; } .session-shell { padding:16px 14px 38px; } .session-titlebar, .replay-boundary { align-items:flex-start; flex-direction:column; } .session-layout { grid-template-columns:1fr; } .session-sidebar { position:static; grid-row:1; } .replay-layout { grid-template-columns:1fr; } .replay-index { height:min(46vh,320px); } .replay-event-card { min-height:260px; } .replay-controls { flex-wrap:wrap; } .replay-position { width:100%; order:4; } .replay-speeds { margin-left:0; } }
  @media (prefers-reduced-motion:reduce) { .session-view *, .session-view *::before, .session-view *::after { scroll-behavior:auto !important; transition-duration:.001ms !important; animation-duration:.001ms !important; animation-iteration-count:1 !important; } }
