/* Approved SVG composition, extended over the existing functional controllers. */
:root {
  --home-canvas:var(--color-home-canvas);
  --tile-start:var(--color-tile-start);
  --scrim:var(--color-scrim);
}
html { background:var(--color-canvas); }
body.workbench {
  --page:var(--color-canvas); --surface:var(--color-control); --surface-soft:var(--color-surface);
  --ink:var(--color-ink); --ink-soft:var(--color-secondary); --line:var(--color-line);
  --line-strong:var(--color-control-border); --green:var(--color-teal); --green-dark:var(--color-teal-hover);
  --green-soft:var(--color-teal-soft); --focus:var(--color-focus);
  --red-dark:var(--color-error); --red-soft:var(--color-error-fill);
  background:var(--page); color:var(--ink); font:var(--type-body);
}
body.workbench.wb-home-page { --page:var(--home-canvas); }
/* Explicit reset prevents legacy component sizes from adding a fifth role. */
.workbench *, .workbench *::before, .workbench *::after {
  letter-spacing:0 !important;
  font-family:var(--font-family) !important;
}
.workbench :where(div,section,aside,nav,header,footer,form,fieldset,span,a,p,strong,b,em,label,button,input,select,textarea,summary,dt,dd,li) {
  font:var(--type-body) !important;
  font-style:normal;
}
.workbench :where(h1) { font:var(--type-title) !important; }
.workbench :where(h2,h3,h4) { font:var(--type-heading) !important; }
.workbench :where(small,time,.wb-muted,.wb-field-note,.wb-count-label,.wb-badge,.wb-recent-heading,
  .wb-recent-heading span,.wb-project-table-head span,.wb-project-updated,.wb-recent-time,
  .wb-record-meta span,.wb-record-copy small,.wb-project-name p,.wb-recent-project p,
  .wb-connection,.wb-reserved,.wb-tool-state,.wb-breadcrumb,.wb-breadcrumb a,
  .wb-projects-pagination,.wb-projects-pagination span,.wb-projects-pagination label,
  .wb-home-footer a,.wb-library-table-head span,#librarySummary,#selectionHint,#recordFolderSummary,
  .wb-folders small,.wb-record-domain summary>span,.wb-record-task summary>span,
  .wb-record-domain summary>span span,.wb-record-task summary>span span,.wb-workflow h2,
  .legend-row span,.legend-row .legend-item,.matrix-reading,.matrix-reading strong,
  .matrix-stage span,.step-number,.app-identity span,.app-identity small,.heat-status,
  .heat-status span,.heat-step,.stars,.issue-context,.issue-location-status,.issue-kind,
  .issue-origin,.issue-origin span,.issue-origin button,.issue-evidence,.issue-meta,
  .issue-meta span,.issue-meta strong,.issue-location,.issue-location span,.issue-location button,
  .inspector-index,.metric-line span,.metric-line strong,.screen-caption,.reason-block strong,
  .wb-detail-meta,.wb-detail-meta span,.wb-detail-path,.overview-stat,.overview-stat strong,.overview-scope,
  #filterSummary,#saveStatus,#requestStatus,#flowCount,.request-status) { font:var(--type-note) !important; }
.workbench :where(.wb-brand,.wb-sidebar-title>strong,.wb-tile-heading h2,.wb-intent-heading strong) {
  font:var(--type-heading) !important;
}
.workbench :where(h1,h2,h3,p) { margin-top:0; }
.workbench :where(a) { text-decoration:none; text-underline-offset:4px; }
.workbench :where(button,input,select,textarea,a,summary):focus-visible {
  outline:2px solid var(--color-focus); outline-offset:3px;
}
.workbench ::selection { background:var(--color-selection); color:var(--color-ink); }
.workbench :is(input,textarea)::placeholder { color:var(--color-muted); opacity:1; }
.workbench * { scrollbar-color:var(--color-control-border) transparent; scrollbar-width:thin; }
.workbench :is(input,textarea) { caret-color:var(--color-teal); }
.workbench :is(input[type=checkbox],input[type=radio]) {
  accent-color:var(--color-teal); width:16px; height:16px; flex:0 0 16px;
}
.workbench svg { width:18px; height:18px; stroke-width:1.7; }
.workbench [hidden] { display:none !important; }
.wb-header {
  position:sticky; top:0; height:64px; padding:0 40px 0 0; gap:32px; align-items:center;
  background:var(--page); border:0; z-index:30;
}
.wb-brand { width:216px; flex:0 0 216px; height:64px; padding:0 32px; gap:8px; border-right:1px solid var(--line); }
.wb-home-page .wb-brand { border-right-color:transparent; }
.wb-brand svg { width:24px; height:24px; flex-basis:24px; color:var(--green); }
.wb-tools { height:64px; align-items:center; gap:32px; }
.wb-tool { min-height:40px; padding:0; color:var(--ink); }
.wb-tool.is-active { color:var(--green); }
.wb-tool.is-active::after { height:1px; border-radius:0; inset:auto 0 0; }
.wb-reserved { display:flex; align-items:center; gap:8px; color:var(--color-muted); white-space:nowrap; }
.wb-reserved svg { width:16px; height:16px; }
.wb-connection { color:var(--color-muted); gap:8px; }
.wb-connection::before { width:4px; height:4px; }
.wb-layout { grid-template-columns:216px minmax(0,1fr); min-height:calc(100dvh - 64px); }
.wb-sidebar {
  top:64px; height:calc(100dvh - 64px); padding:32px 24px 24px;
  background:var(--gradient-sidebar); border-right:1px solid var(--line);
}
.wb-sidebar-title { display:grid; justify-items:center; gap:12px; padding:24px 0 0; margin-bottom:64px; }
.wb-tool-emblem { display:grid; place-items:center; width:64px; height:64px; border-radius:50%; background:var(--color-rail-mint); }
.wb-tool-emblem svg { width:24px; height:24px; color:var(--ink); }
.wb-side-nav { gap:8px; }
.wb-side-nav a,.wb-side-bottom a { min-height:44px; padding:0 8px; gap:12px; border-radius:4px; }
.wb-side-nav a.is-active { background:transparent; color:var(--ink); }
.wb-side-nav a.is-active svg { stroke-width:2.2; }
.wb-side-nav a:hover,.wb-side-bottom a:hover { background:var(--color-hover); }
.wb-side-nav a>span { display:none; }
.wb-side-bottom { padding-top:24px; }
.wb-side-bottom>span { display:none; }
.wb-side-bottom a { color:var(--ink); }
.wb-side-bottom a[href="/legacy/"] { display:none; }
.wb-workflow { margin-top:24px; padding-top:16px; }
.wb-workflow h2 { padding:0 8px; color:var(--color-muted); }
.wb-workflow>p { margin:8px 8px 12px; font:var(--type-note) !important; }
.wb-workflow li button { padding:8px; gap:8px; border-radius:4px; }
.wb-workflow li button.is-active { color:var(--green); background:transparent; }
.wb-workflow li button>span,.wb-workflow li button b { font:var(--type-note) !important; }
.wb-main,.wb-home-page .wb-main { padding:32px 40px 24px; max-width:none; width:100%; }
.wb-view { max-width:none; min-width:0; }
.wb-breadcrumb { display:none; }
.wb-page-head,#homeView .wb-page-head,#setupView .wb-page-head,#prepareView .wb-page-head {
  max-width:none; min-height:72px; align-items:flex-start; margin:0 0 32px; gap:24px;
}
.wb-page-head h1,#homeView .wb-page-head h1,#setupView .wb-page-head h1,#prepareView .wb-page-head h1 {
  font:var(--type-title) !important; margin:0; text-wrap:balance;
}
/* Remove generic explanations, retain real task goals, validation and live status. */
.wb-page-head p,.wb-eyebrow,.wb-intent-description,.wb-intent-requirements,
.wb-intent-note,.wb-source-heading p,#recordFolderSummary,#archiveSettingsHelp,
#recordNameHint,#screenshotOrderHint,#setupDraftHelp,#designActionHint,
.wb-design-fields .wb-field-note,#newDomainField .wb-field-note,.wb-analysis-options small,
.wb-side-bottom>span,.workbench #resultArea .section-heading p,
.record-filter-hint,.wb-detail-path { display:none !important; }
.wb-home-page #homeView .wb-page-head>[data-action=new] { display:none; }
.wb-home-page #homeView .wb-page-head { min-height:64px; }
.wb-status { border-radius:4px; padding:8px 12px; margin:0 0 16px; background:var(--color-teal-soft); color:var(--green-dark); }
.wb-status.is-error { color:var(--color-error); background:var(--color-error-fill); }
.wb-status.is-busy { color:var(--color-cyan); background:var(--color-cyan-soft); }
.workbench .button {
  display:inline-flex; align-items:center; justify-content:center; min-height:40px;
  padding:8px 16px; gap:8px; border:1px solid var(--color-control-border);
  border-radius:4px; background:var(--color-control); white-space:nowrap;
  box-shadow:none; font:var(--type-body) !important;
}
.workbench .button svg { width:16px; height:16px; flex-basis:16px; }
.workbench .button-primary { background:var(--green); border-color:var(--green); color:var(--color-white); }
.workbench .button-quiet { background:var(--color-control); border-color:var(--color-control-border); }
.workbench .button:hover { background:var(--color-hover); border-color:var(--green); }
.workbench .button-primary:hover { background:var(--color-teal-hover); color:var(--color-white); }
.workbench :is(button,.button):disabled { cursor:default; opacity:1; background:var(--color-disabled-fill); color:var(--color-disabled-ink); border-color:var(--line); }
.workbench .button:active { background:var(--color-teal-soft); }
.workbench .button-primary:active { background:var(--color-teal-hover); }
.wb-text-action { padding:8px 0; text-decoration:none; }
.wb-text-action:hover,.wb-section-head>a:hover { text-decoration:underline; color:var(--color-teal-hover); }
.wb-section-head,#homeView .wb-section-head { min-height:40px; margin:0 0 8px; gap:16px; align-items:center; }
.wb-section-head>a { min-height:40px; gap:8px; color:var(--green); font:var(--type-body) !important; }
.wb-section-head>a svg { width:16px; height:16px; flex-basis:16px; }
.wb-entry { margin-bottom:32px; }
.wb-entry>h2 { margin:0 0 16px; }
.wb-tools-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px; }
.wb-tool-entry {
  display:flex; flex-direction:column; align-items:stretch; min-height:192px; padding:24px;
  border:1px solid var(--color-accent-border); border-radius:4px;
  background:linear-gradient(180deg,var(--tile-start) 0%,var(--home-canvas) 40%,var(--color-mint) 100%);
}
.wb-tool-entry .wb-tile-heading { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.wb-tool-entry h2 { margin:0; }
.wb-tile-heading>svg { width:24px; height:24px; color:var(--color-cyan); }
.wb-tool-state { margin-left:auto; color:var(--color-success-ink); }
.wb-tool-entry>a,.wb-tool-entry>button { margin-top:auto; align-self:flex-end; }
.wb-reserved-tile { background:linear-gradient(180deg,var(--color-canvas),var(--color-cyan-soft)); }
.wb-reserved-tile .wb-tile-heading>svg { color:var(--color-secondary); }
.wb-home-columns { display:grid; grid-template-columns:minmax(0,1fr) 264px; gap:32px; }
#homeView .wb-library-summary {
  display:block; border:0; border-left:1px solid var(--line); border-radius:0; padding:0 0 0 24px;
  margin:0; background:transparent; min-width:0;
}
.wb-library-summary .wb-section-head { gap:8px; white-space:nowrap; }
.wb-library-summary .wb-section-head a { gap:4px; }
.wb-library-table-head { display:flex; justify-content:space-between; min-height:40px; align-items:center; padding:8px 4px; border-bottom:1px solid var(--line); color:var(--color-muted); }
.wb-home-library-row { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:64px; padding:8px 4px; border:0; border-bottom:1px solid var(--line); background:transparent; text-align:left; gap:8px; }
.wb-home-library-row>span { display:flex; align-items:center; gap:8px; }
.wb-home-library-row small { display:block; color:var(--color-muted); }
.wb-home-library-row>span:last-child { font:var(--type-note) !important; color:var(--color-muted); }
.wb-home-library-row svg { width:16px; height:16px; flex-basis:16px; }
.wb-home-library-row:hover { background:var(--color-hover); }
#homeView #librarySummary { margin:12px 0 0; color:var(--color-muted); }
.wb-home-footer { margin-top:auto; padding-top:32px; color:var(--color-muted); }
.wb-home-footer a { color:inherit; }
#homeView { min-height:calc(100dvh - 120px); display:flex; flex-direction:column; }
.wb-home-columns { margin-bottom:24px; }
body:not(.wb-home-page) .wb-home-footer { display:none; }
.wb-recent-table,.wb-projects-table { border:0; border-radius:0; background:transparent; }
.wb-recent-heading,.wb-recent-row { grid-template-columns:minmax(0,1fr) 100px 140px 124px; gap:16px; padding:8px 12px; }
.wb-recent-heading { height:40px; min-height:40px; border-bottom:1px solid var(--line); background:transparent; border-radius:0; color:var(--color-muted); }
.wb-recent-row { min-height:64px; border-top:0; border-bottom:1px solid var(--line); border-radius:0 !important; }
.wb-recent-project { gap:12px; }
.wb-recent-project p { margin-top:4px; color:var(--color-muted); }
.wb-recent-icon { width:16px; height:16px; flex:0 0 16px; background:transparent; color:var(--color-secondary); }
.wb-recent-icon svg { width:16px; height:16px; }
.wb-recent-hint { display:none; }
.wb-recent-meta { display:contents; }
.wb-recent-action .button { border:0; background:transparent; padding:8px 0; }
.wb-badge,.wb-badge.ready { padding:4px 8px; border-radius:4px; background:var(--color-success-fill); color:var(--color-success-ink); }
.wb-badge:not(.ready),.wb-badge.pending { background:var(--color-draft-fill); color:var(--color-draft-ink); }
.wb-recent-row:hover,#projectsView .wb-project-row:hover { background:var(--color-hover); }
.workbench :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden]),select,textarea) {
  min-height:40px; padding:8px 12px; border:1px solid var(--color-control-border);
  background:var(--color-control); color:var(--ink); border-radius:4px;
}
.workbench :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden]),select) { height:40px; }
.workbench textarea { resize:vertical; width:100%; }
.wb-search { border:1px solid var(--color-control-border); border-radius:4px; background:var(--color-control); max-width:none; min-width:0; }
.wb-search input { border:0 !important; background:transparent !important; }
.wb-list-toolbar { margin-bottom:16px; gap:12px; }
.wb-list-toolbar>label { min-width:0; }
#projectsView .wb-projects-toolbar { gap:12px; flex-wrap:nowrap; }
#projectsView .wb-search { flex:1; max-width:none; }
#projectsView .wb-list-toolbar select { max-width:136px; }
.wb-count-label { padding:4px 8px; border-radius:4px; background:var(--color-draft-fill); color:var(--color-muted); }
#projectsView :is(.wb-project-table-head,.wb-project-row) { grid-template-columns:minmax(0,1fr) 104px 132px 184px; gap:16px; padding:8px 12px; }
#projectsView .wb-project-table-head { min-height:40px; border-radius:0; background:transparent; }
#projectsView .wb-project-row { min-height:64px; }
.wb-project-identity { align-items:center; }
.wb-project-folder { width:16px; height:16px; flex-basis:16px; border-radius:0; background:transparent; color:var(--color-secondary); }
.wb-project-folder svg { width:16px; height:16px; }
#projectsView .wb-project-actions>button { min-width:0; padding:8px; border:0; background:transparent; }
.wb-project-name p { color:var(--color-muted); }
.wb-project-progress { display:none; }
.wb-projects-pagination { gap:12px; padding:16px 0; }
.wb-projects-filter-summary { margin:0 0 8px; min-height:24px; }
.wb-intent-grid { max-width:none; gap:32px; margin:0; }
.wb-intent-card { padding:24px 0; min-height:216px; background:transparent; border:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0; gap:24px; }
.wb-intent-card:hover { box-shadow:none; background:var(--color-hover); }
.wb-intent-heading { flex-direction:row; align-items:center; gap:16px; }
.wb-intent-icon { width:48px; height:48px; flex-basis:48px; border-radius:4px; background:var(--color-teal-soft); }
.wb-intent-cta { padding:0; border:0; }
.wb-design-form { max-width:none; }
.wb-upload-workspace { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,1fr); gap:40px; align-items:start; }
.wb-upload-information { padding-left:32px; border-left:1px solid var(--line); min-width:0; }
.wb-design-section { margin-bottom:24px; }
.wb-design-section h2 { margin:0 0 16px; }
.wb-design-fields>label { margin-bottom:16px; gap:8px; }
.wb-design-form .wb-upload-target { min-height:248px; border-radius:4px; border-color:var(--color-control-border); background:var(--color-surface); gap:16px; padding:32px; }
.wb-design-form .wb-upload-target>span { max-width:32ch; font:var(--type-note) !important; color:var(--color-muted); }
.wb-design-form .wb-upload-target.is-compact { min-height:104px; padding:16px; }
.wb-design-form .wb-upload-target strong { font:var(--type-body) !important; }
.wb-design-form #uploadFileHint { margin:8px 0 16px; }
.wb-screenshot-list { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.wb-screenshot-item { border:0; background:transparent; padding:0; }
.wb-screenshot-item img { height:120px; background:var(--color-surface); }
.wb-screenshot-item p { margin:4px 0; font:var(--type-note) !important; }
.wb-file-actions { gap:4px; flex-wrap:wrap; }
.wb-file-actions button { width:32px; height:32px; background:var(--color-control); border:1px solid var(--line); border-radius:4px; }
.wb-file-actions span { font:var(--type-note) !important; }
.wb-design-form .wb-advanced { padding:16px 0; }
.wb-advanced>summary { margin:0; color:var(--ink); }
.wb-advanced>summary span { margin-left:0; }
.wb-advanced>summary span+span { margin-left:8px; font:var(--type-note) !important; }
.wb-form-pair { gap:16px; }
.wb-form-pair label,.wb-setting-field { gap:8px; }
.wb-archive-location { display:grid; grid-column:1 / -1; gap:8px; margin:0; }
.wb-archive-recognition-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wb-archive-recognition-actions .button { flex:0 0 auto; min-width:132px; }
#archiveRecognitionStatus { margin:0; overflow-wrap:anywhere; }
#archiveRecognitionStatus.is-error { color:var(--color-error); }
#archiveRecognitionStatus.wb-archive-status-compact { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#archiveSuggestion { display:grid; gap:4px; }
#archiveSuggestion[hidden] { display:none; }
#archiveSuggestion strong { font:var(--type-body); overflow-wrap:anywhere; }
.wb-archive-explanation>summary { display:flex; align-items:center; gap:8px; cursor:pointer; }
.wb-archive-explanation>summary::before { content:""; width:6px; height:6px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(-45deg); flex:0 0 6px; }
.wb-archive-explanation[open]>summary::before { transform:rotate(45deg); }
.wb-archive-explanation>summary::-webkit-details-marker { display:none; }
#archiveSuggestion .wb-archive-explanation>summary { margin:0; }
.workbench .wb-archive-explanation>summary,.workbench .wb-archive-explanation>summary span,
.workbench .wb-archive-explanation-copy p { font:var(--type-note) !important; color:var(--color-secondary); }
.wb-archive-explanation-copy { max-height:90px; overflow:auto; margin-top:4px; padding:8px; background:var(--color-surface); border:1px solid var(--line); border-radius:4px; }
.wb-archive-explanation-copy p { margin:0; overflow-wrap:anywhere; }
.wb-archive-explanation-copy p+p { margin-top:4px; }
.wb-archive-browser { border:1px solid var(--color-accent-border); border-radius:var(--radius); background:var(--color-surface); overflow:hidden; }
.wb-archive-search { display:flex; align-items:center; gap:8px; margin:0 !important; padding:8px; border-bottom:1px solid var(--line); }
.wb-archive-search svg { flex:0 0 16px; width:16px; height:16px; color:var(--color-secondary); }
.wb-archive-search input { width:100%; min-width:0; min-height:32px; }
#archiveFolderTree { max-height:176px; overflow:auto; padding:4px 8px; scrollbar-gutter:stable; }
.wb-archive-domain>summary {
  display:flex; align-items:center; gap:8px; min-height:40px; padding:8px;
  cursor:pointer; border-bottom:1px solid var(--line); list-style:none;
}
.wb-archive-domain>summary::-webkit-details-marker { display:none; }
.wb-design-form .wb-advanced .wb-archive-domain>summary { margin:0; }
.wb-archive-domain>summary strong { flex:1; min-width:0; overflow-wrap:anywhere; }
.wb-archive-domain>summary>svg { flex:0 0 16px; width:16px; height:16px; color:var(--color-secondary); }
.wb-archive-domain[open]>summary { background:var(--color-teal-soft); }
.wb-archive-domain[open]>summary>svg:first-child { transform:rotate(90deg); }
.wb-archive-domain small { color:var(--color-muted); white-space:nowrap; }
.wb-archive-children { margin-left:16px; border-left:1px solid var(--line); }
.wb-archive-folder {
  display:flex !important; align-items:center; gap:8px !important; margin:0 !important;
  min-height:40px; padding:8px; border-bottom:1px solid var(--line); cursor:pointer;
}
.wb-archive-folder>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.wb-archive-folder>svg { flex:0 0 16px; width:16px; height:16px; color:var(--color-secondary); }
.wb-archive-folder.is-selected { background:var(--color-teal-soft); }
.wb-archive-folder:hover,.wb-archive-domain>summary:hover { background:var(--color-hover); }
.wb-archive-folder.is-recommended { background:var(--color-teal-soft); outline:1px solid var(--color-teal); outline-offset:-1px; color:var(--color-teal-hover); }
.wb-archive-folder.is-recommended>svg { color:var(--color-teal); }
.wb-archive-folder.is-recommended:hover { background:var(--color-selection); }
.workbench .wb-archive-match { font:var(--type-note) !important; color:var(--color-teal-hover); white-space:nowrap; }
.wb-archive-locate { width:100%; min-height:40px; padding:8px; background:transparent; border:0; color:var(--color-teal); text-align:left; }
.wb-archive-new-domain {
  display:flex; align-items:center; gap:8px; width:100%; min-height:40px; padding:8px 16px;
  border:0; border-top:1px solid var(--line); background:transparent; color:var(--color-teal); text-align:left; cursor:pointer;
}
.wb-archive-new-domain:hover { background:var(--color-hover); }
.wb-archive-empty { margin:0; padding:12px 8px; color:var(--color-muted); font:var(--type-note) !important; }
.wb-setting-field { margin:16px 0 0; }
#libraryArchiveFields { margin:16px 0 0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 16px; }
#libraryArchiveFields .wb-form-pair,#newDomainField { grid-column:1 / -1; }
#newArchiveFolder { grid-column:1; }
#libraryArchiveFields>label:last-of-type { grid-column:2; }
#newArchiveFolder[hidden]~label:last-of-type { grid-column:1 / -1; }
.wb-design-form .wb-form-footer { border-top:1px solid var(--line); padding-top:16px; display:flex; justify-content:space-between; }
.wb-design-actions { margin-top:24px; }
.wb-options { margin-top:16px; }
.wb-analysis-options { gap:16px; padding:0; }
.wb-upload-complete { max-width:none; border-top:1px solid var(--line); padding:32px 0; }
.wb-inline-error { color:var(--color-error); background:var(--color-error-fill); border-radius:4px; padding:8px 12px; }
.wb-prepare-layout { display:grid; grid-template-columns:minmax(0,1fr) 304px; gap:32px; align-items:start; }
.wb-source-heading { margin:0 0 16px !important; align-items:center; }
.wb-source-heading h2 { margin:0; }
.wb-source-heading>svg { display:none; }
.wb-record-browser { border:0; background:transparent; border-radius:0; overflow:visible; }
#prepareView .wb-record-browser .wb-list-toolbar { padding:0 0 16px; margin:0; gap:8px; flex-wrap:nowrap; }
#prepareView .wb-record-browser .wb-search { max-width:none; }
#prepareView #recordChoices { max-height:none; overflow:visible; }
.wb-record-domain>summary,.wb-record-task>summary { min-height:48px; padding:8px; gap:8px; }
.wb-record-domain>summary strong,.wb-record-task>summary strong { font:var(--type-body) !important; }
#prepareView .wb-record-domain>summary,#prepareView .wb-record-task>summary { background:transparent; }
#prepareView .wb-record-domain[open]>summary { background:var(--color-surface); }
.wb-record-task { margin-left:16px; }
.wb-record-browser .wb-record-folder-items { padding-left:8px; margin-left:16px; border-color:var(--line); }
#prepareView .wb-record-row,.wb-library-content .wb-record-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:12px 8px; }
.wb-record-row>label { grid-column:1; min-height:24px !important; }
.wb-record-meta { display:flex; gap:16px; grid-column:1; margin:0 0 0 24px; color:var(--color-muted); }
.wb-record-row>.button { grid-column:2; grid-row:1 / span 2; padding:8px; background:transparent; border:0; }
.wb-record-copy strong { display:block; overflow-wrap:anywhere; }
.wb-record-copy small { display:block; margin-top:4px; color:var(--color-muted); }
#prepareView .wb-selection-tray { margin:0; padding:0 0 0 24px; border:0; border-left:1px solid var(--line); border-radius:0; background:transparent; }
.wb-selection-tray>div:first-child { display:grid; gap:8px; }
.wb-selection-tray #selectedCount { font:var(--type-heading) !important; }
.wb-selected-records { display:grid; gap:8px; margin:16px 0 24px; }
.wb-selected-chip { width:100%; padding:4px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; justify-content:space-between; }
.wb-selected-chip span { max-width:none; min-width:0; white-space:normal; font:var(--type-body) !important; }
.wb-selected-chip button { width:32px; height:32px; }
#prepareView .wb-selection-tray .wb-project-input { margin:16px 0 0; gap:8px; }
.wb-tray-footer { display:grid; gap:16px; margin-top:16px; }
.wb-save-feedback { justify-content:space-between; }
.wb-tray-actions { gap:8px; justify-content:space-between; }
.wb-tray-actions .button { padding-inline:12px; }
.wb-required { margin-left:4px; color:var(--color-muted); }
#designSummary,.wb-design-ready { background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:0 0 16px; margin:0 0 24px; }
#designSummaryContent p { margin-top:8px; font:var(--type-note) !important; }
.wb-library-layout { grid-template-columns:240px minmax(0,1fr); gap:24px; padding-top:0; border:0; }
.wb-folders { max-height:none; overflow:visible; padding-right:16px; }
.wb-folders button { border-radius:4px; padding:8px; min-height:44px; }
.wb-folders button.is-active { background:var(--color-teal-soft); color:var(--green); }
.wb-library-domain summary { list-style:none; display:flex; align-items:center; gap:8px; min-height:44px; padding:8px; cursor:pointer; }
.wb-library-domain summary::-webkit-details-marker { display:none; }
.wb-library-domain summary>span { flex:1; }
.wb-library-domain summary svg { width:16px; height:16px; flex-basis:16px; }
.wb-library-domain[open]>summary>svg:first-child { transform:rotate(90deg); }
.wb-library-domain>button { padding-left:32px; gap:8px; }
.wb-library-domain>button span { font:var(--type-note) !important; }
.wb-library-content .wb-section-head { margin-top:24px; }
.wb-library-content .wb-record-row { padding:8px 12px; min-height:64px; }
.wb-library-content .wb-record-meta { margin-left:0; }
.wb-library-content .wb-record-copy small { display:none; }
.wb-settings-list { max-width:none; }
.wb-settings-list>div { padding:24px 0; grid-template-columns:184px minmax(0,1fr); }
.workbench #resultView .result-page-head { flex-direction:row; margin:0 0 16px; min-height:56px; }
.result-title-row { gap:12px; }
.result-title-row h1 { max-width:30ch; }
.result-actions { min-width:0; }
.workbench #resultArea { padding-top:0; }
.workbench #resultArea .overview-line { padding:0 0 8px; margin:0; border:0; border-radius:0; background:transparent; min-height:0; box-shadow:none; }
.workbench #resultArea .overview-stats { padding:0; margin:0; justify-content:flex-start; }
.workbench #resultArea .overview-scope { display:none; }
.workbench #resultArea .workspace-section { border:0; border-radius:0; background:transparent; box-shadow:none; padding:0; }
.workbench #resultArea .controls { padding:16px 0; gap:16px; }
.workbench #resultArea .controls .metric-field { gap:8px; }
.workbench #resultArea .controls fieldset { margin:0; }
.workbench #resultArea .controls legend { font:var(--type-note) !important; }
.workbench .segment { font:var(--type-body) !important; min-height:40px; }
.result-view-tabs { margin-bottom:0; border-color:var(--line); gap:24px; }
.result-view-tabs button { padding:8px 0; min-height:40px; border-bottom-width:1px; }
.result-view-tabs button[aria-selected=true] { color:var(--green); }
.overview-stats { gap:16px; }
.overview-stat { gap:4px; }
.overview-stat strong { color:inherit; }
.workbench #resultArea .legend-row { margin:0 0 16px; padding:8px 0; gap:12px; }
.workbench #resultArea .legend-explainer { display:none; }
.legend-row .legend-scale { gap:12px; }
.workbench #resultArea .workspace-section { padding-top:0; margin-bottom:16px; }
.workbench #resultArea .section-heading { margin-bottom:16px; min-height:32px; }
.workbench #resultArea .comparison-layout,.workbench #resultArea .flow-comparison-layout { gap:24px; grid-template-columns:minmax(0,1fr) 304px; }
.workbench #resultArea .is-panel-collapsed { grid-template-columns:minmax(0,1fr); }
.workbench #resultArea .inspector { border-radius:0; border:0; border-left:1px solid var(--line); padding:0 0 0 24px; background:transparent; top:80px; max-height:calc(100dvh - 104px); }
.workbench .detail-tabs button { padding:8px; }
.workbench #issueCards { display:grid; gap:12px; padding-bottom:12px; }
.workbench .issue-card {
  border:1px solid var(--line); border-radius:var(--radius); background:var(--color-surface);
  padding:12px; box-shadow:none;
}
.workbench .issue-card h3 { font:var(--type-heading) !important; margin:12px 0 4px; text-wrap:pretty; }
.workbench .issue-toolbar { padding:16px 13px 8px; }
.workbench .issue-toolbar select { min-width:0; }
.workbench .issue-context { margin:0 0 12px; padding:0 13px; }
.workbench .issue-card p { max-width:70ch; }
.workbench .issue-kind { padding:2px 6px; background:var(--color-control); color:var(--color-secondary); }
.workbench .issue-location { align-items:flex-start; gap:8px; padding:4px 0; color:var(--color-teal); }
.workbench .issue-location>span { flex:1; }
.workbench .issue-location>svg { margin-top:2px; }
.workbench .issue-location:disabled { color:var(--color-disabled-ink); cursor:default; text-decoration:none; }
.workbench .issue-summary { margin:8px 0; }
.workbench .issue-candidate-note { margin:0 0 12px; color:var(--color-muted); font:var(--type-note) !important; }
.workbench .issue-evidence { border-top:1px solid var(--line); padding-top:4px; margin:0; }
.workbench :is(.issue-evidence-link,.issue-evidence-unavailable) { font:var(--type-note) !important; gap:8px; }
.workbench :is(.issue-evidence-link,.issue-evidence-unavailable)>span { font:var(--type-note) !important; }
.workbench .issue-evidence>:is(.issue-evidence-link,.issue-evidence-unavailable):last-child { border-bottom:0; }
.workbench .issue-checks { border-top:1px solid var(--line); margin-top:4px; }
.workbench :is(.issue-checks,.issue-other-evidence)>summary { font:var(--type-note) !important; }
.workbench .issue-analysis-section { margin-top:12px; }
.workbench .issue-analysis-section :is(strong,li) { font:var(--type-note) !important; }
.workbench .issue-analysis-section>strong { color:var(--color-secondary); }
.workbench .issue-analysis-section ul { margin:4px 0 12px; padding-left:16px; }
.workbench .matrix-wrap { border-radius:4px; }
.workbench .matrix-app-copy strong { font:var(--type-body) !important; }
.workbench .matrix-header { background:var(--color-surface); }
.workbench .matrix-stage { background:var(--color-surface); }
.workbench .matrix-stage strong { font:var(--type-body) !important; }
.workbench .heat-cell { border-radius:0; }
.workbench .flow-app { background:transparent; border-radius:0; }
.workbench .flow-step { border-radius:4px; }
.workbench .flow-step strong { font:var(--type-body) !important; }
.workbench .flow-slot .step-number { font:var(--type-note) !important; }
.workbench .flow-board.is-condensed .flow-step strong { font:var(--type-note) !important; }
.workbench .flow-preview img { object-fit:contain; }
.workbench .matrix-record-filter,.workbench .matrix-score-help { margin-top:16px; }
.workbench .record-filter-content,.workbench .view-settings-content { background:var(--color-control); border-radius:4px; box-shadow:none; border:1px solid var(--line); }
.workbench .selected-score { border-radius:4px; }
.workbench .selected-score strong { font:var(--type-heading) !important; }
.workbench .reason-block p { font:var(--type-body) !important; }
.workbench .app-mark { font:var(--type-note) !important; border-radius:4px; }
.workbench .wb-record-dialog[open],.workbench .wb-screenshot-dialog { border:1px solid var(--line); border-radius:4px; background:var(--color-control); padding:24px; }
.workbench .wb-record-dialog[open] { width:min(1280px,94vw); height:min(832px,92dvh); }
.workbench dialog::backdrop { background:var(--scrim); }
.wb-detail-step { grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); gap:32px; padding:16px 0; }
.wb-detail-step img { max-width:100%; max-height:min(60vh,580px); object-fit:contain; }
.wb-detail-image { background:var(--color-surface); border:0; }
.wb-detail-copy h3 { font:var(--type-heading) !important; }
.wb-detail-copy>p { font:var(--type-body) !important; color:var(--color-secondary); }
.wb-detail-navigation { padding-top:16px; }
.wb-inferred-note { border-left:0; padding:12px; border-radius:4px; background:var(--color-cyan-soft); color:var(--color-ink); }
.wb-empty,#recentProjectsEmpty,#projectsEmpty { border:0; background:transparent; border-radius:0; padding:32px 16px; }
.workbench :is(button,a,input,select,textarea) { transition:background-color 140ms ease-out,border-color 140ms ease-out,color 140ms ease-out; }
@media (min-width:980px) {
  #prepareView #recordChoices { max-height:calc(100dvh - 300px); overflow:auto; }
  #prepareView .wb-selection-tray { position:sticky; top:96px; }
  .wb-library-content .wb-record-row { min-height:64px; padding:8px 12px; }
  .wb-library-content .wb-record-row>label { min-height:22px; }
  .wb-library-content .wb-record-meta { line-height:18px !important; }
  .wb-folders { max-height:calc(100dvh - 232px); overflow:auto; }
  .workbench #matrix .matrix-wrap { max-height:calc(100dvh - 560px); min-height:200px; overflow:auto; }
  .workbench #resultArea .inspector { position:static; max-height:calc(100dvh - 560px); overflow:auto; }
  .workbench #resultArea .flow-canvas { max-height:calc(100dvh - 420px); overflow:auto; }
  .workbench #resultArea .flow-comparison-layout .inspector { max-height:calc(100dvh - 420px); }
}
@media (min-width:1100px) and (max-height:850px) {
  .wb-main,.wb-home-page .wb-main { padding-top:24px; }
  .wb-page-head,#homeView .wb-page-head,#setupView .wb-page-head,#prepareView .wb-page-head { min-height:56px; margin-bottom:16px; }
  .wb-entry { margin-bottom:16px; }
  .wb-tool-entry { min-height:144px; padding:16px; }
  .wb-recent-row { min-height:56px; }
  .wb-design-section { margin-bottom:16px; }
  .wb-design-form .wb-upload-target { min-height:184px; }
  .wb-design-form .wb-advanced { padding:12px 0; }
  .wb-sidebar-title { margin-bottom:32px; padding-top:8px; }
  .wb-workflow { margin-top:16px; }
  .workbench #resultArea .controls { padding:8px 0; }
}
@media (max-width:1279px) {
  .wb-brand { width:184px; flex-basis:184px; padding-inline:24px; }
  .wb-layout { grid-template-columns:184px minmax(0,1fr); }
  .wb-main,.wb-home-page .wb-main { padding-inline:24px; }
  .wb-sidebar { padding-inline:16px; }
  .wb-header { padding-right:24px; }
  .wb-home-columns { grid-template-columns:minmax(0,1fr) 248px; gap:24px; }
  .wb-recent-heading,.wb-recent-row { grid-template-columns:minmax(0,1fr) 80px 120px; gap:12px; }
  .wb-recent-time,.wb-recent-heading>:nth-child(3) { display:none; }
  .wb-recent-project,.wb-recent-action { grid-column:auto; grid-row:auto; }
  #projectsView .wb-projects-toolbar { flex-wrap:wrap; }
  #projectsView .wb-projects-toolbar .wb-search { flex-basis:100%; }
  #projectsView :is(.wb-project-table-head,.wb-project-row) { grid-template-columns:minmax(0,1fr) 88px 160px; gap:12px; }
  #projectsView .wb-project-updated,#projectsView .wb-project-table-head>:nth-child(3) { display:none; }
  .wb-prepare-layout { grid-template-columns:minmax(0,1fr) 280px; gap:24px; }
  .wb-upload-workspace { gap:24px; }
  .wb-upload-information { padding-left:24px; }
  .wb-library-layout { grid-template-columns:200px minmax(0,1fr); }
  .workbench #resultArea .comparison-layout,.workbench #resultArea .flow-comparison-layout { grid-template-columns:minmax(0,1fr) 280px; }
  .workbench #resultArea .is-panel-collapsed { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:979px) {
  .wb-connection,.wb-reserved { display:none; }
  .wb-home-columns,.wb-upload-workspace,.wb-prepare-layout { grid-template-columns:minmax(0,1fr); }
  #homeView .wb-library-summary { padding:24px 0 0; border:0; border-top:1px solid var(--line); }
  .wb-tools-grid { grid-template-columns:1fr; }
  .wb-tool-entry { min-height:160px; }
  .wb-upload-information { padding:24px 0 0; border:0; border-top:1px solid var(--line); }
  #prepareView .wb-selection-tray { padding:24px 0 0; border:0; border-top:1px solid var(--line); }
  .wb-tray-footer { display:flex; }
  .wb-library-layout { grid-template-columns:1fr; }
  .wb-folders { max-height:240px; overflow:auto; border:0; border-bottom:1px solid var(--line); padding:0 0 16px; }
  .workbench #resultView .result-page-head { flex-direction:column; }
  .workbench #resultArea .comparison-layout,.workbench #resultArea .flow-comparison-layout { grid-template-columns:minmax(0,1fr); }
  .workbench #resultArea .inspector { position:static; border:0; border-top:1px solid var(--line); padding:24px 0 0; max-height:none; }
}
@media (max-width:699px) {
  .wb-header { height:auto; min-height:64px; padding:8px 16px; gap:0 24px; flex-wrap:wrap; }
  .wb-brand { width:auto; flex:0 0 auto; height:40px; min-height:40px; padding:0; border:0; }
  .wb-tools { height:40px; flex-basis:auto; order:0; gap:16px; }
  .wb-tool { min-height:40px; }
  .wb-layout { display:block; }
  .wb-sidebar { height:auto; position:static; padding:8px 16px; border:0; border-bottom:1px solid var(--line); background:var(--color-teal-soft); }
  .wb-sidebar-title { display:none; }
  .wb-side-nav { display:flex; flex-wrap:wrap; gap:0 16px; justify-content:flex-start; }
  .wb-side-nav a,.wb-side-nav a:first-child { display:flex; padding:0; flex:0 0 auto; gap:8px; }
  .wb-side-nav a svg { display:none; }
  .wb-side-bottom { display:none; }
  .wb-workflow { margin-top:8px; padding-top:8px; }
  .wb-workflow ol { display:flex; flex-wrap:wrap; }
  .wb-workflow li { flex:0 0 auto; }
  .wb-main,.wb-home-page .wb-main { padding:24px 16px; }
  .wb-page-head,#homeView .wb-page-head,#setupView .wb-page-head,#prepareView .wb-page-head { min-height:64px; margin-bottom:24px; flex-wrap:wrap; gap:16px; }
  .wb-entry { margin-bottom:24px; }
  #homeView { min-height:calc(100dvh - 112px); }
  .wb-tool-entry { padding:16px; }
  .wb-recent-heading { display:none; }
  .wb-recent-row { grid-template-columns:minmax(0,1fr) 104px; gap:4px 8px; padding:12px 0; min-height:80px; }
  .wb-recent-project { grid-column:1; grid-row:1; }
  .wb-recent-icon { display:none; }
  .wb-recent-meta { display:flex; grid-column:1; grid-row:2; gap:8px; padding:0; }
  .wb-recent-action { grid-column:2; grid-row:1 / span 2; }
  .wb-recent-action .button { font:var(--type-body) !important; padding:8px 0; }
  .wb-recent-action svg { display:block; }
  .wb-intent-grid { grid-template-columns:1fr; gap:24px; }
  .wb-intent-card { min-height:160px; padding:24px 0; }
  .wb-screenshot-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .wb-design-form .wb-upload-target { padding:24px 16px; }
  .wb-design-form .wb-form-footer { gap:16px; flex-wrap:wrap; }
  .wb-design-form .wb-design-primary { width:auto; }
  .wb-form-pair { grid-template-columns:1fr; }
  #libraryArchiveFields { grid-template-columns:1fr; }
  #libraryArchiveFields>label:last-of-type { grid-column:1; }
  #projectsView .wb-project-table-head { display:none; }
  #projectsView .wb-project-row { grid-template-columns:minmax(0,1fr) auto; padding:12px 0; gap:8px; }
  #projectsView .wb-project-identity { grid-column:1 / -1; }
  #projectsView .wb-project-state { grid-column:1; grid-row:2; }
  #projectsView .wb-project-actions { grid-column:2; grid-row:2; }
  #projectsView .wb-projects-toolbar label:not(.wb-search) { flex:1 1 120px; }
  .wb-projects-pagination { gap:16px; }
  .wb-projects-pagination>span { order:3; flex-basis:100%; text-align:left; }
  .wb-tray-footer { display:grid; }
  #prepareView .wb-record-browser .wb-list-toolbar { flex-wrap:wrap; }
  #prepareView .wb-record-browser .wb-search { flex-basis:100%; }
  .wb-detail-step { grid-template-columns:1fr; gap:24px; }
  .wb-detail-step img { width:auto; height:auto; max-width:100%; max-height:48vh; }
  .wb-detail-image { min-height:0; }
  .wb-detail-copy { max-height:none; }
  .workbench .wb-record-dialog[open] { padding:16px; width:96vw; }
  .wb-settings-list>div { grid-template-columns:1fr; gap:8px; }
  .workbench .matrix-reading { max-width:none; }
  .workbench .legend-row { align-items:flex-start; }
  .workbench #resultArea .controls { gap:12px; }
  .workbench .flow-app .app-identity { display:grid; gap:4px; }
  .workbench .flow-step strong { font:var(--type-note) !important; }
}
@media (prefers-reduced-motion:reduce) {
  .workbench * { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}

/* 2026-11-13: user annotations; shared control geometry and record selection. */
.wb-connection::before { display:none; }
.wb-tools-grid .button { min-width:144px; }
.wb-home-columns { align-items:stretch; }
.wb-recent-section,#homeView .wb-library-summary {
  min-width:0; border:1px solid var(--color-accent-border); border-radius:4px;
  padding:16px; background:transparent;
}
#homeView .wb-library-summary { border-left:1px solid var(--color-accent-border); padding:16px; }
#homeView .wb-section-head { min-height:40px; margin-bottom:8px; }
#homeView .wb-recent-table,#homeView .wb-library-summary {
  --overview-list-height:calc(100dvh - 370px);
}
.wb-home-page #homeView .wb-recent-table,.wb-home-page #homeView .wb-library-summary {
  --overview-list-height:240px;
}
#homeView .wb-recent-table { max-height:var(--overview-list-height); overflow:auto; }
#homeView .wb-recent-heading { position:sticky; top:0; z-index:1; background:var(--page); }
#homeLibraryRows { max-height:calc(var(--overview-list-height) - 40px); overflow:auto; }
.wb-home-library-row { height:64px; min-height:64px; }
.wb-home-library-row>span:first-child { min-width:0; flex:1; }
.wb-home-library-row>span:first-child>span { min-width:0; }
.wb-home-library-row small { margin-top:4px; }
.wb-home-library-row>span:last-child { flex:0 0 48px; justify-content:flex-end; }
.wb-home-library-row>span>svg { color:var(--color-secondary); }
.wb-home-footer { padding-top:24px; }

