/* Shared UI and receipt workspace. Page-specific homepage styles live in home.css. */
@font-face{font-family:"IBM Plex Sans";src:url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Sans";src:url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
:root{
  --paper:#f6f7f3;--surface:#fff;--ink:#182b27;--text:#182b27;--muted:#5b6b63;
  --action:#205443;--action-hover:#153d30;--action-soft:#eaf1eb;--line:#dbe2dc;--soft:#edf2ed;
  --danger:#a7312c;--success:#24613d;--warning:#78521b;--radius:12px;
  --font-sans:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Consolas,monospace;
  font-family:var(--font-sans);font-size:16px;line-height:1.6;color:var(--text);background:var(--paper);font-synthesis:none;
}
*{box-sizing:border-box}
body{margin:0}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea,summary{touch-action:manipulation}
a{color:var(--action);text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{color:var(--action-hover)}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
button,a,input,select,textarea,summary,[tabindex]{outline-offset:3px}
:focus-visible{outline:3px solid var(--action)}
h1,h2,h3,p{margin-top:0}
h1,h2,h3{color:var(--ink);font-family:var(--font-sans);font-weight:600;line-height:1.2}
h1{font-size:56px;letter-spacing:-1.8px}
h2{font-size:32px;letter-spacing:-.6px}
h3{font-size:18px;letter-spacing:0}
p{margin-bottom:1em}
strong,b{font-weight:600}
[hidden]{display:none!important}
.icon{display:inline-block;width:20px;height:20px;flex:0 0 20px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.shell{width:min(1200px,calc(100% - 64px));margin-inline:auto}
.shell.wide{width:min(1420px,calc(100% - 48px))}
.site-header{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid var(--line)}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;line-height:1.25;font-size:17px;font-weight:400;flex-shrink:0;min-height:44px}
.brand:hover{color:var(--ink)}
.brand strong{font-weight:600}
.brand br{display:none}
.brand-mark{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border:1px solid var(--ink);border-radius:5px;color:var(--ink);font-family:var(--font-sans);font-size:20px;letter-spacing:-1.5px;font-weight:600;line-height:1}
.brand-mark>span{display:none}
.site-header nav{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px}
.site-header nav>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px;color:var(--muted);text-decoration:none;font-size:14px;line-height:1.4}
.site-header nav>a:hover,.site-header nav>a[aria-current="page"]{color:var(--ink);text-decoration:underline}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--action);border-radius:8px;background:var(--action);color:#fff;font:600 14px/1.4 var(--font-sans);text-decoration:none;text-align:center;white-space:normal;transition:border-color .15s}
.button:hover:not(:disabled){background:var(--action-hover);border-color:var(--action-hover);color:#fff}
.button:active:not(:disabled){background:#102f25}
.button:disabled{background:#e7ece6;border-color:#d7dfd6;color:#4c5d4a}
.button-ghost{background:var(--surface);border-color:#c5d2c8;color:var(--ink)}
.button-ghost:hover:not(:disabled){background:var(--soft);border-color:#92ad9b;color:var(--ink)}
.button-light{background:#fff;border-color:#fff;color:var(--action)}
.button-light:hover:not(:disabled){background:var(--soft);border-color:var(--soft);color:var(--action-hover)}
.button-small{min-height:44px;padding:10px 14px;font-size:14px}
.site-header nav>a.button{padding:10px 16px;color:#fff}
.site-header nav>a.button:hover{text-decoration:none}
.text-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:0;background:none;color:var(--action);font-size:14px;padding:8px;text-decoration:underline;text-underline-offset:3px}
.text-link{font-size:16px;font-weight:600}
.hero-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:24px 0}
.quiet,.eyebrow,.updated{font-size:12px;line-height:1.6;color:var(--muted)}
.eyebrow{font-weight:600;letter-spacing:0;text-transform:none}
.beta-badge{display:inline-block;padding:4px 8px;background:var(--soft);border-radius:4px;font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap}
.site-footer{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap;padding:20px 0;margin-top:40px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.site-footer div{display:flex;align-items:center;gap:4px 20px;flex-wrap:wrap}
.site-footer a{display:inline-flex;align-items:center;min-height:44px;font-size:12px;text-decoration:none;color:var(--muted)}
.site-footer a:hover{text-decoration:underline;color:var(--ink)}
.site-footer>p{flex-basis:100%;margin:0;font-size:12px}
.skip-link{position:fixed;top:-100px;left:16px;z-index:100;padding:12px 16px;background:var(--ink);color:#fff;border-radius:5px}
.skip-link:focus{top:12px;color:#fff}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Inputs and messages use the same visual language on every page. */
.field{margin-bottom:12px;min-width:0}
.field label,.batch-client-wrap label{display:block;font-size:14px;font-weight:600;line-height:1.4;margin-bottom:5px}
.field input,.field select,.field textarea,.batch-client-wrap input{display:block;border:1px solid #bdcbc1;border-radius:8px;background:var(--surface);color:var(--ink);padding:9px 11px;font-size:14px;line-height:1.5;min-width:0;max-width:100%;width:100%;min-height:44px}
.field input:disabled,.field select:disabled,.field textarea:disabled{background:#edf1ec;color:#647266;border-color:var(--line)}
.field input[readonly]{background:#f7f9f5}
.field [aria-invalid="true"]{border-color:var(--danger)}
.field textarea{min-height:152px;resize:vertical}
.field-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:12px}
.field-hint{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--muted)}
.notice{padding:12px 14px;border:1px solid var(--line);border-radius:6px;font-size:14px;line-height:1.6}
.notice-amber{background:#fff7e8;border-color:#e4cb9e;color:var(--warning)}
.notice-error{background:#fff1ef;border-color:#e6b6b1;color:var(--danger)}

/* Working surface: compact intake, a persistent document list, original and review. */
.workspace-main{padding-top:24px}
.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.workspace-heading h1{font-size:28px;letter-spacing:-.7px;margin:0}
.session-note{display:flex;align-items:flex-start;gap:8px;margin:0 0 16px;font-size:12px;line-height:1.5;color:var(--muted)}
.session-note .icon{width:16px;height:16px;flex-basis:16px;margin-top:1px}
.intake-card{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:8px 24px;padding:16px 20px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);transition:border-color .15s,background-color .15s}
.intake-card.dragging{border-color:var(--action);background:var(--action-soft);outline:2px solid var(--action);outline-offset:-2px}
.intake-intro{display:flex;align-items:flex-start;gap:12px;min-width:0}
.upload-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;background:var(--action-soft);color:var(--action);border-radius:5px}
.intake-intro h2{margin:0 0 4px;font-size:17px;line-height:1.4;letter-spacing:0}
.intake-intro p{max-width:58ch;margin:0;font-size:12px;line-height:1.5;color:var(--muted)}
.intake-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.batch-client-wrap{width:210px;max-width:100%;min-width:0}
.batch-client-wrap label{font-size:12px}
.intake-footnote{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;color:var(--muted)}
.activity-bar{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;min-height:48px;padding:8px 0}
.activity-bar>p{font-size:12px;line-height:1.5;margin:0;color:var(--muted)}
.activity-bar>p[data-tone="error"]{color:var(--danger)}
.activity-bar>p[data-tone="success"]{color:var(--success)}
.progress-wrap{display:flex;align-items:center;gap:12px;flex-shrink:0}
progress{width:120px;height:8px;accent-color:var(--action)}
.export-bar{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;padding:12px 16px;margin:0 0 16px;background:#eaf1e9;border:1px solid #d2dfd1;border-radius:6px}
.export-bar h2{margin:0 0 2px;font-size:16px;line-height:1.4;letter-spacing:0}
.export-bar p{margin:0;font-size:12px;line-height:1.5;color:var(--muted)}
.export-bar .button{flex-shrink:0}
.workspace-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;align-items:start}
.queue-panel,.review-panel{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.panel-heading h2{margin:0;font-size:16px;line-height:1.5;letter-spacing:0}
.count-badge{display:inline-grid;place-items:center;min-width:24px;height:24px;margin-left:6px;padding:0 5px;background:var(--soft);border-radius:4px;font-size:12px;font-weight:400;vertical-align:middle}
.queue-empty{font-size:14px;line-height:1.6;color:var(--muted);padding:20px 16px;margin:0}
.queue-list{list-style:none;padding:6px;margin:0;max-height:540px;overflow:auto}
.queue-list li{margin:0 0 4px}
.document-row{display:flex;align-items:center;gap:10px;width:100%;min-height:68px;padding:10px 8px;border:1px solid transparent;border-radius:5px;text-align:left;background:transparent;color:var(--ink)}
.document-row:hover{background:#e5ede2}
.document-row[aria-current="true"]{border-color:#b4c9b8;background:var(--action-soft)}
.row-file-icon{display:grid;place-items:center;width:32px;height:38px;flex:0 0 32px;background:#fff;border:1px solid #bfd0c1;border-radius:3px;font-size:12px;font-weight:600}
.row-text{min-width:0}
.row-filename{display:block;font-family:var(--font-mono);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.row-meta{display:block;margin-top:4px;font-size:12px;line-height:1.5;color:var(--muted)}
.row-meta[data-status="confirmed"]{color:var(--success)}
.row-meta[data-status="error"]{color:var(--danger)}
.queue-legend{padding:14px 16px;border-top:1px solid var(--line);font-size:12px;line-height:1.6;color:var(--muted)}
.review-panel{min-height:360px}
.empty-state{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:360px;padding:36px 40px}
.empty-state>.icon{width:36px;height:36px;flex-basis:36px;color:#718c75;margin-bottom:20px}
.empty-state h2{font-size:26px;letter-spacing:-.5px;margin:0 0 12px}
.empty-state p{max-width:56ch;font-size:16px;line-height:1.65;color:var(--muted);margin:0}
.review-top{align-items:flex-start}
.review-top h2{font-family:var(--font-mono);font-size:14px;font-weight:400;overflow-wrap:anywhere}
.review-top>div{min-width:0}
.review-top .quiet{margin:0 0 3px}
.document-status{flex-shrink:0;max-width:45%;padding:4px 8px;border-radius:4px;background:var(--soft);font-size:12px;line-height:1.5;color:var(--ink);text-align:center}
.method-note{margin:0;padding:10px 16px;font-size:12px;line-height:1.5;color:var(--muted)}
#duplicate-note,#document-error{margin:0 16px 12px}
.field-warnings{list-style:none;padding:0;margin:0 16px 12px;font-size:12px;line-height:1.5;color:var(--warning)}
.field-warnings li{padding:2px 0}
.document-review-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,1fr);gap:20px;padding:0 16px 20px}
.source-pane{min-width:0}
.source-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin-bottom:4px}
.source-heading h3{font-size:14px;line-height:1.4;margin:0}
.source-heading a{display:inline-flex;align-items:center;min-height:44px;font-size:14px;line-height:1.4;text-align:right}
.source-actions{display:flex;align-items:center;gap:4px 14px;flex-wrap:wrap}
.source-heading .review-jump,.review-heading-row .review-jump{display:none}
.source-preview{display:flex;justify-content:center;align-items:flex-start;min-height:360px;max-height:620px;overflow:auto;background:#eaf0e6;border:1px solid var(--line);border-radius:5px}
.source-preview img{display:block;max-width:100%;height:auto;object-fit:contain}
.source-preview iframe{border:0;width:100%;height:540px;background:#fff}
.source-preview>p{padding:28px 20px;margin:0;font-size:14px;line-height:1.6;color:var(--muted);text-align:center}
.source-note{margin:8px 0 0;font-size:12px;line-height:1.5}
.pdf-preview{width:100%;min-width:0}
.pdf-preview-controls{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px;background:#eaf0e6;border-bottom:1px solid var(--line)}
.pdf-preview-controls .button{padding:8px;font-size:14px;min-height:44px}
.pdf-preview-controls span{font-size:12px;line-height:1.4;text-align:center}
.pdf-preview-canvas{display:block;width:100%;height:auto;background:#fff}
.review-form{min-width:0}
.form-intro{min-height:48px;padding-top:4px}
.form-intro h3{font-size:14px;line-height:1.4;margin:0}
.form-intro p{font-size:12px;line-height:1.5;color:var(--muted);margin:3px 0 12px}
#field-amount{font-variant-numeric:tabular-nums}
.confirm-button{width:100%;min-height:44px}
.review-form #retry-btn,.review-form #manual-btn{width:100%;margin-top:8px;min-height:44px}
.review-form .notice{margin-bottom:12px}
.exclude-choice{display:flex;align-items:flex-start;gap:8px;min-height:44px;margin-top:10px;padding:8px 0;font-size:12px;line-height:1.5;color:var(--muted);cursor:pointer}
.exclude-choice input{width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:var(--action)}
.review-form>.quiet{margin:4px 0 0;font-size:12px;line-height:1.5}
.workspace-boundary{max-width:100ch;margin:16px 0 0;font-size:12px;line-height:1.6;color:var(--muted)}

/* Recovery pass: a quiet brand frame and a clearly ordered working desk. */
.site-header{padding:12px 20px;margin-block:16px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 18px #182b2704}
.brand{gap:11px;font-size:18px;font-weight:600;letter-spacing:-.5px}
.brand-mark{position:relative;border-color:var(--action);border-radius:10px;background:var(--action);color:transparent;font-size:0}
.brand-mark::before{content:"";position:absolute;width:14px;height:19px;border:1.5px solid #fff;border-radius:2px;transform:rotate(-8deg)}
.brand-mark::after{content:"";position:absolute;width:8px;height:1.5px;top:13px;left:13px;background:#fff;box-shadow:0 4px #fff,0 8px #fff;transform:rotate(-8deg)}
.beta-badge{padding:5px 9px;border:1px solid var(--line);border-radius:6px;background:var(--action-soft);color:var(--action)}
.workspace-heading h1{font-size:36px;letter-spacing:-1.1px}
.workspace-subtitle{font-size:16px;line-height:1.6;color:var(--muted);margin:0 0 22px}
.work-steps{display:flex;align-items:center;gap:24px;list-style:none;margin:0 0 20px;padding:0}
.work-steps li{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--muted)}
.work-steps li+li::before{content:"";width:30px;height:1px;background:#cdd8ce;margin-right:8px}
.work-step-number{display:grid;place-items:center;width:25px;height:25px;border:1px solid #c6d5c9;border-radius:50%;font-size:12px;color:var(--action);background:#fff}
.session-note{margin:16px 0 0}
.intake-card{padding:24px;gap:14px 28px;border-color:#cbd9ce;box-shadow:0 5px 18px #182b2703}
.intake-intro{align-items:center;gap:15px}
.upload-icon{width:48px;height:52px;flex-basis:48px;border:1px solid #d9e5da;border-radius:10px}
.upload-icon .icon{width:23px;height:23px;flex-basis:23px}
.intake-intro h2{font-size:19px;letter-spacing:-.25px;margin-bottom:5px}
.intake-intro p{line-height:1.6}
.intake-footnote{padding-top:12px;border-top:1px solid #edf1eb}
.activity-bar{min-height:51px;padding:10px 2px}
.export-bar{padding:20px 24px;margin:20px 0 0;border-radius:12px}
.export-heading{display:flex;align-items:center;gap:14px;min-width:0}
.export-symbol{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;background:#fff;border:1px solid #d2dfd1;border-radius:10px;color:var(--action)}
.export-bar h2{font-size:17px;letter-spacing:-.2px;margin-bottom:4px}
.workspace-grid{grid-template-columns:236px minmax(0,1fr);gap:18px}
.queue-panel{background:#f0f4ed}
.panel-heading{padding:17px 18px}
.panel-heading h2{font-size:15px}
.count-badge{background:#fff;border:1px solid var(--line);border-radius:5px}
.queue-empty{padding:22px 18px}
.queue-list{padding:8px}
.document-row{min-height:76px;padding:12px 10px;border-radius:8px}
.document-row[aria-current="true"]{background:#fff;box-shadow:0 3px 8px #182b2706}
.row-file-icon{height:39px;border-radius:4px;color:var(--action)}
.row-filename{font-size:13px}
.queue-legend{padding:16px 18px}
.review-panel{min-height:400px;box-shadow:0 8px 25px #182b2704;overflow:hidden}
.empty-state{align-items:center;min-height:400px;text-align:center}
.empty-documents{display:flex;align-items:center;gap:12px;margin-bottom:25px;color:var(--action)}
.empty-documents>span{display:grid;place-items:center;width:54px;height:70px;background:#f5f7f1;border:1px solid #cddbcf;border-radius:8px}
.empty-documents>span:last-child{background:#eaf1e6}
.empty-documents>span>.icon{width:26px;height:26px}
.empty-state h2{font-size:25px;letter-spacing:-.65px;max-width:25ch}
.empty-state p{max-width:52ch;font-size:15px;line-height:1.7}
.empty-state .empty-hint{font-size:12px;margin-top:18px;color:var(--action)}
.document-status{padding:5px 9px;border:1px solid #d3dfd2;border-radius:6px;background:var(--action-soft)}
.method-note{padding:12px 20px}
.document-review-grid{gap:24px;padding:0 20px 24px}
.source-heading{margin-bottom:8px}
.source-preview{border-color:#d5dfd0;border-radius:8px}
.source-note{margin-top:10px;line-height:1.6}
.pdf-preview-controls{padding:8px}
.review-form{border-left:1px solid #e7ece3;padding-left:24px}
.form-intro{min-height:52px}
.form-intro h3{font-size:16px;letter-spacing:-.2px}
.form-intro p{margin-bottom:15px}
.confirm-button{min-height:46px;margin-top:4px}
.exclude-choice{margin-top:12px;padding-block:9px}

/* Help, guides and settings retain plain semantic HTML. */
.prose{max-width:840px;padding-top:48px;padding-bottom:32px}
.prose h1{font-size:44px;letter-spacing:-1.3px;margin:0 0 20px;max-width:24ch}
.prose-lead{font-size:18px;line-height:1.65;color:var(--muted);max-width:70ch}
.prose .eyebrow{margin-bottom:12px}
.prose section{border-top:1px solid var(--line);margin-top:32px;padding-top:24px}
.prose h2{font-size:26px;margin:0 0 16px}
.prose h3{font-size:18px;margin:24px 0 12px}
.prose section p,.prose li,.prose dd{font-size:16px;line-height:1.7;color:var(--muted)}
.prose ul,.prose ol{padding-left:24px}
.prose li{margin:8px 0}
.prose code{font-family:var(--font-mono);font-size:14px;overflow-wrap:anywhere;background:#eaf0e8;padding:2px 4px;border-radius:3px}
.prose pre{max-width:100%;overflow:auto;background:#eaf0e8;padding:16px;border-radius:5px}
.prose pre code{padding:0;background:none;font-size:13px}
.prose table{width:100%;border-collapse:collapse;font-size:14px}
.prose th,.prose td{text-align:left;padding:12px 8px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.prose th{color:var(--ink);font-weight:600}
.prose details{border-block:1px solid var(--line);padding:8px 0;margin:16px 0}
.prose summary{padding:8px 0;min-height:44px;font-weight:600;cursor:pointer}
.updated{margin-bottom:24px}
.help-questions{margin:0}
.help-questions>div{margin:20px 0}
.help-questions dt{font-size:16px;line-height:1.5;font-weight:600;color:var(--ink)}
.help-questions dd{margin:6px 0 0}
.page-contents{margin:24px 0;padding:16px 20px;border-left:3px solid #a8c2ae;background:#edf3ec}
.page-contents>p{margin:0 0 6px;font-size:14px;font-weight:600;color:var(--ink)}
.page-contents ul{margin:0;padding-left:20px}
.page-contents li{margin:4px 0}
.page-contents a{display:inline-flex;align-items:center;min-height:44px;font-size:16px;line-height:1.5}
.prose section[id]{scroll-margin-top:24px}
#feedback-status,#delete-status,#feedback-copy-status{margin-top:16px;overflow-wrap:anywhere}
#feedback-receipt,#feedback-secret,#delete-receipt,#delete-secret{font-family:var(--font-mono);font-size:14px}

@media(min-width:1500px){
  .document-review-grid{grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr)}
  .source-preview{min-height:440px;max-height:700px}
}
@media(max-width:1200px){
  .intake-card{grid-template-columns:1fr}
  .intake-actions{justify-content:flex-start}
  .intake-footnote{margin-top:2px}
  .workspace-grid{grid-template-columns:200px minmax(0,1fr)}
  .document-review-grid{gap:16px;grid-template-columns:minmax(0,1fr) minmax(270px,1fr)}
}
@media(max-width:1000px){
  .workspace-grid{grid-template-columns:1fr}
  .queue-list{max-height:180px}
  .queue-empty{padding:14px 16px}
  .queue-legend{padding:10px 16px}
  .document-review-grid{grid-template-columns:minmax(0,1.1fr) minmax(280px,1fr)}
  .activity-bar{flex-wrap:wrap}
}
@media(max-width:760px){
  .shell,.shell.wide{width:calc(100% - 32px)}
  .site-header{min-height:72px;gap:8px 16px;flex-wrap:wrap;padding:12px 14px;margin-block:12px}
  .brand{font-size:16px}
  .brand-mark{width:36px;height:36px;flex-basis:36px}
  .site-header nav{justify-content:flex-start;gap:4px 8px}
  .site-header nav>a{font-size:16px;padding:8px 4px}
  .site-header nav .beta-badge{display:none}
  .site-header nav>a.button{padding:9px 12px}
  .site-footer{margin-top:32px;padding:16px 0}
  .site-footer div{gap:4px 16px}
  .workspace-main{padding-top:20px}
  .workspace-heading{align-items:flex-start}
  .workspace-heading h1{font-size:26px;line-height:1.3}
  .workspace-heading .button{padding:8px 10px;font-size:16px}
  .session-note{margin-top:16px;margin-bottom:0}
  .intake-card{padding:14px;gap:12px}
  .intake-intro{gap:10px}
  .intake-intro h2{font-size:16px}
  .intake-actions{gap:10px;align-items:stretch}
  .batch-client-wrap{width:100%;flex-basis:100%}
  .intake-actions>.button{flex:1 1 130px}
  .activity-bar{padding:10px 0;gap:4px}
  .activity-bar>p{flex-basis:100%}
  .progress-wrap{justify-content:space-between;width:100%}
  progress{width:50%}
  .export-bar{padding:12px;align-items:flex-start}
  .export-bar h2{font-size:14px}
  .export-bar .button{padding:10px 12px;font-size:16px}
  .panel-heading{padding:12px 14px}
  .review-top{gap:8px}
  .review-top h2{font-size:13px}
  .document-review-grid{grid-template-columns:minmax(0,1fr);padding:0 14px 18px;gap:20px}
  .method-note{padding:10px 14px}
  #duplicate-note,#document-error{margin:0 14px 12px}
  .field-warnings{margin:0 14px 12px}
  .source-preview{min-height:260px;max-height:460px}
  .source-preview iframe{height:400px}
  .source-preview img{width:100%;height:auto}
  .review-form{border-top:1px solid var(--line);border-left:0;padding:20px 0 0}
  .source-heading,.review-heading-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px}
  .source-heading .review-jump,.review-heading-row .review-jump{display:inline-flex;align-items:center;min-height:44px;font-size:14px;line-height:1.4;font-weight:600}
  #review-original,#review-fields{scroll-margin-top:16px}
  .empty-state{min-height:280px;padding:28px 24px}
  .empty-state h2{font-size:23px}
  .field input,.field select,.field textarea,.batch-client-wrap input{font-size:16px;min-height:44px}
  .button,.button-small,.text-button,.pdf-preview-controls .button{font-size:16px}
  #feedback-receipt,#feedback-secret,#delete-receipt,#delete-secret{font-size:16px}
  .field-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
  .prose{padding-top:32px;padding-bottom:24px}
  .prose h1{font-size:36px;letter-spacing:-1px}
  .prose-lead{font-size:17px}
  .prose h2{font-size:24px}
  .prose section{margin-top:28px;padding-top:22px}
  .prose .hero-actions{gap:10px}
  .prose .hero-actions .button{width:100%}
}
@media(max-width:760px){
  .work-steps{align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:18px}
  .work-steps li{flex:1;flex-direction:column;align-items:flex-start;gap:6px;font-size:12px}
  .work-steps li+li::before{display:none}
  .workspace-subtitle{font-size:14px;margin-bottom:18px}
  .export-symbol{display:none}
  .empty-documents{margin-bottom:20px}
  .empty-state .empty-hint{margin-top:16px}
}
@media(max-width:400px){
  .workspace-heading{flex-wrap:wrap;align-items:center}
  .export-bar{flex-wrap:wrap}
  .export-bar .button{width:100%}
  .field-row{grid-template-columns:minmax(0,1fr)}
  .document-status{max-width:42%}
  .prose h1{font-size:32px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* Once a batch is open, keep the mobile review closer to its original. */
@media(max-width:760px){
 .workspace-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:14px}
 .workspace-heading h1{font-size:24px;line-height:1.2}
 .workspace-heading .button{font-size:14px;max-width:110px}
 .workspace-page:has(#review-content:not([hidden])) .workspace-subtitle,
 .workspace-page:has(#review-content:not([hidden])) .work-steps{display:none}
 .source-preview{min-height:220px;max-height:280px}
 .document-review-grid{gap:14px}
 .source-note{margin-bottom:4px}
}
