:root {
  color-scheme: light;
  font-family: "Instrument Sans", "Inter", system-ui, sans-serif;
  color: #242036;
  background: #f5f3f9;
  --ink: #242036;
  --muted: #615972;
  --line: #e2ddeb;
  --accent: #5838c8;
  --accent-hover: #4529ad;
  --accent-light: #eee8ff;
  --paper: #fff;
  --good: #136610;
  --error: #a82348;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #9478ff; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.app-shell { display: grid; grid-template: 64px minmax(0, 1fr) / 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { grid-column: 1; grid-row: 1 / 3; position: sticky; top: 0; height: 100vh; background: #1d192e; color: #f7f3ff; padding: 26px 13px; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px; color: #fff; text-decoration: none; font-size: .98rem; font-weight: 800; line-height: 1.17; letter-spacing: -.03em; }
.brand small { display: block; color: #cfc3e7; font-size: .71rem; font-weight: 550; letter-spacing: .05em; }
.brand-mark { flex: 0 0 33px; height: 33px; border-radius: 10px; background: #bca8ff; position: relative; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 11px; height: 11px; border: 1.5px solid #26175c; transform: skewY(-15deg); border-radius: 2px; }
.brand-mark::before { left: 8px; top: 9px; }
.brand-mark::after { top: 13px; left: 13px; background: #bca8ff; }
.sidebar nav { display: grid; gap: 3px; margin-top: 36px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 9px; border-radius: 9px; color: #e4ddf3; font-size: .83rem; font-weight: 580; text-decoration: none; }
.sidebar nav a:hover { background: #332948; }
.sidebar nav a[aria-current] { background: #422e71; color: #fff; font-weight: 750; box-shadow: inset 3px 0 #bc9cff; }
.nav-context { margin: 22px 9px 5px; color: #c3b2de; font-size: .7rem; font-weight: 750; letter-spacing: .085em; }
.nav-icon { width: 15px; height: 15px; flex: 0 0 15px; position: relative; opacity: .84; }
.icon-orders, .icon-board { border: 1.5px solid currentColor; border-radius: 2px; }
.icon-orders::before, .icon-board::before { content: ''; position: absolute; left: 2px; right: 2px; top: 4px; border-top: 1.5px solid currentColor; }
.icon-board::before { left: 4px; top: 0; bottom: 0; right: auto; border: 0; border-left: 1.5px solid currentColor; }
.icon-edit::before { content: ''; position: absolute; inset: 5px 0; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(-43deg); }
.icon-flow::before, .icon-flow::after { content: ''; position: absolute; inset: 1px auto auto 0; width: 5px; height: 5px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-flow::after { inset: auto 0 1px auto; }
.icon-tiles { background: linear-gradient(currentColor,currentColor) 50% 50% / 2px 100% no-repeat,linear-gradient(currentColor,currentColor) 50% 50% / 100% 2px no-repeat; border: 1.5px solid currentColor; border-radius: 2px; }
.icon-check { border: 1.5px solid currentColor; border-radius: 50%; }
.icon-check::before { content: ''; position: absolute; left: 3px; top: 3px; width: 6px; height: 4px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.top { grid-column: 2; display: flex; align-items: center; gap: 11px; padding: 0 clamp(18px,3.1vw,46px); min-width: 0; background: #fff; border-bottom: 1px solid var(--line); }
.top a { color: var(--ink); font-size: .82rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.top a:hover { text-decoration: underline; }
.top-divider { color: #93889f; }
.top-revision { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 650; white-space: nowrap; }
.top-revision span { margin: 0 5px; }
.client-top { background: #1d192e; padding: 16px 26px; }
.client-top .brand { width: fit-content; }
main { width: min(100%, 1420px); margin: 0 auto; padding: clamp(22px,3.2vw,46px); min-width: 0; }
.app-shell > main { grid-column: 2; }
.client-shell main { max-width: 1150px; }

h1 { margin: 0 0 24px; font-size: clamp(1.9rem,3.4vw,2.75rem); line-height: 1.08; letter-spacing: -.06em; }
h2 { font-size: 1.03rem; margin: 0 0 15px; letter-spacing: -.025em; }
p { line-height: 1.55; }
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: 0; box-shadow: 0 2px 6px #2e204006; }
.index-grid, .order-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,300px); gap: 17px; align-items: start; }
.heading, .page-heading, .section-title, .orders a, .history a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.heading { margin: 17px 0 24px; }
.page-heading { align-items: end; margin: 0 0 22px; }
.heading h1, .page-heading h1, .section-title h2 { margin: 0; }
.page-subtitle { color: var(--muted); margin: 7px 0 0; }
.order-no { font-size: .77rem; color: var(--muted); margin: 0 0 6px; font-weight: 750; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-light); color: #482597; border-radius: 999px; padding: 7px 11px; font-size: .76rem; font-weight: 750; line-height: 1.2; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: #6744ce; }
.back, .section-title a, .foot a { font-size: .84rem; }
.muted, .spec { color: var(--muted); font-size: .84rem; }
.file, code { overflow-wrap: anywhere; }
aside:not(.sidebar) { display: grid; gap: 14px; }
form { display: grid; gap: 10px; }
label { font-size: .83rem; font-weight: 650; }
input, select, textarea { width: 100%; padding: 10px; color: inherit; font: inherit; border: 1px solid #cbc3d9; border-radius: 8px; background: white; }
input[type=file] { font-size: .82rem; }
button, .button { padding: 11px 14px; border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: white; font: inherit; font-size: .86rem; font-weight: 750; line-height: 1.25; text-align: center; cursor: pointer; text-decoration: none; }
.button { display: inline-block; }
button:hover, .button:hover { background: var(--accent-hover); }
button:disabled { opacity: .65; cursor: wait; }
.button-outline { color: var(--accent); background: white; border-color: #cfc2e7; }
.button-outline:hover { color: var(--accent-hover); background: var(--accent-light); }
.error { color: var(--error); }
.legend, .orders, .history, .workflow-steps { padding: 0; list-style: none; }
.orders li + li, .history li + li { border-top: 1px solid var(--line); }
.orders a, .history a { min-height: 46px; padding: 8px 2px; text-decoration: none; }
.orders a:hover, .history a:hover { background: #f9f6ff; }
.orders strong { flex: 1; }
.history a[aria-current] strong { text-decoration: underline; }
.history time { color: var(--muted); font-size: .79rem; }
details { margin-top: 14px; font-size: .79rem; color: var(--muted); }
summary { cursor: pointer; }
code { display: block; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 16px 0; }
.legend li { display: flex; align-items: center; gap: 6px; font-size: .76rem; }
.legend span { color: var(--muted); }
.legend i { width: 18px; border-top: 2px solid #222931; }
.legend .cut { border-color: #c81d32; }
.legend .crease, .legend .half-crease { border-color: #16804c; }
.legend .half-crease { border-top-style: dashed; }
.legend .bleed { border-color: #0086af; }
.parts { display: grid; grid-template-columns: 1.12fr 1fr; gap: 12px; }
figure { margin: 0; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); min-width: 0; }
figure a { display: grid; place-items: center; height: 255px; padding: 12px; background: #f1eef6; }
figure a:hover { background: #ede7fa; }
figure img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
figcaption { padding: 11px; font-size: .82rem; }
figcaption span { display: block; color: var(--muted); margin-top: 4px; }
.foot { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 0; }
.empty { min-height: 200px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.art-links { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: .84rem; margin-top: 12px; }
.imposition { background: white; padding: 14px; }
.imposition img { display: block; max-height: 480px; }

.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; min-height: 135px; padding: 15px 8px; border: 1.5px dashed #a392ce; border-radius: 11px; background: #f7f4ff; color: #482f93; text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-within { border-color: var(--accent); background: #ece4ff; }
.dropzone small { color: var(--muted); font-weight: 500; }
.drop-icon { width: 35px; height: 35px; background: #e9dfff; border-radius: 10px; font-size: 1.25rem; display: grid; place-items: center; }
.dropzone input { position: absolute; inset: 0; opacity: 0; height: 100%; cursor: pointer; }

.journey-panel { margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; background: var(--paper); }
.journey-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin: 0 2px 10px; }
.journey-header h2 { margin: 0; font-size: .91rem; }
.journey-header > span { color: var(--muted); font-size: .74rem; font-weight: 650; }
.workflow-steps { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin: 0; gap: 5px; }
.workflow-steps li { min-width: 0; border-radius: 8px; background: #f7f5fa; }
.workflow-steps li > a, .workflow-steps .step-link { display: flex; align-items: center; gap: 6px; min-height: 55px; height: 100%; padding: 7px 6px; font-size: inherit; color: inherit; text-decoration: none; border-radius: inherit; }
.workflow-steps li > a:hover { background: #e7dcff; }
.workflow-steps .step-selected { background: var(--accent-light); color: #44268a; box-shadow: inset 0 0 0 2px var(--accent); }
.workflow-steps .step-alert { background: #fff0da; color: #722c1b; }
.workflow-steps strong, .workflow-steps small { display: block; font-size: .76rem; line-height: 1.22; }
.workflow-steps small { color: var(--muted); font-size: .67rem; margin-top: 3px; }
.step-icon { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border-radius: 50%; border: 1.5px solid #c9c0d9; font-size: .78rem; font-weight: 800; }
.step-selected:not(.step-done) .step-icon { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-alert .step-icon { border-color: #924126; background: #924126; }
.step-done .step-icon { border-color: #d5e6d2; background: #e9f4e6; color: var(--good); }
.journey-next, .journey-history { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 9px 10px; border: 1px solid #e6dcf7; border-radius: 9px; background: #fbf9ff; font-size: .79rem; }
.journey-next.has-pending { border-color: #ecd3a8; background: #fffbf2; }
.journey-next p, .journey-history p { margin: 3px 0 0; color: var(--muted); }
.journey-next ul { padding-left: 17px; margin: 5px 0 0; font-size: .78rem; color: #722c1b; }
.journey-next > .button { flex-shrink: 0; }
.workflow-hero { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(215px,1fr); padding: 0; overflow: hidden; margin-bottom: 17px; }
.workflow-preview { position: relative; display: grid; place-items: center; min-width: 0; min-height: 285px; overflow: hidden; background: #e9e2f7; background-image: radial-gradient(#b9add0 1px,transparent 1px); background-size: 15px 15px; }
.workflow-preview img { display: block; width: min(calc(100% - 36px),340px); max-height: 282px; margin: 17px; border-radius: 11px; object-fit: contain; box-shadow: 0 12px 36px #31244d31; }
.preview-label { position: absolute; left: 12px; bottom: 12px; padding: 6px 9px; color: #3d3057; background: #f7f3fc; border: 1px solid #d8cce8; border-radius: 7px; font-size: .72rem; font-weight: 700; }
.preview-label span { margin: 0 2px; }
.workflow-action { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(18px,3vw,42px); }
.workflow-action h2 { font-size: clamp(1.48rem,2.6vw,2.25rem); line-height: 1.08; letter-spacing: -.055em; margin: 0; }
.quiet-link { font-size: .82rem; margin-top: 14px; }
.workflow-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; align-items: start; }
.workflow-history { padding-left: 22px; }
.workflow-history li { margin-bottom: 12px; color: var(--muted); font-size: .85rem; }
.workflow-history li strong { color: var(--ink); }
.workflow-history .art-links { margin-top: 4px; }
.decision-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
button.secondary { color: #452784; background: var(--accent-light); }
.register-imposition { display: block; margin: 15px 0; }
.notice-simulation { background: #fff2d5; border: 1px solid #e3ca90; border-radius: 10px; color: #513709; padding: 10px 14px; font-size: .84rem; }
.document-hashes dt { font-size: .81rem; font-weight: 700; }
.document-hashes dd { margin: 0 0 12px; }
.check-confirm { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.check-confirm input { width: auto; margin: 2px 0 0; }
.layout-comparison { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: .82rem; text-align: left; }
.layout-comparison caption { text-align: left; font-weight: 750; margin: 0 0 8px; }
.layout-comparison th, .layout-comparison td { border-bottom: 1px solid var(--line); padding: 8px 6px; }
.layout-comparison small { color: var(--muted); font-weight: 400; }
.layout-comparison [aria-current] { font-weight: 750; }
.imposition-checks { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 14px; }
.checks { padding: 0; list-style: none; font-size: .83rem; line-height: 1.4; }
.checks li { margin-bottom: 8px; }
.checks strong { color: var(--good); margin-right: 5px; }
.checks strong.error { color: var(--error); }

.workspace-tabs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 15px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #eeeaf5; }
.workspace-tabs a { padding: 8px 12px; border-radius: 7px; color: #504369; font-size: .81rem; font-weight: 650; text-decoration: none; }
.workspace-tabs a:hover { background: #e4dcf3; }
.workspace-tabs a[aria-selected=true] { color: #492399; background: #fff; box-shadow: 0 1px 4px #33244d13; }
[data-workspace-panel], [id="importacao-faca"], [id="parametros-folha"], [id="previous"], [id="posterior"] { scroll-margin-top: 18px; }
.summary-preview { display: grid; place-items: center; margin-top: 12px; min-height: 265px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #eee9f7; }
.summary-preview img { width: min(98%,325px); height: auto; border-radius: 8px; }
.os-facts { margin: 0 0 13px; }
.os-facts div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.os-facts dt { color: var(--muted); font-size: .73rem; }
.os-facts dd { margin: 3px 0 0; font-size: .87rem; font-weight: 650; }
.step-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(235px,285px); gap: 16px; align-items: start; }
.step-status { grid-column: 2; grid-row: 1; display: grid; gap: 12px; border-top: 3px solid #9680d8; }
.step-status.status-done { border-top-color: #39804e; }
.step-status.status-pending { border-top-color: #ac732c; }
.step-status h2 { margin: 0; font-size: 1.2rem; }
.step-status.status-done h2 { color: #246036; }
.step-status p { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.step-status > a:not(.button) { font-size: .83rem; }
.step-preview { grid-column: 1; grid-row: 1; }
.step-preview .parts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.step-preview .section-title { flex-wrap: wrap; }
.step-initial { max-width: 520px; }
.step-initial > p { color: var(--muted); margin: 0 0 16px; }
.step-details { padding-top: 12px; border-top: 1px solid var(--line); }
.step-details summary { color: #47366c; font-size: .83rem; font-weight: 700; }
.step-details form, .step-details label { margin-top: 12px; }
.step-details label { display: block; }
.approval-preview figure a { height: clamp(195px,33vw,370px); }
.approval-preview .workspace-tabs { width: fit-content; }
.ordinal { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 5px; border-radius: 7px; color: #492399; background: var(--accent-light); font-size: .75rem; font-variant-numeric: tabular-nums; }
.montage-workspace, .technical-workspace { display: grid; grid-template-columns: minmax(233px,280px) minmax(0,1fr); gap: 16px; align-items: start; }
.montage-results { display: grid; gap: 15px; min-width: 0; }
.paired-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.paired-fields label, .field-stack label { display: grid; gap: 5px; }
.field-details { margin: 5px 0; border: 1px solid var(--line); border-radius: 8px; background: #fbf9ff; padding: 8px 10px; }
.field-details summary { color: #3c2f56; font-weight: 750; }
.field-stack { display: grid; gap: 7px; padding-top: 8px; }
.montage-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.montage-preview-head p { margin: 0; font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.montage-preview-head p span { color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; }
.register-imposition { margin-bottom: 13px; }
#montage-draft { color: #722c1b; margin: 4px 0; }
.technical-document { margin-bottom: 15px; }
.technical-document p { margin: 10px 0 0; font-size: .87rem; }
.technical-workspace { grid-template-columns: minmax(0,1fr) minmax(240px,300px); }
.release-card { border-top: 3px solid #9d82ed; }
.checklist-fields { margin-bottom: 4px; }
.checklist-row { display: grid; grid-template-columns: minmax(0,1fr) 132px; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.checklist-row select { font-size: .8rem; padding: 7px 8px; }
.checklist-row:has(option[value=pending]:checked) { color: #722c1b; background: #fff4e2; }
.checklist-row:has(option[value=ok]:checked) select { color: var(--good); }
.review-result { border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 10px; display: grid; gap: 3px; font-size: .84rem; }
.review-result.has-pending { border-color: #efdab5; background: #fff8eb; color: #722c1b; }
.review-result span { font-size: .75rem; color: var(--muted); }
.review-result p { margin: 4px 0 0; }
.checklist-readonly { padding: 0; margin: 10px 0 0; list-style: none; }
.checklist-readonly li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: .81rem; }
.proof-review figure a { height: clamp(250px,42vh,420px); }

.editor-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,280px); gap: 17px; align-items: start; }
.editor-card { overflow: hidden; padding: 0; }
.editor-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 15px 17px; }
.editor-bar h2 { margin: 0; }
.editor-canvas { display: grid; place-items: center; min-height: 465px; padding: 19px; overflow: hidden; background: #29233a; background-image: radial-gradient(#53476a 1px,transparent 1px); background-size: 15px 15px; }
#art-canvas { width: min(100%,420px); max-height: 475px; overflow: visible; }
.canvas-paper { fill: #fffdfd; stroke: #d1c5dc; stroke-width: .5; }
.canvas-guide { fill: none; stroke: #9b83c5; stroke-width: .35; stroke-dasharray: 1.4 1.2; }
#movable-art { cursor: grab; touch-action: none; user-select: none; }
#movable-art:focus-visible { outline: none; }
#art-canvas.dragging #movable-art { cursor: grabbing; }
.art-selection { fill: transparent; stroke: #6840df; stroke-width: .7; stroke-dasharray: 2 1.4; vector-effect: non-scaling-stroke; }
#movable-art:focus .art-selection { stroke-width: 1.5; }
.editor-help { color: var(--muted); font-size: .76rem; }
#art-position { font-variant-numeric: tabular-nums; color: var(--ink); }
.position-fields { border: 0; margin: 6px 0 0; padding: 0; min-width: 0; }
.position-fields legend { font-weight: 750; font-size: .81rem; margin-bottom: 7px; }
.position-fields > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.position-fields input { margin-top: 5px; }
.editor-inspector p { margin: 6px 0; }
.canvas-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.canvas-tools label, .canvas-tools output { font-size: .73rem; font-weight: 700; }
.canvas-tools input { width: 86px; padding: 0; accent-color: var(--accent); }
.canvas-tools button { padding: 6px 8px; font-size: .72rem; }
.inspector-head { margin-bottom: 12px; }
.inspector-group { display: grid; gap: 7px; min-width: 0; margin: 0 0 4px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--line); }
.inspector-group legend { padding: 0 5px 0 0; font-size: .76rem; color: #493768; font-weight: 750; }
.inspector-group > button { padding: 7px; font-size: .75rem; }
#editor-draft.has-changes { color: #722c1b; }

@media (max-width: 1090px) {
  .app-shell { grid-template-columns: 180px minmax(0,1fr); }
  .sidebar { padding-inline: 9px; }
  .sidebar nav a { font-size: .77rem; gap: 7px; }
  .workflow-steps li > a, .workflow-steps .step-link { gap: 5px; padding-inline: 4px; }
  .workflow-steps strong { font-size: .7rem; }
  .step-icon { flex-basis: 18px; height: 18px; }
}
@media (max-width: 880px) {
  .app-shell { display: block; }
  .sidebar { height: auto; position: static; display: flex; flex-direction: column; padding: 12px 14px 8px; }
  .sidebar nav { display: flex; overflow-x: auto; margin: 11px 0 0; gap: 5px; padding-bottom: 4px; }
  .sidebar nav a { white-space: nowrap; font-size: .78rem; padding: 8px; }
  .nav-context, .nav-icon { display: none; }
  .top { min-height: 43px; }
}
@media (max-width: 680px) {
  main { padding: 19px 13px 32px; }
  .index-grid, .order-grid, .step-grid, .workflow-grid, .editor-grid, .montage-workspace, .technical-workspace { grid-template-columns: 1fr; }
  .step-grid > * { grid-column: auto; grid-row: auto; }
  .step-preview .parts { gap: 8px; }
  .step-preview .parts figure a { height: clamp(130px,39vw,205px); padding: 6px; }
  .workflow-steps { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
  .workflow-steps li > a, .workflow-steps .step-link { align-items: start; flex-direction: column; min-height: 64px; }
  .workflow-steps strong { font-size: .65rem; overflow-wrap: anywhere; }
  .workflow-steps small { font-size: .59rem; }
  .step-icon { flex-basis: auto; width: 18px; }
  .journey-next, .journey-history { align-items: flex-start; flex-direction: column; }
  .page-heading, .heading { align-items: start; flex-wrap: wrap; }
  .workflow-hero { grid-template-columns: 1fr; }
  .sidebar nav { flex-wrap: wrap; overflow: visible; }
  .sidebar nav a { padding: 7px 8px; }
  .top { gap: 7px; }
  .workflow-preview { min-height: 220px; }
  .workflow-preview img { max-height: 235px; }
  figure a { height: 205px; }
  .checklist-row { grid-template-columns: 1fr; padding: 8px 5px; }
  .technical-document .section-title { align-items: flex-start; flex-direction: column; }
  .editor-canvas { min-height: 360px; }
}
@media (max-width: 390px) {
  .top a { font-size: .74rem; }
  .top-revision { font-size: .68rem; }
  .foot { flex-direction: column; }
  .orders a { flex-wrap: wrap; }
}

.workflow-control { margin: -10px 0 17px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; width: fit-content; }
.workflow-control > summary { color: var(--ink); font-weight: 700; }
.workflow-control form { margin-top: 9px; }
.brief-fields { display: grid; min-width: 0; gap: 9px; border: 0; padding: 0; margin: 0; }

.artist-conversation { display: grid; gap: 10px; padding: 0; list-style: none; }
.artist-conversation li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbf9ff; }
.artist-conversation strong { font-size: .8rem; }
.artist-conversation p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.artist-reply { border-top: 1px solid var(--line); padding-top: 15px; }

.artist-heading { align-items: center; }
.artist-grid { margin-bottom: 1rem; }
.artist-actions .button, .artist-actions button { display: block; width: 100%; }
.artist-actions p { overflow-wrap: anywhere; }
.artist-secondary { padding-top: 10px; border-top: 1px solid var(--line); }
.artist-adjust { margin: 0; }
.artist-adjust summary { list-style: none; }
.artist-adjust summary::-webkit-details-marker { display: none; }
.artist-adjust[open] summary { background: var(--accent-light); }
.artist-adjust form { margin-top: 10px; border: 0; padding: 0; }
.artist-preview .section-title { margin-bottom: 10px; }
.artist-preview figure a { height: clamp(190px,40vh,340px); }
.artist-history { margin: 0 0 1rem; }
.artist-history summary { color: var(--ink); font-size: .92rem; font-weight: 700; }
.artist-history summary span { margin-left: 8px; color: var(--muted); font-weight: 400; }
.artist-history .artist-conversation { max-height: 45vh; overflow-y: auto; padding-right: 8px; }

.workflow-control.is-human { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; background: #fff8eb; border-color: #e4c883; }
.workflow-control.is-human > div:first-child { display: grid; gap: 4px; }
.workflow-control.is-human span { color: var(--muted); font-size: .8rem; }
.control-actions, .review-navigation { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.control-actions form { margin: 0; }
.review-navigation { margin: 18px 0 8px; }
.review-explanation { margin-top: 15px; border-left: 3px solid #b48625; padding: 3px 14px; background: #fffaf0; }
.review-explanation h3 { margin: 8px 0; font-size: 1rem; }
.review-explanation p { color: var(--muted); font-size: .88rem; margin: 8px 0; }
@media(max-width:680px) { .workflow-control.is-human { align-items: flex-start; flex-direction: column; } }
.preview-3d {width:100%;text-align:left}
.artist-preview figure a.preview-3d-open {height:auto;min-height:0;padding:14px;background:#fff;text-align:center}
.preview-3d-stage {position:relative;width:100%;height:420px;overflow:hidden;border:1px solid #e3dfee;border-radius:16px;background:radial-gradient(ellipse at 50% 40%,#fff 15%,#f2eff8 100%)}
.preview-3d-stage canvas {display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none;cursor:grab}
.preview-3d-stage canvas:active {cursor:grabbing}
.preview-3d-stage canvas:focus-visible {outline:3px solid #7555de;outline-offset:-5px;border-radius:16px}
.preview-3d-stage .preview-3d-poster {width:100%;height:100%;object-fit:contain}
.preview-3d-status {position:absolute;bottom:12px;left:12px;right:12px;border-radius:10px;padding:7px 10px;background:#ffffffdf;color:#514567;font-size:.78rem;pointer-events:none;z-index:1;text-align:center}
.preview-3d[data-ready="true"] .preview-3d-poster {visibility:hidden}
.preview-3d-help {font-size:.85rem;text-align:center;color:#625774;margin:12px 0}
.preview-3d-actions {display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.preview-3d-parts {display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin:12px 0}
.preview-3d-parts button {width:auto!important;font-size:.85rem;min-height:40px;padding:8px 12px;background:#fff;color:#4d329d;border:1px solid #dcd3f1;border-radius:9px}
.preview-3d-parts button[aria-pressed="true"] {background:#5a35c4;color:#fff;border-color:#5a35c4}
.preview-3d-fold {display:flex;align-items:center;justify-content:center;gap:12px;font-size:.875rem;color:#625774;margin:14px 10px}
.preview-3d-fold input {width:130px;max-width:35%;accent-color:#5a35c4}
.preview-3d-fold output {min-width:40px;font-variant-numeric:tabular-nums}
.preview-3d-actions button {width:auto!important;min-height:38px;padding:7px 11px;font-size:.8rem;background:#fff;color:#4d329d;border:1px solid #dcd3f1;border-radius:9px}
.preview-3d-actions button:hover {background:#f0eafa}
.preview-3d-scope {font-size:.75rem;line-height:1.45;text-align:center;color:#746982;margin:14px 0 0}
@media(max-width:600px) {.preview-3d-stage {height:330px}.preview-3d-actions button {font-size:.76rem}}

.company-logo-form{margin-top:28px}.company-logo-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:180px;padding:24px;border:1.5px dashed #b7a6d9;border-radius:16px;background:#faf8ff;text-align:center;cursor:pointer}.company-logo-drop.is-dragging{background:#eee8ff;border-color:#5838c8}.company-logo-drop img{max-width:190px;max-height:100px;object-fit:contain}.company-logo-drop>span{font-size:.875rem;font-weight:500;color:#756981}.company-logo-drop>span[aria-hidden]{font-size:2rem;color:#8563d6}.company-logo-drop input{max-width:100%;margin:6px 0 0;font-size:.875rem}.company-brand-sample{display:flex;align-items:center;gap:16px;padding:22px 0;margin:12px 0 28px;border-bottom:1px solid var(--line)}.company-brand-sample img{max-width:150px;max-height:64px;object-fit:contain}.company-presentation-preview p{line-height:1.6}
/* A persistent, compact map for the production desks. */
.guided-workflow{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin-bottom:16px;font-size:.72rem}
.guided-workflow>strong{color:var(--accent);white-space:nowrap}.guided-workflow ol{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;list-style:none;padding:0;margin:0}
.guided-workflow li{display:flex;align-items:center;gap:6px;color:var(--muted)}.guided-workflow li>span{display:grid;place-items:center;width:23px;height:23px;border:1px solid var(--line);border-radius:50%;font-weight:700}
.guided-workflow li[aria-current]{color:var(--accent);font-weight:700}.guided-workflow li[aria-current]>span{color:#fff;background:var(--accent);border-color:var(--accent)}
.die-acceptance{padding:14px 0;font-size:.8rem}.die-acceptance summary{cursor:pointer;font-weight:650;color:var(--accent)}.die-acceptance form{display:grid;gap:12px;max-width:600px}.die-acceptance p{line-height:1.5}.die-acceptance input{margin-top:6px}
@media(max-width:1000px){.guided-workflow{align-items:flex-start;gap:10px;flex-direction:column}.guided-workflow ol{width:100%;overflow-x:auto;padding-bottom:3px}.guided-workflow li{white-space:nowrap}}

/* Production desks keep navigation shallow so the artwork owns the viewport. */
.app-shell.production-desk{grid-template-rows:36px minmax(0,1fr)}
.production-desk>.top{min-height:36px;padding-inline:16px;gap:8px}
.production-desk>.top a{font-size:.73rem}.production-desk>.top .top-revision{font-size:.68rem}
.production-desk>main{padding:8px 16px 16px}
.production-desk .guided-workflow{min-height:30px;padding:4px 10px;margin-bottom:6px;gap:12px;border-radius:8px;font-size:.65rem;flex-direction:row;align-items:center}
.production-desk .guided-workflow ol{min-width:0;gap:8px;padding:0}
.production-desk .guided-workflow li{gap:5px;white-space:nowrap}
.production-desk .guided-workflow li>span{width:19px;height:19px;flex:none}
@media(max-width:680px){.production-desk .guided-workflow>strong{display:none}.production-desk .guided-workflow ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 8px;overflow:visible}.production-desk>.top{padding-inline:12px}.production-desk>main{padding-inline:12px}}