/* Keep the two evaluation choices compact and aligned. */
#newView .wb-intent-grid { gap:32px; padding-top:8px; }
#newView .wb-intent-card {
  display:flex; flex-direction:column; align-items:stretch; gap:24px;
  padding:24px 0; border:1px solid var(--color-accent-border); border-radius:4px;
}
#newView .wb-intent-card:hover { background:transparent; border-color:var(--color-teal); }
#newView .wb-intent-heading { padding-inline:16px; }
#newView .wb-intent-icon { width:40px; height:40px; flex-basis:40px; }
#newView .wb-intent-cta { width:calc(100% - 32px); margin-top:auto; margin-inline:16px; min-height:40px; align-items:center; }

/* Keep the analysis progress/evidence directly below the ordered uploads. */
.wb-reconstruction-area { border-top:1px solid var(--line); padding-top:16px; margin-top:16px; min-height:112px; }
.wb-reconstruction-area .wb-section-head { margin-bottom:8px; min-height:24px; }
.wb-reconstruction-area .wb-section-head h2 { margin:0; }
.wb-reconstruction-area p { margin:0; }
.wb-reconstruction-area .wb-design-ready { margin:8px 0 0; padding:0; border:0; }
.wb-reconstruction-area .wb-progress { border:0; background:transparent; padding:0; margin:0; }
.wb-reconstruction-area progress { accent-color:var(--color-teal); width:100%; height:8px; }
.wb-reconstruction-area .wb-preview-strip { display:flex; gap:12px; max-height:200px; overflow:auto; }
.wb-reconstruction-area .wb-preview-strip figure { flex:0 0 112px; margin:0; }
.wb-reconstruction-area .wb-preview-strip img { width:100%; height:136px; object-fit:contain; }
.wb-reconstruction-area figcaption { font:var(--type-note) !important; }
.wb-upload-information :is(select,input),.wb-form-pair label { width:100%; min-width:0; }
.wb-form-footer .button { min-width:var(--control-action-width); }
.wb-design-primary .button { min-width:184px; }
.wb-inline-actions { align-items:center; }
.result-actions .wb-inline-actions { display:grid; grid-template-columns:repeat(3,minmax(120px,1fr)); }
.result-actions .button { width:100%; }
.wb-detail-navigation .button,.wb-preview-controls .button { min-width:96px; }
#settingsView>a[href="/legacy/"] { display:none; }

