:root {
  --ink: #172033;
  --muted: #667085;
  --subtle: #8b95a7;
  --line: #dce2ea;
  --line-strong: #c7d0dc;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --canvas: #eef2f6;
  --navy: #183456;
  --navy-strong: #112844;
  --navy-pale: #eaf0f7;
  --teal: #08786e;
  --teal-strong: #06645c;
  --teal-pale: #e4f4f1;
  --amber: #a35b00;
  --amber-pale: #fff5df;
  --red: #b42318;
  --red-pale: #fff0ee;
  --green: #167348;
  --green-pale: #e8f6ee;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .045);
  --radius: 10px;
  --radius-small: 6px;
  --shell: 1480px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); }
a:hover { color: var(--teal-strong); }
svg { display: block; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { padding: .08rem .3rem; border: 1px solid #d9e1eb; border-radius: 4px; background: #f5f7fa; font-size: .9em; }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); padding: 9px 14px; border-radius: 5px; color: #fff; background: var(--navy); }
.skip-link:focus { transform: none; }
.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; }

.site-header { border-bottom: 1px solid #d4dbe5; background: rgba(255,255,255,.98); }
.header-inner { min-height: 70px; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 11px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: white; background: var(--navy); }
.brand-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-product { font-size: 16px; font-weight: 730; letter-spacing: -.01em; }
.brand-company { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 560; letter-spacing: .02em; }
.header-partner-logo { display: grid; place-items: center; }
.header-partner-logo img { width: min(24vw, 230px); height: 52px; display: block; object-fit: contain; }
.header-actions-slot { min-width: 0; justify-self: end; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions form { margin: 0; }
.header-context { margin-right: 8px; color: var(--muted); font-size: 13px; }

.main-content { min-height: calc(100vh - 135px); padding-block: 34px 56px; }
.site-footer { border-top: 1px solid #d4dbe5; color: var(--muted); background: #f8fafc; }
.footer-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 12px; }

h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.22; letter-spacing: -.025em; }
h1 { font-size: clamp(27px, 3vw, 38px); font-weight: 720; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 680; }
p { margin: 0; }
.eyebrow { margin-bottom: 7px; color: var(--teal); font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.lede { color: var(--muted); font-size: 16px; line-height: 1.6; }
.page-heading { margin-bottom: 24px; }
.page-heading p { max-width: 720px; margin-top: 9px; color: var(--muted); }
.heading-with-actions { display: flex; align-items: end; justify-content: space-between; gap: 24px; }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-weight: 660;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(8,120,110,.22); outline-offset: 2px; }
.button-primary { color: white; background: var(--navy); border-color: var(--navy); }
.button-primary:hover { color: white; background: var(--navy-strong); }
.button-secondary { color: white; background: var(--teal); border-color: var(--teal); }
.button-secondary:hover { color: white; background: var(--teal-strong); }
.button-success { color: #fff; background: var(--green); border-color: var(--green); }
.button-success:hover { color: #fff; background: #105c39; }
.button-quiet { color: var(--navy); border-color: var(--line-strong); background: white; }
.button-quiet:hover { color: var(--navy-strong); border-color: #9eacbd; background: var(--surface-soft); }
.button-small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button-wide { width: 100%; }
.button:disabled, .button-disabled { color: #98a2b3; border-color: #e0e5ec; background: #f1f3f6; cursor: not-allowed; }
.text-button { padding: 3px 2px; border: 0; color: var(--teal-strong); background: transparent; font-size: 12px; font-weight: 680; cursor: pointer; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.text-button:disabled, .text-button-disabled { color: #98a2b3; cursor: default; text-decoration: none; }
.text-button:disabled:hover, .text-button-disabled:hover { text-decoration: none; }
.text-danger { color: var(--red); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.panel-heading-row { align-items: center; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--teal-strong); background: var(--teal-pale); font-size: 13px; font-weight: 760; }
.section-panel { margin-top: 22px; }

.notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; padding: 13px 15px; border: 1px solid #c7d9ed; border-radius: var(--radius-small); color: #214565; background: #edf5fc; }
.notice ul { margin: 5px 0 0; padding-left: 19px; }
.notice-icon { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: #47799e; font-size: 12px; font-weight: 800; }
.notice-warning { border-color: #f0d39b; color: #694414; background: var(--amber-pale); }
.notice-warning .notice-icon { background: var(--amber); }
.notice-error { border-color: #efc0bb; color: #7a271f; background: var(--red-pale); }
.notice-error .notice-icon { background: var(--red); }
.notice.compact { margin: 22px 0 0; padding: 11px 13px; font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr); gap: 22px; align-items: start; }
.upload-form { display: grid; gap: 14px; padding: 22px 24px 18px; }
.upload-mode-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.upload-mode-option { position: relative; min-width: 0; cursor: pointer; }
.upload-mode-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-mode-option > span { min-height: 54px; display: grid; align-content: center; gap: 1px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); transition: border-color .15s, color .15s, background .15s, box-shadow .15s; }
.upload-mode-option strong { color: inherit; font-size: 12px; }
.upload-mode-option small { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.upload-mode-option input:checked + span { border-color: #b9cadc; color: var(--navy); background: white; box-shadow: 0 1px 3px rgba(19, 48, 80, .08); }
.upload-mode-option input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.folder-selection-label { margin: 1px 2px 7px; color: var(--muted); font-size: 11px; font-weight: 680; }
.folder-selection-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.folder-selection-panel[hidden] { display: none; }
.pdf-pair-pickers { display: grid; gap: 10px; }
.pdf-pair-pickers[hidden], [data-upload-panel][hidden], [data-upload-help][hidden] { display: none; }
.upload-options { border-top: 1px solid var(--line); padding-top: 13px; }
.upload-options summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.upload-options-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(7rem, 1fr); gap: 14px; padding-top: 13px; }
.upload-options-grid-single { grid-template-columns: minmax(7rem, 10rem); }
.job-name-field { padding: 13px 14px; border: 1px solid #d5dee8; border-radius: 8px; background: var(--surface-soft); }
.optional-label, .timezone-label { margin-left: 4px; color: var(--subtle); font-weight: 500; }
.profile-picker { display: grid; gap: 6px; padding: 13px 14px; border: 1px solid #cbd7e3; border-radius: 8px; background: #f8fbfd; }
.profile-picker .field-group { gap: 5px; }
.profile-description { min-height: 18px; color: var(--navy); font-size: 11px; line-height: 1.45; }
.profile-picker .field-hint { min-height: 0; color: #79520e; }
.file-picker { position: relative; min-height: 116px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px; border: 1.5px dashed #aab7c7; border-radius: 8px; color: var(--navy); background: var(--surface-soft); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.file-picker:hover, .file-picker:focus-within { border-color: var(--teal); background: #f0f8f7; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker > span:not(.file-picker-icon) { min-width: 0; display: grid; gap: 4px; }
.file-picker strong { font-size: 14px; }
.file-picker [data-file-name] { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-compact { min-height: 84px; justify-content: flex-start; padding: 15px 17px; }
.file-picker-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--teal); background: var(--teal-pale); }
.file-picker-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upload-side-badge { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--navy); font-size: 14px; font-weight: 800; }
.upload-side-badge-b { background: var(--teal-strong); }
.pairing-note { margin: 1px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.requirements { margin: 0 24px 23px; padding: 15px 17px; border-radius: 7px; color: var(--muted); background: var(--surface-soft); font-size: 12px; }
.requirements strong { color: var(--ink); font-size: 12px; }
.requirements ul { margin: 8px 0 0; padding-left: 18px; }
.requirements li + li { margin-top: 4px; }

.job-list { display: grid; }
.job-filters { display: grid; gap: 11px; padding: 15px 19px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.job-filter-search-row { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; align-items: end; gap: 9px; }
.job-filter-details { border-top: 1px solid #e3e8ef; padding-top: 9px; }
.job-filter-details summary { width: fit-content; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.job-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(115px, 1fr)); gap: 9px; padding-top: 10px; }
.job-row { min-height: 76px; display: grid; grid-template-columns: 38px minmax(160px, 1fr) auto 16px; align-items: center; gap: 13px; padding: 13px 19px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.job-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.job-row:hover { color: inherit; background: #f8fbfc; }
.job-document { width: 36px; height: 40px; display: grid; place-items: center; border: 1px solid #cbd6e2; border-radius: 6px; color: var(--navy); background: var(--navy-pale); }
.job-document svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.job-primary, .job-meta { min-width: 0; display: grid; gap: 4px; }
.job-primary strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.job-source { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.job-primary .mono { color: var(--muted); font-size: 11px; }
.job-meta { justify-items: end; }
.job-meta time { color: var(--subtle); font-size: 11px; }
.row-arrow { color: #9aa5b4; font-size: 25px; }

.status-badge { width: fit-content; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid #ccd5e0; border-radius: 999px; color: #526174; background: #f3f5f8; font-size: 11px; font-weight: 730; line-height: 1.25; white-space: nowrap; }
.status-badge::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #8792a2; content: ""; }
.status-large { padding: 7px 12px; font-size: 13px; }
.status-uploaded, .status-ready { color: #335d80; border-color: #bfd4e7; background: #edf5fb; }
.status-uploaded::before, .status-ready::before { background: #3f7da8; }
.status-validating, .status-running-base, .status-running-postprocess { color: #79520e; border-color: #ecd197; background: var(--amber-pale); }
.status-validating::before, .status-running-base::before, .status-running-postprocess::before { background: #d58300; animation: pulse 1.2s infinite; }
.status-base-done, .status-waiting-for-exceptions { color: #075e58; border-color: #abd9d4; background: var(--teal-pale); }
.status-base-done::before, .status-waiting-for-exceptions::before { background: var(--teal); }
.status-done { color: #145b3b; border-color: #b2dcc5; background: var(--green-pale); }
.status-done::before { background: var(--green); }
.status-failed, .status-base-failed, .status-postprocess-failed { color: #8a2c24; border-color: #ebbbb5; background: var(--red-pale); }
.status-failed::before, .status-base-failed::before, .status-postprocess-failed::before { background: var(--red); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.empty-state { min-height: 275px; display: grid; place-items: center; align-content: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-state h3 { margin-top: 14px; }
.empty-state p { margin-top: 6px; font-size: 13px; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #718096; background: #edf1f5; }
.empty-icon svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }

.breadcrumbs { display: flex; align-items: center; gap: 8px; margin: -8px 0 18px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--teal); text-decoration: underline; }
.job-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 24px 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.job-hero-main { min-width: 0; }
.job-source-detail { margin-top: 5px; color: var(--muted); font-size: 12px; }
.job-hero h1 { overflow-wrap: anywhere; }
.job-identity { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.job-identity .mono { color: var(--navy); font-weight: 650; }
.job-status-block { min-width: 180px; display: grid; justify-items: end; gap: 6px; }
.status-label { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.poll-state { color: var(--subtle); font-size: 10px; }
.job-error { margin-top: 16px; margin-bottom: 0; }
.metric-strip { display: grid; grid-template-columns: repeat(8, minmax(110px, 1fr)); margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.metric-strip > div { min-width: 0; padding: 11px 14px; border-right: 1px solid var(--line); }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip dt { color: var(--muted); font-size: 9px; font-weight: 710; letter-spacing: .05em; text-transform: uppercase; }
.metric-strip dd { margin: 3px 0 0; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 670; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.profile-context { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.profile-context-copy { min-width: 0; display: grid; gap: 3px; }
.profile-context-label { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .055em; text-transform: uppercase; }
.profile-context-copy > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; }
.profile-context-copy strong { font-size: 13px; }
.profile-context-copy .mono { color: var(--muted); font-size: 10px; }
.profile-context-copy p { max-width: 650px; color: var(--muted); font-size: 11px; }
.profile-context-details { min-width: 520px; max-width: 680px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0; margin: 0; padding: 0; }
.profile-context-details > div { min-width: 140px; flex: 1 1 140px; padding: 4px 14px; border-left: 1px solid var(--line); }
.profile-context-details dt { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .045em; text-transform: uppercase; }
.profile-context-details dd { margin: 2px 0 0; font-size: 11px; font-weight: 680; text-transform: capitalize; }
.progress-line { height: 3px; margin: -3px 7px 0; overflow: hidden; background: #e5e9ef; }
.progress-line span { width: 36%; height: 100%; display: block; background: var(--teal); animation: progress 1.4s ease-in-out infinite; }
@keyframes progress { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.action-bar form { margin: 0; }
.action-separator { width: 1px; height: 28px; margin: 0 2px; background: var(--line-strong); }
.stale-results-notice { margin: 16px 0 0; }
.profile-rule-saved-notice { border-color: #b9dfca; color: var(--green); background: var(--green-pale); }
.profile-rule-saved-notice .notice-icon { background: var(--green); }

.record-count { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 4px 9px; border-radius: 999px; color: #465467; background: #eef2f6; font-size: 11px; font-weight: 700; white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: #4b586a; font-weight: 700; text-align: left; }
thead th { padding: 10px 13px; border-bottom: 1px solid var(--line-strong); background: #f7f9fb; font-size: 10px; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
tbody th, tbody td { padding: 11px 13px; border-bottom: 1px solid #e8ecf1; vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #fafcfd; }
.preview-linked-row { cursor: pointer; }
.preview-linked-row:hover { background: #f3f8f8; }
.document-preview-link { color: inherit; text-decoration: none; }
.document-preview-link:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.filename-cell { min-width: 180px; color: var(--ink); overflow-wrap: anywhere; }
.details-cell { min-width: 190px; color: var(--muted); }
.result-tag { display: inline-flex; padding: 3px 7px; border-radius: 4px; color: #344054; background: #edf1f5; font-size: 10px; font-weight: 740; text-transform: capitalize; white-space: nowrap; }
.result-ok { color: var(--green); background: var(--green-pale); }
.result-different, .result-missing-in-a, .result-missing-in-b, .result-error { color: var(--red); background: var(--red-pale); }

.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; margin-top: 22px; }
.review-grid .section-panel { margin-top: 0; }
.exception-form { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(190px, 1fr) minmax(220px, 1.3fr) auto; gap: 12px; align-items: end; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.field-group { min-width: 0; display: grid; gap: 6px; }
.field-group label { color: #344054; font-size: 11px; font-weight: 680; }
.field-group label span { color: var(--subtle); font-weight: 500; }
.field-group label .field-label-text { flex: 0 0 auto; color: #344054; font-weight: 680; }
.field-label-with-hint { min-width: 0; display: flex; align-items: baseline; gap: 5px; }
.field-label-hint { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.field-label-hint::before { content: "— "; }
input[type="text"], input[type="search"], input[type="datetime-local"], input[type="password"], input[type="number"], select, textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #bfc9d5; border-radius: 5px; color: var(--ink); background: white; }
input::placeholder { color: #98a2b3; }
textarea { line-height: 1.45; resize: vertical; }
textarea::placeholder { color: #98a2b3; }
.field-hint { min-height: 16px; color: var(--subtle); font-size: 10px; line-height: 1.35; }
.exception-add { align-self: end; margin-top: 0; }
.exception-table-wrap { max-height: 340px; }
.rule-policy { margin: 0; padding: 11px 22px; border-bottom: 1px solid var(--line); color: #5f521e; background: #fffaf0; font-size: 11px; }
#exceptions, #comparison-rules { scroll-margin-top: 18px; }
.anchor-target { position: absolute; }
.panel-heading-actions { display: flex; align-items: center; gap: 8px; }
.comparison-rules-panel { position: relative; overflow: hidden; }
.comparison-rules-table-wrap { max-height: 390px; }
.comparison-rules-table { min-width: 790px; }
.comparison-rules-table td { vertical-align: middle; }
.rule-name-cell { min-width: 155px; max-width: 260px; color: var(--ink); }
.rule-name-cell > span, .rule-name-cell > small { display: block; }
.rule-name-cell > span { overflow-wrap: anywhere; }
.rule-name-cell > small { margin-top: 3px; overflow: hidden; color: var(--subtle); font-size: 9px; font-weight: 520; text-overflow: ellipsis; white-space: nowrap; }
.rule-scope-cell { min-width: 120px; }
.rule-chip { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #344054; background: #edf1f5; font-size: 9px; font-weight: 750; white-space: nowrap; }
.rule-type-ignore { color: #335d80; background: #edf5fb; }
.rule-type-expected_change { color: #79520e; background: var(--amber-pale); }
.rule-type-protected { color: #8a2c24; background: var(--red-pale); }
.rule-actions form { display: inline; margin-left: 8px; }
.rule-actions > .text-button + form { margin-left: 8px; }
.action-note { color: var(--subtle); font-size: 10px; font-weight: 650; white-space: nowrap; }
.rule-result-strip { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); margin: 0; padding: 0; border-bottom: 1px solid var(--line); background: #fafbfc; }
.rule-result-strip > div { min-width: 0; padding: 11px 16px; border-right: 1px solid var(--line); }
.rule-result-strip > div:last-child { border-right: 0; }
.rule-result-strip dt { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.rule-result-strip dd { margin: 2px 0 0; color: var(--ink); font-size: 15px; font-weight: 760; font-variant-numeric: tabular-nums; }
.rule-result-strip .has-violations { background: var(--red-pale); }
.rule-result-strip .has-violations dt, .rule-result-strip .has-violations dd { color: var(--red); }
.runtime-values-panel { overflow: hidden; }
.runtime-result-strip { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); margin: 0; padding: 0; border-bottom: 1px solid var(--line); background: #fafbfc; }
.runtime-result-strip > div { min-width: 0; padding: 10px 16px; border-right: 1px solid var(--line); }
.runtime-result-strip > div:last-child { border-right: 0; }
.runtime-result-strip dt { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.runtime-result-strip dd { margin: 2px 0 0; color: var(--ink); font-size: 15px; font-weight: 760; font-variant-numeric: tabular-nums; }
.runtime-values-table-wrap { max-height: 360px; }
.runtime-values-table { min-width: 720px; }
.runtime-values-table td { vertical-align: middle; }
.runtime-name-cell { min-width: 170px; max-width: 300px; color: var(--ink); }
.runtime-name-cell > span, .runtime-name-cell > small { display: block; }
.runtime-name-cell > small { margin-top: 3px; overflow: hidden; color: var(--subtle); font-size: 9px; font-weight: 520; text-overflow: ellipsis; white-space: nowrap; }
.runtime-values-cell { min-width: 250px; }
.runtime-value-count { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.runtime-value-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.runtime-value-preview code { max-width: 220px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.runtime-value-preview > span { color: var(--subtle); font-size: 9px; font-weight: 650; }
.runtime-actions form { display: inline; margin-left: 8px; }
.runtime-actions > .text-button + form { margin-left: 8px; }
.runtime-policy { margin: 0; padding: 11px 22px; border-top: 1px solid var(--line); color: var(--muted); background: #fbfcfd; font-size: 11px; }
#runtime-values { scroll-margin-top: 18px; }
.runtime-editor-body { grid-template-columns: 1fr; }
.runtime-editor-warning, .profile-editor-footnote { color: var(--amber); font-size: 10px; font-weight: 650; }
.runtime-editor-dialog textarea[data-runtime-values] { min-height: 150px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.runtime-editor-dialog textarea[data-runtime-note] { min-height: 74px; }
.record-count-alert { color: var(--red); background: var(--red-pale); }
.classification-cell { min-width: 150px; }
.classification-tag { display: inline-flex; padding: 3px 7px; border-radius: 4px; font-size: 9px; font-weight: 740; white-space: nowrap; }
.classification-unexpected, .classification-violation { color: var(--red); background: var(--red-pale); }
.classification-ignored { color: #526174; background: #edf1f5; }
.classification-expected { color: var(--green); background: var(--green-pale); }
.rule-violations-table { min-width: 900px; }
.rule-violations-table-wrap { max-height: 390px; }
.compact-table { font-size: 11px; }
.compact-table thead { position: sticky; z-index: 1; top: 0; }
.compact-table thead th { padding-block: 9px; }
.compact-table tbody th, .compact-table tbody td { padding-block: 9px; }
.row-action { width: 1%; text-align: right; white-space: nowrap; }
.yes-no { display: inline-flex; padding: 2px 6px; border-radius: 4px; color: var(--muted); background: #edf0f4; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.yes-no.is-yes { color: var(--green); background: var(--green-pale); }
.yes-no.is-no { color: var(--red); background: var(--red-pale); }
.inline-empty { padding: 18px 22px; color: var(--muted); font-size: 13px; }

.rule-editor-dialog { width: min(calc(100% - 32px), 780px); max-width: none; max-height: min(calc(100vh - 32px), 900px); padding: 0; overflow: hidden; border: 1px solid #aeb9c7; border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 24px 70px rgba(8, 22, 40, .28); }
.rule-editor-dialog::backdrop { background: rgba(17, 32, 51, .62); backdrop-filter: blur(2px); }
.rule-editor-form { max-height: min(calc(100vh - 32px), 900px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.rule-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 22px 18px; border-bottom: 1px solid var(--line-strong); }
.rule-editor-header h2 { font-size: 21px; }
.rule-editor-header p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.rule-editor-body { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 15px 18px; padding: 20px 22px; overflow-y: auto; background: #fafbfc; }
.rule-field-wide { grid-column: 1 / -1; }
.comparison-rule-legacy-note { margin: 0; padding: 10px 12px; font-size: 10px; line-height: 1.45; }
.rule-editor-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rule-area-control { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 8px 7px 11px; border: 1px solid #bfc9d5; border-radius: 5px; background: white; }
.rule-area-control output { min-width: 0; overflow-wrap: anywhere; color: var(--navy); font-size: 11px; font-weight: 650; }
.rule-area-control output.is-error { color: var(--red); }
.field-hint.is-error { color: var(--red); font-weight: 650; }
.rule-enabled-control { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.rule-enabled-control input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--teal); }
.rule-enabled-control span { display: grid; gap: 1px; }
.rule-enabled-control strong { font-size: 11px; }
.rule-enabled-control small { color: var(--subtle); font-size: 10px; }
.rule-enabled-with-help { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; }
.rule-enabled-with-help .rule-enabled-control { width: 100%; }
.rule-enabled-with-help > .info-help-button { margin: 0; }
.rule-editor-footer { min-height: 66px; display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--line-strong); background: white; }
.rule-editor-footer-spacer { flex: 1; }
.profile-rule-dialog { width: min(calc(100% - 32px), 650px); }
.profile-rule-dialog-body { grid-template-columns: 1fr; }
.profile-rule-options { min-width: 0; display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
.profile-rule-options legend { margin-bottom: 8px; color: #344054; font-size: 11px; font-weight: 720; }
.profile-rule-option { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.profile-rule-option:hover { border-color: #9eb8c8; background: #fbfdfd; }
.profile-rule-option input { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--teal); }
.profile-rule-option > span { min-width: 0; display: grid; gap: 2px; }
.profile-rule-option strong { font-size: 12px; }
.profile-rule-option small { color: var(--muted); font-size: 10px; }
.profile-rule-option.is-disabled { opacity: .58; cursor: not-allowed; }
.profile-rule-option.is-disabled:hover { border-color: var(--line); background: white; }
.profile-rule-compatibility:not(:empty) { color: var(--amber); font-weight: 650; }

.region-editor-dialog { width: min(calc(100% - 32px), 1540px); max-width: none; height: min(calc(100vh - 32px), 980px); max-height: none; padding: 0; overflow: hidden; border: 1px solid #aeb9c7; border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 24px 70px rgba(8, 22, 40, .28); }
.region-editor-dialog::backdrop { background: rgba(17, 32, 51, .62); backdrop-filter: blur(2px); }
.region-editor-form { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.region-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 22px 18px; border-bottom: 1px solid var(--line-strong); background: white; }
.region-editor-header h2 { font-size: 21px; }
.region-editor-header p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.region-editor-close { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; color: #475467; background: white; font-size: 24px; line-height: 1; cursor: pointer; }
.region-editor-close:hover { color: var(--navy); background: var(--surface-soft); }
.region-editor-body { min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.region-editor-controls { min-height: 0; display: grid; align-content: start; gap: 15px; padding: 20px; overflow-y: auto; border-right: 1px solid var(--line-strong); background: #f8fafc; }
.region-page-controls { display: grid; grid-template-columns: 40px minmax(74px, 1fr) 40px; gap: 6px; }
.region-page-controls input { min-width: 0; text-align: center; }
.region-selection-summary { display: grid; gap: 5px; padding: 12px; border: 1px solid #cbd7e3; border-radius: 6px; background: white; }
.region-selection-summary > span { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.region-selection-summary output { min-height: 18px; overflow-wrap: anywhere; color: var(--navy); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; font-weight: 680; }
.region-global-warning { margin: 0; padding: 10px; font-size: 10px; line-height: 1.45; }
.region-editor-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #303844; }
.region-editor-workspace-header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 14px; color: #dbe2ea; border-bottom: 1px solid #66717d; background: #27303a; font-size: 10px; font-weight: 650; }
.region-page-viewport { position: relative; min-height: 0; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 20px; background-color: #525b66; background-image: linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.025) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.025) 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
.region-page-stage { position: relative; display: none; flex: 0 0 auto; max-width: 100%; background: white; box-shadow: 0 4px 18px rgba(0,0,0,.34); }
.region-page-stage.is-ready { display: block; }
.region-page-stage img { width: auto; max-width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.region-page-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.region-image-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; color: #e7edf4; font-size: 13px; font-weight: 650; text-align: center; pointer-events: none; }
.region-image-message[hidden] { display: none; }
.region-editor-footer { min-height: 66px; display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--line-strong); background: white; }
.region-editor-footer-spacer { flex: 1; }
.dynamic-confidence { display: block; margin-top: 3px; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.confidence-high { color: #067647; }
.confidence-medium { color: #b54708; }
.confidence-low { color: #b42318; }
.dynamic-field-dialog { width: min(calc(100% - 32px), 1420px); height: min(calc(100vh - 32px), 900px); max-width: none; max-height: min(calc(100vh - 32px), 900px); }
.dynamic-field-form { height: 100%; min-height: 0; max-height: none; }
.dynamic-field-body { min-height: 0; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr); overflow: hidden; }
.dynamic-field-preview { min-width: 0; min-height: 0; padding: 20px; overflow: auto; border-right: 1px solid var(--line-strong); background: #303844; color: #eef2f6; }
.dynamic-preview-frame { position: relative; width: 100%; margin: 0 auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.dynamic-preview-frame[hidden] { display: none; }
.dynamic-preview-frame img { display: block; width: 100%; height: auto; }
.dynamic-preview-box { position: absolute; display: block; min-width: 4px; min-height: 4px; border: 3px solid; pointer-events: none; }
.dynamic-preview-box b { position: absolute; left: -3px; bottom: calc(100% + 3px); padding: 2px 5px; color: white; font-size: 10px; line-height: 1.2; white-space: nowrap; }
.dynamic-anchor-box { border-color: #2563eb; outline: 1px solid #fff; }
.dynamic-anchor-box b { background: #1d4ed8; }
.dynamic-value-box { border-color: #dc2626; outline: 1px solid #fff; }
.dynamic-value-box b { background: #b91c1c; }
.dynamic-field-settings { min-height: 0; overflow-y: auto; background: white; }
.dynamic-detection-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 20px 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--line-strong); }
.dynamic-detection-summary div { min-width: 0; padding: 10px 12px; background: #f8fafc; }
.dynamic-detection-summary span, .dynamic-detection-summary strong { display: block; }
.dynamic-detection-summary span { margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.dynamic-detection-summary strong { overflow-wrap: anywhere; font-size: 12px; }
.dynamic-field-settings > .notice { margin: 14px 20px 0; }
.dynamic-field-fields { overflow: visible; }
.dynamic-field-form > .rule-editor-footer { flex-wrap: wrap; }
.dynamic-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 6px; }
.dynamic-methods legend { padding: 0 4px; font-size: 11px; font-weight: 750; }
.dynamic-methods label { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.dynamic-methods .field-hint { grid-column: 1 / -1; }
.dynamic-unresolved-row { background: #fff7ed; }
.guidance-panel { box-shadow: none; }
.workflow-list { display: grid; gap: 0; margin: 0; padding: 9px 21px 14px; list-style: none; }
.workflow-list li { position: relative; display: grid; grid-template-columns: 27px 1fr; gap: 11px; padding: 12px 0; }
.workflow-list li:not(:last-child)::after { position: absolute; top: 39px; bottom: -5px; left: 13px; width: 1px; background: #d8dee7; content: ""; }
.workflow-list li > span { width: 27px; height: 27px; z-index: 1; display: grid; place-items: center; border: 1px solid #bcc7d3; border-radius: 50%; color: #627084; background: white; font-size: 10px; font-weight: 750; }
.workflow-list li.is-complete > span { color: white; border-color: var(--teal); background: var(--teal); }
.workflow-list li.is-complete > span::before { content: "✓"; }
.workflow-list li.is-complete > span { font-size: 0; }
.workflow-list li.is-complete > span::before { font-size: 11px; }
.workflow-list strong { font-size: 12px; }
.workflow-list p { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.tall-table { max-height: 520px; overflow: auto; }
.differences-table { min-width: 1340px; }
.filename-small { max-width: 190px; display: block; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.subvalue { display: block; margin-top: 3px; color: var(--subtle); font-size: 9px; }
.small { font-size: 9.5px; }
.text-preview { min-width: 150px; max-width: 280px; color: #4f5d6d; overflow-wrap: anywhere; }
.row-muted { opacity: .58; background: #f8f9fa; }

.image-browser { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; padding: 20px; }
.image-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fafbfc; }
.image-card > a { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: #e6eaf0; }
.image-card img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.image-card > a:hover img { transform: scale(1.015); }
.image-open { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 4px; color: white; background: rgba(17, 40, 68, .88); font-size: 9px; font-weight: 700; opacity: 0; transition: opacity .15s; }
.image-card > a:hover .image-open, .image-card > a:focus-visible .image-open { opacity: 1; }
.image-card figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 11px; }
.image-title { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.image-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.side-badge { padding: 2px 5px; border-radius: 3px; color: var(--navy); background: var(--navy-pale); font-weight: 700; }

.preview-panel { overflow: hidden; }
.preview-heading-copy { min-width: 0; }
.preview-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; margin-top: 12px; }
.preview-filter { display: inline-flex; padding: 3px; border: 1px solid #cbd5df; border-radius: 7px; background: #f1f4f7; }
.preview-filter-button { min-width: 72px; height: 30px; padding: 0 13px; border: 0; border-radius: 5px; color: #536174; background: transparent; font: inherit; font-size: 11px; font-weight: 720; cursor: pointer; }
.preview-filter-button:hover { color: var(--navy); background: rgba(255,255,255,.65); }
.preview-filter-button.is-active { color: var(--navy); background: white; box-shadow: 0 1px 3px rgba(16,33,52,.13); }
.preview-filter-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.preview-filter-caption { color: var(--subtle); font-size: 10.5px; line-height: 1.45; }
.preview-documents { display: grid; }
.preview-document[hidden] { display: none; }
.preview-document:not([hidden]) ~ .preview-document:not([hidden]) { border-top: 8px solid var(--canvas); }
.preview-filter-empty { margin: 22px; padding: 28px 20px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: #fafbfc; text-align: center; }
.preview-filter-empty[hidden] { display: none; }
.preview-filter-empty strong, .preview-filter-empty span { display: block; }
.preview-filter-empty strong { color: var(--navy); font-size: 13px; }
.preview-filter-empty span { margin-top: 4px; font-size: 11px; }
.preview-document-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px; color: inherit; background: #fbfcfd; text-decoration: none; transition: background-color .15s ease; }
.preview-document-header:hover { color: inherit; background: #f3f8f8; }
.preview-document-title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.preview-document-title > span:last-child { min-width: 0; display: grid; gap: 3px; }
.preview-document-title strong { overflow-wrap: anywhere; font-size: 14px; }
.preview-document-title small { color: var(--muted); font-size: 11px; }
.preview-document-icon { width: 35px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #cbd6e2; border-radius: 6px; color: var(--navy); background: var(--navy-pale); }
.preview-document-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.preview-document-action { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 11px; font-weight: 680; white-space: nowrap; }
.preview-open-arrow { color: var(--teal); font-size: 24px; font-weight: 400; line-height: 1; }
.preview-page-list { border-top: 1px solid var(--line); }
.preview-page-row + .preview-page-row { border-top: 1px solid var(--line); }
.preview-page-row { padding: 18px 22px 22px; }
.preview-page-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.preview-page-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.preview-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fafbfc; }
.preview-card-media { position: relative; display: block; overflow: hidden; color: inherit; background: #e8edf2; text-decoration: none; }
.preview-card-media img { width: 100%; height: auto; display: block; transition: transform .2s ease; }
.preview-card-media:hover img { transform: scale(1.012); }
.preview-card-media:hover .image-open, .preview-card-media:focus-visible .image-open { opacity: 1; }
.preview-card figcaption { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-top: 1px solid var(--line); }
.preview-image-name { min-width: 0; overflow: hidden; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.preview-card-blank { border-style: dashed; }
.preview-blank { aspect-ratio: 1 / 1.4142; display: grid; place-items: center; isolation: isolate; color: var(--muted); background: #e8edf2; }
.blank-sheet { position: absolute; z-index: -1; width: min(48%, 250px); height: 78%; border: 1px solid #d0d7df; border-radius: 2px; background: white; box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.blank-message { display: grid; gap: 4px; color: #697586; text-align: center; }
.blank-message strong { color: #4b5868; font-size: 13px; }
.blank-message small { font-size: 10px; }
.annotation-badge, .blank-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; color: #8a2c24; background: var(--red-pale); font-size: 9px; font-weight: 740; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.blank-badge { color: #5e6877; background: #edf0f4; }

.preview-page .shell { width: min(calc(100% - 28px), 1900px); }
.preview-page .main-content { padding-top: 22px; }
.viewer-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.viewer-heading-copy { min-width: 0; }
.viewer-heading h1 { overflow-wrap: anywhere; font-size: clamp(23px, 2.2vw, 32px); }
.viewer-heading p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.viewer-document-nav { display: flex; gap: 8px; }
.compare-viewer { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.viewer-toolbar { min-height: 58px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 9px 14px; border-bottom: 1px solid var(--line-strong); background: #fbfcfd; }
.viewer-page-nav, .viewer-zoom-controls { display: flex; align-items: center; gap: 6px; }
.viewer-page-nav { justify-self: start; }
.viewer-zoom-controls { justify-self: center; }
.viewer-nav-button, .viewer-tool-button { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border: 1px solid #bcc7d4; border-radius: 5px; color: var(--navy); background: white; font-size: 17px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; }
.viewer-nav-button:hover, .viewer-tool-button:hover { color: var(--teal-strong); border-color: #8fa2b5; background: #f5f8fa; }
.viewer-nav-button.is-disabled { color: #a7afba; border-color: #dfe4ea; background: #f2f4f6; cursor: default; }
.viewer-tool-text { min-width: 58px; font-size: 11px; }
.viewer-page-position { min-width: 92px; color: #445164; font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; }
.viewer-zoom-value { min-width: 68px; color: var(--muted); font-size: 10px; text-align: center; }
.viewer-help { justify-self: end; color: var(--subtle); font-size: 10px; text-align: right; }
.viewer-stage { position: relative; background: #303844; }
.viewer-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viewer-pane { min-width: 0; height: min(76vh, 900px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #3b4450; }
.viewer-pane + .viewer-pane { border-left: 1px solid #69727e; }
.viewer-pane-header, .viewer-pane-footer { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; color: #dbe2ea; background: #27303a; font-size: 10px; }
.viewer-pane-header > span:first-child { display: flex; align-items: center; gap: 8px; }
.viewer-pane-header strong { color: white; font-size: 11px; }
.viewer-pane-footer { min-height: 37px; border-top: 1px solid #59636f; }
.viewer-pane-footer > span:first-child { min-width: 0; overflow: hidden; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.side-badge-large { padding: 3px 7px; }
.viewer-viewport { position: relative; min-height: 0; overflow: hidden; background-color: #525b66; background-image: linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.025) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.025) 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; cursor: grab; touch-action: none; }
.viewer-viewport.is-panning { cursor: grabbing; }
.viewer-surface { position: absolute; top: 0; left: 0; max-width: none; display: block; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; box-shadow: 0 3px 16px rgba(0,0,0,.3); }
.viewer-blank-surface { width: 1240px; height: 1754px; display: grid; place-items: center; border: 1px solid #d8dce1; color: #6a7480; background: white; }
.viewer-edge-arrow { position: absolute; z-index: 5; top: 50%; width: 44px; height: 74px; display: grid; place-items: center; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.5); color: white; background: rgba(16,33,52,.78); font-size: 42px; font-weight: 300; line-height: 1; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.viewer-edge-arrow:hover { color: white; background: rgba(8,120,110,.92); }
.viewer-edge-previous { left: 8px; border-radius: 6px; }
.viewer-edge-next { right: 8px; border-radius: 6px; }

.data-grid { display: grid; gap: 12px; margin-top: 22px; }
.details-panel { overflow: hidden; box-shadow: none; }
.details-panel > summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; cursor: pointer; list-style: none; }
.details-panel > summary::-webkit-details-marker { display: none; }
.details-panel > summary:hover { background: #fafcfd; }
.details-panel > summary span:first-child { display: grid; gap: 2px; }
.details-panel > summary strong { font-size: 14px; }
.details-panel > summary small { color: var(--muted); font-size: 11px; }
.details-panel[open] > summary { border-bottom: 1px solid var(--line); }
.details-panel > summary::after { margin-left: 6px; color: var(--muted); content: "+"; font-size: 20px; }
.details-panel[open] > summary::after { content: "−"; }
.details-panel > summary .record-count { margin-left: auto; }

.file-links { display: grid; margin: 0; padding: 4px 22px 12px; list-style: none; }
.file-links li { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.file-links li:last-child { border-bottom: 0; }
.file-links a { font-weight: 650; text-decoration: none; }
.file-links a:hover { text-decoration: underline; }
.file-links span { color: var(--muted); font-size: 12px; }
.empty-results { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding: 25px; }
.empty-results p { margin-top: 5px; color: var(--muted); }

.profiles-heading { align-items: center; }
.profile-library-note { margin: 0 0 18px; }
.profiles-panel { overflow: hidden; }
.profiles-table { min-width: 900px; }
.profiles-table td { vertical-align: middle; }
.profile-name-cell { min-width: 230px; max-width: 430px; color: var(--ink); }
.profile-name-cell > span, .profile-name-cell > small { display: block; }
.profile-name-cell > small { margin-top: 3px; color: var(--subtle); font-size: 9px; font-weight: 520; line-height: 1.4; }
.profile-name-cell > small:not(.mono) { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-default-tag { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: var(--teal-strong); background: var(--teal-pale); font-size: 8px; font-weight: 760; text-transform: uppercase; vertical-align: middle; }
.profile-mode-tag { display: inline-flex; padding: 3px 7px; border-radius: 4px; color: var(--navy); background: var(--navy-pale); font-size: 9px; font-weight: 720; white-space: nowrap; }
.profile-actions form { display: inline; margin-left: 8px; }
.profile-actions > .text-button + form, .profile-actions > .action-note + form { margin-left: 8px; }
.profile-rule-count { display: inline-flex; min-width: 24px; justify-content: center; padding: 2px 7px; border-radius: 999px; color: var(--teal-strong); background: var(--teal-pale); font-size: 9px; font-weight: 760; }
.profile-rules-link { margin-left: 6px; }
.profile-rules-context { margin-bottom: 0; }
.profile-rules-table { min-width: 820px; }
.profiles-empty { min-height: 240px; }
.profile-editor-body textarea { min-height: 82px; }

.auth-layout { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 30px 0 60px; }
.auth-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 18px 45px rgba(17,40,68,.09); }
.auth-card .lede { margin-top: 11px; font-size: 14px; }
.stack-form { display: grid; margin-top: 25px; }
.stack-form label { margin: 13px 0 6px; color: #344054; font-size: 12px; font-weight: 670; }
.stack-form .button { margin-top: 21px; }
.auth-help { margin-top: 17px; color: var(--subtle); font-size: 11px; text-align: center; }

@media (max-width: 1020px) {
  .header-inner { grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr); gap: 14px; }
  .header-partner-logo img { width: min(22vw, 200px); height: 45px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .job-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .metric-strip { grid-template-columns: repeat(4, 1fr); }
  .metric-strip > div { border-bottom: 1px solid var(--line); }
  .metric-strip > div:nth-child(4n) { border-right: 0; }
  .metric-strip > div:nth-last-child(-n+4) { border-bottom: 0; }
  .profile-context { align-items: flex-start; flex-direction: column; gap: 12px; }
  .profile-context-details { width: 100%; min-width: 0; justify-content: flex-start; }
  .profile-context-details > div:first-child { padding-left: 0; border-left: 0; }
  .review-grid { grid-template-columns: 1fr; }
  .guidance-panel { order: -1; }
  .workflow-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .workflow-list li { grid-template-columns: 27px 1fr; }
  .workflow-list li::after { display: none; }
  .exception-form { grid-template-columns: 1fr 1fr; }
  .exception-add { align-self: end; margin-top: 0; }
  .panel-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .viewer-toolbar { grid-template-columns: auto 1fr; }
  .viewer-help { display: none; }
  .viewer-zoom-controls { justify-self: end; }
  .region-editor-body { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .header-inner { min-height: 64px; grid-template-columns: auto 1fr; gap: 10px; }
  .header-partner-logo { display: none; }
  .header-actions-slot { justify-self: end; }
  .brand-company, .header-context { display: none; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; gap: 5px; padding-block: 5px; }
  .main-content { padding-block: 24px 40px; }
  .footer-inner { min-height: 56px; }
  .footer-inner span:last-child { display: none; }
  .panel-heading { padding: 18px; }
  .page-heading { margin-bottom: 18px; }
  .dashboard-grid { gap: 16px; }
  .upload-form { padding: 18px; }
  .profile-picker { padding: 12px; }
  .upload-options-grid { grid-template-columns: 1fr; }
  .requirements { margin-inline: 18px; }
  .job-row { grid-template-columns: 34px minmax(0, 1fr) 14px; padding-inline: 15px; }
  .job-filters { padding-inline: 15px; }
  .job-filter-search-row, .job-filter-grid { grid-template-columns: 1fr; }
  .job-filter-search-row .button { width: 100%; }
  .job-meta { grid-column: 2; grid-row: 2; justify-items: start; }
  .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .job-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .job-status-block { min-width: 0; justify-items: start; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric-strip > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metric-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
  .metric-strip > div:last-child { border-right: 0; border-bottom: 0; }
  .profile-context { padding: 13px; }
  .profile-context-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-context-details > div { min-width: 0; padding: 3px 10px; }
  .profile-context-details > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .action-bar { align-items: stretch; }
  .action-bar > form, .action-bar > .button { flex: 1 1 calc(50% - 9px); }
  .action-bar form .button { width: 100%; }
  .action-separator { display: none; }
  .workflow-list { grid-template-columns: 1fr; }
  .exception-form { grid-template-columns: 1fr; padding: 17px; }
  .exception-add { width: 100%; }
  .panel-heading-actions { width: 100%; justify-content: flex-start; }
  .comparison-rules-panel > .panel-heading { align-items: flex-start; flex-direction: column; }
  .rule-result-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-result-strip > div:nth-child(2) { border-right: 0; }
  .rule-result-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .runtime-result-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runtime-result-strip > div:nth-child(2) { border-right: 0; }
  .runtime-result-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .runtime-values-panel > .panel-heading { align-items: flex-start; flex-direction: column; }
  .runtime-values-panel > .panel-heading .button { width: 100%; }
  .runtime-editor-warning, .profile-editor-footnote { display: none; }
  .rule-editor-dialog { width: calc(100% - 12px); max-height: calc(100vh - 12px); }
  .rule-editor-form { max-height: calc(100vh - 12px); }
  .rule-editor-header { padding: 15px; }
  .rule-editor-body { grid-template-columns: 1fr; padding: 16px; }
  .rule-field-wide { grid-column: auto; }
  .rule-editor-pair { grid-template-columns: 1fr; }
  .rule-area-control { align-items: stretch; flex-direction: column; }
  .region-editor-dialog { width: calc(100% - 12px); height: calc(100vh - 12px); }
  .region-editor-header { padding: 15px; }
  .region-editor-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(460px, 1fr); overflow-y: auto; }
  .region-editor-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .region-selection-summary, .region-global-warning { grid-column: 1 / -1; }
  .region-editor-workspace { min-height: 620px; }
  .region-editor-footer { position: sticky; z-index: 2; bottom: 0; }
  .dynamic-field-dialog { width: calc(100% - 12px); height: calc(100vh - 12px); max-height: calc(100vh - 12px); }
  .dynamic-field-form { height: 100%; min-height: 0; max-height: none; }
  .dynamic-field-form > .rule-editor-footer .button { flex: 1 1 170px; }
  .dynamic-field-form > .rule-editor-footer .rule-editor-footer-spacer { display: none; }
  .dynamic-field-body { grid-template-columns: 1fr; overflow-y: auto; }
  .dynamic-field-preview { max-height: 58vh; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .dynamic-detection-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dynamic-methods { grid-template-columns: 1fr; }
  .image-browser { grid-template-columns: 1fr; padding: 14px; }
  .preview-document-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 14px; }
  .preview-filter-row { align-items: flex-start; flex-direction: column; }
  .preview-document-action { width: 100%; justify-content: flex-end; }
  .preview-page-row { padding: 14px; }
  .preview-page-pair { grid-template-columns: 1fr; }
  .preview-page .shell { width: min(calc(100% - 16px), 1900px); }
  .viewer-heading { align-items: flex-start; flex-direction: column; }
  .viewer-document-nav { width: 100%; }
  .viewer-document-nav .button { flex: 1; }
  .viewer-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .viewer-page-nav, .viewer-zoom-controls { justify-self: center; }
  .viewer-panes { grid-template-columns: 1fr; }
  .viewer-pane { height: 68vh; min-height: 520px; }
  .viewer-pane + .viewer-pane { border-top: 1px solid #69727e; border-left: 0; }
  .viewer-edge-arrow { position: fixed; top: auto; bottom: 12px; transform: none; }
  .file-links li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .profiles-heading { align-items: stretch; flex-direction: column; }
  .profiles-heading .button { width: 100%; }
  .auth-layout { align-items: start; padding-top: 22px; }
  .auth-card { padding: 25px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.object-browser-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.object-browser-action-panel {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.object-browser-action-panel h2,
.object-browser-action-panel p {
  margin: 0;
}

.object-browser-action-panel p {
  color: var(--muted, #52647a);
  margin-top: 0.25rem;
}

.object-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.object-card {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 0.8rem;
}

.object-card-preview {
  align-items: center;
  background: #f4f7fa;
  border: 1px solid #e0e6ed;
  border-radius: 7px;
  display: flex;
  height: 112px;
  justify-content: center;
  overflow: hidden;
}

.object-card-preview img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.object-card-placeholder {
  color: #5c6f85;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.object-card-copy {
  min-width: 0;
}

.object-card-copy h3 {
  font-size: 1rem;
  margin: 0.45rem 0;
  overflow-wrap: anywhere;
}

.object-card-location {
  align-items: center;
  color: #52647a;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.4rem;
}

.object-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.object-metadata-list {
  display: grid;
  font-size: 0.78rem;
  gap: 0.2rem 0.5rem;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0.5rem 0 0;
}

.object-metadata-list dt {
  color: #52647a;
  text-transform: capitalize;
}

.object-metadata-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.info-help-button {
  align-items: center;
  appearance: none;
  background: #edf1f5;
  border: 1px solid #b7c0ca;
  border-radius: 50%;
  color: #667587;
  cursor: help;
  display: inline-flex;
  flex: 0 0 19px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  height: 19px;
  justify-content: center;
  line-height: 1;
  margin-left: 5px;
  padding: 0;
  vertical-align: text-bottom;
  width: 19px;
}

.info-help-button:hover {
  background: #e2e8ef;
  border-color: #8290a0;
  color: #344054;
}

.info-help-button:focus-visible,
.info-help-close:focus-visible,
.help-sidebar a:focus-visible {
  outline: 3px solid rgba(0, 126, 120, 0.28);
  outline-offset: 2px;
}

.info-help-popover {
  background: #fff;
  border: 1px solid #c9d4df;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(17, 38, 66, 0.2);
  color: var(--ink);
  margin: 0;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 18px;
  position: fixed;
  width: min(380px, calc(100vw - 24px));
  z-index: 2500;
}

.info-help-popover::backdrop { background: transparent; }
.info-help-popover[hidden] { display: none; }
.info-help-popover h2 { font-size: 18px; margin: 4px 32px 8px 0; }
.info-help-popover > p { color: #344054; font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.info-help-detail { background: #f6f8fa; border-radius: 8px; margin-top: 8px; padding: 9px 11px; }
.info-help-detail strong { color: #344054; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.info-help-detail p { color: #52647a; font-size: 13px; line-height: 1.45; margin: 3px 0 0; }
.info-help-close { background: transparent; border: 0; color: #52647a; cursor: pointer; font-size: 23px; line-height: 1; padding: 3px 7px; position: absolute; right: 9px; top: 8px; }
.info-help-more { color: var(--teal); display: inline-block; font-size: 13px; font-weight: 720; margin-top: 13px; text-decoration: none; }
.info-help-more:hover { text-decoration: underline; }
.info-help-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.info-help-assistant { color: var(--navy); display: inline-block; font-size: 13px; font-weight: 720; margin-top: 13px; text-decoration: none; }
.info-help-assistant:hover { color: var(--teal); text-decoration: underline; }
.info-help-assistant[hidden] { display: none; }

.header-actions .is-current { background: #eef7f6; border-color: #9bcac6; color: #006f69; }

.help-heading { margin-bottom: 18px; }
.help-version { color: #6b7788; font-weight: 650; letter-spacing: 0; margin-left: 8px; text-transform: none; }
.help-assistant { background: #fff; border: 1px solid #c8d5e2; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; scroll-margin-top: 18px; }
.help-assistant-heading { align-items: flex-start; background: linear-gradient(135deg, #f8fbfd 0%, #edf7f6 100%); border-bottom: 1px solid #d7e1e9; display: flex; gap: 24px; justify-content: space-between; padding: 19px 21px; }
.help-assistant-heading h2 { font-size: 21px; }
.help-assistant-heading p { color: #52647a; font-size: 13px; line-height: 1.5; margin-top: 5px; max-width: 760px; }
.help-assistant-status-block { align-items: flex-end; display: grid; flex: 0 0 auto; gap: 4px; justify-items: end; }
.help-assistant-status { align-items: center; background: #f3f5f8; border: 1px solid #ccd5e0; border-radius: 999px; color: #526174; display: inline-flex; font-size: 11px; font-weight: 730; gap: 7px; min-height: 29px; padding: 5px 10px; white-space: nowrap; }
.help-assistant-status::before { background: #8792a2; border-radius: 50%; content: ""; flex: 0 0 7px; height: 7px; width: 7px; }
.help-assistant-status[data-state="ready"] { background: var(--green-pale); border-color: #b2dcc5; color: #145b3b; }
.help-assistant-status[data-state="ready"]::before { background: var(--green); }
.help-assistant-status[data-state="checking"]::before,
.help-assistant-status[data-state="loading"]::before,
.help-assistant-status[data-state="rebuilding"]::before,
.help-assistant-status[data-state="busy"]::before { animation: pulse 1.2s infinite; background: #d58300; }
.help-assistant-status[data-state="checking"],
.help-assistant-status[data-state="loading"],
.help-assistant-status[data-state="rebuilding"],
.help-assistant-status[data-state="busy"] { background: var(--amber-pale); border-color: #ecd197; color: #79520e; }
.help-assistant-status[data-state="unavailable"],
.help-assistant-status[data-state="disabled"] { background: var(--red-pale); border-color: #ebbbb5; color: #8a2c24; }
.help-assistant-status[data-state="unavailable"]::before,
.help-assistant-status[data-state="disabled"]::before { background: var(--red); }
.help-assistant-context { align-items: center; background: #f8fafc; border-bottom: 1px solid #e1e7ed; color: #52647a; display: flex; flex-wrap: wrap; font-size: 12px; gap: 5px 10px; padding: 9px 21px; }
.help-assistant-context > span { font-size: 10px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.help-assistant-context > strong { color: var(--ink); }
.help-assistant-context > a { color: var(--teal); font-weight: 680; margin-left: auto; text-decoration: none; }
.help-assistant-context > a:hover { text-decoration: underline; }
.help-assistant-body { display: grid; gap: 14px; padding: 18px 21px 20px; }
.help-assistant-transcript { background: #f8fafc; border: 1px solid #dce4eb; border-radius: 9px; display: grid; gap: 12px; max-height: min(46vh, 480px); min-height: 132px; overflow-y: auto; padding: 15px; }
.help-assistant-welcome { align-self: center; color: #52647a; justify-self: center; max-width: 680px; padding: 12px; text-align: center; }
.help-assistant-welcome[hidden] { display: none; }
.help-assistant-welcome strong { color: var(--navy); display: block; font-size: 14px; }
.help-assistant-welcome p { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.help-assistant-message { border-radius: 9px; display: grid; gap: 5px; max-width: min(90%, 900px); padding: 11px 13px; }
.help-assistant-message > strong { color: #52647a; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.help-assistant-message > p { overflow-wrap: anywhere; white-space: pre-wrap; }
.help-assistant-message-user { background: var(--navy); color: #fff; justify-self: end; }
.help-assistant-message-user > strong { color: #cbd8e7; }
.help-assistant-message-assistant { background: #fff; border: 1px solid #d9e2ea; justify-self: start; }
.help-assistant-message-assistant > p { color: #263b54; font-size: 14px; line-height: 1.6; }
.help-assistant-sources { border-top: 1px solid #e0e6ec; margin-top: 6px; padding-top: 9px; }
.help-assistant-sources > span { color: #52647a; font-size: 10px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.help-assistant-sources ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 7px 0 0; padding: 0; }
.help-assistant-sources a,
.help-assistant-sources li { font-size: 11px; }
.help-assistant-sources a { background: #edf7f6; border-radius: 999px; color: #006f69; display: inline-flex; font-weight: 680; padding: 5px 9px; text-decoration: none; }
.help-assistant-sources a:hover { background: #dff1ef; text-decoration: underline; }
.help-assistant-error { margin: 0; }
.help-assistant-error[hidden] { display: none; }
.help-assistant-suggestions > span { color: #52647a; display: block; font-size: 10px; font-weight: 720; letter-spacing: .04em; margin-bottom: 7px; text-transform: uppercase; }
.help-assistant-suggestions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.help-assistant-suggestions button { background: #fff; border: 1px solid #cbd7e3; border-radius: 999px; color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 650; min-height: 34px; padding: 6px 11px; }
.help-assistant-suggestions button:hover { background: #f0f8f7; border-color: #8dbdb8; color: var(--teal-strong); }
.help-assistant-suggestions button:focus-visible { outline: 3px solid rgba(8,120,110,.22); outline-offset: 2px; }
.help-assistant-suggestions button:disabled { background: #f1f3f6; border-color: #e0e5ec; color: #98a2b3; cursor: not-allowed; }
.help-assistant-form { display: grid; gap: 7px; }
.help-assistant-form > label { color: #344054; font-size: 12px; font-weight: 720; }
.help-assistant-form textarea { line-height: 1.5; min-height: 82px; resize: vertical; }
.help-assistant-form-actions { align-items: center; display: flex; gap: 8px; justify-content: flex-end; }
.help-assistant-form-actions > p { color: var(--subtle); font-size: 10px; margin-right: auto; }
.help-assistant-diagnostics { border-top: 1px solid #e1e7ed; color: #52647a; padding-top: 10px; }
.help-assistant-diagnostics summary { cursor: pointer; font-size: 11px; font-weight: 680; width: fit-content; }
.help-assistant-diagnostics dl { display: grid; font-size: 11px; gap: 4px 12px; grid-template-columns: max-content minmax(0, 1fr); margin: 9px 0 0; }
.help-assistant-diagnostics dt { color: var(--subtle); }
.help-assistant-diagnostics dd { margin: 0; overflow-wrap: anywhere; }
.help-assistant-disabled { align-items: center; color: #52647a; display: flex; gap: 14px; padding: 17px 19px; }
.help-assistant-disabled-icon { align-items: center; background: #edf1f5; border: 1px solid #b7c0ca; border-radius: 50%; color: #667587; display: inline-flex; flex: 0 0 28px; font-family: Georgia, serif; font-size: 16px; font-style: italic; font-weight: 700; height: 28px; justify-content: center; }
.help-assistant-disabled h2 { font-size: 16px; }
.help-assistant-disabled p { font-size: 13px; line-height: 1.5; margin-top: 3px; }
.help-search { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 18px; padding: 16px 18px; }
.help-search > label { color: #344054; display: block; font-size: 12px; font-weight: 720; margin-bottom: 7px; }
.help-search-row { display: flex; gap: 8px; }
.help-search-row input { flex: 1 1 auto; min-width: 0; }
.help-layout { align-items: start; display: grid; gap: 18px; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
.help-sidebar,
.help-content { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.help-sidebar { max-height: calc(100vh - 170px); overflow: auto; padding: 10px 12px 16px; position: sticky; top: 88px; }
.help-sidebar details { border-bottom: 1px solid #e8edf2; padding: 5px 0; }
.help-sidebar details:last-child { border-bottom: 0; }
.help-sidebar summary { color: #233650; cursor: pointer; font-size: 13px; font-weight: 730; padding: 8px 6px; }
.help-sidebar ul { list-style: none; margin: 0; padding: 0 0 6px 13px; }
.help-sidebar li { margin: 1px 0; }
.help-sidebar a { border-radius: 6px; color: #52647a; display: block; font-size: 12px; line-height: 1.35; padding: 5px 7px; text-decoration: none; }
.help-sidebar a:hover,
.help-sidebar a[aria-current="page"] { background: #edf7f6; color: #006f69; }
.help-content { min-height: 520px; min-width: 0; padding: clamp(20px, 3vw, 38px); }
.help-topic { min-width: 0; }
.help-topic > h2,
.help-results-heading h2 { font-size: clamp(25px, 3vw, 36px); margin: 5px 0 10px; }
.help-topic-summary { color: #344054; font-size: 17px; line-height: 1.55; margin: 0 0 20px; max-width: 860px; }
.help-consequence-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 24px; }
.help-consequence-grid > div { background: #f5f8fa; border-left: 3px solid #8ca0b5; border-radius: 4px 9px 9px 4px; padding: 13px 15px; }
.help-consequence-grid > div:first-child { border-left-color: var(--teal); }
.help-consequence-grid strong { color: #344054; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.help-consequence-grid p { color: #52647a; font-size: 13px; line-height: 1.5; margin: 5px 0 0; }
.help-topic-body { color: #344054; font-size: 15px; line-height: 1.65; max-width: 900px; width: 100%; }
.help-topic-body p { margin: 0 0 14px; }
.help-comparison-table { margin: 24px 0; }
.help-comparison-table table { border-collapse: collapse; min-width: 620px; width: 100%; }
.help-comparison-table th,
.help-comparison-table td { border: 1px solid #dce4eb; font-size: 13px; line-height: 1.45; padding: 11px 13px; text-align: left; }
.help-comparison-table thead th { background: #f2f6f8; color: #344054; }
.help-related { border-top: 1px solid #e1e7ed; margin-top: 26px; padding-top: 19px; }
.help-related h3 { font-size: 15px; margin: 0 0 9px; }
.help-related > div { display: flex; flex-wrap: wrap; gap: 8px; }
.help-related a { background: #edf7f6; border-radius: 999px; color: #006f69; font-size: 12px; font-weight: 680; padding: 6px 10px; text-decoration: none; }
.help-topic-meta { border-top: 1px solid #e1e7ed; color: #6b7788; display: flex; flex-wrap: wrap; font-size: 11px; gap: 8px 18px; margin-top: 28px; padding-top: 13px; }
.help-search-results { display: grid; gap: 10px; margin-top: 18px; }
.help-result-card { border: 1px solid #dce4eb; border-radius: 10px; padding: 14px 16px; }
.help-result-card > span { color: #667587; font-size: 10px; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; }
.help-result-card h3 { font-size: 17px; margin: 4px 0 6px; }
.help-result-card h3 a { color: var(--navy); text-decoration: none; }
.help-result-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.help-result-card p { color: #52647a; font-size: 13px; line-height: 1.5; margin: 0; }
.help-empty { min-height: 260px; }

@media (max-width: 880px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-sidebar { max-height: none; position: static; }
  .help-consequence-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .help-search-row { align-items: stretch; flex-direction: column; }
  .help-content { padding: 18px; }
  .info-help-popover { left: 12px !important; width: calc(100vw - 24px); }
  .help-assistant-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .help-assistant-status-block { align-items: flex-start; justify-items: start; }
  .help-assistant-body { padding: 15px; }
  .help-assistant-transcript { max-height: 55vh; padding: 10px; }
  .help-assistant-message { max-width: 96%; }
  .help-assistant-form-actions { align-items: stretch; flex-direction: column; }
  .help-assistant-form-actions > p { margin: 0 0 2px; }
  .help-assistant-form-actions .button { width: 100%; }
  .help-assistant-context > a { margin-left: 0; width: 100%; }
}

.mono-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (max-width: 640px) {
  .object-browser-action-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .object-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .object-card-preview {
    height: 84px;
  }
}

/* Voluntary Getting Started tutorial. The guide points at stable targets and
   reports server validation. Its explicit prefill action changes only unsaved
   rule-editor fields; persistence still uses the normal form submission. */
.tutorial-hero { align-items: center; background: linear-gradient(135deg, #fff 0%, #f0faf8 100%); display: flex; gap: 32px; justify-content: space-between; margin-bottom: 16px; padding: clamp(24px, 4vw, 46px); }
.tutorial-hero h1 { font-size: clamp(34px, 5vw, 52px); margin: 5px 0 10px; }
.tutorial-lead { color: #344054; font-size: 18px; line-height: 1.55; margin: 0; max-width: 700px; }
.tutorial-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tutorial-meta span { background: #e7f5f3; border-radius: 999px; color: #17635f; font-size: 12px; font-weight: 680; padding: 7px 11px; }
.tutorial-actions { align-items: stretch; display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.tutorial-actions form, .tutorial-actions .button { margin: 0; width: 100%; }
.tutorial-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
.tutorial-learning-list { counter-reset: tutorial-list; display: grid; gap: 12px; list-style: none; margin: 0; padding: 18px 24px 22px; }
.tutorial-learning-list li { align-items: center; color: #344054; display: grid; gap: 12px; grid-template-columns: 30px 1fr; }
.tutorial-learning-list li::before { background: #edf7f6; border: 1px solid #9bcac6; border-radius: 50%; color: #006f69; content: counter(tutorial-list); counter-increment: tutorial-list; display: grid; font-size: 12px; font-weight: 760; height: 28px; place-items: center; width: 28px; }
.tutorial-safety-card ul { color: #52647a; line-height: 1.55; margin: 18px 24px 18px; padding-left: 18px; }
.tutorial-safety-card > a { display: inline-block; margin: 0 24px 22px; }
.tutorial-resume-card { align-items: center; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 16px; padding: 18px 22px; }
.tutorial-resume-card h2 { font-size: 18px; margin: 3px 0 4px; }
.tutorial-resume-card p { color: #667587; margin: 0; }
.tutorial-resume-card progress { accent-color: var(--teal); height: 12px; max-width: 360px; width: 35%; }
.tutorial-complete-notice { margin-bottom: 16px; }
.tutorial-result-target { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; }

.tutorial-guide { pointer-events: none; }
.rule-editor-dialog.tutorial-coach-host { overflow: visible; }
.region-editor-dialog.tutorial-coach-host { overflow: visible; }
.tutorial-highlight { border: 3px solid #20b2aa; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 24, 42, .52), 0 0 0 5px rgba(32, 178, 170, .20); opacity: 0; pointer-events: none; position: fixed; transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease, opacity .15s ease; z-index: 2200; }
.tutorial-highlight.is-visible { opacity: 1; }
.tutorial-target-active { position: relative; z-index: 2201; }
.tutorial-coach { background: #fff; border: 1px solid #91aaa8; border-radius: 12px; box-shadow: 0 18px 52px rgba(8, 22, 40, .30); max-height: calc(100vh - 24px); overflow: auto; padding: 18px; pointer-events: auto; position: fixed; width: min(390px, calc(100vw - 24px)); z-index: 2202; }
.tutorial-coach-progress { align-items: center; color: #627084; display: flex; font-size: 11px; font-weight: 720; justify-content: space-between; letter-spacing: .035em; text-transform: uppercase; }
.tutorial-coach-progress a { color: #087a74; text-decoration: none; }
.tutorial-coach h2 { color: var(--navy); font-size: 21px; margin: 10px 0 7px; }
.tutorial-coach > p { color: #3e4f63; font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.tutorial-coach > p a { color: #087a74; font-weight: 680; }
.tutorial-coach .tutorial-guidance { background: #f3f7f9; border-radius: 7px; color: #52647a; font-size: 12px; padding: 9px 10px; }
.tutorial-coach-prefill { margin: 2px 0 8px; width: 100%; }
.tutorial-coach-prefill[hidden] { display: none; }
.tutorial-coach-links { font-size: 12px; margin: 6px 0 15px; }
.tutorial-coach-links a { color: #087a74; font-weight: 680; }
.tutorial-coach-actions { align-items: center; border-top: 1px solid #e1e7ed; display: flex; flex-wrap: wrap; gap: 7px; padding-top: 13px; }
.tutorial-coach-actions [hidden] { display: none; }
.tutorial-coach-actions form { margin: 0; }
.tutorial-coach-actions form .button { white-space: nowrap; }
.tutorial-coach-spacer { flex: 1; }
.tutorial-coach-error { color: #b42318 !important; }
.tutorial-footer-area-suggestion { border: 3px solid #20b2aa; border-radius: 5px; box-shadow: 0 0 0 4px rgba(32, 178, 170, .18); box-sizing: border-box; color: transparent; height: 7.2%; left: 8%; pointer-events: none; position: absolute; top: 83.1%; width: 84%; z-index: 3; }
.tutorial-footer-area-suggestion::before { background: #087a74; border-radius: 5px; bottom: calc(100% + 7px); color: #fff; content: "Select the complete footer area"; font-size: clamp(9px, 1vw, 12px); font-weight: 720; padding: 4px 7px; position: absolute; right: 0; white-space: nowrap; }
.tutorial-footer-area-suggestion[hidden] { display: none; }
.tutorial-dynamic-value-suggestion { border: 3px solid #20b2aa; border-radius: 5px; box-shadow: 0 0 0 4px rgba(32, 178, 170, .18); color: transparent; left: 32.7%; pointer-events: none; position: absolute; top: 33.6%; width: 11.2%; height: 2.8%; z-index: 3; }
.tutorial-dynamic-value-suggestion::before { background: #087a74; border-radius: 5px; bottom: calc(100% + 7px); color: #fff; content: "Select only 123456789"; font-size: clamp(9px, 1vw, 12px); font-weight: 720; padding: 4px 7px; position: absolute; right: 0; white-space: nowrap; }
.tutorial-dynamic-value-suggestion[hidden] { display: none; }

@media (min-width: 900px) {
  .rule-editor-dialog.tutorial-coach-host:not(.dynamic-field-dialog) { margin: auto 16px auto auto; width: min(calc(100% - 440px), 780px); }
  .rule-editor-dialog.tutorial-coach-host > .tutorial-coach { left: 16px !important; right: auto !important; top: 50% !important; transform: translateY(-50%); }
}

@media (min-width: 1180px) {
  .rule-editor-dialog.dynamic-field-dialog.tutorial-coach-host { margin: auto 16px auto auto; width: min(calc(100% - 440px), 1100px); }
}

@media (max-width: 899px) {
  .tutorial-coach-host .tutorial-coach { bottom: 8px !important; left: 8px !important; right: 8px !important; top: auto !important; width: auto; }
}

@media (min-width: 900px) and (max-width: 1179px) {
  .dynamic-field-dialog.tutorial-coach-host .tutorial-coach { bottom: 8px !important; left: 8px !important; right: 8px !important; top: auto !important; transform: none; width: auto; }
}

@media (max-width: 800px) {
  .tutorial-hero { align-items: stretch; flex-direction: column; }
  .tutorial-actions { flex-direction: row; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .tutorial-resume-card { align-items: stretch; flex-direction: column; }
  .tutorial-resume-card progress { max-width: none; width: 100%; }
}

@media (max-width: 520px) {
  .tutorial-actions { flex-direction: column; }
  .tutorial-coach { bottom: 8px !important; left: 8px !important; right: 8px !important; top: auto !important; width: auto; }
}
