:root {
  color-scheme: light;
  --ground: #f3f4f1;
  --surface: #fff;
  --raised: #f6f7f5;
  --active: #e8ebe7;
  --border: #e8eaec;
  --rule: #edf0ec;
  --control: #b9bfbb;
  --text: #171c19;
  --muted: #5b625d;
  --accent: #1b6c80;
  --negative: #a9272d;
  --warning: #79540c;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ground);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { touch-action: manipulation; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
button:disabled { background: #edf0ed; color: #626a64; border-color: #d8ded9; }
input, select { min-width: 0; width: 100%; border: 1px solid var(--control); border-radius: 6px; background: #fff; color: var(--text); padding: 10px 12px; min-height: 44px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
h2 { font-size: 17px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 15px; line-height: 1.5; font-weight: 600; }
p + p { margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: #fff; padding: 12px 18px; }
.skip-link:focus { top: 8px; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 8px 32px 8px 24px; gap: 24px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 18px; font-weight: 600; white-space: nowrap; }
.brand img { flex: none; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.account-name { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.app-frame { display: grid; grid-template-columns: minmax(0,1fr); min-height: calc(100dvh - 64px); }
body.authenticated .app-frame { grid-template-columns: 228px minmax(0,1fr); }
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 26px 16px 24px; }
.scope { color: var(--muted); font-size: 12px; padding: 0 12px 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { text-align: left; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; min-height: 44px; border: none; border-radius: 6px; background: transparent; font-size: 14px; color: var(--text); }
.nav-item:hover { outline: 1px solid var(--control); }
.nav-item.active { background: var(--active); font-weight: 600; }
.nav-count { padding: 0 6px; border-radius: 4px; background: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.sidebar-note { margin-top: 56px; padding: 0 12px; font-size: 13px; }
.sidebar-note p { margin: 16px 0 6px; font-weight: 500; }
.paper-rule { display: block; width: 35px; border-top: 2px solid var(--accent); }
.sheet { margin: 0 8px 8px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; min-width: 0; outline: none; }
body.authenticated .sheet { margin-left: 0; }
.initial-state { padding: 48px 0; text-align: center; }
.initial-state p { margin-top: 12px; }
.initial-state button { margin-top: 20px; }
.sign-in-view { max-width: 980px; margin: 58px auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,370px); gap: 64px; align-items: start; }
.sign-in-intro { padding-top: 8px; }
.sign-in-intro h1 { margin-bottom: 16px; }
.sign-in-intro > p { max-width: 410px; }
.sign-in-steps { list-style: none; padding: 0; margin: 34px 0 0; }
.sign-in-steps li { display: flex; gap: 12px; align-items: center; padding: 12px 0; font-size: 14px; }
.step-mark { width: 18px; height: 22px; border: 1px solid #a4afa8; border-radius: 2px; border-top: 3px solid var(--accent); flex: none; }
.sign-in-form { border: 1px solid var(--border); border-radius: 8px; padding: 26px; }
.sign-in-form label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.sign-in-form input { margin-bottom: 20px; }
.sign-in-form .button { width: 100%; margin-top: 4px; }
.sign-in-form > p:last-child { margin-top: 16px; text-align: center; }
.title-row { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 28px; }
.title-row p { font-size: 14px; margin-top: 8px; max-width: 620px; }
.title-row > .button { flex: none; }
/* One content grid: two equal tracks + 24px gutter = the sheet's full inner width. */
.upload-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; max-width: 1180px; }
.upload-form { min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 24px; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.file-field { position: relative; min-height: 132px; padding: 24px; background: var(--raised); border: 1px solid var(--control); border-radius: 8px; overflow: hidden; }
.file-field:hover { border-color: var(--accent); }
.file-field:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.file-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; }
.file-field-copy { display: flex; align-items: center; min-height: 82px; gap: 18px; pointer-events: none; }
.file-field-copy > div { min-width: 0; }
.file-field strong { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.file-field-copy .small { display: block; margin-top: 6px; }
.document-mark { width: 30px; height: 40px; flex: none; fill: none; stroke: #737d76; stroke-width: 1.5; }
.field-help, .action-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.print-options { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding: 14px 0 20px; font-size: 14px; }
.media-note { font-size: 13px; padding: 12px 14px; background: var(--raised); border-radius: 6px; margin: -8px 0 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 6px; padding: 9px 16px; font-size: 14px; font-weight: 500; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; text-decoration: none; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: #155667; }
.button.secondary { border-color: var(--control); background: #fff; color: var(--text); }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { border-color: #7c8780; }
.button.quiet { background: transparent; padding: 9px 10px; color: var(--text); }
.button.danger { color: var(--negative); }
.button.primary:disabled, .button.secondary:disabled, .button.quiet:disabled { background: #edf0ed; color: #626a64; border-color: #d8ded9; }
#upload-button { width: 100%; }
.action-note { text-align: center; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; min-height: 44px; }
.printer-list { list-style: none; padding: 0; margin: 0; }
.printer-row { border-bottom: 1px solid var(--rule); padding: 17px 0; }
.printer-row h3 { margin-bottom: 4px; }
.printer-row .media { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.connection::before { content: ""; width: 6px; height: 6px; background: #929b95; border-radius: 50%; flex: none; }
.connection.online { color: #235c42; }
.connection.online::before { background: #287b55; }
.connection.disabled { color: #705614; }
.connection.disabled::before { background: #ac8736; }
.availability-note { margin-top: 16px; }
.access-note { border-top: 1px solid var(--rule); margin-top: 36px; padding-top: 24px; max-width: 1180px; }
.access-note h2 { font-size: 15px; margin-bottom: 6px; }
.copy-link { display: flex; max-width: 640px; margin-top: 14px; }
.copy-link input { border-radius: 6px 0 0 6px; font-size: 14px; background: var(--raised); }
.copy-link .button { border-radius: 0 6px 6px 0; margin-left: -1px; }
.message, .notice { font-size: 14px; padding: 12px 16px; margin-bottom: 24px; border-radius: 6px; }
.notice { color: #705014; border: 1px solid #e5d4a8; background: #fff9eb; }
.message { color: #164557; background: #eef6f7; border: 1px solid #c9dfe4; }
.field-error { font-size: 13px; line-height: 1.5; color: var(--negative); margin: 10px 0 16px; overflow-wrap: anywhere; }
.view-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 0 12px; min-height: 44px; display: inline-flex; gap: 10px; align-items: center; font-size: 14px; }
.tab.active { border-color: var(--accent); color: var(--text); font-weight: 600; }
.tab .num { font-size: 12px; }
.jobs-list { display: flex; flex-direction: column; }
.job-row { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.job-main { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.job-identity { min-width: 0; flex: 1; }
.job-identity h2 { font-size: 16px; overflow-wrap: anywhere; margin-bottom: 5px; }
.job-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.job-meta + .job-meta { margin-top: 4px; }
.job-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.status { display: inline-block; font-size: 12px; padding: 3px 7px; border-radius: 4px; background: #eef0ee; color: #39423c; white-space: nowrap; }
.status.held { background: #eaf4f5; color: #185363; }
.status.uncertain, .status.failed { background: #fff0ed; color: #96312c; }
.status.simulated { background: #fff7e4; color: #765312; }
.job-status-line { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; }
.job-status-description { color: var(--muted); font-size: 12px; }
.job-message { margin-top: 9px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.empty-row { padding: 28px 0; color: var(--muted); font-size: 14px; }
.empty-row .button { margin-top: 14px; }
.freshness { margin-top: 16px; }
dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--border); border-radius: 12px; padding: 24px; color: var(--text); background: #fff; overflow-y: auto; }
dialog::backdrop { background: rgb(19 28 24 / 40%); }
.dialog-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.dialog-heading h2 { font-size: 22px; }
.dialog-heading + p { font-size: 14px; }
.release-details { padding: 0; margin: 24px 0; }
.release-details > div { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.release-details dt { color: var(--muted); }
.release-details dd { margin: 0; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
dialog .notice { font-size: 13px; }
@media (max-width: 1100px) {
  body.authenticated .app-frame { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding: 0 24px; }
  .sidebar nav { flex-direction: row; gap: 12px; }
  .nav-item { border-radius: 6px 6px 0 0; padding: 12px 16px; gap: 12px; }
  .scope, .sidebar-note { display: none; }
  body.authenticated .sheet { margin-left: 8px; }
  .sheet { padding: 28px; }
  .upload-layout { gap: 24px; }
  .sign-in-view { gap: 36px; margin: 36px auto; }
}
@media (max-width: 720px) {
  .topbar { min-height: 60px; padding: 8px 18px; gap: 12px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 25px; height: 30px; }
  .account { gap: 6px; }
  .account-name { max-width: 120px; font-size: 12px; }
  .account .button { padding-inline: 6px; font-size: 13px; }
  .app-frame { min-height: calc(100dvh - 60px); }
  .sidebar { padding: 0 16px; }
  .sheet, body.authenticated .sheet { margin: 0; border: 0; border-radius: 0; padding: 24px 20px 36px; }
  h1 { font-size: 24px; }
  .title-row { margin-bottom: 24px; gap: 16px; }
  .title-row p { font-size: 14px; }
  .upload-layout { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .destinations { border-top: 1px solid var(--rule); padding-top: 20px; }
  .section-heading h2 { font-size: 16px; }
  .file-field { min-height: 116px; padding: 16px; }
  .file-field-copy { min-height: 82px; }
  .sign-in-view { grid-template-columns: minmax(0,1fr); gap: 26px; margin: 8px auto; max-width: 480px; }
  .sign-in-intro { padding: 0; }
  .sign-in-intro h1 { margin-bottom: 12px; }
  .sign-in-intro > p { font-size: 14px; }
  .sign-in-steps { display: none; }
  .sign-in-form { padding: 0; border: 0; }
  .sign-in-form .button { margin-top: 0; }
  .job-main { flex-wrap: wrap; gap: 12px; }
  .job-identity { flex-basis: 100%; }
  .job-actions { width: 100%; justify-content: flex-start; }
  .job-status-line { flex-direction: column; gap: 7px; }
  .job-actions .button { padding-inline: 14px; }
  .job-row { padding: 20px 0; }
  .message, .notice { padding: 12px; font-size: 13px; }
  dialog { padding: 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .dialog-heading h2 { font-size: 20px; }
  .release-details > div { grid-template-columns: 80px minmax(0,1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .nav-item { transition: background-color .12s, border-color .12s; }
}
/* Print layout: 340px settings + 24px gutter + the remaining preview width. */
.print-workspace{display:grid;grid-template-columns:minmax(290px,340px) minmax(0,1fr);gap:24px;align-items:start}
.print-controls{min-width:0}.print-controls .field{margin-bottom:18px}
.file-field.compact{min-height:96px;padding:14px}.file-field.compact .file-field-copy{min-height:64px;gap:12px}.file-field.compact .document-mark{width:24px;height:32px}
.settings-section{margin-top:24px;border-top:1px solid var(--rule);padding-top:14px}.settings-section .field-help{margin:2px 0 14px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.setting-field{min-width:0}.setting-field.wide{grid-column:1/-1}
.setting-field label{display:block;font-size:13px;font-weight:500;margin-bottom:6px}.setting-field input,.setting-field select{font-size:14px;min-height:44px;padding:9px 10px}.setting-hint{font-size:12px;color:var(--muted);margin-top:5px}
.settings-actions{display:flex;gap:10px;margin-top:16px}.settings-actions .button{flex:1;padding-inline:10px;font-size:13px}#settings-state.dirty{color:var(--warning)}
.destination-details{border-top:1px solid var(--rule);margin-top:24px;padding-top:14px}.destination-details summary{cursor:pointer;font-size:14px;font-weight:500;min-height:44px;padding-top:10px}
.preview-panel{border:1px solid var(--border);border-radius:8px;overflow:hidden;position:sticky;top:16px;background:#f5f6f4;min-width:0}
.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid #e3e7e1;background:#fff}.preview-toolbar h2{font-size:16px}.preview-toolbar>span{text-align:right;font-size:12px}
.preview-stage{min-height:460px;display:flex;justify-content:center;align-items:center;padding:24px}.preview-stage canvas{display:block;max-width:100%;height:auto;max-height:610px;object-fit:contain;outline:1px solid #c9d0c9;background:#fff}
.preview-empty{min-height:460px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:32px;text-align:center;gap:12px}.preview-empty .document-mark{width:38px;height:48px}.preview-empty>p{font-size:15px}.preview-empty>span{max-width:300px}
.preview-navigation{display:flex;align-items:center;justify-content:center;gap:18px;padding:12px 20px;border-top:1px solid #e3e7e1}.preview-navigation>span{text-align:center;min-width:90px}.preview-navigation .button{padding-inline:12px;min-height:44px;font-size:13px;background:#fff}
.preview-caption{border-top:1px solid #e3e7e1;background:#fff;padding:14px 20px}.preview-caption>span:empty{display:none}.preview-caption>p{margin-top:5px;font-size:12px}.preview-panel>.field-error{padding:0 20px;margin:16px 0}
@media(max-width:1100px){.print-workspace{grid-template-columns:minmax(270px,320px) minmax(0,1fr)}.preview-stage,.preview-empty{min-height:390px}}
@media(max-width:760px){.print-workspace{display:flex;flex-direction:column;gap:24px}.print-controls{display:contents}.print-workspace .upload-form{order:1;width:100%}.preview-panel{order:2;position:static;width:100%}.settings-section{order:3;margin-top:0;border-top:0;padding-top:0;width:100%}.destination-details{order:4;margin-top:0;width:100%}.preview-stage,.preview-empty{min-height:260px}.preview-stage{padding:18px}.preview-stage canvas{max-height:430px}.preview-toolbar{padding:14px 16px}.preview-caption{padding:12px 16px}.settings-actions .button{min-height:46px;font-size:14px}.setting-field input,.setting-field select{min-height:44px;font-size:16px}}
.preview-stage canvas.monochrome{filter:grayscale(1)}