:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #0f172a;
  --ink-soft: #27364c;
  --muted: #526075;
  --subtle: #718096;
  --accent: #0369a1;
  --accent-hover: #075985;
  --accent-soft: #e8f3fa;
  --navy: #0f172a;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dce4ed;
  --line-strong: #c4d0de;
  --success: #16785b;
  --success-soft: #eaf7f1;
  --warning: #92550a;
  --warning-soft: #fff7e6;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --focus: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .035);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .13);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 3px; }
button { min-height: 44px; padding: 10px 17px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: 14px; font-weight: 650; transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
button:hover:not(:disabled) { background: var(--surface-soft); border-color: #94a8bc; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-color: var(--accent); background: var(--accent); color: #fff; }
.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.quiet { border-color: transparent; background: transparent; }
.quiet:hover:not(:disabled) { border-color: transparent; background: #eef2f7; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 3vw, 36px); line-height: 1.16; letter-spacing: -.035em; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.02em; }
h3 { font-size: 16px; line-height: 1.4; }
p { color: var(--muted); font-size: 14px; line-height: 1.65; }
small { color: var(--muted); font-size: 12px; }
svg { display: block; }
.site-header { position: relative; z-index: 5; height: 74px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); }
.header-inner { display: flex; align-items: center; gap: 26px; width: min(1600px, 100%); height: 100%; margin: auto; padding: 0 36px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #7dd3fc; }
.brand-mark svg { width: 25px; height: 25px; }
.brand-name { font-size: 22px; font-weight: 720; letter-spacing: -.045em; }
.brand-name strong { color: var(--muted); font-weight: 480; }
.pilot { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #16a377; box-shadow: 0 0 0 3px rgba(22, 163, 119, .11); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-actions button, .header-link { min-height: 40px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.header-link { color: var(--ink-soft); font-weight: 650; text-decoration: none; }
.header-link:hover { background: #eef2f7; }
main { width: min(1600px, 100%); margin: auto; padding: 34px 36px 56px; }
.eyebrow, .section-kicker { color: var(--accent); font-size: 10px; font-weight: 780; letter-spacing: .14em; line-height: 1.6; }
.eyebrow { margin-bottom: 12px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading p { margin: 0; }
.base { display: flex; align-items: center; flex-shrink: 0; gap: 12px; min-width: 250px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); }
.base-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 8px; background: #fff7da; color: #84600a; font-size: 16px; font-weight: 800; letter-spacing: -.05em; }
.base small { display: block; margin-bottom: 2px; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.base strong { font-size: 12px; }
.workspace-grid { display: grid; grid-template-columns: 292px minmax(0, 1fr); align-items: start; gap: 24px; }
.sidebar { min-width: 0; }
.upload-card { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.upload-card h2 { margin: 6px 0 18px; font-size: 18px; }
.base-select-label { display: block; margin: 10px 0 7px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
#upload-base { margin-bottom: 13px; }
.drop-zone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 22px 12px; border: 1.5px dashed #a9bdd0; border-radius: 10px; background: #f7fafc; text-align: center; cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.drop-zone strong { font-size: 13px; }
.drop-zone > span:not(.upload-symbol) { color: var(--muted); font-size: 11px; }
.upload-symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border: 1px solid #c9dce9; border-radius: 10px; background: var(--surface); color: var(--accent); }
.upload-symbol svg { width: 22px; height: 22px; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.upload-help { margin: 12px 0 17px; font-size: 11px; line-height: 1.75; text-align: center; }
.upload-card .primary { width: 100%; gap: 8px; padding: 11px 9px; font-size: 12px; }
.file-name { color: var(--accent); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.file-name:not(:empty) { padding-top: 12px; }
.job-list-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; padding: 0 2px; }
.job-list-head h2 { margin: 0; font-size: 14px; }
.count { min-width: 25px; padding: 3px 7px; border-radius: 6px; background: #e7edf4; color: var(--muted); font-size: 11px; text-align: center; }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .025); transition: border-color .18s ease, box-shadow .18s ease; }
input:hover, textarea:hover, select:hover { border-color: #91a6bb; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(3, 105, 161, .09); }
input::placeholder, textarea::placeholder { color: #8391a3; }
input:disabled, textarea:disabled, select:disabled { background: #f1f4f7; color: #45556b; opacity: 1; -webkit-text-fill-color: #45556b; cursor: default; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; margin: 0; padding: 0; accent-color: var(--accent); }
input[type="search"] { min-height: 42px; margin-bottom: 10px; background: transparent; font-size: 12px; }
textarea { min-height: 110px; line-height: 1.6; resize: vertical; }
#jobs { display: grid; gap: 4px; }
.job { display: flex; align-items: flex-start; gap: 11px; width: 100%; margin: 0; padding: 13px 11px; border-color: transparent; background: transparent; text-align: left; }
.job:hover:not(:disabled) { border-color: transparent; background: #eaf0f6; }
.job.active { border-color: #c2d9e8; background: var(--accent-soft); }
.job-icon { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 36px; margin-top: 1px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--subtle); font-size: 18px; }
.job.active .job-icon { border-color: #bdd5e5; color: var(--accent); }
.job-content { min-width: 0; flex: 1; }
.job strong { display: block; overflow: hidden; font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sidebar-note { margin: 16px 10px; color: var(--subtle); font-size: 11px; line-height: 1.7; }
.detail { min-width: 0; overflow: clip; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 26px 28px 20px; }
.detail-head h2 { margin: 5px 0 7px; font-size: 24px; overflow-wrap: anywhere; }
.detail-head p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #c9e6da; border-radius: 7px; background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge.warning { border-color: #eed9af; background: var(--warning-soft); color: var(--warning); }
.badge.error { border-color: #f0c5c1; background: var(--danger-soft); color: var(--danger); }
.stepper { display: flex; gap: 12px; margin: 0 28px 22px; padding: 15px 0; border-top: 1px solid #edf1f5; border-bottom: 1px solid #edf1f5; list-style: none; }
.stepper li { display: flex; align-items: center; flex: 1; gap: 8px; color: var(--subtle); font-size: 11px; }
.stepper li + li::before { content: ""; width: 20px; height: 1px; flex-shrink: 0; margin-right: 5px; background: var(--line); }
.step-number { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: #edf1f5; font-size: 10px; }
.stepper .done .step-number { background: var(--success-soft); color: var(--success); }
.stepper .current { color: var(--accent); font-weight: 700; }
.stepper .current .step-number { background: var(--accent); color: #fff; }
.review-overview { display: flex; gap: 10px; padding: 0 28px 22px; }
.overview-item { display: flex; align-items: center; flex: 1; gap: 10px; padding: 13px 14px; border: 1px solid #e4eaf0; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.overview-item strong { color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -.04em; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 11px; padding: 0 28px; }
.section-title h3 { margin: 0; font-size: 13px; }
.section-title span { color: var(--muted); font-size: 11px; }
.doc-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 28px 20px; }
.doc { min-height: 36px; padding: 7px 10px; border-color: #cddde8; background: #f3f8fb; color: #245979; font-size: 11px; font-weight: 600; }
.doc .check { margin-right: 5px; color: var(--success); }
.missing-docs { margin: 0 28px 18px; color: var(--muted); font-size: 12px; }
.missing-docs summary { padding: 6px 0; cursor: pointer; }
.missing-docs p { margin: 8px 0; font-size: 11px; }
.notice { margin: 0 28px 18px; padding: 14px 16px; border: 1px solid #ead9b8; border-radius: 9px; background: var(--warning-soft); color: #7c4d10; font-size: 12px; line-height: 1.7; }
.notice p { margin: 4px 0 0; color: inherit; font-size: 12px; }
.notice strong { font-size: 12px; }
.notice.success { border-color: #c9e6da; background: var(--success-soft); color: var(--success); }
.notice.info { border-color: var(--line); background: #f3f7fb; color: #3c556f; }
.notice.error { border-color: #f0c5c1; background: var(--danger-soft); color: var(--danger); }
.notice ul { margin: 8px 0 0; padding-left: 18px; }
.notice a { color: inherit; }
.review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8fafc; }
.review-toolbar h3 { margin: 0 0 3px; font-size: 14px; }
.review-toolbar p { margin: 0; font-size: 11px; }
.review-toolbar button { min-height: 38px; padding: 7px 11px; font-size: 11px; white-space: nowrap; }
.audience-toggle { margin-left: auto; }
.field-section { border-bottom: 1px solid #e7edf2; scroll-margin-top: 20px; }
.field-section > summary { display: flex; align-items: center; gap: 12px; padding: 19px 28px; list-style: none; cursor: pointer; }
.field-section > summary::-webkit-details-marker { display: none; }
.field-section > summary::after { content: "+"; margin-left: auto; color: var(--subtle); font-size: 21px; font-weight: 400; }
.field-section[open] > summary::after { content: "−"; }
.group-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: #eaf1f7; color: #4e6b85; font-size: 11px; font-weight: 750; }
.group-title { min-width: 0; }
.group-title h3 { margin: 0 0 3px; font-size: 14px; }
.group-title p { margin: 0; font-size: 11px; line-height: 1.5; }
.group-count { margin-left: auto; padding: 4px 7px; border-radius: 6px; background: #edf1f5; color: var(--muted); font-size: 10px; white-space: nowrap; }
.field-section > summary:has(.group-count)::after { margin-left: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 22px; margin: 0; padding: 2px 28px 25px; border: 0; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #3c4c60; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { font-size: 15px; }
.field-hint { margin-top: 5px; color: var(--subtle); font-size: 11px; line-height: 1.55; }
.field-info { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.page-link { min-height: 32px; padding: 4px 8px; border-color: transparent; background: #edf5fa; color: var(--accent); font-size: 11px; font-weight: 550; }
.field-note { margin-top: 6px; color: #8a5a20; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.field.has-issue input { border-color: #c67a46; }
.field.has-issue label { color: #8d4c27; }
.actions { position: sticky; bottom: 0; z-index: 2; padding: 21px 28px; border-top: 1px solid var(--line); background: rgba(248, 250, 252, .97); box-shadow: 0 -8px 24px rgba(15, 23, 42, .04); }
.confirm-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.action-explainer { margin: 0 0 16px 28px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.action-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.action-buttons .primary { margin-left: auto; }
.action-buttons button { font-size: 12px; }
.save-state { flex: 1; margin: 0; color: var(--muted); font-size: 11px; }
.save-state.dirty { color: var(--warning); }
.action-feedback { margin-top: 12px; color: var(--danger); font-size: 12px; line-height: 1.6; }
.action-feedback:empty { display: none; }
.empty { min-height: 480px; padding: 90px 30px 110px; text-align: center; }
.empty h2 { margin: 20px 0 10px; font-size: 23px; }
.empty p { font-size: 14px; }
.empty-illustration { width: 96px; height: 96px; margin: 0 auto; color: var(--accent); }
.empty-tags { display: flex; justify-content: center; gap: 7px; margin-top: 22px; }
.empty-tags span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.spinner { width: 32px; height: 32px; margin: 25px auto; border: 3px solid #dce7ef; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); max-width: 1120px; margin: 46px auto 34px; overflow: hidden; border: 1px solid #1d2a40; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.welcome { padding: 46px 44px; background: var(--navy); color: #fff; }
.welcome .eyebrow { color: #7dd3fc; }
.welcome h1 { margin: 18px 0; font-size: clamp(38px, 4vw, 50px); line-height: 1.12; letter-spacing: -.045em; }
.welcome h1 span { color: #7dd3fc; }
.welcome .lead { max-width: 470px; color: #b8c5d6; font-size: 16px; line-height: 1.7; }
.welcome-steps { display: grid; gap: 0; margin: 30px 0 26px; padding: 0; list-style: none; }
.welcome-steps li { display: flex; align-items: flex-start; gap: 15px; padding: 16px 0; border-top: 1px solid #27364c; }
.welcome-number { padding-top: 2px; color: #7dd3fc; font-size: 11px; font-weight: 750; letter-spacing: .06em; }
.welcome-steps strong { font-size: 14px; font-weight: 650; }
.welcome-steps p { margin: 4px 0 0; color: #9eacc0; font-size: 12px; line-height: 1.55; }
.welcome-note { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid #2d3c52; border-radius: 10px; background: #162238; }
.note-icon { flex-shrink: 0; color: #7dd3fc; }
.note-icon svg { width: 22px; height: 22px; }
.welcome-note strong { display: block; margin-bottom: 3px; font-size: 12px; }
.welcome-note span:not(.note-icon) { display: block; color: #9eacc0; font-size: 11px; line-height: 1.55; }
.login-column { display: flex; align-items: center; background: var(--surface); }
.login-card { width: 100%; padding: 40px; }
.login-card-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 23px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.login-card-icon svg { width: 25px; height: 25px; }
.login-card h2 { margin: 9px 0 8px; font-size: 27px; }
.login-card > p { margin-bottom: 24px; font-size: 13px; }
.login-card label { display: block; margin: 17px 0 7px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.login-card input { min-height: 48px; }
.password-control { position: relative; }
.password-control input { padding-right: 86px; }
.password-control button { position: absolute; top: 4px; right: 4px; min-height: 40px; padding: 8px; font-size: 11px; }
.login-card > .primary { justify-content: space-between; width: 100%; min-height: 48px; margin-top: 8px; }
.reset-link { display: block; margin: 20px 0 24px; font-size: 12px; text-align: center; }
.login-card > .login-footnote { margin: 0; padding-top: 20px; border-top: 1px solid #e8edf2; color: var(--subtle); font-size: 11px; line-height: 1.75; text-align: center; }
.inline-error { margin: 12px 0 !important; color: var(--danger) !important; font-size: 12px !important; line-height: 1.5; }
.inline-error:empty { display: none; }
#toast { position: fixed; bottom: 24px; left: 50%; z-index: 20; width: max-content; max-width: calc(100% - 32px); padding: 13px 19px; border: 1px solid #334155; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: 0 10px 35px rgba(15, 23, 42, .25); font-size: 13px; line-height: 1.5; transform: translateX(-50%); }
dialog { max-width: calc(100vw - 32px); max-height: 92dvh; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .68); backdrop-filter: blur(4px); }
#preview { width: min(1020px, 94vw); height: 90dvh; background: #edf1f5; }
.preview-toolbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.preview-toolbar > div { margin-right: auto; }
.preview-toolbar h2 { margin: 3px 0 0; font-size: 16px; }
.preview-toolbar a, .preview-toolbar button { font-size: 12px; }
.preview-hint { margin: 0; padding: 10px 20px; background: #f7fafc; font-size: 12px; }
.preview-hint:empty { display: none; }
.preview-canvas { padding: 24px; overflow: auto; }
#page-image { display: block; width: 100%; box-shadow: 0 4px 20px rgba(15, 23, 42, .1); }
#help-dialog { width: 600px; padding: 36px; background: var(--surface); }
#help-dialog h2 { margin-top: 10px; font-size: 26px; }
#help-dialog .notice { margin: 22px 0; }
#help-dialog > a { font-size: 13px; }
.dialog-close { float: right; margin: -20px -20px 12px 12px; font-size: 12px; }
.help-steps { display: grid; gap: 16px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.help-steps strong { color: var(--ink); }
footer { display: flex; gap: 24px; width: min(1600px, 100%); margin: auto; padding: 22px 36px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 11px; }
footer span:last-child { margin-left: auto; }
.footer-brand { color: var(--ink-soft); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 40; padding: 12px 20px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(100%); }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1200px) {
  .sidebar { position: sticky; top: 22px; }
  #jobs { max-height: 360px; overflow: auto; }
}
@media (max-width: 1100px) {
  .header-inner, main, footer { padding-left: 24px; padding-right: 24px; }
  .workspace-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; }
  .detail-head, .field-section > summary, .actions { padding-left: 22px; padding-right: 22px; }
  .fields { gap: 18px 16px; padding-left: 22px; padding-right: 22px; }
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(350px, .9fr); }
  .welcome { padding: 38px 32px; }
  .login-card { padding: 34px; }
  .stepper { gap: 7px; }
  .stepper li + li::before { width: 8px; margin-right: 0; }
  .review-overview { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 800px) {
  .site-header { height: auto; min-height: 70px; }
  .header-inner { flex-wrap: wrap; gap: 12px; padding-top: 13px; padding-bottom: 13px; }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 35px; height: 35px; }
  .pilot { margin-left: auto; font-size: 10px; }
  .header-actions { width: 100%; padding-top: 4px; border-top: 1px solid #edf1f5; }
  .heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .heading .base { width: 100%; }
  .workspace-grid { grid-template-columns: 1fr; gap: 20px; }
  .upload-card { padding: 20px; }
  #jobs { display: flex; gap: 8px; padding-bottom: 5px; overflow: auto; }
  .job { flex: 0 0 240px; border-color: var(--line); background: var(--surface); }
  .sidebar-note { display: none; }
  .login-layout { grid-template-columns: 1fr; max-width: 540px; margin: 20px auto; border-color: var(--line); }
  .welcome { padding: 34px; }
  .welcome h1 { font-size: 39px; }
  .welcome-steps { margin-bottom: 0; }
  .welcome-note { margin-top: 24px; }
  .login-card { padding: 34px; }
  .review-toolbar { padding: 17px 20px; }
  .detail-head h2 { font-size: 22px; }
  .stepper { margin-left: 20px; margin-right: 20px; }
  .doc-list, .section-title { padding-left: 20px; padding-right: 20px; }
  .missing-docs, .notice { margin-left: 20px; margin-right: 20px; }
  .actions { position: static; }
  .preview-toolbar { gap: 9px; padding: 12px; }
  .preview-canvas { padding: 10px; }
  footer { flex-wrap: wrap; gap: 10px 20px; }
  footer span:last-child { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 520px) {
  main { padding: 24px 15px 36px; }
  .header-inner { padding-right: 16px; padding-left: 16px; }
  .brand-name { font-size: 20px; }
  .pilot { max-width: 155px; line-height: 1.35; }
  .header-actions { justify-content: space-between; }
  .header-actions button, .header-link { padding-right: 8px; padding-left: 8px; font-size: 12px; }
  h1 { font-size: 28px; }
  .heading p { font-size: 13px; }
  .welcome { padding: 28px 24px; }
  .welcome h1 { font-size: 34px; }
  .welcome .lead { font-size: 14px; }
  .welcome-steps, .welcome-note { display: none; }
  .login-card { padding: 28px 24px; }
  .login-card h2 { font-size: 25px; }
  .login-card-icon { margin-bottom: 19px; }
  .fields { grid-template-columns: 1fr; gap: 18px; padding: 0 20px 24px; }
  .field.wide { grid-column: auto; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .detail-head { display: block; padding: 22px 20px 18px; }
  .detail-head .badge { margin-top: 13px; }
  .stepper { gap: 5px; }
  .stepper li { gap: 5px; font-size: 9px; }
  .stepper li + li::before { display: none; }
  .step-number { width: 21px; height: 21px; font-size: 9px; }
  .review-overview { gap: 7px; padding: 0 20px 20px; }
  .overview-item { display: block; padding: 10px 8px; font-size: 10px; }
  .overview-item strong { display: block; margin-bottom: 2px; font-size: 20px; }
  .section-title { display: block; }
  .section-title span { display: block; margin-top: 5px; }
  .review-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .review-toolbar p { max-width: 300px; }
  .field-section > summary { gap: 9px; padding: 18px 20px; }
  .group-title h3 { font-size: 14px; }
  .group-count { font-size: 9px; }
  .actions { padding: 20px; }
  .action-buttons { gap: 10px; }
  .action-buttons .save-state { order: -1; flex-basis: 100%; }
  .action-buttons button { width: 100%; }
  .action-buttons .primary { margin-left: 0; }
  .empty { min-height: 380px; padding: 65px 20px; }
  #help-dialog { padding: 28px 22px; }
  .help-steps { font-size: 13px; }
  footer { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