/* Three-level browser: consistent folder rows, compact execution table, explicit selection. */
.wb-prepare-layout { grid-template-columns:minmax(0,1fr) 304px; gap:24px; }
.wb-record-browser {
  border:1px solid var(--color-accent-border); border-radius:4px; background:var(--color-surface);
  overflow:hidden;
}
#prepareView .wb-record-browser .wb-list-toolbar { padding:16px; border-bottom:1px solid var(--line); background:transparent; gap:12px; }
#prepareView #refreshRecords { min-width:var(--control-action-width); }
#prepareView #recordChoices { padding:8px; max-height:calc(100dvh - 342px); overflow:auto; scrollbar-gutter:stable; }
#prepareView .wb-record-domain { margin:0; border:0; }
#prepareView .wb-record-domain>summary,#prepareView .wb-record-task>summary {
  display:flex; align-items:center; gap:8px; min-height:48px; padding:8px 12px;
  border-bottom:1px solid var(--line); border-radius:0;
}
#prepareView .wb-record-domain>summary>strong,#prepareView .wb-record-task>summary>strong {
  flex:1; min-width:0; overflow-wrap:anywhere;
}
#prepareView .wb-record-domain>summary .wb-tree-count,#prepareView .wb-record-task>summary .wb-tree-count {
  white-space:nowrap; color:var(--color-muted); margin-left:auto; flex:0 0 auto;
}
#prepareView .wb-record-task>summary .wb-tree-selected { color:var(--color-teal); white-space:nowrap; }
#prepareView .wb-record-domain[open]>summary { background:var(--color-teal-soft); }
#prepareView .wb-record-domain>summary:hover,#prepareView .wb-record-task>summary:hover { background:var(--color-hover); }
#prepareView .wb-record-task { margin-left:20px; }
#prepareView .wb-record-task[open]>summary { background:var(--color-control); }
#prepareView .wb-record-folder-items { margin:0 0 8px 20px; padding:0; border-left:1px solid var(--line); }
#prepareView .wb-record-row {
  display:grid; grid-template-columns:minmax(0,1fr) 128px 104px; align-items:center;
  min-height:80px; gap:12px; padding:12px;
  border-bottom:1px solid var(--line); background:var(--color-control);
}
#prepareView .wb-record-row>label { grid-column:1; grid-row:1; align-items:center; gap:12px; min-width:0; }
#prepareView .wb-record-row .wb-record-copy { min-width:0; }
#prepareView .wb-record-row .wb-record-copy small { display:block; }
#prepareView .wb-record-meta { grid-column:2; grid-row:1; display:grid; gap:4px; margin:0; align-content:center; }
#prepareView .wb-record-row>.button { grid-column:3; grid-row:1; width:104px; min-height:40px; padding:8px; border:1px solid var(--color-control-border); background:var(--color-control); }
#prepareView .wb-record-row:hover { background:var(--color-hover); }
#prepareView .wb-record-row.is-selected { background:var(--color-teal-soft); }
#prepareView .wb-selection-tray { border:1px solid var(--color-accent-border); border-radius:4px; padding:16px; background:transparent; }
#selectedRecords { max-height:240px; overflow:auto; margin-bottom:16px; }
#prepareView .wb-save-feedback { display:grid; grid-template-columns:minmax(0,1fr) 120px; align-items:center; gap:8px; }
#prepareView .wb-save-feedback .button { width:120px; }
.wb-tray-actions { display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.wb-tray-actions .button { width:100%; min-width:0; padding:8px; }
.wb-tray-footer { grid-template-columns:minmax(0,1fr); justify-content:stretch; }
.wb-library-content #libraryRecords { max-height:calc(100dvh - 462px); min-height:128px; overflow:auto; scrollbar-gutter:stable; }
.wb-library-content .wb-record-row>.button { width:96px; border:1px solid var(--color-control-border); background:var(--color-control); }
.wb-projects-pagination>div { display:flex; gap:8px; }
.wb-projects-pagination>.wb-pagination-options { gap:16px; flex-wrap:wrap; }
.wb-projects-pagination>div .button { min-width:80px; }

/* P2: the filter and all review selects share the same width and right edge. */
.workbench .issue-toolbar { display:grid; grid-template-columns:minmax(0,1fr) var(--inspector-control-width); align-items:center; gap:12px; }
.workbench .issue-card-meta { display:grid; grid-template-columns:minmax(0,1fr) var(--inspector-control-width); align-items:center; gap:12px; }
.workbench :is(.issue-toolbar,.issue-card-meta) select {
  box-sizing:border-box; width:var(--inspector-control-width); min-width:var(--inspector-control-width);
  max-width:none; height:40px; min-height:40px; padding:8px 32px 8px 12px; margin:0;
  appearance:none; background-color:var(--color-control);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23202827' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position:right 12px center; background-repeat:no-repeat;
}
.workbench .issue-card-meta .issue-kind { justify-self:start; }
.workbench .issue-card { width:100%; }
.workbench #resultArea .overview-line { padding:0 0 16px; }
.workbench #resultArea .legend-row { margin-bottom:8px; }
.workbench .matrix-row>.matrix-cell { box-sizing:border-box; }
.workbench .empty-cell { display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:12px 8px; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.workbench .empty-cell .empty-mark {
  display:grid; place-items:center; box-sizing:border-box; flex:0 0 18px;
  width:18px; height:18px; padding:0; margin:0;
}
.workbench .empty-mark svg { display:block; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.7; }
.workbench .empty-cell>span:last-child { min-width:0; font:var(--type-note) !important; }
.workbench .evidence-image img { object-fit:contain; }
@media(min-width:980px) {
  #designSummary:not([hidden])~.wb-prepare-layout #recordChoices { max-height:calc(100dvh - 442px); }
  .wb-recent-row,.wb-home-library-row { min-height:64px; }
  .workbench #matrix .matrix-wrap,.workbench #resultArea .comparison-layout .inspector,
  .workbench #resultArea .flow-comparison-layout .inspector { max-height:calc(100dvh - 594px); }
  #allProjects { max-height:calc(100dvh - 400px); overflow:auto; }
  .wb-folders { max-height:calc(100dvh - 360px); }
}
@media(min-width:1100px) and (max-height:850px) {
  .wb-home-page #homeView .wb-recent-table,.wb-home-page #homeView .wb-library-summary { --overview-list-height:200px; }
  .wb-design-fields>label { margin-bottom:8px; gap:4px; }
  .wb-design-section h2 { margin-bottom:8px; }
  .wb-design-form .wb-design-actions { margin-top:16px; }
}
@media(max-width:1279px) {
  #prepareView .wb-record-row { grid-template-columns:minmax(0,1fr) 104px; gap:4px 12px; }
  #prepareView .wb-record-row>.button { grid-column:2; grid-row:1 / span 2; }
  #prepareView .wb-record-meta { grid-column:1; grid-row:2; display:flex; gap:12px; margin-left:28px; }
}
@media(max-width:979px) {
  .wb-prepare-layout { grid-template-columns:1fr; }
  #prepareView .wb-selection-tray { padding:16px; border:1px solid var(--color-accent-border); }
  #prepareView #recordChoices { max-height:480px; }
  #homeView .wb-recent-table { max-height:360px; }
  #homeLibraryRows { max-height:320px; }
  .wb-library-content #libraryRecords { max-height:480px; }
}
@media(max-width:699px) {
  #homeView .wb-library-summary { padding:16px; border:1px solid var(--color-accent-border); }
  #homeView .wb-recent-table { max-height:none; }
  #homeView .wb-recent-row { min-height:80px; }
  .wb-home-library-row { height:auto; min-height:64px; }
  .result-actions { width:100%; }
  .result-actions .wb-inline-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .result-actions .button { padding:8px; }
  .result-actions .button svg { display:none; }
  #prepareView .wb-record-task { margin-left:8px; }
  #prepareView .wb-record-folder-items { margin-left:8px; }
  #prepareView .wb-record-domain>summary,#prepareView .wb-record-task>summary { padding-inline:8px; gap:4px; flex-wrap:wrap; }
  #prepareView .wb-record-task>summary .wb-tree-count { display:none; }
  #prepareView .wb-record-row { grid-template-columns:minmax(0,1fr) 88px; padding:12px 8px; }
  #prepareView .wb-record-row>.button { width:88px; }
  #prepareView #refreshRecords { min-width:104px; }
  #prepareView .wb-record-browser .wb-list-toolbar { padding:12px; }
}

/* Compact cells keep the color pattern readable across more aligned steps. */
.workbench #matrix .comparison-layout[data-density=compact] {
  --stage-width:104px; --cell-width:112px; --cell-height:84px;
}
.workbench #matrix .comparison-layout[data-density=compact] :is(.matrix-cell,.matrix-app-copy strong,.matrix-app-copy span,.matrix-app-copy small,.matrix-stage strong,.matrix-stage span,.heat-main,.heat-step,.heat-score,.heat-status,.burden-unrated) {
  font:var(--type-note) !important;
}
.workbench #matrix .comparison-layout[data-density=compact] .matrix-header {
  min-height:54px; padding:6px;
}
.workbench #matrix .comparison-layout[data-density=compact] .matrix-app-header { gap:6px; }
.workbench #matrix .comparison-layout[data-density=compact] .matrix-stage { padding:6px; }
.workbench #matrix .comparison-layout[data-density=compact] .matrix-stage strong {
  -webkit-line-clamp:2; margin-bottom:2px;
}
.workbench #matrix .comparison-layout[data-density=compact] .heat-cell {
  padding:6px; gap:2px;
}
.workbench #matrix .comparison-layout[data-density=compact] .heat-score {
  display:flex; align-items:center; min-height:14px;
}
.workbench #matrix .comparison-layout[data-density=compact] .burden-stars { gap:2px; }
.workbench #matrix .comparison-layout[data-density=compact] .burden-stars svg {
  width:14px; height:14px;
}
.workbench #matrix .comparison-layout[data-density=compact] .empty-cell { padding:6px; gap:6px; }

