:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --canvas: #fbfbfa;
  --panel: #ffffff;
  --panel-muted: #f7f7f5;
  --ink: #191918;
  --ink-soft: #3d3d3a;
  --muted: #6c6c68;
  --soft: #97978f;
  --line: #eaeae6;
  --line-strong: #dbdbd5;
  --accent: #191918;
  --accent-dark: #000000;
  --accent-soft: #f2f2ef;
  --link: #2f5bb7;
  --blue: #6c6c68;
  --blue-soft: #f2f2ef;
  --ready: #2f6b4f;
  --ready-soft: #eef3f0;
  --amber: #8a5a0b;
  --amber-soft: #faf3e6;
  --coral: #a52a1f;
  --coral-soft: #fbeeec;
  --shadow: 0 1px 2px rgba(25, 25, 24, 0.04);
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: auto; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font: 13px/1.55 var(--font); font-feature-settings: "cv05" 1, "cv08" 1; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.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; }

.demo-shell { min-height: 100vh; }
.app-topbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center; min-height: 68px; padding: 0 32px; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.app-brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; text-decoration: none; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: var(--accent); }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dce9f1; }
.brand-mark::before { transform: translate(-6px, -6px); }
.brand-mark::after { transform: translate(6px, 6px); }
.brand-mark span { transform: translate(6px, -6px); }
.brand-word { font-weight: 700; font-size: 18px; letter-spacing: -0.04em; }
.brand-context { padding-left: 9px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.view-tabs { display: flex; align-self: stretch; gap: 26px; }
.view-tab { position: relative; display: inline-flex; align-items: center; padding: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.view-tab::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.view-tab:hover, .view-tab.is-active { color: var(--ink); }
.view-tab.is-active::after { background: var(--accent); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #cfdee7; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; }
.demo-dot, .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--accent-dark); background: #e3edf3; border: 0; border-radius: 50%; font-size: 11px; font-weight: 700; }

main { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 26px 0 54px; }
.workspace-view { min-width: 0; }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 32px; margin-bottom: 28px; color: var(--muted); font-size: 12px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; min-width: 0; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs strong { color: var(--ink); font-weight: 600; }
.crumb-separator { color: var(--line-strong); }
.view-bar-meta { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.workspace-date { color: var(--muted); }
.quiet-button, .text-button { padding: 0; color: var(--accent-dark); background: transparent; border: 0; font-size: 12px; font-weight: 600; }
.quiet-button:hover, .text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.save-indicator, .autosave-copy { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-overline, .panel-label, .section-kicker { margin: 0 0 5px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; line-height: 1.3; text-transform: uppercase; }
.page-header h1, .summary-header h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 3.2vw, 38px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.page-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.dot-separator { padding: 0 5px; color: var(--line-strong); }
.demo-context { padding: 7px 10px; color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; font-weight: 600; }

.form-progress { padding: 15px 18px 16px; margin-bottom: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 2px 8px rgba(23, 49, 46, 0.02); }
.form-progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 11px; font-size: 13px; }
.form-progress-copy strong:first-child { font-weight: 700; }
.form-progress-copy > strong { color: var(--accent-dark); font-size: 12px; }
.progress-title-separator { padding: 0 7px; color: var(--line-strong); }
.progress-track { height: 5px; overflow: hidden; background: #e8efec; border-radius: 999px; }
.progress-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 180ms ease; }

.applicant-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; gap: 18px; }
.flow-rail { position: sticky; top: 94px; padding: 17px 12px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.rail-heading span:last-child { color: var(--soft); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.flow-list { display: grid; gap: 3px; padding: 12px 0 15px; margin: 0; list-style: none; }
.flow-item { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 9px; width: 100%; padding: 9px 8px; color: var(--muted); text-align: left; background: transparent; border: 0; border-radius: 5px; }
.flow-item:hover { background: var(--panel-muted); color: var(--ink); }
.flow-item.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.flow-item.is-complete { color: var(--ink); }
.flow-number { display: grid; place-items: center; width: 22px; height: 22px; color: var(--soft); border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; font-weight: 700; }
.flow-item.is-active .flow-number { color: #fff; background: var(--accent); border-color: var(--accent); }
.flow-item.is-complete .flow-number { color: var(--ready); background: var(--ready-soft); border-color: #cbdbe5; }
.checkmark { font-size: 11px; }
.flow-item strong, .flow-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-item strong { font-size: 12px; font-weight: 600; }
.flow-item small { margin-top: 1px; color: var(--soft); font-size: 10px; }
.flow-item.is-active small { color: var(--accent); }
.rail-footnote { display: grid; gap: 2px; padding: 13px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.rail-footnote strong { color: var(--ink); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; }

.form-card { min-width: 0; min-height: 700px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.form-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 29px 21px; border-bottom: 1px solid var(--line); }
.form-card-head h2 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -0.035em; }
.form-subtitle { max-width: 560px; margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.required-note { padding-top: 2px; color: var(--soft); font-size: 11px; white-space: nowrap; }
.required-star, .field em { color: var(--coral); font-style: normal; }
.question-viewport { min-height: 530px; padding: 26px 29px 28px; }
.question-group { min-height: 470px; }
.section-intro { display: flex; align-items: flex-start; gap: 11px; padding-bottom: 21px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-intro-number { color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.section-intro p { max-width: 680px; margin: -1px 0 0; color: var(--muted); font-size: 13px; }
.field-grid { display: grid; gap: 21px 18px; }
.field-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field, .choice-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; padding: 0; margin: 0; border: 0; }
.field > span, .choice-field legend { color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.35; }
.field > span small { color: var(--soft); font-size: 11px; font-weight: 400; }
.field input, .field textarea, .search-field input { width: 100%; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; outline: none; transition: border-color 140ms ease, box-shadow 140ms ease; }
.field input, .search-field input { height: 40px; padding: 0 11px; }
.field textarea { min-height: 86px; padding: 10px 11px; resize: vertical; }
.field input:focus, .field textarea:focus, .search-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49, 91, 120, 0.11); }
.field input::placeholder, .field textarea::placeholder, .search-field input::placeholder { color: #a5b0ae; }
.field-wide { grid-column: 1 / -1; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 500; }
.choice:has(input:checked) { color: var(--accent-dark); background: var(--accent-soft); border-color: #bed0dc; }
.choice input { position: absolute; opacity: 0; }
.choice span { white-space: nowrap; }
.conditional-field { grid-column: 1 / -1; padding: 15px; background: var(--panel-muted); border: 1px solid var(--line); border-radius: 6px; }
.conditional-field .field-grid { gap: 16px; }
.conditional-empty { display: flex; align-items: center; gap: 10px; min-height: 47px; padding: 11px 14px; color: var(--ready); background: var(--ready-soft); border: 1px solid #d1e0e8; border-radius: 6px; }
.conditional-empty span { font-weight: 700; }
.conditional-empty p { margin: 0; color: var(--ready); font-size: 12px; }
.form-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 76px; padding: 15px 29px; background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); }
.action-right { display: flex; align-items: center; gap: 18px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 38px; padding: 0 15px; border-radius: 5px; font-size: 12px; font-weight: 700; transition: background 140ms ease, border-color 140ms ease, color 140ms ease; }
.primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); }
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary-button { color: var(--accent-dark); background: #fff; border: 1px solid var(--line-strong); }
.secondary-button:hover { background: var(--panel-muted); border-color: var(--accent); }
.secondary-button[disabled] { color: var(--soft); background: var(--panel-muted); cursor: not-allowed; }
.demo-note { margin: 15px 0 0; color: var(--soft); font-size: 11px; }

.team-page-header { margin-bottom: 22px; }
.triage-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.triage-filter { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 10px 14px; color: var(--muted); text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.triage-filter:hover { border-color: var(--line-strong); background: var(--panel-muted); }
.triage-filter.is-active { color: var(--accent-dark); background: var(--accent-soft); border-color: #bed0dc; }
.triage-filter strong { font-size: 20px; font-weight: 600; letter-spacing: -0.04em; }
.triage-filter span { font-size: 12px; font-weight: 600; }
.applicants-card { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.section-card-head, .tab-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-card-head { padding: 22px 24px 15px; }
.section-card-head h2, .tab-panel-heading h2, .summary-panel h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.section-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.queue-context, .front-end-note { color: var(--soft); font-size: 11px; }
.applicant-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px 17px; }
.search-field { position: relative; display: block; width: min(350px, 100%); }
.search-field > span { position: absolute; top: 7px; left: 12px; color: var(--soft); font-size: 20px; line-height: 1; }
.search-field input { padding-left: 35px; height: 38px; font-size: 12px; }
.toolbar-note { color: var(--soft); font-size: 11px; }
.applicant-table-wrap { width: 100%; min-width: 0; overflow-x: auto; contain: paint; border-top: 1px solid var(--line); }
.applicant-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 12px; }
.applicant-table th { padding: 12px 13px; color: var(--soft); background: var(--panel-muted); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.applicant-table td { padding: 14px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.applicant-table th:first-child, .applicant-table td:first-child { padding-left: 24px; }
.applicant-table th:last-child, .applicant-table td:last-child { padding-right: 24px; }
.applicant-row { outline: none; transition: background 120ms ease; }
.applicant-row:hover, .applicant-row:focus { background: #fbfdfc; }
.applicant-row:focus { box-shadow: inset 3px 0 0 var(--accent); }
.applicant-cell, .owner-cell { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.applicant-cell strong, .applicant-cell small, .stage-cell strong, .stage-cell small, .due-cell strong, .due-cell small { display: block; }
.applicant-cell strong, .stage-cell strong, .due-cell strong { color: var(--ink); font-weight: 600; }
.applicant-cell small, .stage-cell small, .due-cell small { margin-top: 2px; color: var(--soft); font-size: 10px; }
.person-avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; color: var(--accent-dark); background: #e7eef3; border-radius: 50%; font-size: 10px; font-weight: 700; }
.table-avatar { width: 30px; height: 30px; }

.attention-cell { display: inline-block; max-width: 180px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.attention-cell.review { color: var(--coral); }
.attention-cell.waiting { color: var(--amber); }
.attention-cell.ready { color: var(--ready); }
.owner-cell { color: var(--muted); font-size: 11px; }
.owner-chip { display: inline-grid; place-items: center; width: 24px; height: 24px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 50%; font-size: 9px; font-weight: 700; }
.due-cell strong { font-size: 11px; font-weight: 500; }
.status-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-tag.review { color: var(--coral); background: var(--coral-soft); }
.status-tag.waiting { color: var(--amber); background: var(--amber-soft); }
.status-tag.ready { color: var(--ready); background: var(--ready-soft); }
.row-open { color: var(--accent); font-size: 16px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 24px; color: var(--soft); font-size: 11px; }

.summary-page { padding-bottom: 40px; }
.summary-header { margin-bottom: 22px; }
.back-link { display: inline-flex; margin-bottom: 20px; color: var(--accent-dark); font-size: 12px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.summary-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.summary-identity { display: flex; align-items: center; gap: 14px; }
.summary-avatar { width: 50px; height: 50px; font-size: 13px; }
.summary-meta { display: flex; align-items: center; gap: 16px; padding-bottom: 2px; }
.owner-label { color: var(--soft); font-size: 11px; }
.owner-label strong { margin-left: 4px; color: var(--ink); font-weight: 600; }
.summary-panel, .summary-tab-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.panel-label { color: var(--soft); }
.blocker-row, .clear-state { display: flex; align-items: flex-start; gap: 10px; }
.check-status { display: inline-grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.check-status.passed { color: var(--ready); background: var(--ready-soft); }
.check-status.action { color: var(--coral); background: var(--coral-soft); }
.check-status.warning { color: var(--amber); background: var(--amber-soft); }
.summary-tabs { display: flex; gap: 21px; padding: 0 5px; margin-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
.summary-tab { position: relative; padding: 11px 3px 12px; color: var(--muted); background: transparent; border: 0; font-size: 12px; font-weight: 700; }
.summary-tab::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.summary-tab:hover, .summary-tab.is-active { color: var(--accent-dark); }
.summary-tab.is-active::after { background: var(--accent); }
.summary-tab-panel { min-height: 220px; padding: 23px 25px; box-shadow: none; }
.tab-panel-heading { align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab-panel-heading h2 { font-size: 18px; }
.tab-panel-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.document-list, .check-list, .activity-list { display: grid; }
.document-row, .check-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.document-row:last-child, .check-row:last-child { border-bottom: 0; }
.document-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--coral); background: var(--coral-soft); border-radius: 4px; font-size: 9px; font-weight: 700; }
.document-row strong, .document-row small, .check-row strong, .check-row p { display: block; }
.document-row strong, .check-row strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.document-row small { margin-top: 2px; color: var(--soft); font-size: 11px; }
.document-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.document-comment-button { font-size: 11px; white-space: nowrap; }
.document-note { display: flex; gap: 8px; padding: 0 0 12px 48px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; }
.document-note span { color: var(--soft); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.document-note p { margin: 0; }
.document-comment { padding: 13px 0 15px 48px; border-bottom: 1px solid var(--line); }
.comment-field { display: grid; gap: 6px; }
.comment-field > span { color: var(--ink); font-size: 11px; font-weight: 700; }
.comment-field textarea { width: 100%; min-height: 66px; padding: 9px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; outline: none; resize: vertical; }
.comment-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49, 91, 120, 0.11); }
.comment-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 9px; }
.document-status, .check-label { font-size: 10px; font-weight: 700; white-space: nowrap; }
.document-status.passed, .check-label.passed { color: var(--ready); }
.document-status.action, .check-label.action { color: var(--coral); }
.document-status.warning, .check-label.warning { color: var(--amber); }
.activity-list { max-width: 760px; padding-top: 4px; }
.activity-row { position: relative; display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 12px; padding: 13px 0 13px 2px; }
.activity-row:not(:last-child)::after { content: ""; position: absolute; top: 28px; bottom: -13px; left: 7px; width: 1px; background: var(--line); }
.activity-marker { z-index: 1; width: 11px; height: 11px; margin-top: 4px; background: var(--line-strong); border: 3px solid var(--panel); border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong); }
.activity-marker.blue { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.activity-row small, .activity-row strong, .activity-row p { display: block; }
.activity-row small { color: var(--soft); font-size: 10px; }
.activity-row strong { margin-top: 2px; color: var(--ink); font-size: 12px; font-weight: 600; }
.activity-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.summary-demo-note { margin-top: 14px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; align-items: center; gap: 9px; max-width: min(380px, calc(100vw - 32px)); padding: 12px 15px; color: #fff; background: #223343; border-radius: 6px; box-shadow: 0 12px 30px rgba(25, 44, 59, 0.2); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-check { display: grid; place-items: center; width: 18px; height: 18px; color: var(--accent-dark); background: #dce8f0; border-radius: 50%; font-size: 11px; font-weight: 700; }

@media (max-width: 1050px) {
  .app-topbar { grid-template-columns: 1fr auto; padding: 0 22px; }
  .view-tabs { grid-column: 1 / -1; grid-row: 2; justify-content: center; min-height: 38px; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .app-brand { grid-column: 1; grid-row: 1; }
  .applicant-layout { grid-template-columns: 210px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  main { width: min(100% - 28px, 620px); padding-top: 19px; }
  .app-topbar { padding: 0 14px; }
  .brand-context { display: none; }
  .demo-badge { padding: 5px 7px; font-size: 10px; }
  .avatar { width: 29px; height: 29px; }
  .view-tabs { gap: 19px; }
  .view-tab { font-size: 12px; }
  .view-bar { align-items: flex-start; margin-bottom: 22px; }
  .view-bar-meta { gap: 0; }
  .workspace-date, .view-bar-meta .quiet-button { display: none; }
  .page-header, .summary-heading-row { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-header h1, .summary-header h1 { font-size: 31px; }
  .demo-context { align-self: flex-start; }
  .form-progress-copy { align-items: flex-start; flex-direction: column; gap: 5px; }
  .applicant-layout { display: flex; flex-direction: column; gap: 12px; }
  .flow-rail { position: static; width: 100%; padding: 13px 10px 10px; }
  .flow-list { display: flex; overflow-x: auto; gap: 5px; padding: 10px 0 4px; margin-right: -2px; }
  .flow-list li { flex: 0 0 180px; }
  .flow-item { height: 51px; }
  .rail-footnote { display: none; }
  .form-card { min-height: 0; }
  .form-card-head { padding: 20px 18px 17px; }
  .form-card-head h2 { font-size: 21px; }
  .question-viewport { min-height: 430px; padding: 21px 18px 23px; }
  .question-group { min-height: 390px; }
  .field-grid.two-up { grid-template-columns: 1fr; gap: 18px; }
  .field-wide { grid-column: auto; }
  .conditional-field { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; padding: 13px 18px; }
  .action-right { justify-content: space-between; }
  .primary-button { min-height: 40px; }
  .triage-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .triage-filter { min-height: 54px; padding: 9px 11px; }
  .triage-filter strong { font-size: 18px; }
  .applicant-toolbar { align-items: stretch; flex-direction: column; gap: 8px; padding: 0 17px 14px; }
  .search-field { width: 100%; }
  .toolbar-note { display: none; }
  .section-card-head { padding: 19px 17px 13px; }
  .queue-context { display: none; }
  .applicant-table th:first-child, .applicant-table td:first-child { padding-left: 17px; }
  .applicant-table th:last-child, .applicant-table td:last-child { padding-right: 17px; }
  .table-footer { padding: 13px 17px; }
  .summary-identity { align-items: flex-start; }
  .summary-meta { padding-left: 64px; }
  .summary-tabs { gap: 15px; overflow-x: auto; }
  .summary-tab { white-space: nowrap; }
  .summary-tab-panel { min-height: 200px; padding: 19px 17px; }
  .tab-panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .document-row, .check-row { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .document-row-actions { grid-column: 2; justify-content: space-between; }
  .document-note, .document-comment { padding-left: 42px; }
  .document-status, .check-label { grid-column: 2; }
}

@media (max-width: 430px) {
  .topbar-actions { gap: 7px; }
  .demo-badge { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .triage-filter { gap: 7px; }
  .triage-filter span { font-size: 11px; }
  .form-actions .secondary-button { align-self: flex-start; }
  .action-right { align-items: stretch; flex-direction: column; gap: 9px; }
  .autosave-copy { justify-content: flex-end; }
  .summary-meta { align-items: flex-start; flex-direction: column; gap: 7px; padding-left: 0; }
}

/* ── Pre-review pack ─────────────────────────────────────────────────────── */

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "cv05" 1; }

/* Chrome */
.app-topbar { min-height: 52px; padding: 0 20px; background: var(--panel); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: transparent; }
.brand-mark svg { display: block; width: 22px; height: 22px; }
.brand-word { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.brand-context { padding-left: 8px; font-size: 12px; }
.view-tab { font-size: 13px; font-weight: 500; }
.demo-badge { padding: 3px 8px; color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.demo-dot { width: 5px; height: 5px; background: var(--soft); }
.avatar { width: 26px; height: 26px; color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); font-size: 10px; font-weight: 600; }

main { width: min(1100px, calc(100% - 48px)); padding: 22px 0 48px; }
.view-bar { margin-bottom: 18px; font-size: 12px; }
.page-overline, .panel-label, .section-kicker { margin: 0 0 4px; color: var(--soft); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; }
.page-header h1, .summary-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.028em; }
.page-subtitle { margin: 5px 0 0; font-size: 13px; }
.back-link { margin-bottom: 16px; color: var(--muted); font-weight: 500; }
.summary-header { margin-bottom: 18px; }
.summary-avatar { width: 40px; height: 40px; color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.owner-label { font-size: 12px; }

/* Status as a dot, not a pill */
.status-tag { min-height: 0; padding: 0; gap: 6px; color: var(--muted); background: none !important; border-radius: 0; font-size: 12px; font-weight: 500; }
.status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-tag.review { color: var(--coral); }
.status-tag.waiting { color: var(--amber); }
.status-tag.ready { color: var(--ready); }

/* Basis strip */
.basis-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.basis-tag { padding: 2px 7px; color: var(--ink-soft); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 4px; font-size: 11px; font-weight: 600; }

/* Result summary */
.review-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 14px 16px; margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 6px; }
.review-summary-main { min-width: 0; }
.review-summary-line { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -0.018em; }
.review-summary-sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.review-tally { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.tally-item { display: grid; gap: 0; min-width: 68px; padding: 0 13px; border-left: 1px solid var(--line); }
.tally-item:first-child { border-left: 0; }
.tally-item strong { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tally-item span { color: var(--soft); font-size: 11px; font-weight: 500; }
.tally-item.blocking strong { color: var(--coral); }
.tally-item.confirm strong { color: var(--amber); }
.tally-item.is-zero strong { color: var(--line-strong); }

/* Tabs */
.summary-tabs { gap: 18px; padding: 0; margin-bottom: 0; border-bottom: 1px solid var(--line-strong); }
.summary-tab { padding: 9px 1px 10px; font-size: 13px; font-weight: 500; }
.summary-tab.is-active { color: var(--ink); font-weight: 600; }
.summary-tab.is-active::after { background: var(--ink); }
.tab-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 6px; color: var(--muted); background: var(--panel-muted); border-radius: 4px; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-tab.is-active .tab-count { color: var(--ink); background: var(--accent-soft); }

.summary-panel, .summary-tab-panel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.summary-tab-panel { min-height: 0; padding: 0; }
.tab-panel-heading { padding: 20px 0 0; border-bottom: 0; }
.tab-panel-heading h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.tab-panel-subtitle { margin: 4px 0 0; max-width: 620px; font-size: 12px; }

/* Findings */
.finding-list, .passed-list { display: grid; gap: 10px; padding-top: 14px; }
.severity-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.severity-chip.blocking { color: var(--coral); }
.severity-chip.confirm { color: var(--amber); }
.severity-chip.note { color: var(--soft); }

/* Evidence table */
.evidence-block { margin-top: 12px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.evidence-label { margin: 0; padding: 7px 12px; color: var(--soft); background: var(--panel-muted); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.evidence-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.evidence-row:first-of-type { border-top: 0; }
.evidence-source { color: var(--ink); font-size: 12px; font-weight: 500; }
.evidence-page { color: var(--soft); font-weight: 400; }
.evidence-field { color: var(--muted); font-size: 12px; }
.evidence-quote { color: var(--ink); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; overflow-wrap: anywhere; }
.evidence-computed { margin: 0; padding: 8px 12px; color: var(--ink-soft); background: var(--panel-muted); border-top: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; line-height: 1.5; }

.finding-rule strong, .finding-action strong { color: var(--ink); font-weight: 600; }
.confidence-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ready); }
.confidence-line.inferred .confidence-dot { background: var(--amber); }

/* Buttons */
.primary-button, .secondary-button { min-height: 30px; padding: 0 12px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.primary-button { color: #fff; background: var(--ink); border-color: var(--ink); }
.primary-button:hover { background: #000; border-color: #000; }
.secondary-button { color: var(--ink); border-color: var(--line-strong); }
.secondary-button:hover { background: var(--panel-muted); border-color: var(--soft); }
.text-button, .quiet-button { color: var(--muted); font-weight: 500; }
.text-button:hover, .quiet-button:hover { color: var(--ink); }

/* Passed checks */
.check-status { width: 15px; height: 15px; background: none !important; font-size: 12px; }
.check-status.passed { color: var(--ready); }
.crossref { display: grid; gap: 0; margin-top: 9px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.crossref-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px; align-items: baseline; padding: 7px 11px; border-top: 1px solid var(--line); }
.crossref-row:first-child { border-top: 0; }
.crossref-row > span:first-child { color: var(--muted); font-size: 12px; }

/* Not checked */
.not-checked-list { display: grid; padding: 14px 0 0; margin: 0; list-style: none; }
.not-checked-list li { position: relative; padding: 11px 0 11px 20px; color: var(--ink-soft); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.not-checked-list li::before { content: ""; position: absolute; top: 18px; left: 2px; width: 8px; height: 1px; background: var(--line-strong); }
.scope-statement { max-width: 700px; margin: 18px 0 0; padding: 12px 14px; color: var(--ink-soft); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 12px; line-height: 1.55; }

/* Documents */
.document-list { padding-top: 8px; }
.document-row { grid-template-columns: 28px minmax(0, 1fr) auto; padding: 12px 0; }
.document-icon { width: 26px; height: 26px; color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 4px; font-size: 9px; font-weight: 600; }
.document-icon.action, .document-icon.warning, .document-icon.passed { color: var(--muted); background: var(--panel-muted); }
.document-row strong { font-size: 13px; }
.document-row small { font-size: 12px; }
.document-extracted { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.45; }
.document-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.document-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.document-status.passed { color: var(--muted); }
.document-status.action { color: var(--coral); }
.document-status.warning { color: var(--amber); }
.document-note { padding-left: 39px; font-size: 12px; }
.document-comment { padding-left: 39px; }
.comment-field textarea { border-radius: 5px; font-size: 13px; }
.comment-field textarea:focus { border-color: var(--ink); box-shadow: none; }

/* Activity */
.activity-row strong { font-size: 13px; }
.activity-row p, .activity-row small { font-size: 12px; }
.activity-marker { background: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong); }
.activity-marker.blue { background: var(--soft); box-shadow: 0 0 0 1px var(--soft); }

/* Clear state */
.clear-panel { display: flex; align-items: flex-start; gap: 10px; padding: 18px 0 4px; }
.clear-panel > span { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; color: var(--ready); font-size: 12px; font-weight: 600; }
.clear-panel strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.clear-panel p { max-width: 600px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Client request */
.request-drawer { padding: 16px 18px; margin-top: 16px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 6px; }
.request-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.request-drawer-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.018em; }
.request-list { display: grid; margin: 12px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.request-list li { padding: 10px 12px; border-top: 1px solid var(--line); }
.request-list li:first-child { border-top: 0; }
.request-list strong { display: block; color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.5; }
.request-list span { display: block; margin-top: 3px; color: var(--soft); font-size: 11px; }
.request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 13px; }
.request-note { color: var(--soft); font-size: 12px; }

/* Footer */
.pack-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.pack-footer-line { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.pack-footer-line strong { color: var(--ink-soft); font-weight: 600; }
.pack-footer-line a { color: var(--link); text-underline-offset: 2px; }
.pack-footer .demo-note { margin-top: 7px; font-size: 11px; }
.rates-note { margin: 6px 0 0; color: var(--soft); font-size: 11px; }

.toast { padding: 10px 14px; background: var(--ink); border-radius: 6px; font-size: 12px; }
.toast-check { width: 15px; height: 15px; color: var(--ink); background: #fff; font-size: 10px; }

@media (max-width: 880px) {
  main { width: calc(100% - 28px); }
  .review-summary { align-items: flex-start; flex-direction: column; }
  .review-tally { width: 100%; }
  .tally-item { min-width: 0; flex: 1 1 56px; padding: 0 10px; }
  .tally-item:first-child { padding-left: 0; }
  .summary-tabs { overflow-x: auto; gap: 15px; }
  .summary-tab { white-space: nowrap; }
  .evidence-row, .crossref-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .evidence-field { font-size: 11px; }
}

.person-avatar { color: var(--muted); background: var(--panel-muted); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-weight: 600; }
.table-avatar { width: 28px; height: 28px; }
.applicant-row td { font-size: 13px; }
.stage-cell small, .due-cell small { color: var(--soft); }
.demo-dot, .status-tag::before, .severity-chip::before, .document-status::before, .confidence-dot { flex: 0 0 auto; }

/* Disclosure: scannable list first, proof one click down */
.finding-list { gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.finding-card { border-top: 1px solid var(--line); background: var(--panel); }
.finding-card:first-child { border-top: 0; }
.finding-card.is-resolved { background: var(--panel-muted); }
.finding-card.is-resolved .finding-claim { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.finding-summary, .passed-summary { display: grid; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; }
.finding-summary { grid-template-columns: 88px minmax(0, 1fr) auto 12px; }
.passed-summary { grid-template-columns: 16px minmax(0, 1fr) 12px; }
.finding-summary::-webkit-details-marker, .passed-summary::-webkit-details-marker { display: none; }
.finding-summary:hover, .passed-summary:hover { background: var(--panel-muted); }
.finding-claim, .passed-label { color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.45; }
.finding-headline { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.finding-card.blocking .finding-headline { color: var(--coral); }
.finding-card.confirm .finding-headline { color: var(--amber); }
.finding-card.is-resolved .finding-headline { color: var(--ready); }
.severity-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.severity-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.severity-chip.blocking { color: var(--coral); }
.severity-chip.confirm { color: var(--amber); }
.severity-chip.note { color: var(--soft); }
.disclosure { width: 12px; height: 12px; color: var(--soft); transition: transform 120ms ease; }
details[open] > summary .disclosure { transform: rotate(90deg); }

.finding-body { padding: 2px 14px 14px 116px; }
.finding-detail { margin: 0 0 12px; max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.finding-rule, .finding-action { margin: 10px 0 0; max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.finding-rule strong, .finding-action strong { color: var(--ink); font-weight: 600; }
.finding-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 11px 0 0; }
.confidence-line { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--soft); font-size: 11px; }
.rule-ref { color: var(--soft); font-size: 11px; }
.finding-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; }

.passed-list { gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.passed-row { display: block; padding: 0; border-top: 1px solid var(--line); border-bottom: 0; }
.passed-row:first-child { border-top: 0; }
.passed-body { padding: 0 14px 13px 42px; }
.passed-body p { margin: 0; max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.check-status { display: grid; place-items: center; width: 16px; height: 16px; color: var(--ready); font-size: 12px; }

@media (max-width: 880px) {
  .finding-summary { grid-template-columns: minmax(0, 1fr) 12px; row-gap: 6px; }
  .finding-summary .severity-chip { grid-row: 1; }
  .finding-summary .disclosure { grid-row: 1; grid-column: 2; }
  .finding-claim { grid-column: 1 / -1; }
  .finding-headline { grid-column: 1 / -1; white-space: normal; }
  .finding-body { padding-left: 14px; }
}
