/* Shared workbench layout for the free tools. Proposed November 2026; prototyped on Photo Forensics first.
   One grid for every tool: a persistent side panel for the file, the views, the settings, the AI layer and the notes,
   and a main column for the stage, the executive triage, the collected records and the exports.
   Under 1024px the side panel stacks above the stage and, once results exist, becomes a sticky top sheet of chips. */
.workbench{--wb-aside-width:332px;--wb-gap:24px;--wb-sticky-top:132px;--wb-sticky-top-phone:112px;--wb-container:1600px;--wb-line:#c3d3d9;--wb-line-soft:#dbe6ea;--wb-panel-bg:#f6f9fa;--wb-accent:#0098bc;--wb-ink:#081c23;--wb-muted:#49636e;--wb-radius:3px;--wb-shadow:0 16px 40px rgba(7,25,31,.16)}
.container--workbench{max-width:var(--wb-container,1600px)}
.workbench{max-width:none;display:grid;grid-template-columns:minmax(0,1fr);gap:var(--wb-gap);align-items:start}
.workbench__head{grid-column:1/-1;min-width:0}
.workbench__head h2{margin-bottom:16px}
.workbench__head .tool-intake{margin-bottom:0}
.workbench__aside{min-width:0}
.workbench__main{min-width:0}
.workbench__panel{margin:0 0 14px;border:1px solid var(--wb-line);background:#fff;padding:0}
.workbench__panel:last-child{margin-bottom:0}
.workbench__panel>summary{margin:0;padding:12px 16px;font-size:15px;font-weight:700;color:var(--wb-ink);background:var(--wb-panel-bg);cursor:pointer;list-style:revert}
.workbench__panel>summary::marker{color:var(--wb-accent)}
.workbench__panel[open]>summary{border-bottom:1px solid var(--wb-line)}
.workbench__panel-body{padding:14px 16px 16px}
.workbench__panel-body>:first-child{margin-top:0}
.workbench__panel-body>:last-child{margin-bottom:0}
.workbench__panel .tool-workspace label,.workbench__panel label{margin:0 0 8px;font-size:14px}
.workbench__panel .tool-actions{margin:14px 0 0;gap:10px}
.workbench__panel .tool-actions .btn{width:100%;text-align:center}
.workbench__panel input[type=file]{padding:12px}
.workbench__panel .photo-input p,.workbench__panel .photo-notes p{font-size:13px;line-height:1.55;color:var(--wb-muted);margin:8px 0 0}
.workbench__status{margin:0 0 14px}
.workbench__status .tool-status{margin:0;padding:12px;font-size:14px;line-height:1.55}
.workbench__status progress{display:block;margin-top:10px}
.workbench .photo-tool-groups{grid-template-columns:minmax(0,1fr);gap:12px}
.workbench .photo-tool-groups fieldset{padding:10px 12px 12px}
.workbench .photo-tool-groups legend{font-size:13px;color:var(--wb-muted)}
.workbench .photo-view-buttons{gap:8px}
.workbench .photo-view-button{min-height:38px;padding:6px 12px;font-size:13px;line-height:1.3}
.workbench .photo-tool-picker .tool-note{font-size:13px;line-height:1.55;margin:12px 0 0}
.workbench .photo-controls{grid-template-columns:minmax(0,1fr);gap:14px;margin:0}
.workbench .photo-controls label{font-size:13px;margin-bottom:6px}
.workbench .photo-controls select{padding:9px}
.workbench .photo-controls input[type=range]{min-height:36px}
.workbench .workbench__panel .tool-note{font-size:13px;line-height:1.55}
.workbench .photo-notes textarea{min-height:120px}
.workbench__empty{margin:0;padding:28px 24px;border:1px dashed var(--wb-line);background:var(--wb-panel-bg);color:var(--wb-muted);font-size:15px;line-height:1.6}
.workbench__empty p{margin:0}
.workbench__main .tool-results:not([hidden])~.workbench__empty{display:none}
.workbench[data-workbench-state=results] .workbench__empty{display:none}
.workbench__main .tool-results>h2{margin-top:0}
.workbench__stage{margin:0 0 24px}
.workbench__stage .photo-image-pair{gap:16px}
.workbench__stage .photo-image-panel h3{margin:0 0 10px;font-size:17px}
.workbench__stage .photo-canvas-scroll{max-height:640px}
.workbench__stage .tool-split-control{margin:14px 0 10px}
.workbench__stage .photo-method-note{margin:0 0 16px}
.workbench__stage .photo-pixel-box{margin:16px 0 0}
.workbench__results{min-width:0}
.workbench__footer{margin:32px 0 0;padding-top:20px;border-top:2px solid var(--wb-accent)}
.workbench__footer h3{margin:0 0 12px}
.workbench__footer .tool-actions{margin:0 0 12px}
.workbench__footer .tool-note{margin:0}
.workbench .tool-results .tool-triage{margin-top:0}
.workbench [hidden]{display:none!important}
@media(min-width:1024px){
.workbench{grid-template-columns:var(--wb-aside-width) minmax(0,1fr)}
.workbench__aside{position:sticky;top:var(--wb-sticky-top);max-height:calc(100vh - var(--wb-sticky-top) - 16px);overflow:auto;overscroll-behavior:contain;padding-right:4px}
.workbench__aside::-webkit-scrollbar{width:8px}
.workbench__aside::-webkit-scrollbar-thumb{background:var(--wb-line);border-radius:4px}
}
@media(max-width:1023px){
.workbench{gap:20px}
.workbench__panel .tool-actions .btn{width:auto;flex:1 1 140px}
.workbench[data-workbench-state=results] .workbench__aside{position:sticky;top:var(--wb-sticky-top-phone);z-index:6;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px 8px;padding:8px 16px;margin:0 -16px;background:#fff;border-top:1px solid var(--wb-line);border-bottom:1px solid var(--wb-line);box-shadow:0 10px 24px rgba(7,25,31,.1)}
.workbench[data-workbench-state=results] .workbench__panels{display:contents}
.workbench[data-workbench-state=results] .workbench__status{flex-basis:100%;margin:0;order:9}
.workbench[data-workbench-state=results] .workbench__status .tool-status{padding:6px 10px;font-size:12px;line-height:1.4}
.workbench[data-workbench-state=results] .workbench__panel{margin:0;border:0;background:transparent;position:static}
.workbench[data-workbench-state=results] .workbench__panel>summary{list-style:none;padding:6px 12px;border:1px solid var(--wb-ink);border-radius:999px;background:#fff;font-size:14px;line-height:1.3}
.workbench[data-workbench-state=results] .workbench__panel>summary::-webkit-details-marker{display:none}
.workbench[data-workbench-state=results] .workbench__panel[open]>summary{background:var(--wb-ink);color:#fff;border-color:var(--wb-ink)}
.workbench[data-workbench-state=results] .workbench__panel-body{position:absolute;left:0;right:0;top:100%;max-height:min(60vh,520px);overflow:auto;overscroll-behavior:contain;padding:16px;background:#fff;border-bottom:1px solid var(--wb-line);box-shadow:var(--wb-shadow)}
.workbench__stage .photo-image-pair{gap:12px}
.workbench__stage .photo-canvas-scroll{max-height:420px}
}
@media(max-width:767px){
.workbench[data-workbench-state=results] .workbench__aside{padding:8px 12px;margin:0 -16px}
.workbench[data-workbench-state=results] .workbench__panel>summary{padding:7px 12px;font-size:13px}
.workbench__empty{padding:20px 16px}
.workbench__footer .tool-actions .btn{width:100%}
}
@media(prefers-reduced-motion:no-preference){.workbench__panel>summary{transition:background-color .15s ease,color .15s ease}}

/* Shared shell for the video family and the beta tools built from it. */
.workbench.video-workspace{background:#fff;border:1px solid var(--wb-line);border-top:4px solid var(--wb-accent);border-radius:0;padding:40px;box-shadow:0 16px 50px #07191f0c;color:#07191f}
.workbench.video-workspace .workbench__panel{margin:0 0 14px;padding:0;border:1px solid var(--wb-line);background:#fff}
.workbench.video-workspace .workbench__panel>summary{padding:12px 16px}
.workbench.video-workspace .workbench__head p{max-width:none}
.workbench .video-inputs{grid-template-columns:minmax(0,1fr);gap:14px}
.workbench .video-inputs p,.workbench .video-controls p{font-size:13px;line-height:1.55;color:var(--wb-muted)}
.workbench .video-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch}
.workbench .video-controls label{margin:0;font-size:13px}
.workbench .video-controls input[type=number],.workbench .video-controls select{width:100%;padding:9px}
.workbench .video-controls .btn{width:100%}
.workbench .video-contact-sheet{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.workbench .video-contact-sheet span{font-size:11px}
.workbench .video-ai{border:0;padding:0;margin:0;background:transparent}
.workbench .video-ai h3{font-size:16px;margin:0 0 8px}
.workbench .video-ai p,.workbench .video-ai label{font-size:13px;line-height:1.55}
.workbench .video-frame-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
.workbench .video-ai select{width:100%}
.workbench .video-ai .btn{width:100%;margin-top:8px}
.workbench__stage .video-players{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin:0 0 16px}
.workbench__stage .video-players video{max-height:360px}
.workbench__stage .video-canvases{gap:16px}
.workbench__stage .video-canvases canvas{width:100%}
.workbench__stage>p{margin:12px 0 0}
.workbench__ai-records:empty{display:none}
.workbench__ai-records{margin:0 0 24px}
.workbench__ai-records .photo-ai-records{margin:0}
/* The experimental local AI chooser inside a side panel. */
.workbench__panel .photo-ai-panel{margin:0;padding:0;border:0;background:transparent}
.workbench__panel .photo-ai-panel h3{font-size:16px;margin:0 0 8px}
.workbench__panel .photo-ai-panel p,.workbench__panel .photo-ai-panel li,.workbench__panel .photo-ai-card-copy strong{font-size:13px;line-height:1.55}
.workbench__panel .photo-ai-choices,.workbench__panel .photo-ai-crop-controls{grid-template-columns:minmax(0,1fr);gap:10px;padding:10px;margin:12px 0}
.workbench__panel .photo-ai-card{padding:10px}
.workbench__panel .photo-ai-card:has(input:checked){padding:9px}
.workbench__panel .photo-ai-scope{padding:12px;margin:12px 0}
.workbench__panel .photo-ai-panel .tool-actions>button{width:100%}
.workbench__panel .photo-ai-panel .tool-status{font-size:13px;padding:10px}
/* Field filters, comparison filters and file cards inside a side panel. */
.workbench .tool-field-controls{grid-template-columns:minmax(0,1fr);gap:12px;margin:0}
.workbench .tool-field-controls .btn{width:100%}
.workbench .compare-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0}
.workbench .compare-filters input[type=search],.workbench .compare-filters select{width:100%;box-sizing:border-box}
.workbench .compare-files{grid-template-columns:minmax(0,1fr);gap:12px;margin:0 0 12px}
.workbench .compare-file{padding:12px}
.workbench .compare-file label{margin:8px 0 6px;font-size:13px}
.workbench__panel textarea{min-height:140px}
.workbench__panel #tool-headers{min-height:180px;font-size:13px}
.workbench__status .tool-progress{margin:12px 0 0;padding:14px}
.workbench__status .tool-progress-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
.workbench__status .tool-progress-privacy{margin-top:12px}
.workbench__main .tool-results>.tool-platform,.workbench__main .tool-results>.tool-map-host{margin-top:0}
.workbench__footer .tool-export-status{margin:0 0 10px}
@media(max-width:1023px){
.workbench.video-workspace{padding:24px 16px}
.workbench .video-inputs p{display:none}
.workbench[data-workbench-state=results] .workbench__status .tool-progress{display:none}
}
/* Exports bar, round two audit batch three (November 2, 2026). The footer that holds Save the report, the download
   buttons and the export status stays at the bottom of the window while the reader scrolls the results, then settles
   at the end of the results, so it never covers the last row for good. Generic: give any direct child of a tool's
   results column the class workbench__exports (or the attribute data-workbench-exports) and keep the explanatory
   notes and any notice after it, outside the bar. Its z-index sits under the phone sheet (6) and the privacy banner. */
.workbench__exports,[data-workbench-exports]{position:sticky;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:32px 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));background:#fff;border-top:2px solid var(--wb-accent,#0098bc);box-shadow:0 -10px 24px rgba(7,25,31,.08)}
.workbench__exports>h3{flex:0 0 auto;order:0;margin:0;font-size:17px;line-height:1.3}
.workbench__exports .tool-export-status{flex:1 1 240px;order:1;margin:0;padding:6px 10px;font-size:13px;line-height:1.45}
/* Five downloads (PDF, HTML, CSV, JSON, Markdown) wrap into full rows: each button grows from a shared basis, so a
   short last row stretches across the bar instead of leaving an empty cell, on a desktop and on a phone alike. */
.workbench__exports .tool-actions{flex:1 1 100%;order:2;display:flex;flex-wrap:wrap;margin:0;gap:8px}
.workbench__exports .tool-actions .btn{flex:1 1 136px;width:auto;min-width:0;min-height:44px;padding:6px 12px;font-size:14px;line-height:1.25;white-space:normal}
.workbench__exports .tool-export-status:empty{display:none}
.workbench__exports+.tool-note,.workbench__exports+p{margin-top:16px}
html:has(.workbench[data-workbench-state=results] .workbench__exports){scroll-padding-bottom:180px}
@media(max-width:767px){
.workbench__exports,[data-workbench-exports]{gap:6px;margin:24px 0 0;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px))}
.workbench__exports>h3{font-size:15px}
.workbench__exports .tool-actions{gap:6px}
.workbench__exports .tool-actions .btn{flex-basis:130px;padding:6px 8px}
.workbench__exports .tool-export-status{flex-basis:150px;padding:4px 8px;font-size:12px;line-height:1.4}
}

/* Touch targets, round two audit batch three. On coarse pointers and under 1024px every control in a tool workspace
   is at least 44 by 44 CSS pixels: buttons, selects, text and file inputs, summaries, checkbox and radio labels,
   ranges, the sheet chips, Show me and the Open the section links. The desktop with a mouse is unchanged. */
@media (pointer:coarse),(max-width:1023px){
:is(.tool-workspace,.workbench) :is(button,.btn,select,input[type=text],input[type=search],input[type=number],input[type=email],input[type=url],input[type=file],input[type=range]){min-height:44px;box-sizing:border-box}
:is(.tool-workspace,.workbench) :is(button,.btn){min-width:44px}
:is(.tool-workspace,.workbench) input[type=file]::file-selector-button{min-height:36px;padding:6px 12px}
:is(.tool-workspace,.workbench) summary{min-height:44px;box-sizing:border-box}
:where(.tool-workspace,.workbench) summary{padding-top:10px;padding-bottom:10px}
:is(.tool-workspace,.workbench) :is(input[type=checkbox],input[type=radio]){width:22px;height:22px;min-height:0}
:is(.tool-workspace,.workbench) label:has(>input[type=checkbox],>input[type=radio]){min-height:44px;box-sizing:border-box}
:where(.tool-workspace,.workbench) label:has(>input[type=checkbox],>input[type=radio]){padding-top:10px;padding-bottom:10px}
:is(.tool-workspace,.workbench) .tool-plain-link,:is(.tool-workspace,.workbench) .tool-triage a:not(.btn),:is(.tool-workspace,.workbench) .tool-consult a:not(.btn){display:inline-flex;align-items:center;min-height:44px}
:is(.tool-workspace,.workbench) .video-show-me__button,:is(.tool-workspace,.workbench) .photo-view-button,:is(.tool-workspace,.workbench) .tool-split-control .btn{min-height:44px}
.workbench[data-workbench-state=results] .workbench__panel>summary{display:flex;align-items:center;min-height:44px;min-width:44px;justify-content:center;padding-top:6px;padding-bottom:6px}
.workbench .photo-view-button{min-height:44px}
.workbench__panel .photo-ai-panel a:not(.btn){display:inline-flex;align-items:center;min-height:44px}
.workbench .photo-controls select,.workbench .video-controls select,.workbench .video-controls input[type=number]{min-height:44px}
}
/* The phone sheet keeps its height in check now that its chips are 44 pixels tall: no box around each chip, the
   status line in the small type the tool status already uses, and the video mode choices side by side. */
@media(max-width:1023px){
.workbench[data-workbench-state=results] .workbench__panels .workbench__panel,.workbench.video-workspace[data-workbench-state=results] .workbench__panel,.tool-workspace.workbench[data-workbench-state=results] .workbench__panel{margin:0;padding:0;border:0;background:transparent}
.workbench[data-workbench-state=results] .workbench__status .video-status{margin:0;padding:6px 10px;font-size:12px;line-height:1.4}
.workbench[data-workbench-state=results] .video-mode__options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px}
}
/* Printing the workbench (round two audit, batch four). The side panel, the empty state and the sticky exports bar stay
   off the paper and the results column takes the full width. The results column becomes a single flex column only so
   the plain findings card (or the block that holds it) can lead; a training sample label stays above it. The chrome,
   the controls and the break guards are in tool-hero.css. */
@media print{
.container--workbench{max-width:none}
.workbench,.workbench.video-workspace{display:block;padding:0;border:0;box-shadow:none}
.workbench :is(.workbench__head,.workbench__aside,.workbench__empty,.workbench__exports,[data-workbench-exports]){display:none!important}
.workbench__main{width:100%;max-width:none}
.workbench__main>section{display:flex;flex-direction:column;align-items:stretch}
.workbench__main>section>*{min-width:0;max-width:100%}
.workbench__main>section>:is(.tool-plain-findings,:has(>.tool-plain-findings)){order:-1}
.workbench__main>section>:is(.video-training-sample,.photo-sample-label){order:-2}
.workbench__main>section>h2:first-child{order:-3}
.workbench__stage .photo-canvas-scroll{max-height:none}
}
/* Round 2 (November 3, 2026). Phones: after a run the sticky header, the chip sheet and the sticky Save the report
   bar left about 420 of 844 pixels for results, and the flagged PDF page sat under the sheet. On phones the bar
   settles at the end of the results instead of floating, the sheet's status line keeps to one line, and anything a
   chip or a page button scrolls to clears the header and the sheet. Photo tools: the view picker under the two
   pictures sat behind the floating bar on a desktop, so their Save the report bar stays at the end of the results. */
@media(max-width:767px){
.workbench__exports,[data-workbench-exports]{position:static;box-shadow:none}
html:has(.workbench[data-workbench-state=results] .workbench__exports){scroll-padding-bottom:0}
.workbench[data-workbench-state=results] .workbench__aside{padding-top:6px;padding-bottom:6px}
.workbench[data-workbench-state=results] .workbench__status :is(.tool-status,.video-status){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workbench[data-workbench-state=results] :is(.workbench__stage,.pdf-stage,.workbench__main [id]){scroll-margin-top:calc(var(--wb-sticky-top-phone,112px) + 88px)}
.pdf-stage .pdf-figure img{max-height:56svh}
}
[data-photo-footer].workbench__exports{position:static;box-shadow:none}
