:root {
  color-scheme: light;
  --bg: #eff3f9;
  --paper: #ffffff;
  --ink: #182945;
  --muted: #4f5e75;
  --line: #d5dfea;
  --dark: #182d50;
  --dark-hover: #284776;
  --accent: #315a8a;
  --pink: #f7e4ed;
  --pink-ink: #813650;
  --gold: #fbefcd;
  --gold-ink: #73550d;
  --danger: #9a2d38;
  --radius: 18px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100svh; display: flex; flex-direction: column; font-size: 15px; }
main { flex: 1; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .52; }
button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #376da8; outline-offset: 3px; }
h1[tabindex]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
.icon-library { width: 0; height: 0; position: absolute; pointer-events: none; }
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; pointer-events: none; }
.shell { width: min(100% - 64px, 1120px); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--line); background: #f9fbfe; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 46px; }
.brand-mark img { display: block; height: 43px; width: auto; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; font-weight: 700; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.privacy { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); background: #e8f0fb; border: 1px solid #d5e2f2; border-radius: 30px; padding: 7px 12px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.privacy .icon { width: 15px; height: 15px; }
.masthead-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.staff-link { color: var(--accent); font-size: 13px; font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }
.approval-send { margin: 9px 0 0; border-color: var(--line); }
.workflow-dialog { width: min(440px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 15px; padding: 0; background: var(--paper); color: var(--ink); box-shadow: 0 16px 65px #0e1b3645; }
.workflow-dialog::backdrop { background: #0e1d37b3; }
.workflow-dialog-body { padding: 16px 18px 18px; }
.workflow-dialog-body form { display: grid; gap: 12px; margin-top: 12px; }
.workflow-dialog-body form p { color: var(--muted); line-height: 1.55; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 282px; margin-top: 38px; display: grid; grid-template-columns: 1.36fr 1fr; align-items: center; background: linear-gradient(115deg, #142747 0%, var(--dark) 62%, #284d79 100%); color: #ffffff; border-radius: 24px; box-shadow: 0 16px 34px -28px #14264a; }
.hero-copy { padding: 43px 0 47px 50px; z-index: 1; }
.eyebrow { font-size: 11px; font-weight: 750; line-height: 1.4; letter-spacing: .13em; }
.hero .eyebrow { color: #d2e4ff; display: flex; gap: 9px; align-items: center; }
.hero .eyebrow span { width: 7px; height: 7px; background: #a7c9ff; border-radius: 50%; box-shadow: 0 0 0 4px #c9ddff26; }
.hero h1, .work-heading h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.055em; font-weight: 400; }
.hero h1 { font-size: clamp(54px, 7vw, 83px); line-height: .98; margin: 17px 0 18px; }
.hero-copy > p:last-child { color: #e1ebfc; font-size: 16px; line-height: 1.6; max-width: 405px; }
.hero-art { height: 100%; min-height: 245px; position: relative; }
.hero-orbit { position: absolute; border: 1px solid #d9e8ff24; border-radius: 50%; aspect-ratio: 1; }
.orbit-outer { width: 410px; left: -5px; top: -60px; }
.orbit-inner { width: 316px; left: 42px; top: -13px; }
.paper { position: absolute; top: 50%; width: 185px; height: 146px; padding: 16px 15px; border: 1px solid #fff9; border-radius: 9px; box-shadow: 0 11px 25px #09193273; }
.paper-pink { color: #823d58; background: #f2d3e2; left: 41%; transform: translateY(-56%) rotate(13deg); }
.paper-yellow { color: #71520c; background: #f8e6aa; left: 13%; transform: translateY(-37%) rotate(-13deg); }
.paper-heading { display: flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; font-size: 9px; }
.paper-heading .icon { width: 15px; height: 15px; }
.paper-lines { border: 1px solid currentColor; opacity: .48; height: 51px; margin-top: 13px; background: linear-gradient(90deg, transparent 73%, currentColor 73%, currentColor 74%, transparent 74%), repeating-linear-gradient(to bottom, transparent 0, transparent 12px, currentColor 12px, currentColor 13px); }
.paper-sign { margin-top: 19px; height: 1px; width: 43%; background: currentColor; opacity: .52; }

.choice-heading { margin: 34px 0 17px; }
.choice-heading .eyebrow { color: var(--accent); }
.choice-heading h2 { font-size: 25px; font-weight: 680; letter-spacing: -.035em; margin-top: 4px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.choice { display: grid; grid-template-rows: auto auto 1fr auto; text-align: left; padding: 23px 25px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); color: var(--ink); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.choice-payment { --card-bg: #fcf1f7; --card-border: #e8d4df; --tag-bg: var(--pink); --tag-ink: var(--pink-ink); }
.choice-receiving { --card-bg: #fff8e6; --card-border: #e8dcba; --tag-bg: var(--gold); --tag-ink: var(--gold-ink); }
.choice-ready { --card-bg: #edf6f3; --card-border: #c8ded5; --tag-bg: #d5eae2; --tag-ink: #24594c; }
.ready-type-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ready-selected { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ready-selected p { display: grid; gap: 5px; }
.ready-selected p span { color: var(--muted); font-size: 14px; }
.ready-count { margin: 18px 0; font-weight: 650; }
.ready-help { color: var(--muted); font-size: 13px; margin: 16px 0; line-height: 1.6; }
.choice:hover { transform: translateY(-2px); border-color: var(--tag-ink); box-shadow: 0 11px 24px -21px #243954; }
.choice-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.choice-icon, .heading-icon { display: grid; place-items: center; background: var(--tag-bg); color: var(--tag-ink); border: 1px solid var(--card-border); border-radius: 12px; width: 46px; height: 46px; }
.choice-icon .icon { width: 23px; height: 23px; }
.form-tag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 30px; white-space: nowrap; font-size: 11px; line-height: 1.2; font-weight: 750; color: var(--tag-ink); background: var(--tag-bg); }
.form-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.choice > strong { font-size: 24px; letter-spacing: -.035em; font-weight: 670; }
.choice-copy { margin-top: 6px; color: var(--muted); line-height: 1.5; }
.choice-link { display: flex; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid var(--card-border); padding-top: 15px; margin-top: 19px; color: var(--tag-ink); font-size: 13px; font-weight: 730; }
.choice-link .icon { width: 18px; height: 18px; }

#workspace[data-mode="payment"] { --tag-bg: var(--pink); --tag-ink: var(--pink-ink); --card-border: #e8d4df; }
#workspace[data-mode="receiving"] { --tag-bg: var(--gold); --tag-ink: var(--gold-ink); --card-border: #e8dcba; }
.back-button { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 680; color: var(--accent); border: 0; padding: 8px 0; background: transparent; margin: 19px 0 13px; }
.back-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-button .icon { width: 17px; height: 17px; }
.work-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 0 0 24px; margin-bottom: 24px; }
.work-heading h1 { font-size: clamp(41px, 6vw, 63px); line-height: 1.1; margin: 6px 0; }
.work-heading p:last-child { color: var(--muted); line-height: 1.5; }
.heading-icon { width: 68px; height: 68px; border-radius: 16px; flex: 0 0 auto; }
.heading-icon .icon { width: 30px; height: 30px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .435fr); gap: 20px; align-items: start; }
#voucher-form { display: grid; gap: 17px; min-width: 0; }
.form-panel, .summary { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 22px; min-width: 0; }
.details-layout { display: grid; min-width: 0; scroll-margin-top: 66px; }
.compare-action { margin: -4px 0; }
.compare-action button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cbd9ed; border-radius: 9px; background: #edf4ff; color: var(--accent); padding: 9px 13px; min-height: 42px; font-size: 13px; font-weight: 700; }
.compare-action button:hover:not(:disabled) { background: #e2edfc; border-color: #a4bad7; }
.compare-action button .icon { width: 17px; height: 17px; }
.compare-action button[aria-expanded=true] { background: var(--paper); }
.comparison-tabs { display: none; }
#workspace[data-comparing=true] .work-grid { grid-template-columns: minmax(0, 1fr); }
#workspace[data-comparing=true] .details-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; gap: 16px; }
#workspace[data-comparing=true] .summary { position: static; width: min(100%, 510px); }
.panel-heading, .summary-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; }
.step, .summary-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--tag-bg); color: var(--tag-ink); font-size: 12px; font-weight: 760; }
.panel-heading h2, .summary h2 { font-size: 20px; font-weight: 680; letter-spacing: -.028em; line-height: 1.16; }
.panel-heading p { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 4px; }
.field-grid { display: grid; gap: 13px; }
.primary-fields, .bank-fields, .totals-fields { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
[data-mode=payment] .totals-fields { grid-template-columns: minmax(0, 1fr); }
[data-mode=payment] .totals-fields .field { width: min(100%, 220px); justify-self: end; }
.bank-fields, .signatures { margin-top: 15px; }
.signatures { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.signature-actions, .signature-draw-actions, .signature-methods { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.signature-actions { margin-top: 3px; }
.signature-button, .signature-remove, .signature-methods button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: #f7faff; color: var(--accent); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.signature-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.signature-remove { border-color: transparent; background: transparent; color: var(--danger); }
.signature-button:hover:not(:disabled), .signature-methods button:hover:not(:disabled) { background: #e8eff9; }
.signature-preview, .signature-upload-preview { display: block; width: 100%; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background-color: #fff; background-image: linear-gradient(45deg, #eaf0f7 25%, transparent 25%), linear-gradient(-45deg, #eaf0f7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eaf0f7 75%), linear-gradient(-45deg, transparent 75%, #eaf0f7 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.signature-preview { height: 70px; padding: 7px; margin-top: 3px; }
.signature-upload-preview { height: 150px; padding: 15px; margin-top: 12px; }
#signature-dialog { width: min(600px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; border: 1px solid var(--line); border-radius: 15px; padding: 0; background: var(--paper); color: var(--ink); box-shadow: 0 16px 65px #0e1b3645; }
#signature-dialog::backdrop { background: #0e1d37d0; }
.signature-editor { padding: 16px 18px 18px; }
.signature-help { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0; }
.signature-methods { margin: 12px 0 16px; }
.signature-methods button { flex: 1 1 0; min-height: 40px; }
.signature-methods button[aria-pressed=true] { background: #e5eefb; border-color: #8daacd; color: var(--ink); }
#signature-pad { display: block; width: 100%; height: auto; aspect-ratio: 25 / 9; border: 1px solid #a4b7cf; border-radius: 9px; background: #fff; touch-action: none; cursor: crosshair; }
.signature-draw-actions { margin-top: 10px; justify-content: space-between; }
#signature-use { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--ink); font-weight: 650; font-size: 13px; }
.required-mark { color: var(--pink-ink); }
.field small { font-size: 11px; font-weight: 450; color: var(--muted); line-height: 1.4; }
input:not([type=file]) { display: block; min-width: 0; width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #cbd7e6; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 450; }
input::placeholder { color: #60718a; opacity: 1; }
input:focus { border-color: #396ca3; outline: 2px solid #376da838; outline-offset: 1px; }
input[aria-invalid=true] { border-color: var(--danger); }
.account-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.account-choices button { background: #faf7ed; border: 1px solid #e9debc; border-radius: 20px; padding: 5px 9px; min-height: 28px; font-size: 11px; font-weight: 630; }
.account-choices button[aria-pressed=true] { background: var(--gold); border-color: #a98a41; }
.account-choices button:hover { border-color: #a98a41; }

.line-section { border-block: 1px solid var(--line); padding: 16px 0 12px; margin: 18px 0 15px; }
.line-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; gap: 8px; }
.line-heading h3 { font-size: 14px; font-weight: 710; }
.line-heading span { font-size: 11px; color: var(--muted); }
.line-labels, .detail-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.18fr) minmax(0, 1fr) 34px; gap: 8px; align-items: start; }
[data-mode=receiving] .line-labels, [data-mode=receiving] .detail-row { grid-template-columns: minmax(0, 3.38fr) minmax(0, 1fr) 34px; }
[data-mode=receiving] .charge-label { display: none; }
.line-labels { color: var(--muted); font-size: 11px; font-weight: 650; padding-bottom: 4px; }
.detail-row + .detail-row { margin-top: 7px; }
.detail-row input { min-height: 39px; }
.detail-row .icon-button { margin-top: 1px; }
.row-mobile-label { display: none; }
#workspace[data-comparing=true] .line-labels { display: none; }
#workspace[data-comparing=true] .detail-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 34px; }
#workspace[data-comparing=true] .row-mobile-label { display: inline; }
#workspace[data-comparing=true] .row-description { grid-column: 1 / 3; grid-row: 1; }
#workspace[data-comparing=true] .row-charge { grid-column: 1; grid-row: 2; }
#workspace[data-comparing=true] .row-amount { grid-column: 2; grid-row: 2; }
#workspace[data-comparing=true] .detail-row .icon-button { grid-column: 3; grid-row: 1; align-self: end; }
.subtle-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 3px; margin-top: 5px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 700; }
.subtle-button .icon { width: 15px; height: 15px; }
.subtle-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }

.drop-zone { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 69px; text-align: left; border: 1px dashed #9eb3cf; border-radius: 10px; background: #f4f7fc; padding: 10px 12px; }
.drop-zone:hover:not(:disabled), .drop-zone.drag-over { border-color: var(--accent); background: #e8eff9; }
.drop-icon { color: var(--accent); width: 38px; height: 38px; border: 1px solid #d3e0f1; border-radius: 9px; display: grid; place-items: center; background: #eaf1fa; flex: 0 0 auto; }
.drop-zone strong, .drop-zone small { display: block; }
.drop-zone strong { font-size: 13px; font-weight: 720; }
.drop-zone small { margin-top: 3px; font-size: 11px; color: var(--muted); }
.file-list { display: grid; gap: 6px; margin-top: 10px; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 10px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.file-item > .icon { color: var(--accent); width: 16px; height: 16px; }
.file-meta { min-width: 0; flex: 1; }
.file-meta strong, .file-meta small { display: block; overflow-wrap: anywhere; }
.file-meta strong { font-size: 12px; font-weight: 650; }
.file-meta small { color: var(--muted); font-size: 11px; }
.file-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); }
.icon-button:not(:disabled):hover { background: #edf2f9; border-color: var(--line); color: var(--ink); }
.icon-button .icon { width: 17px; height: 17px; }
.status { padding: 9px 11px; border: 1px solid #d6e4f6; border-radius: 8px; background: #edf4ff; color: #2f527b; font-size: 12px; line-height: 1.45; margin-top: 10px; overflow-wrap: anywhere; white-space: pre-line; }
.status[data-tone=error] { background: #fdf0f1; border-color: #ebc8cd; color: var(--danger); }
.status[data-tone=notice] { background: #fbf6e9; border-color: #e8debd; color: #695518; }

.summary { position: sticky; top: 18px; box-shadow: 0 10px 23px -24px #192f51; }
.summary-head { align-items: center; }
.summary-icon { background: #e5eefb; color: var(--accent); }
.summary-head .eyebrow { color: var(--accent); font-size: 9px; margin-bottom: 2px; }
.summary-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-block: 1px solid var(--line); padding: 11px 0; font-size: 13px; color: var(--muted); }
.summary-total strong { font-size: 21px; font-weight: 670; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.page-order { list-style: none; margin: 13px 0 16px; padding: 0; display: grid; gap: 7px; }
.page-order li { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; line-height: 1.25; }
.page-order li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.page-number { display: grid; place-items: center; min-width: 25px; min-height: 22px; padding: 0 4px; background: #e9f0fb; border-radius: 5px; color: var(--accent); font-size: 10px; font-weight: 720; flex: 0 0 auto; }
.filename-field { border-top: 1px solid var(--line); padding: 14px 0 13px; }
.filename-caption { margin-top: 10px; font-size: 11px; color: var(--muted); }
.filename-preview { margin-top: 2px; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; line-height: 1.45; }
.primary-button, .preview-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 700; }
.primary-button { background: var(--dark); color: #ffffff; }
.primary-button:hover:not(:disabled) { background: var(--dark-hover); }
.preview-button { margin-bottom: 7px; background: transparent; color: var(--accent); }
.preview-button:hover:not(:disabled) { background: #e8eff9; }
.primary-button .icon, .preview-button .icon { width: 17px; height: 17px; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); padding: 17px 0 24px; margin-top: 38px; font-size: 12px; }
#preview-dialog { max-width: none; width: min(680px, calc(100% - 24px)); max-height: calc(100% - 24px); border: 1px solid var(--line); border-radius: 15px; padding: 0; background: var(--paper); color: var(--ink); box-shadow: 0 16px 65px #0e1b3645; }
#preview-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#preview-dialog::backdrop { background: #0e1d37d0; }
.dialog-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px 12px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; line-height: 1.2; letter-spacing: -.02em; }
.close-review, .review-zoom, .comparison-tabs button { color: var(--accent); border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 6px 9px; font-size: 12px; font-weight: 680; white-space: nowrap; }
.close-review, .review-zoom { min-height: 34px; }
.close-review { display: inline-flex; align-items: center; gap: 5px; }
.close-review .icon { width: 15px; height: 15px; }
.close-review:hover, .review-zoom:not(:disabled):hover, .comparison-tabs button:hover { background: #edf4ff; }
.review-pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.inline-document { position: sticky; top: 14px; height: min(720px, calc(100dvh - 28px)); min-height: 310px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
#preview-dialog > .review-pane { flex: 1 1 auto; }
.review-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f9fbfe; min-height: 54px; }
.review-file { min-width: 0; flex: 1 1 140px; }
.review-file h2, .review-file h3 { font-size: 13px; line-height: 1.25; }
.review-file p { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.review-file select { margin-top: 5px; width: 100%; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: inherit; background: white; font: inherit; font-size: 12px; }
.review-tools, .page-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.page-controls { border: 1px solid var(--line); border-radius: 7px; background: var(--paper); gap: 2px; }
.page-controls button { width: 32px; height: 32px; }
.page-controls span { white-space: nowrap; text-align: center; font-size: 11px; min-width: 59px; color: var(--muted); }
.review-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; background: #e9eef6; padding: 12px; }
.review-scroll:focus-visible { outline-offset: -3px; }
.review-scroll canvas { width: 100%; height: auto; display: block; background: white; }
.review-scroll[data-zoomed=true] canvas { width: 175%; }
.review-status { padding: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.review-status[data-error=true] { color: var(--danger); }

@media (max-width: 840px) {
  #workspace[data-comparing=true] .details-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  [data-comparing=true] .comparison-tabs { display: flex; position: sticky; top: 0; z-index: 2; gap: 6px; padding: 4px 0; background: var(--bg); }
  .comparison-tabs button { flex: 1 1 0; min-height: 40px; }
  .comparison-tabs button[aria-pressed=true] { color: var(--ink); background: #e8eff9; border-color: #a4bad7; }
  [data-comparing=true] .details-layout[data-active-pane=invoice] #details-panel,
  [data-comparing=true] .details-layout[data-active-pane=form] #invoice-preview-panel { display: none; }
  .inline-document { position: static; height: min(68dvh, 620px); min-height: 260px; }
  .review-scroll { padding: 7px; }
}
@media (max-width: 400px) {
  .dialog-head { padding: 9px 10px; gap: 7px; align-items: start; }
  .dialog-head h2 { font-size: 16px; }
  .close-review { gap: 3px; padding-inline: 6px; }
  .close-review .icon { display: none; }
  .review-toolbar { padding-inline: 8px; }
}

@media (max-width: 850px) {
  .shell { width: min(100% - 40px, 1120px); }
  .hero-copy { padding-left: 36px; }
  .paper { width: 159px; height: 128px; padding: 13px 10px; }
  .paper-lines { height: 44px; }
  .paper-yellow { left: 6%; }
  .paper-pink { left: 36%; }
  .form-panel, .summary { padding: 17px; }
  .work-grid { gap: 13px; }
}
@media (max-width: 710px) {
  .choices { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .hero { margin-top: 24px; min-height: 249px; grid-template-columns: 1.4fr .95fr; }
  .hero-copy { padding-left: 28px; }
  .hero h1 { font-size: clamp(44px, 9vw, 63px); }
  .hero-copy > p:last-child { font-size: 14px; }
  .paper { top: 49%; width: 135px; height: 116px; }
  .paper-heading { font-size: 7.5px; }
  .paper-heading .icon { width: 12px; height: 12px; }
  .paper-yellow { left: -2%; }
  .paper-pink { left: 33%; }
  .paper-sign { margin-top: 13px; }
  .choice { padding: 17px; }
  .choice > strong { font-size: 21px; }
  .choice-copy { font-size: 13px; }
}
@media (max-width: 500px) {
  .masthead-actions:has(.staff-link:not([hidden])) .privacy { display: none; }
  .shell { width: calc(100% - 28px); }
  .masthead-inner { min-height: 67px; gap: 7px; }
  .brand { gap: 5px; }
  .brand-mark { width: 31px; }
  .brand-mark img { height: 36px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 10px; }
  .privacy { font-size: 10px; padding: 5px 7px; gap: 3px; }
  .privacy .icon { width: 12px; height: 12px; }
  .hero { margin-top: 16px; display: block; min-height: auto; border-radius: 17px; }
  .hero-copy { padding: 24px 24px 25px; }
  .hero .eyebrow { font-size: 9px; }
  .hero h1 { margin: 12px 0 10px; }
  .hero-copy > p:last-child { max-width: 310px; }
  .hero-art { position: absolute; inset: 0 0 0 auto; width: 27%; min-height: 0; z-index: -1; opacity: .45; }
  .hero-art .paper { display: none; }
  .orbit-outer { left: -45px; top: -98px; width: 315px; }
  .orbit-inner { left: -4px; top: -55px; width: 232px; }
  .choice-heading { margin: 23px 0 11px; }
  .choice-heading h2 { font-size: 22px; }
  .choices { grid-template-columns: 1fr; gap: 10px; }
  .choice { padding: 14px 16px; border-radius: 14px; }
  .choice-top { margin-bottom: 8px; }
  .choice-icon { width: 36px; height: 36px; border-radius: 9px; }
  .choice-icon .icon { width: 19px; height: 19px; }
  .choice-link { margin-top: 12px; padding-top: 10px; }
  .work-heading { padding-bottom: 16px; margin-bottom: 13px; gap: 8px; }
  .work-heading h1 { font-size: 39px; }
  .work-heading p:last-child { font-size: 13px; }
  .heading-icon { width: 42px; height: 42px; border-radius: 10px; }
  .heading-icon .icon { width: 21px; height: 21px; }
  .form-panel, .summary { padding: 14px; border-radius: 13px; }
  .primary-fields, .totals-fields, .signatures { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bank-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .line-labels { display: none; }
  .detail-row, [data-mode=receiving] .detail-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 34px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
  .row-mobile-label { display: inline; }
  .row-description { grid-column: 1 / 3; grid-row: 1; }
  .row-charge { grid-column: 1; grid-row: 2; }
  .row-amount { grid-column: 2; grid-row: 2; }
  [data-mode=receiving] .row-amount { grid-column: 1 / 3; }
  .detail-row .icon-button { grid-column: 3; grid-row: 1; align-self: end; }
  input:not([type=file]) { font-size: 16px; }
  .footer { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