/* The comparison is the primary workspace; auxiliary controls share compact rows. */
@media(min-width:980px) {
  body.wb-result-page .wb-main { padding:16px 24px; }
  body.wb-result-page #resultView {
    display:flex; flex-direction:column; height:calc(100dvh - 96px); min-height:480px;
  }
  body.wb-result-page #resultView .result-page-head { flex:0 0 auto; min-height:48px; margin-bottom:8px; align-items:flex-start; }
  body.wb-result-page .result-title-row { min-height:32px; align-items:center; }
  body.wb-result-page .result-project { min-width:180px; }
  body.wb-result-page .result-actions { width:auto; flex:0 0 auto; justify-items:end; }
  body.wb-result-page .result-title-row h1 { font:var(--type-heading) !important; }
  body.wb-result-page .result-actions .wb-inline-actions { grid-template-columns:repeat(3,minmax(104px,1fr)); }
  body.wb-result-page :is(.result-actions .button,.result-rename summary) { font:var(--type-note) !important; }
  body.wb-result-page .result-actions .button { min-height:32px; padding:6px 12px; }
  body.wb-result-page #resultSaveFeedback { min-height:18px; margin-top:4px; }
  body.wb-result-page #resultArea { display:flex; flex:1; flex-direction:column; min-height:0; gap:8px; }
  body.wb-result-page .result-toolbar {
    display:flex; flex:0 0 auto; align-items:center; flex-wrap:wrap; gap:8px 24px;
    border-bottom:1px solid var(--line);
  }
  body.wb-result-page .result-view-tabs { flex:0 0 auto; margin:0; border:0; gap:24px; }
  body.wb-result-page .result-view-tabs button { min-height:40px; padding:8px 0; }
  body.wb-result-page #resultArea .controls {
    display:flex; flex:1; align-items:center; flex-wrap:wrap; gap:8px 12px;
    min-width:0; min-height:40px; padding:0; border:0; margin:0;
  }
  body.wb-result-page #resultArea .controls :is(.segment,.check-control span,.result-view-settings summary,.button) {
    font:var(--type-note) !important;
  }
  body.wb-result-page #resultArea .controls .segment { min-height:32px; padding:6px 10px; }
  body.wb-result-page #resultArea .controls .segmented-control { padding:2px; }
  body.wb-result-page #resultArea .controls :is(.button,.result-view-settings>summary) {
    min-height:32px; padding:6px 10px;
  }
  body.wb-result-page #filterSummary:empty { display:none; }
  body.wb-result-page .result-meta {
    display:flex; flex:0 0 auto; align-items:center; flex-wrap:wrap; gap:4px 24px;
    padding:0 0 8px; border-bottom:1px solid var(--line);
  }
  body.wb-result-page #resultArea .legend-row {
    display:flex; align-items:center; flex:1 1 auto; flex-wrap:wrap;
    min-height:24px; gap:4px 12px; padding:0; margin:0; border:0;
  }
  body.wb-result-page .legend-row .legend-scale { gap:8px; }
  body.wb-result-page #resultArea .overview-line { flex:0 0 auto; padding:0; margin:0; }
  body.wb-result-page #resultArea .overview-stats { gap:12px; }
  body.wb-result-page #resultArea :is(#matrix,#flow) {
    display:flex; flex:1; flex-direction:column; min-height:0; margin:0; padding:0;
  }
  body.wb-result-page #resultArea .section-heading { flex:0 0 auto; min-height:24px; margin:0 0 8px; }
  body.wb-result-page #resultArea .section-heading h2 { font:var(--type-body) !important; margin:0; }
  body.wb-result-page #matrixScrollHint { font:var(--type-note) !important; margin:0 0 4px; }
  body.wb-result-page #resultArea :is(.comparison-layout,.flow-comparison-layout) {
    flex:1; min-height:0; gap:16px; align-items:stretch;
  }
  body.wb-result-page #resultArea .comparison-layout { grid-template-rows:minmax(0,1fr); }
  body.wb-result-page #matrix .matrix-wrap {
    height:100%; max-height:none; min-height:0; overflow:auto;
  }
  body.wb-result-page #resultArea :is(.comparison-layout,.flow-comparison-layout) .inspector {
    height:100%; min-height:0; max-height:none; padding-left:16px; overflow:auto;
  }
  body.wb-result-page #flow .flow-path-content { min-height:0; overflow:auto; }
  body.wb-result-page #flow .flow-canvas { max-height:none; }
  body.wb-result-page .result-matrix-footer {
    display:grid; flex:0 0 auto; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:start; margin-top:8px;
  }
  body.wb-result-page .result-matrix-footer :is(.matrix-record-filter,.matrix-score-help) {
    margin:0; padding:0; max-width:none;
  }
  body.wb-result-page .result-matrix-footer summary {
    min-height:32px; padding:6px 10px; font:var(--type-note) !important;
  }
  body.wb-result-page .result-matrix-footer .matrix-record-filter[open] { padding:8px; }
  body.wb-result-page .result-matrix-footer :is(.record-filter-content,.matrix-score-help>p) {
    max-height:160px; overflow:auto;
  }
  body.wb-result-page .result-matrix-footer .matrix-score-help[open] { width:280px; }
}
/* Related tasks share the existing folder browser's type and control sizes. */
.wb-record-recommendations { padding: 12px 16px; border-bottom: 1px solid var(--color-line); }
.workbench .wb-record-recommendations h3 { margin: 0 0 8px; font: var(--type-body) !important; }
#recommendedFolders { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-recommend-folder { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--color-line); border-radius: 4px; background: var(--color-control); text-align: left; color: var(--color-ink); font: inherit; cursor: pointer; }
.wb-recommend-folder > svg { width: 16px; height: 16px; flex: 0 0 16px; }
.wb-recommend-folder > span:first-of-type { flex: 1; min-width: 0; }
.wb-recommend-folder strong { display: block; font-size: 14px; line-height: 22px; font-weight: 400; overflow-wrap: anywhere; }
.workbench .wb-recommend-folder small { display: block; font: var(--type-note) !important; color: var(--color-secondary); }
.wb-recommend-folder:hover { background:var(--color-hover); border-color:var(--color-accent-border); }
.wb-recommend-folder:focus-visible { outline:2px solid var(--color-focus); outline-offset:2px; }
.wb-recommend-folder:disabled { opacity: .5; cursor: default; }
@media (min-width: 980px) {
  #prepareView #recordChoices { max-height: max(140px, calc(100dvh - 342px - var(--recommendation-height, 0px))); }
  #designSummary:not([hidden])~.wb-prepare-layout #recordChoices {
    max-height: max(140px, calc(100dvh - 442px - var(--recommendation-height, 0px)));
  }
}

/* The upload page fits the desktop viewport; long collections scroll in their own panes. */
@media (min-width:980px) and (min-height:700px) {
  body.wb-setup-page .wb-main {
    display:flex; flex-direction:column; height:calc(100dvh - 64px); min-height:0; padding:16px 24px;
  }
  body.wb-setup-page #workspaceStatus { flex:0 0 auto; margin-bottom:8px; }
  body.wb-setup-page #setupView { display:flex; flex:1; flex-direction:column; min-height:0; width:100%; }
  body.wb-setup-page #setupView .wb-page-head { flex:0 0 auto; min-height:40px; margin:0 0 12px; align-items:center; }
  body.wb-setup-page #setupForm { display:flex; flex:1; flex-direction:column; min-height:0; }
  body.wb-setup-page .wb-upload-workspace { flex:1; min-height:0; gap:24px; align-items:stretch; }
  body.wb-setup-page .wb-upload-workspace>.wb-design-section {
    display:flex; flex-direction:column; min-height:0; margin:0;
  }
  body.wb-setup-page .wb-design-section h2 { flex:0 0 auto; margin:0 0 8px; }
  body.wb-setup-page .wb-upload-target { flex:0 0 auto; min-height:184px; padding:24px; }
  body.wb-setup-page .wb-upload-target.is-compact { min-height:64px; padding:12px 16px; gap:8px 12px; }
  body.wb-setup-page #uploadFileHint { flex:0 0 auto; margin:8px 0; }
  body.wb-setup-page #screenshotError { flex:0 0 auto; max-height:66px; overflow:auto; margin:0 0 8px; }
  body.wb-setup-page #screenshotList {
    flex:1; min-height:0; grid-template-columns:repeat(auto-fill,minmax(132px,1fr));
    align-content:start; gap:12px; overflow:auto; margin:0; padding:4px 4px 8px; scrollbar-gutter:stable;
  }
  body.wb-setup-page .wb-design-form #screenshotList:not(:empty) { margin:0; }
  body.wb-setup-page #screenshotList:empty { padding:0; }
  body.wb-setup-page .wb-file-actions { display:grid; grid-template-columns:28px minmax(24px,1fr) 28px 28px; gap:4px; }
  body.wb-setup-page .wb-file-actions button { width:28px; height:28px; }
  body.wb-setup-page .wb-file-actions>span { text-align:center; }
  body.wb-setup-page .wb-reconstruction-area { flex:0 0 auto; min-height:64px; padding-top:8px; margin-top:8px; }
  body.wb-setup-page .wb-reconstruction-area .wb-preview-strip { max-height:120px; }
  body.wb-setup-page .wb-reconstruction-area .wb-preview-strip img { height:88px; }
  body.wb-setup-page .wb-upload-information { min-height:0; overflow:auto; padding-left:24px; scrollbar-gutter:stable; }
  body.wb-setup-page .wb-design-fields { display:grid; grid-template-columns:minmax(112px,.7fr) minmax(0,1.3fr); gap:8px 16px; margin:0; }
  body.wb-setup-page .wb-design-fields h2 { grid-column:1 / -1; margin:0; }
  body.wb-setup-page .wb-design-fields>label { align-content:start; gap:4px; margin:0; }
  body.wb-setup-page #taskDescription { height:68px; min-height:68px; }
  body.wb-setup-page .wb-advanced { padding:8px 0; }
  body.wb-setup-page .wb-advanced[open]>summary { margin-bottom:8px; }
  body.wb-setup-page .wb-options { margin-top:8px; }
  body.wb-setup-page #libraryArchiveFields { margin:8px 0 0; gap:0 12px; }
  body.wb-setup-page .wb-archive-location { gap:4px; }
  body.wb-setup-page .wb-archive-recognition-actions .button { min-height:32px; padding:4px 12px; }
  body.wb-setup-page .wb-archive-search { padding:4px 8px; }
  body.wb-setup-page .wb-archive-search input { height:32px; min-height:32px; padding:4px 8px; }
  body.wb-setup-page #archiveFolderTree { max-height:clamp(88px,calc(100dvh - 664px),176px); padding:4px; overscroll-behavior:contain; }
  body.wb-setup-page .wb-design-form .wb-archive-domain>summary { margin:0; }
  body.wb-setup-page .wb-archive-new-domain { min-height:32px; padding:4px 12px; }
  body.wb-setup-page .wb-setting-field { margin:8px 0 0; gap:4px; }
  body.wb-setup-page .wb-analysis-options { padding:0; gap:8px; }
  body.wb-setup-page #designError,body.wb-setup-page #pendingArchive { flex:0 0 auto; max-height:66px; overflow:auto; margin:8px 0 0; }
  body.wb-setup-page .wb-design-actions { flex:0 0 auto; margin:12px 0 0; padding:0; }
  body.wb-setup-page .wb-form-footer { flex-wrap:nowrap; gap:12px; padding-top:12px; }
  body.wb-setup-page .wb-form-footer>div { gap:8px; }
  body.wb-setup-page #analysisSettings { position:relative; border:0; padding:0; margin-right:auto; }
  body.wb-setup-page #analysisSettings>summary { margin:0; padding:8px; }
  body.wb-setup-page #analysisSettings .wb-analysis-options {
    position:absolute; bottom:calc(100% + 8px); left:0; z-index:5; width:280px; padding:12px;
    border:1px solid var(--color-control-border); border-radius:4px; background:var(--color-control);
  }
}
@media (min-width:980px) and (min-height:700px) and (max-height:850px) {
  body.wb-setup-page .wb-screenshot-item img { height:104px; }
}

/* Browse deeper levels to the right inside the existing folder frame. */
.wb-folder-column { display:flex; flex-direction:column; min-width:0; min-height:0; border-right:1px solid var(--line); }
.wb-folder-column:last-child { border-right:0; }
.workbench .wb-folder-column>h3 {
  flex:0 0 auto; min-height:32px; margin:0; padding:6px 12px; border-bottom:1px solid var(--line);
  background:var(--color-surface); color:var(--color-secondary); font:var(--type-note) !important;
}
.wb-folder-column-list { flex:1; min-height:0; overflow:auto; padding:4px; scrollbar-gutter:stable; overscroll-behavior:contain; }
.wb-folder-nav {
  display:flex; align-items:flex-start; gap:8px; width:100%; min-height:44px; padding:10px 8px;
  border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent;
  color:var(--color-ink); text-align:left; cursor:pointer;
}
.wb-folder-nav>svg { flex:0 0 16px; width:16px; height:16px; margin-top:3px; color:var(--color-secondary); }
.wb-folder-nav>svg:last-child { margin-left:auto; }
.wb-folder-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.workbench .wb-folder-copy>strong { display:inline; font:var(--type-body) !important; }
.workbench .wb-folder-copy>small { display:inline-block; margin-left:6px; color:var(--color-muted); font:var(--type-note) !important; white-space:nowrap; }
.workbench .wb-folder-copy>.wb-tree-selected { color:var(--color-teal-hover); }
.wb-folder-nav:hover { background:var(--color-hover); }
.wb-folder-nav.is-active { background:var(--color-teal-soft); color:var(--color-teal-hover); }
.wb-folder-nav.is-active>svg { color:var(--color-teal); }
.workbench .wb-folder-empty { margin:0; padding:12px 8px; color:var(--color-muted); font:var(--type-note) !important; overflow-wrap:anywhere; }
#prepareView #recordChoices {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding:0;
  height:min(544px,max(140px,calc(100dvh - 342px - var(--recommendation-height,0px))));
  max-height:none; overflow:hidden; scrollbar-gutter:auto;
}
#designSummary:not([hidden])~.wb-prepare-layout #recordChoices {
  height:min(544px,max(140px,calc(100dvh - 442px - var(--recommendation-height,0px))));
  max-height:none;
}
.workbench #prepareView #recordChoices .wb-record-row {
  display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:96px; gap:6px 8px;
  padding:10px 8px; background:transparent;
}
.workbench #prepareView #recordChoices .wb-record-row>label {
  grid-column:1 / -1; grid-row:1; align-items:flex-start; gap:8px; min-width:0;
}
.workbench #prepareView #recordChoices .wb-record-row>label>input { margin:3px 0 0; }
.workbench #prepareView #recordChoices .wb-record-copy small { margin-top:2px; }
.workbench #prepareView #recordChoices .wb-record-meta {
  display:flex; flex-wrap:wrap; grid-column:1; grid-row:2; gap:0 8px; margin:0 0 0 24px;
}
.workbench #prepareView #recordChoices .wb-record-row>.button {
  grid-column:2; grid-row:2; width:72px; min-width:0; min-height:32px; padding:6px;
  font:var(--type-note) !important; align-self:end;
}
.workbench #prepareView #recordChoices .wb-record-row:hover { background:var(--color-hover); }
.workbench #prepareView #recordChoices .wb-record-row.is-selected { background:var(--color-teal-soft); }
.workbench #archiveFolderTree {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); height:176px; max-height:none;
  padding:0; overflow:hidden; scrollbar-gutter:auto;
}
.workbench #archiveFolderTree .wb-folder-column>h3 { min-height:24px; padding:3px 8px; }
.workbench #archiveFolderTree .wb-archive-folder { align-items:flex-start; gap:6px !important; }
.workbench #archiveFolderTree .wb-archive-folder>input { margin:3px 0 0; }
.workbench #archiveFolderTree .wb-folder-copy>.wb-archive-match { color:var(--color-teal-hover); }
.workbench #resultArea .controls>#toggleInspector {
  height:32px; min-height:32px; padding:6px 10px; font:var(--type-note) !important;
}
@media (min-width:980px) and (min-height:700px) {
  body.wb-setup-page #archiveFolderTree { height:clamp(88px,calc(100dvh - 664px),176px); max-height:none; padding:0; }
}
@media (max-width:979px) {
  .wb-prepare-layout { grid-template-columns:minmax(0,1fr); }
  #prepareView .wb-source-panel { min-width:0; }
  #prepareView #recordChoices,#designSummary:not([hidden])~.wb-prepare-layout #recordChoices { height:440px; }
}
@media (max-width:699px) {
  #prepareView #recordChoices { grid-template-columns:repeat(3,minmax(160px,1fr)); overflow-x:auto; }
  .workbench #archiveFolderTree { height:208px; }
}
