html {
  background: var(--canvas);
}

body {
  color: var(--body);
  background: var(--canvas);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: inherit;
  letter-spacing: 0;
}

h1 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
}

h3 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}

a {
  color: var(--info);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
label:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Async page transitions focus the heading so screen readers announce the new context. */
h1[tabindex="-1"]:focus {
  outline: none;
}

/* Component display rules must not override semantic visibility. */
[hidden] {
  display: none !important;
}

.container {
  width: min(100% - 40px, 1200px);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-160%);
}

.skip-link:focus {
  left: 12px;
  transform: translateY(0);
}

.site-header {
  min-height: 72px;
  border-bottom: 1px solid var(--hairline);
  background: rgb(255 255 255 / 96%);
}

.header-row {
  min-height: 72px;
  padding-block: 8px;
  gap: 24px;
}

.brand-logo-link {
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-word {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.dev-label,
.hist-tag {
  letter-spacing: 0;
}

.brand-word b {
  color: var(--brand-red, #c91c1c);
}

.site-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--body);
  font-weight: 600;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--coral-active);
  background: var(--action-soft);
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-md);
  color: var(--ink);
}

.nav-drawer {
  background: var(--surface);
}

.nav-drawer nav a {
  min-height: 48px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
  color: var(--body);
}

.btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.btn-primary {
  color: #ffffff;
  background: var(--coral);
  border: 1px solid var(--coral);
}

.btn-primary:hover {
  color: #ffffff;
  background: var(--coral-active);
  border-color: var(--coral-active);
}

.btn-primary[disabled] {
  color: #6b7280;
  background: #e5e7eb;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.btn-primary[disabled][aria-busy="true"] {
  cursor: wait;
}

.btn-inline {
  display: inline-block;
  width: auto;
  text-decoration: none;
}

.cf-turnstile {
  margin: 12px 0;
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-border);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.btn-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px;
  color: var(--info);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--coral-active);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  padding: 54px 0 64px;
  background: var(--canvas);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 44px 64px;
  align-items: center;
}

.home-copy {
  max-width: 680px;
  grid-column: 1;
  grid-row: 1;
}

.hero h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font-size: 48px;
  line-height: 1.13;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--info);
  font-weight: 700;
}

.upload-card {
  width: 100%;
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: none;
}

.upload-card h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.upload-intro {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.dropzone {
  min-height: 205px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--control-border);
  border-radius: var(--r-md);
  background: #f9fbfd;
}

.dropzone.dragover,
.dropzone:focus-within {
  border-color: var(--focus);
  background: var(--info-soft);
}

.dropzone:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.dropzone-label {
  width: 100%;
  padding: 28px 20px;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--coral);
  background: var(--action-soft);
}

.dropzone-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.dropzone-hint {
  max-width: 340px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 13px;
}

.file-selection {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--surface-soft);
}

.file-selection[hidden] {
  display: none;
}

.file-selection > div {
  min-width: 0;
}

.file-selection strong,
.file-selection span {
  display: block;
}

.file-selection strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-selection span {
  color: var(--muted);
  font-size: 13px;
}

.file-selection .btn {
  width: auto;
}

.dropzone + .file-selection + .cf-turnstile,
.dropzone + .file-selection + .btn,
.cf-turnstile + .btn,
.file-selection + .btn {
  margin-top: 16px;
}

#submit-btn {
  width: 100%;
}

.fine-print {
  color: var(--muted);
  font-size: 13px;
}

.upload-privacy {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
}

.upload-privacy p {
  margin-bottom: 6px;
}

.upload-privacy p:last-child {
  margin-bottom: 0;
}

.home-promises {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin: -12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.home-promises li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.home-promises li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
  font-weight: 700;
}

.home-promises p {
  margin: 0;
}

.home-promises strong {
  color: var(--ink);
}

.results-wrap {
  width: min(100% - 40px, 1200px);
}

#result:not(:empty) {
  margin: 30px 0 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.result-h {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--coral-active);
}

.upload-outcome {
  width: min(100%, 760px);
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--warning);
  border-radius: var(--r-md);
  background: var(--surface);
}

.upload-outcome .eyebrow {
  margin-bottom: 6px;
  color: var(--warning);
}

.upload-outcome-heading {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.upload-outcome-detail {
  color: var(--muted);
}

.upload-outcome-detail p {
  margin: 0 0 8px;
}

.upload-outcome-detail p:last-child {
  margin-bottom: 0;
}

.audit-result {
  max-width: 1040px;
  margin-inline: auto;
}

.audit-outcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.audit-outcome > div {
  max-width: 760px;
}

.audit-outcome h2 {
  margin-bottom: 8px;
  font-size: 32px;
}

.audit-outcome p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.audit-stats {
  margin: 28px 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--hairline);
}

.audit-stats div {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--hairline);
}

.audit-stats div:first-child {
  padding-left: 0;
}

.audit-stats div:last-child {
  border-right: 0;
}

.audit-stats dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.audit-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.report-actions {
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hairline);
}

.audit-tabs button {
  min-height: 44px;
  margin-bottom: -1px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.audit-tabs button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.audit-tabs button[aria-selected="true"] {
  border-bottom-color: var(--coral);
  color: var(--ink);
}

.audit-panel {
  padding-top: 28px;
}

.audit-panel[hidden] {
  display: none;
}

.audit-severity-summary {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.result-header {
  padding: 0 0 24px;
  align-items: flex-start;
  border-bottom: 1px solid var(--hairline);
}

.grade-badge {
  min-width: 58px;
  height: 58px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 28px;
}

.remediable-num {
  color: var(--success);
  font-size: 30px;
}

.report-actions .btn {
  min-height: 44px;
  padding: 10px 14px;
}

.result-verdict {
  margin: 0 0 24px;
}

.scope-heading {
  margin-bottom: 14px;
}

.scope-heading .eyebrow {
  margin-bottom: 4px;
}

.scope-heading h3 {
  margin: 0;
  font-size: 24px;
}

.verdict {
  border: 0;
  border-top: 4px solid var(--success);
  border-radius: 0;
  padding: 18px 0 0;
  background: transparent;
}

.verdict-caveated {
  border-top-color: var(--warning);
}

.verdict-customer_context {
  border-top-color: var(--warning);
}

.verdict-human_tier,
.verdict-screening_incomplete,
.verdict-declined {
  border-top-color: var(--error);
}

.buckets {
  gap: 32px;
}

.bucket {
  min-width: 0;
}

.bucket h4 {
  font-size: 16px;
}

.bucket ul {
  color: var(--body);
}

.price-math {
  margin: 22px 0 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: baseline;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--body);
  font-size: 14px;
}

.price-math > span {
  color: var(--muted);
  font-weight: 600;
}

.price-math > strong {
  color: var(--ink);
  font-size: 22px;
}

.price-math > small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.consent {
  padding: 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.report-h {
  margin-top: 34px;
  font-size: 20px;
}

.findings-list {
  display: block;
}

.finding {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.finding.finding-flag {
  border-left: 0;
  background: transparent;
}

.finding .f-head {
  margin-bottom: 6px;
  color: var(--ink);
}

.finding .f-clauses,
.finding .f-exp,
.finding .f-fix,
.finding .f-tag {
  max-width: 820px;
}

.finding .f-tag {
  width: fit-content;
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--success-soft);
  font-size: 13px;
  font-weight: 700;
}

.finding .f-tag-flag {
  background: var(--warning-soft);
}

.sev-pill,
.val-badge,
.pdf-status,
.gate-badge {
  border-radius: var(--r-sm);
}

.f-tag-fix {
  color: var(--success);
}

.f-tag-flag {
  color: var(--warning);
}

.val-item {
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.buy-panel,
.remediation-started,
.pay-banner {
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.buy-panel {
  margin-top: 12px;
}

.buy-panel h4 {
  margin: 0 0 14px;
  font-size: 20px;
}

.checkout-summary {
  margin: 0 0 16px;
  border-block: 1px solid var(--hairline);
}

.checkout-summary div {
  min-height: 44px;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--hairline-soft);
}

.checkout-summary div:last-child {
  border-bottom: 0;
}

.checkout-summary dt {
  color: var(--muted);
}

.checkout-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.buy-panel .buy-credit {
  width: 100%;
}

.buy-opts {
  display: grid;
  grid-template-columns: 1fr;
}

.buy-opts .btn {
  width: 100% !important;
}

/* Completed audit: focused scope and order experience. */
.audit-view .hero,
.audit-view .sample-demo,
.audit-view .faq-compact {
  display: none;
}

.audit-view .results-wrap {
  width: 100%;
}

.audit-view #result:not(:empty) {
  margin: 0;
}

.btn-quiet {
  width: auto;
  border: 0;
  color: var(--info);
  background: transparent;
}

.btn-quiet:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.audit-document-context {
  padding: 20px max(20px, calc((100% - 1200px) / 2));
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.audit-document-context > * {
  max-width: 1200px;
  margin-inline: auto;
}

.audit-document-title {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.audit-document-title > div {
  min-width: 0;
}

.audit-document-title strong,
.audit-document-title span {
  display: block;
}

.audit-document-title strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-document-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.audit-lifecycle {
  margin-block: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
}

.audit-lifecycle li {
  --node-radius: 5px;
  --previous-node-radius: 5px;
  position: relative;
  padding: 18px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.audit-lifecycle li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 2px solid var(--control-border);
  border-radius: 50%;
  background: var(--surface);
  transform: translateX(-50%);
}

.audit-lifecycle li::after {
  content: "";
  position: absolute;
  right: calc(50% + var(--node-radius));
  top: 5px;
  z-index: 1;
  width: calc(100% - var(--previous-node-radius) - var(--node-radius));
  height: 2px;
  background: var(--hairline);
  transform: translateY(-50%);
}

.audit-lifecycle li:first-child::after {
  display: none;
}

.audit-lifecycle li.done,
.audit-lifecycle li.current {
  color: var(--ink);
}

.audit-lifecycle li.done::before {
  border-color: var(--success);
  background: var(--success);
}

.audit-lifecycle li.done::after,
.audit-lifecycle li.current::after {
  background: var(--success);
}

.audit-lifecycle li.current::before {
  width: 14px;
  height: 14px;
  top: -2px;
  border: 4px solid var(--action-soft);
  background: var(--coral);
}

.audit-lifecycle li.current {
  --node-radius: 7px;
}

.audit-lifecycle li.current + li {
  --previous-node-radius: 7px;
}

.audit-mobile-step {
  display: none;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.audit-result {
  width: min(100% - 40px, 1200px);
  max-width: none;
  margin: 46px auto 72px;
}

.audit-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  grid-template-areas:
    "outcome order"
    "report order";
  column-gap: 48px;
  align-items: start;
}

.audit-outcome {
  grid-area: outcome;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
}

.audit-outcome > div {
  max-width: 760px;
}

.audit-outcome .eyebrow {
  margin-bottom: 8px;
}

.audit-outcome h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.22;
}

.audit-outcome p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.audit-outcome .grade-badge {
  width: 64px;
  min-width: 64px;
  height: 64px;
  font-size: 30px;
}

.audit-report-body {
  grid-area: report;
  min-width: 0;
}

.audit-order-panel {
  position: sticky;
  top: 20px;
  grid-area: order;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.audit-order-panel .eyebrow {
  margin-bottom: 6px;
}

.audit-order-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.audit-order-panel > p:not(.eyebrow) {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.audit-order-panel > #do-remediate + .audit-report-actions {
  margin-top: 10px;
  margin-bottom: 16px;
}

.audit-caveat-note {
  padding-left: 12px;
  border-left: 3px solid #d97706;
}

.audit-order-price {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.2;
}

.audit-order-panel > .btn-primary,
.buy-panel > .btn-primary {
  width: 100%;
}

.customer-context-card {
  margin: 0;
  padding: 0;
}

.customer-context-card h2 {
  margin-top: 0;
}

.customer-context-card > p:not(.eyebrow) {
  color: var(--body);
  font-size: 14px;
}

.customer-context-why {
  padding: 10px 12px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

.customer-context-card fieldset {
  margin: 16px 0;
  padding: 0;
  border: 0;
}

.customer-context-card legend {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
}

.customer-context-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
}

.customer-context-option input {
  margin-top: 4px;
}

.customer-context-option label {
  cursor: pointer;
}

.customer-context-option label strong,
.customer-context-option label span {
  display: block;
}

.customer-context-option label span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.customer-context-card #save-customer-context {
  width: 100%;
}

.customer-context-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.customer-context-actions .btn {
  width: 100%;
}

.audit-order-benefits {
  margin: 18px 0 0;
  padding: 16px 0 0 20px;
  border-top: 1px solid var(--hairline);
  color: var(--body);
  font-size: 13px;
}

.audit-order-benefits li + li {
  margin-top: 6px;
}

.audit-report-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.audit-report-actions .btn {
  width: 100%;
  padding-inline: 10px;
}

.audit-report-actions .btn[aria-busy="true"] {
  cursor: wait;
  opacity: 0.78;
}

.audit-report-progress {
  min-height: 46px;
  padding: 10px 0 0;
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: flex-start;
  color: var(--body);
  border-top: 1px solid var(--hairline-soft);
}

.audit-report-progress > div {
  min-width: 0;
}

.audit-report-progress [role="status"],
.audit-report-progress [role="alert"] {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.audit-report-progress small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.audit-report-progress.is-ready [role="status"] {
  color: var(--success);
}

.audit-report-progress.is-error [role="alert"] {
  color: var(--error);
}

.audit-report-spinner {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  border: 2px solid var(--hairline);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: audit-report-spin 800ms linear infinite;
}

@keyframes audit-report-spin {
  to { transform: rotate(360deg); }
}

.audit-stats {
  margin: 30px 0;
}

.audit-stats dd {
  order: -1;
  font-size: 26px;
  line-height: 1.2;
}

.audit-stats > div {
  display: flex;
  flex-direction: column;
}

.audit-stats dt {
  margin-top: 4px;
  margin-bottom: 0;
}

.audit-panel > h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.audit-panel-lede {
  margin: 0 0 20px;
  color: var(--muted);
}

.audit-scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.audit-document-profile {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.audit-document-profile > h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.audit-document-profile > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.audit-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--hairline);
}

.audit-profile-grid > div {
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--hairline);
}

.audit-profile-grid > div:first-child {
  padding-left: 0;
}

.audit-profile-grid > div:last-child {
  border-right: 0;
}

.audit-profile-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-profile-grid dd {
  margin: 0;
  color: var(--body-strong);
  font-size: 14px;
  line-height: 1.45;
}

.audit-preserved-feature-scope {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--action-soft);
}

.audit-preserved-feature-scope h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.audit-preserved-feature-scope p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
}

.audit-preserved-feature-scope ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 12px 0;
  padding-left: 20px;
  color: var(--body-strong);
  font-size: 14px;
}

.audit-preserved-feature-limit {
  color: var(--muted) !important;
}

.audit-scope-section {
  min-width: 0;
}

.audit-scope-section.attention {
  padding: 18px 20px;
  border: 2px solid #d97706;
  border-radius: var(--r-md);
  background: var(--warning-soft);
}

.audit-scope-section h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.audit-scope-section > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.audit-scope-section ul {
  margin: 0;
  padding-left: 20px;
}

.audit-scope-section li {
  margin: 0 0 10px;
}

.audit-finding-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.audit-finding-row {
  display: grid;
  grid-template-columns: 92px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.audit-finding-row:first-child {
  border-top: 1px solid var(--hairline);
}

.audit-finding-page {
  padding-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.audit-finding-copy {
  min-width: 0;
}

.audit-finding-copy h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.audit-finding-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.audit-finding-copy p + p {
  margin-top: 8px;
}

.audit-finding-clauses {
  font-size: 12px !important;
}

.audit-finding-next strong {
  color: var(--body-strong);
}

.audit-scope-tag,
.audit-evidence-status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.audit-scope-tag.included,
.audit-evidence-status.pass {
  color: var(--success);
  background: var(--success-soft);
}

.audit-scope-tag.attention,
.audit-evidence-status.fail {
  color: var(--warning);
  background: var(--warning-soft);
}

.audit-scope-tag.attention {
  border: 1px solid currentcolor;
}

.checkout-scope-notice {
  margin: 16px 0;
  padding: 16px 18px;
  border: 2px solid #d97706;
  border-radius: var(--r-md);
  color: var(--body);
  background: var(--warning-soft);
}

.checkout-scope-notice strong {
  display: block;
  color: var(--ink);
}

.checkout-scope-notice p {
  margin: 8px 0 0;
}

.audit-evidence-status.unknown {
  color: var(--info);
  background: var(--info-soft);
}

.audit-evidence-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.audit-evidence-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.audit-evidence-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.audit-evidence-table th,
.audit-evidence-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.audit-evidence-table thead th {
  color: var(--body-strong);
  background: var(--surface-soft);
}

.audit-evidence-table tbody tr:last-child th,
.audit-evidence-table tbody tr:last-child td {
  border-bottom: 0;
}

.audit-loading-state {
  width: min(100% - 40px, 760px);
  margin: 72px auto;
}

.audit-loading-state h1 {
  margin-bottom: 8px;
  font-size: 34px;
}

.audit-loading-state p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.audit-loading-state .btn {
  width: auto;
}

.buy-panel h3 {
  margin: 0 0 14px;
  font-size: 19px;
}

.audit-order-panel .buy-panel {
  margin-top: 16px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}

.buy-panel .start-remediation,
.buy-panel .cancel-order-review {
  width: 100%;
}

.buy-panel .cancel-order-review {
  margin-top: 6px;
}

.sample-demo {
  padding: 60px 0;
  border-block: 1px solid var(--hairline);
  background: var(--surface);
}

.sample-demo-inner {
  padding-block: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 54px;
  align-items: center;
}

.sample-demo-copy p {
  max-width: 620px;
  color: var(--muted);
}

.sample-demo-actions {
  margin-top: 22px;
}

.sample-workbench {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.2fr);
  gap: 24px;
  align-items: center;
}

.sample-page-preview {
  position: relative;
  max-width: 330px;
  margin-inline: auto;
  border: 1px solid var(--control-border);
  background: #ffffff;
}

.sample-page-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.sample-page-highlight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sample-page-highlight rect {
  fill: rgb(21 94 239 / 12%);
  stroke: var(--focus);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.sample-reading-order {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sample-order;
}

.sample-reading-order li {
  position: relative;
  min-height: 66px;
  padding: 14px 12px 14px 54px;
  border-bottom: 1px solid var(--hairline);
  counter-increment: sample-order;
}

.sample-reading-order li::before {
  content: counter(sample-order);
  position: absolute;
  left: 10px;
  top: 13px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 700;
}

.sample-reading-order li.active {
  border-left: 4px solid var(--focus);
  background: var(--info-soft);
}

.sample-reading-order b,
.sample-reading-order small {
  display: block;
}

.sample-reading-order small {
  color: var(--muted);
}

.faq-compact {
  padding: 60px 0 72px;
}

.faq-inner {
  max-width: 860px;
}

.faq-item {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}

.faq-item summary {
  min-height: 52px;
  padding: 14px 0;
}

.site-footer {
  padding: 30px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  background: var(--canvas);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 18px 30px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
}

.site-footer p:nth-child(2) {
  flex-basis: 100%;
  order: 3;
}

.auth-area,
.auth-area-mobile {
  color: var(--muted);
}

.auth-user {
  color: var(--body);
}

/* Review workspace */
.review-page {
  min-height: 100vh;
  background: var(--canvas);
}

.review-nav {
  justify-content: center;
}

.review-nav button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.review-nav button:hover:not(.active) {
  color: var(--ink);
  background: var(--surface-soft);
}

.review-nav button.active,
.review-nav button[aria-pressed="true"] {
  border-color: var(--hairline);
  color: var(--ink);
  background: var(--surface-soft);
}

.review-nav button.supplemental {
  color: var(--muted);
  background: var(--surface);
  font-weight: 600;
}

.review-nav button.supplemental::before {
  content: "Optional";
  margin-right: 6px;
  padding: 2px 5px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.review-status {
  color: var(--muted);
}

.review-root {
  width: min(100% - 40px, 1200px);
  max-width: none;
  padding: 28px 0 80px;
}

.review-context {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.review-context .eyebrow {
  margin-bottom: 4px;
}

.review-context h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.review-context > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.ready {
  max-width: 860px;
  margin: 0;
  padding: 0;
}

.ready-badge {
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--success);
  letter-spacing: 0;
}

.ready-badge.warn {
  background: var(--warning);
}

.ready-head {
  margin: 12px 0 6px;
  font-size: 28px;
}

.ready-sub {
  max-width: 700px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 17px;
}

.ready-did {
  max-width: 760px;
}

.ready-did li {
  border-bottom-color: var(--hairline-soft);
}

.ready-score {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0;
  border-block: 1px solid var(--hairline);
}

.ready-metric,
.ready-metric.warn,
.ready-metric.ok {
  padding: 14px;
  border: 0;
  border-right: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}

.ready-metric:first-child {
  padding-left: 0;
}

.ready-metric:last-child {
  border-right: 0;
}

.ready-metric span,
.wiz-label,
.u-role {
  letter-spacing: 0;
}

.ready-match,
.ready-note,
.ready-audit-scope,
.ready-flag,
.ready-scope {
  border-radius: var(--r-md);
}

.ready-match {
  border-left-color: var(--info);
  color: var(--body);
  background: var(--info-soft);
}

.ready-standards-evidence,
.ready-capability-delivery-scope,
.ready-form-delivery-scope {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--info);
  border-radius: var(--r-md);
  color: var(--body);
  background: var(--info-soft);
}

.ready-standards-evidence.warn,
.ready-capability-delivery-scope.warn,
.ready-form-delivery-scope.warn {
  border-color: #d97706;
  background: var(--warning-soft);
}

.ready-standards-evidence h3,
.ready-capability-delivery-scope h3,
.ready-form-delivery-scope h3 {
  margin: 0 0 3px;
  font-size: 1rem;
}

.ready-standards-evidence h4,
.ready-capability-delivery-scope h4,
.ready-form-delivery-scope h4 {
  margin: 14px 0 5px;
  font-size: .9rem;
}

.ready-standards-evidence p,
.ready-capability-delivery-scope p,
.ready-form-delivery-scope p {
  margin: 7px 0;
}

.ready-standards-protocol {
  color: var(--muted);
  font-size: .82rem;
}

.ready-capability-delivery-eyebrow {
  color: var(--muted);
  font-size: .82rem;
}

.ready-form-delivery-eyebrow {
  color: var(--muted);
  font-size: .82rem;
}

.ready-standards-status strong {
  color: var(--navy);
}

.ready-standards-failures,
.ready-capability-delivery-features,
.ready-form-delivery-limits {
  margin: 0;
  padding-left: 20px;
}

.ready-standards-failures li,
.ready-capability-delivery-features li,
.ready-form-delivery-limits li {
  margin: 7px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ready-standards-failures small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.ready-standards-sources {
  font-size: .88rem;
}

.ready-ai-assessment {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--info);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ready-ai-assessment.warn {
  border-color: #d97706;
  background: var(--warning-soft);
}

.ready-ai-assessment summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 700;
  list-style: none;
}

.ready-ai-assessment summary::-webkit-details-marker {
  display: none;
}

.ready-ai-assessment summary::before {
  width: 7px;
  height: 7px;
  margin: 0 5px 0 3px;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 160ms ease;
}

.ready-ai-assessment[open] summary::before {
  transform: rotate(45deg);
}

.ready-ai-assessment p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.ready-ai-assessment .ready-standards-limit {
  margin-bottom: 0;
}

.ready-standards-limit,
.ready-standards-scope,
.ready-capability-delivery-limit,
.ready-form-delivery-limit {
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: .88rem;
}

.ready-note {
  border-color: var(--success);
  color: var(--body);
  background: var(--success-soft);
}

.ready-note.warn,
.ready-audit-scope,
.ready-flag {
  border-color: #d97706;
  color: var(--body);
  background: var(--warning-soft);
}

.ready-scope {
  color: var(--body);
  background: var(--surface-soft);
}

.ready-actions {
  padding-top: 6px;
}

.ready-primary-decision {
  max-width: 760px;
  margin: 20px 0 24px;
}

.ready-primary-decision .outcome-review-choice {
  margin-top: 0;
}

.ready-primary-decision .ready-actions {
  padding-top: 12px;
}

.ready-change-details {
  max-width: 760px;
}

.outcome-review-choice {
  max-width: 760px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.outcome-review-choice h3,
.outcome-review-choice p {
  margin: 0;
}

.outcome-review-choice p {
  margin-top: 5px;
  color: var(--muted);
}

.refund-disclosure {
  max-width: 620px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

.refund-disclosure summary {
  width: fit-content;
  min-height: 44px;
  padding: 11px 4px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.refund-disclosure > div {
  padding: 4px 0 0 20px;
}

.refund-disclosure p {
  margin: 0 0 8px;
}

.refund-disclosure .btn-quiet {
  padding-inline: 0;
}

.wiz {
  max-width: 880px;
  margin: 0;
}

.wiz-head {
  max-width: 720px;
  text-align: left;
}

.wiz-head h2 {
  font-size: 26px;
}

.wiz-actions-center {
  justify-content: center;
}

.hl,
.page-highlight {
  display: none;
}

.review-accept-btn {
  width: auto;
  background: var(--green-900);
}

.wiz-progress-copy {
  margin: 18px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wiz-progress {
  justify-content: flex-start;
  margin: 8px 0 18px;
}

.wiz-card {
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: none;
}

textarea.u-edit,
.ed-page-select,
.u-actions select,
.u-actions .row-select {
  border-color: var(--control-border);
  border-radius: var(--r-md);
}

.btn-sm {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-color: var(--control-border);
  border-radius: var(--r-md);
}

.ed-pager {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
}

.ed-pager .pager-btn,
.ed-page-select {
  height: 44px;
  min-height: 44px;
  font-size: 14px;
}

.ed-page-select {
  width: 100%;
}

.ed-page-info {
  grid-column: 1 / -1;
  margin-left: 0;
  text-align: right;
}

.ed-toolbar {
  gap: 8px;
  margin-bottom: 14px;
}

.ed-toolbar .tool-btn {
  min-height: 44px;
}

.ed-toolbar .accept-all-changes {
  margin-left: auto;
}

.ed-toolbar .accept-all-changes:disabled {
  max-width: 280px;
  white-space: normal;
}

.u-actions .item-looks-right {
  border-color: var(--success);
  color: var(--green-900);
  background: var(--success-soft);
  font-weight: 700;
}

.ed-summary,
.ed-pager,
.ed-empty {
  border-radius: var(--r-md);
}

.ed-split {
  grid-template-columns: minmax(300px, 42%) minmax(0, 1fr);
}

.ed-page,
.unit-card {
  border-radius: var(--r-md);
  box-shadow: none;
}

.unit-card {
  cursor: default;
}

.unit-card.selected {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgb(21 94 239 / 16%);
}

.unit-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.ed-page .hl {
  border-color: var(--focus);
  background: rgb(21 94 239 / 14%);
}

.u-text:focus {
  border-color: var(--focus);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.editor-mobile-switch {
  display: none;
}

.busy-card,
.toast {
  border-radius: var(--r-md);
}

.container-wide {
  width: min(100% - 40px, 1200px);
}

.document-review-tools {
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  border-top: 1px solid var(--hairline-soft);
}

.review-global-action {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  background: var(--green-900);
}

.review-acceptance-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--info);
  color: var(--body-strong);
  background: var(--info-soft);
  font-size: 14px;
}

.review-acceptance-note.blocked {
  border-left-color: var(--coral);
  background: var(--action-soft);
}

.review-acceptance-note strong {
  display: block;
  margin-bottom: 2px;
}

/* Blockers render as a list (review + accept pages) so several notes stay readable instead of
   running together into one paragraph. */
.acceptance-blocker-list {
  margin: 6px 0 0;
  padding-left: 20px;
  list-style: disc;
}

.acceptance-blocker-list li {
  margin: 2px 0;
}

.review-operation-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--info);
  color: var(--body-strong);
  background: var(--info-soft);
  font-size: 14px;
  font-weight: 600;
}

.review-operation-status.working {
  border-left-color: var(--coral);
  background: var(--action-soft);
}

.review-operation-status.success {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.review-operation-status.error {
  border-left-color: var(--error);
  color: var(--error);
  background: var(--error-soft);
}

.editor-save-state {
  flex: 0 1 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.editor-save-state.has-changes,
.save-status.has-changes {
  color: var(--warning);
  font-weight: 700;
}

.review-view-nav {
  width: 100%;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.review-tool-navigation {
  width: 100%;
  min-width: 0;
}

.review-view-panel {
  min-width: 0;
}

.review-view-panel:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

.review-tool-status {
  margin: 0 0 18px;
  border-block: 1px solid var(--hairline);
  background: var(--surface);
}

.review-tool-status dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.review-tool-status dl > div {
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--hairline);
}

.review-tool-status dl > div:first-child {
  padding-left: 0;
}

.review-tool-status dl > div:last-child {
  border-right: 0;
}

.review-tool-status dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.review-tool-status dd {
  margin: 0;
  color: var(--body-strong);
  font-size: 14px;
  line-height: 1.35;
}

.review-tool-status .dirty dd,
.review-tool-status .blocked dd,
.review-tool-status .attention dd {
  color: var(--warning);
  font-weight: 700;
}

.review-tool-status .unavailable dd {
  color: var(--muted);
}

.advanced-review-tool {
  max-width: 1040px;
}

.advanced-tool-header {
  max-width: 760px;
  margin-bottom: 16px;
}

.advanced-tool-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.advanced-tool-header p {
  margin: 0;
  color: var(--muted);
}

.advanced-tool-pager {
  margin-bottom: 14px;
}

.advanced-tool-empty {
  padding: 24px 0;
  border-block: 1px dashed var(--hairline);
}

.advanced-tool-empty .state-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.advanced-tool-empty h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.advanced-tool-empty > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.source-followup-scope {
  max-width: 880px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--warning);
  border-radius: var(--r-sm);
  background: var(--warning-soft);
  color: var(--body-strong);
  line-height: 1.5;
}

.source-followup-actions {
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.source-followup-actions .editor-save-state {
  margin: 0;
}

.source-followup-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
  counter-reset: source-followup;
}

.source-followup-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  counter-increment: source-followup;
}

.source-followup-card .advanced-table-heading {
  margin-bottom: 10px;
}

.source-followup-card h3 {
  overflow-wrap: anywhere;
}

.source-followup-card h3::before {
  content: counter(source-followup) ". ";
  color: var(--muted);
}

.source-followup-detail {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  color: var(--body);
  line-height: 1.5;
}

.source-followup-card .btn-sm {
  margin-top: 12px;
}

.tag-tree-outline {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.tag-tree-row {
  display: grid;
  grid-template-columns: 32px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}

.tag-tree-position {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.tag-tree-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-sm);
  color: var(--body-strong);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.tag-tree-copy {
  min-width: 0;
}

.tag-tree-copy strong,
.tag-tree-copy small {
  display: block;
}

.tag-tree-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}

.tag-tree-copy small {
  margin-top: 2px;
  color: var(--muted);
}

.advanced-table-list {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.ocr-review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ocr-evidence-inspector {
  min-width: 0;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-soft);
}

.ocr-inspector-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ocr-inspector-heading h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ocr-inspector-heading p {
  max-width: 72ch;
  margin: 0;
  color: var(--body);
  line-height: 1.5;
}

.ocr-inspector-heading .gate-badge {
  max-width: 270px;
  white-space: normal;
  text-align: right;
}

.ocr-inspector-split {
  display: grid;
  grid-template-columns: minmax(240px, 1.08fr) minmax(260px, .92fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.ocr-inspector-figure {
  min-width: 0;
  margin: 0;
}

.ocr-inspector-canvas {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ocr-inspector-image {
  width: 100%;
  height: auto;
  display: block;
}

.ocr-inspector-overlay {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  border: 1px solid rgb(74 85 104 / 62%);
  background: rgb(74 85 104 / 8%);
  pointer-events: none;
}

.ocr-inspector-overlay.selected {
  z-index: 4;
  border: 3px solid var(--focus);
  background: rgb(21 94 239 / 18%);
}

.ocr-inspector-overlay-unverified {
  z-index: 2;
  border-color: #d97706;
  background: rgb(217 119 6 / 13%);
}

.ocr-inspector-overlay-missing,
.ocr-inspector-overlay-uncovered {
  z-index: 3;
  border-color: var(--error);
  background: rgb(185 28 28 / 13%);
}

.ocr-inspector-overlay-unreadable,
.ocr-inspector-overlay-ungrounded {
  z-index: 2;
  border-style: dashed;
  border-color: #7c3aed;
  background: rgb(124 58 237 / 12%);
}

.image-loading .ocr-inspector-overlay {
  opacity: 0;
}

.ocr-inspector-figure figcaption,
.ocr-inspector-preview-unavailable {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ocr-inspector-preview-unavailable {
  padding: 10px 12px;
  border: 1px solid #d97706;
  border-radius: var(--r-sm);
  color: var(--body);
  background: var(--warning-soft);
}

.ocr-inspector-preview-unavailable[hidden] {
  display: none;
}

.ocr-inspector-evidence {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ocr-inspector-selection {
  margin: 0;
  color: var(--body-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ocr-inspector-comparison-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ocr-inspector-comparison-panel h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.ocr-inspector-comparison-panel p,
.ocr-inspector-no-map,
.ocr-inspector-no-selection {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--body);
  line-height: 1.5;
}

.ocr-inspector-mapping-state {
  margin-bottom: 6px !important;
  color: var(--muted) !important;
  font-size: 13px;
}

.ocr-inspector-comparison-panel .btn-sm {
  margin-top: 10px;
}

.ocr-inspector-diagnostics {
  padding: 11px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ocr-inspector-diagnostics summary {
  cursor: pointer;
  color: var(--body-strong);
  font-weight: 800;
}

.ocr-inspector-diagnostics > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ocr-inspector-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.ocr-inspector-facts div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.ocr-inspector-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ocr-inspector-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--body-strong);
  font-weight: 800;
}

.ocr-inspector-facts small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ocr-inspector-failure-reasons {
  overflow-wrap: anywhere;
}

.ocr-review-item.selected {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgb(21 94 239 / 14%);
}

.ocr-show-evidence[aria-pressed="true"] {
  border-color: var(--focus);
  color: var(--focus);
  background: var(--info-soft);
}

.ocr-contract-copy,
.ocr-reconciliation {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--body);
  background: var(--surface-soft);
}

.ocr-reconciliation h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.ocr-reconciliation p {
  margin: 0;
}

.ocr-reconciliation-facts,
.ocr-inclusion-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.ocr-reconciliation-facts div,
.ocr-inclusion-facts div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ocr-reconciliation-facts dt,
.ocr-inclusion-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ocr-reconciliation-facts dd,
.ocr-inclusion-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--body-strong);
  font-weight: 800;
}

.form-review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.form-field-facts {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.form-edit-toolbar {
  margin-top: 16px;
}

.form-label-editor {
  margin: 14px 0 10px;
}

.form-label-editor label {
  display: block;
  margin-bottom: 6px;
  color: var(--body-strong);
  font-size: 14px;
  font-weight: 700;
}

.form-label-editor input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-sm);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.form-label-editor input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
}

.form-label-editor input[aria-invalid="true"] {
  border-color: var(--error);
}

.form-widget-order {
  min-height: 44px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--hairline-soft);
}

.form-widget-order span {
  min-width: 0;
  margin-right: auto;
  overflow-wrap: anywhere;
  color: var(--body);
  font-size: 14px;
}

.ocr-token-text {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.5;
}

.ocr-disposition-reason {
  color: var(--body);
  line-height: 1.5;
}

.ocr-review-actions {
  align-items: center;
  flex-wrap: wrap;
}

.ocr-link-note {
  width: 100%;
  margin: 2px 0 0;
}

.ocr-transcript {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.ocr-transcript summary {
  cursor: pointer;
  font-weight: 700;
}

.ocr-transcript pre {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.55;
}

.ocr-transcript > p {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.5;
}

.advanced-table-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
}

.advanced-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.advanced-table-heading h3 {
  margin: 0;
  font-size: 18px;
}

.advanced-table-warning {
  margin: 0 0 10px;
  padding: 9px 10px;
  border-left: 4px solid var(--warning);
  color: var(--body);
  background: var(--warning-soft);
  font-size: 14px;
}

.table-review-confirmation {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}

.table-review-confirmation .u-reviewed,
.table-review-confirmation .field-hint {
  margin: 0;
}

.table-review-confirmation .field-hint {
  margin-top: 6px;
}

.table-structure-controls {
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 220px));
  gap: 12px;
}

.compact-field label,
.compact-field input {
  display: block;
}

.compact-field label {
  margin-bottom: 5px;
  color: var(--body-strong);
  font-size: 13px;
  font-weight: 700;
}

.compact-field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-sm);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.editable-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.editable-review-table td {
  min-width: 170px;
  vertical-align: top;
}

.table-cell-editor,
.table-cell-kind {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-sm);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.table-cell-editor {
  min-height: 72px;
  resize: vertical;
}

.table-cell-kind {
  margin-top: 6px;
}

.table-edit-caveat {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
  font-size: 14px;
}

.table-cell-span {
  margin-top: 5px;
  display: block;
  color: var(--muted);
}

.ready-technical {
  margin: 16px 0;
  padding-block: 12px;
  border-block: 1px solid var(--hairline);
}

.ready-technical > summary {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--body-strong);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.ready-technical > summary::-webkit-details-marker,
.secondary-tools-disclosure > summary::-webkit-details-marker {
  display: none;
}

.ready-technical > summary::before,
.secondary-tools-disclosure > summary::before {
  width: 20px;
  height: 20px;
  display: inline-grid;
  flex: 0 0 20px;
  place-items: center;
  content: "";
  border: 1px solid var(--control-border);
  border-radius: 999px;
  color: var(--navy);
  background: var(--surface);
}

.ready-technical > summary::after,
.secondary-tools-disclosure > summary::after {
  position: absolute;
  top: calc(50% - 3.5px);
  left: 17px;
  width: 7px;
  height: 7px;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--navy);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 160ms ease;
}

.ready-technical[open] > summary::after,
.secondary-tools-disclosure[open] > summary::after {
  transform: rotate(45deg);
}

.ready-technical > summary:hover,
.secondary-tools-disclosure > summary:hover {
  color: var(--navy);
  background: var(--surface-soft);
}

.review-notifications {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  width: min(420px, calc(100% - 40px));
  max-height: min(60vh, 560px);
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.review-notification {
  padding: 12px 12px 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: 8px;
  border: 1px solid var(--control-border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-md);
  color: var(--body-strong);
  background: var(--surface);
  box-shadow: 0 12px 28px rgb(16 24 40 / 14%);
}

.review-notification.err {
  border-left-color: var(--error);
  background: var(--error-soft);
}

.review-notification p {
  margin: 5px 0;
  overflow-wrap: anywhere;
}

.review-notification-dismiss {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  color: var(--body-strong);
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.review-main {
  padding: 28px 0 64px;
}

.review-topline {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.review-topline h1 {
  margin-bottom: 4px;
  font-size: 30px;
}

.review-topline .supporting {
  max-width: 720px;
  margin: 0;
}

.review-progress {
  min-width: 180px;
  flex: 0 0 auto;
  text-align: right;
}

.review-progress strong,
.review-progress > span {
  display: block;
}

.review-progress > span {
  color: var(--muted);
  font-size: 13px;
}

.review-progress-track {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface-cream-strong);
}

.review-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 240ms ease;
}

.unified-review-overview {
  max-width: 920px;
}

.unified-review-overview > h2 {
  margin-bottom: 6px;
}

.unified-review-queue {
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.unified-review-card {
  min-width: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.unified-review-card h3,
.unified-review-card p {
  margin: 0;
}

.unified-review-card p {
  margin-top: 4px;
  color: var(--muted);
}

.review-queue-complete {
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.unified-review-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.content-choice-related {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--info);
  background: var(--info-soft);
  font-size: 14px;
}

.content-choice-related ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.review-overview-back {
  min-height: 44px;
  margin-bottom: 8px;
}

.secondary-tools-disclosure {
  max-width: 760px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.secondary-tools-disclosure > summary {
  position: relative;
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--r-sm);
  color: var(--body-strong);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.secondary-tools-disclosure > p {
  margin: 8px 10px;
  color: var(--muted);
}

.secondary-tools-actions {
  padding: 0 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-followup-disclosure .advanced-review-tool {
  padding: 8px 10px 0;
}

.guided-review {
  max-width: none;
}

.mobile-view-switch {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-md);
  background: var(--surface-soft);
}

.mobile-view-switch button {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.mobile-view-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(23 33 43 / 12%);
}

.review-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 58%) minmax(360px, 42%);
  gap: 0;
  align-items: start;
  overflow: visible;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.preview-pane {
  position: sticky;
  top: 92px;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 28px;
  display: grid;
  align-content: start;
  overflow-x: auto;
  overflow-y: visible;
  border: 0;
  border-radius: 0;
  background: var(--surface-dark-soft);
}

.preview-pane .page-caption {
  margin: 10px 0 0;
  color: var(--on-dark-soft);
  text-align: center;
}

.pdf-page {
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
  border: 1px solid var(--control-border);
  background: #ffffff;
  box-shadow: 0 10px 28px rgb(0 0 0 / 24%);
}

.pdf-page img {
  width: 100%;
  height: auto;
  display: block;
}

.page-image-frame {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface);
}

.page-image-frame img {
  opacity: 1;
  transition: opacity 160ms ease;
}

.page-image-frame.image-loading img,
.page-image-frame.image-load-error img {
  opacity: 0;
}

.page-image-status {
  position: absolute;
  inset: 0;
  z-index: 4;
  min-height: 180px;
  padding: 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--body-strong);
  background: var(--surface-soft);
  text-align: center;
}

.page-image-status[hidden] {
  display: none;
}

.page-image-spinner {
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 3px solid var(--hairline);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: page-image-spin 800ms linear infinite;
}

.page-image-status-copy {
  font-size: 14px;
  font-weight: 700;
}

.page-image-retry {
  background: var(--surface);
}

@keyframes page-image-spin {
  to {
    transform: rotate(360deg);
  }
}

.page-highlight {
  position: absolute;
  border: 3px solid var(--focus);
  background: rgb(21 94 239 / 14%);
  pointer-events: none;
}

.task-pane.wiz-card {
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto auto;
  overflow: visible;
  border: 0;
  border-left: 1px solid var(--hairline);
  border-radius: 0;
}

#review-item-state {
  min-height: 0;
  padding: 28px;
  overflow: visible;
}

.task-pane h2 {
  font-size: 24px;
}

.issue-kicker {
  margin-bottom: 8px;
  color: var(--warning);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.change-summary {
  margin: 20px 0;
  padding: 14px 0;
  border-block: 1px solid var(--hairline);
}

.change-summary h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.change-summary p + h3 {
  margin-top: 14px;
}

.change-summary p:last-child {
  margin-bottom: 0;
}

.checker-detail {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.checker-detail summary {
  width: fit-content;
  min-height: 44px;
  padding-block: 12px;
  display: list-item;
  color: var(--link);
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.checker-detail[open] summary {
  margin-bottom: 8px;
}

.checker-scope {
  color: var(--ink-soft);
}

.checker-notes {
  margin: 8px 0 0;
  padding-left: 20px;
}

.checker-notes li + li {
  margin-top: 6px;
}

.review-playback {
  align-items: center;
}

.review-reading-order {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.review-reading-order li {
  padding: 12px 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid var(--hairline);
}

.review-reading-order .order-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 700;
}

.review-reading-order li strong,
.review-reading-order li small {
  display: block;
}

.review-reading-order li small {
  color: var(--muted);
}

.review-reading-order li.changed {
  border-left: 4px solid var(--coral);
  background: var(--action-soft);
}

.review-reading-order li.changed .order-number {
  color: #ffffff;
  background: var(--coral);
}

.review-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.review-actions .btn,
.review-playback .btn {
  width: auto;
}

.edit-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-soft);
}

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  margin-bottom: 6px;
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-md);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.field textarea {
  min-height: 116px;
  resize: vertical;
}

.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-footer-actions {
  margin: 0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: 0 -8px 20px rgb(23 33 43 / 6%);
  position: sticky;
  z-index: 2;
  bottom: 0;
}

.review-footer-actions .btn {
  width: auto;
}

.save-status {
  color: var(--muted);
  font-size: 13px;
}

.reading-order-jump {
  margin-top: 18px;
}

.review-summary-state {
  max-width: 820px;
  margin-inline: auto;
}

.review-summary-state > h2 {
  font-size: 28px;
}

.summary-band {
  margin: 28px 0;
  padding: 22px 0;
  border-block: 1px solid var(--hairline);
}

.summary-band dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.summary-band dt {
  color: var(--muted);
  font-size: 13px;
}

.summary-band dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.review-summary-actions {
  align-items: center;
}

/* Reminder that guided edits are deferred until one batch apply from the summary. */
.summary-pending-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
  color: var(--body-strong);
  font-size: 14px;
}

/* Processing and status flow */
.document-context {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.document-context-inner {
  padding-block: 16px 18px;
}

.document-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.document-name {
  min-width: 0;
}

.document-name strong,
.document-name span {
  display: block;
}

.document-name strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-name span {
  color: var(--muted);
  font-size: 13px;
}

.job-context-action {
  width: auto;
  flex: 0 0 auto;
}

.lifecycle {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
}

.lifecycle-audit {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lifecycle li {
  --node-radius: 5px;
  --previous-node-radius: 5px;
  position: relative;
  padding: 18px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.lifecycle li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 2px solid var(--control-border);
  border-radius: 50%;
  background: var(--surface);
  transform: translateX(-50%);
}

.lifecycle li::after {
  content: "";
  position: absolute;
  right: calc(50% + var(--node-radius));
  top: 5px;
  z-index: 1;
  width: calc(100% - var(--previous-node-radius) - var(--node-radius));
  height: 2px;
  background: var(--hairline);
  transform: translateY(-50%);
}

.lifecycle li:first-child::after {
  display: none;
}

.lifecycle li.done,
.lifecycle li.current {
  color: var(--ink);
}

.lifecycle li.done::before {
  border-color: var(--success);
  background: var(--success);
}

.lifecycle li.done::after,
.lifecycle li.current::after {
  background: var(--success);
}

.lifecycle li.current::before {
  top: -2px;
  width: 14px;
  height: 14px;
  border: 4px solid var(--action-soft);
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--coral);
}

.lifecycle li.current {
  --node-radius: 7px;
}

.lifecycle li.current + li {
  --previous-node-radius: 7px;
}

.lifecycle li.current.failed::before {
  border-color: var(--error-soft);
  background: var(--error);
  box-shadow: 0 0 0 2px var(--error);
}

.mobile-step {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-main,
.job-main {
  padding: 48px 0 72px;
}

.processing-shell,
.job-card {
  width: min(100% - 40px, 760px);
  max-width: 760px;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.processing-header h1 {
  margin-bottom: 10px;
  font-size: 36px;
  overflow-wrap: anywhere;
}

.job-kicker {
  letter-spacing: 0;
}

.job-reassurance {
  max-width: 680px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 17px;
}

.processing-status {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.job-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
}

.job-status-head h2 {
  margin: 0;
  font-size: 20px;
}

.job-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: #ffffff;
  background: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.job-pill-queued,
.job-pill-running {
  background: var(--warning);
}

.job-pill-succeeded {
  background: var(--success);
}

.job-pill-failed {
  background: var(--error);
}

.job-message {
  margin: 0;
  color: var(--body-strong);
}

.progress-track,
.job-progress {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface-cream-strong);
}

.progress-bar,
.job-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 300ms ease;
}

.job-progress-failed .job-progress span {
  background: var(--error);
}

.job-meta,
.supporting {
  color: var(--muted);
  font-size: 13px;
}

.job-meta {
  margin: 0;
}

.processing-status > .supporting {
  margin: 8px 0 0;
}

.process-stages {
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.process-stage {
  --stage-node-size: 24px;
  --stage-node-top: 4px;
  --stage-node-center: 20px;
  position: relative;
  isolation: isolate;
  min-height: 62px;
  padding: 5px 0 18px 46px;
}

.process-stage::before {
  content: "";
  position: absolute;
  left: var(--stage-node-center);
  top: var(--stage-node-top);
  z-index: 2;
  box-sizing: border-box;
  width: var(--stage-node-size);
  height: var(--stage-node-size);
  border: 2px solid var(--control-border);
  border-radius: 50%;
  background: var(--surface);
  transform: translateX(-50%);
}

.process-stage::after {
  content: "";
  position: absolute;
  left: calc(var(--stage-node-center) - 1px);
  top: calc(var(--stage-node-top) + var(--stage-node-size));
  bottom: calc(0px - var(--stage-node-top));
  z-index: 1;
  width: 2px;
  background: var(--hairline);
}

.process-stage:last-child::after {
  display: none;
}

.process-stage.done::before {
  content: "\2713";
  display: grid;
  place-items: center;
  border-color: var(--success);
  color: #ffffff;
  background: var(--success);
  font-size: 14px;
  font-weight: 700;
}

.process-stage.done::after {
  background: var(--success);
}

.process-stage.current::before {
  border: 6px solid var(--action-soft);
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--coral);
}

.process-stage.current.failed::before {
  border-color: var(--error-soft);
  background: var(--error);
  box-shadow: 0 0 0 2px var(--error);
}

.process-stage strong,
.process-stage span {
  display: block;
}

.process-stage strong {
  color: var(--ink);
}

.process-stage span {
  color: var(--muted);
  font-size: 13px;
}

.button-row,
.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.job-actions {
  margin-top: 22px;
}

.job-action {
  width: auto;
}

.job-details {
  margin-top: 28px;
}

.job-details h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.job-facts {
  margin: 0;
  border-block: 1px solid var(--hairline);
}

.job-fact {
  min-height: 46px;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--hairline-soft);
}

.job-fact:last-child {
  border-bottom: 0;
}

.job-fact dt {
  color: var(--muted);
}

.job-fact dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.ready-callout {
  margin-top: 28px;
  padding: 20px;
  border-left: 4px solid var(--success);
  background: var(--success-soft);
}

.ready-callout h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.ready-callout p {
  margin: 0 0 16px;
}

.job-outcome-failed {
  border-left-color: var(--error);
  background: var(--error-soft);
}

/* Acceptance and completed-download stages */
.stage-main {
  min-height: 520px;
}

.accept-shell,
.complete-shell {
  max-width: 820px;
  margin-inline: auto;
}

.stage-heading {
  max-width: 760px;
}

.stage-heading h1,
.success-heading h1 {
  margin-bottom: 10px;
  font-size: 36px;
}

.stage-heading .lede,
.complete-shell > .lede {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.stage-loading {
  margin: 30px 0;
  padding: 20px 0;
  border-block: 1px solid var(--hairline);
  color: var(--muted);
}

.stage-error,
.deleted-state {
  margin-top: 28px;
  padding: 24px;
  border-left: 4px solid var(--error);
  background: var(--error-soft);
}

.deleted-state {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.stage-error h2,
.deleted-state h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.stage-status,
.download-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.stage-status.acceptance-advisory,
.stage-status.acceptance-blocked {
  padding: 10px 12px;
  border-left: 4px solid var(--info);
  color: var(--body-strong);
  background: var(--info-soft);
}

.stage-status.acceptance-blocked {
  border-left-color: var(--coral);
  background: var(--action-soft);
}

.download-status.working::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid var(--hairline);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: audit-report-spin 800ms linear infinite;
}

.stage-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.stage-actions .btn {
  width: auto;
}

.accept-review-level {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  border: 0;
}

.accept-review-level legend {
  margin-bottom: 10px;
  color: var(--body-strong);
  font-size: 20px;
  font-weight: 800;
}

.accept-review-option {
  min-height: 64px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--surface);
}

.accept-review-option:hover {
  border-color: var(--navy);
  background: var(--surface-soft);
}

.accept-review-option:has(input:checked) {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
  background: var(--info-soft);
}

.accept-review-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.accept-review-option strong,
.accept-review-option small {
  display: block;
}

.accept-review-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.accept-primary-actions {
  margin-top: 14px;
}

.remaining-section {
  margin-top: 32px;
}

.remaining-section h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.remaining-section > p {
  max-width: 720px;
  color: var(--muted);
}

.remaining-list {
  margin: 20px 0 28px;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.remaining-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.remaining-list li > p {
  margin: 6px 0 0;
  color: var(--body);
}

.remaining-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
}

.remaining-source {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.remaining-empty {
  margin: 20px 0 28px;
  padding: 18px 0;
  border-block: 1px solid var(--hairline);
  color: var(--success);
  font-weight: 700;
}

.accept-notice,
.retention-notice {
  margin-top: 26px;
  padding: 20px;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
}

.accept-notice h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.accept-notice p,
.retention-notice p {
  margin: 0;
}

.stage-dialog {
  width: min(100% - 32px, 620px);
  max-height: min(86vh, 720px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--control-border);
  border-radius: var(--r-lg);
  color: var(--body);
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(23 33 43 / 24%);
}

.stage-dialog::backdrop {
  background: rgb(23 33 43 / 58%);
}

.stage-dialog-header,
.stage-dialog-body,
.stage-dialog-actions {
  padding: 20px 24px;
}

.stage-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--hairline);
}

.stage-dialog-header .eyebrow {
  margin-bottom: 2px;
}

.stage-dialog-header h2 {
  margin: 0;
  font-size: 24px;
}

.stage-dialog-close {
  width: auto;
  flex: 0 0 auto;
}

.stage-dialog-body p:first-child {
  margin-top: 0;
}

.stage-dialog-body p:last-child {
  margin-bottom: 0;
}

.stage-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
}

.stage-dialog-actions .btn {
  width: auto;
}

.refund-field {
  margin-top: 18px;
}

.refund-field label {
  margin-bottom: 6px;
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.refund-field label span {
  color: var(--muted);
  font-weight: 400;
}

.refund-field select,
.refund-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--r-md);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.refund-field textarea {
  min-height: 108px;
  resize: vertical;
}

.refund-ack {
  min-height: 44px;
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--body);
  cursor: pointer;
}

.refund-ack input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.refund-confirm {
  border-color: var(--error);
  color: #ffffff;
  background: var(--error);
}

.refund-confirm:hover {
  border-color: #991b1b;
  background: #991b1b;
}

.success-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}

.success-heading .eyebrow {
  margin-bottom: 2px;
}

.success-heading h1 {
  margin-bottom: 0;
}

.success-mark {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--success);
}

.download-list {
  margin: 30px 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.download-row {
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
}

.download-row .btn {
  width: auto;
}

.download-copy {
  min-width: 0;
}

.download-copy strong,
.download-copy span {
  display: block;
}

.download-copy span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.stage-delete-action {
  margin-left: auto;
  color: var(--error);
}

.stage-delete-action:hover {
  color: var(--error);
  background: var(--error-soft);
}

.stage-delete-confirm {
  color: #ffffff;
  border: 1px solid var(--error);
  background: var(--error);
}

.stage-delete-confirm:hover {
  color: #ffffff;
  background: #8f1b13;
}

.my-pdfs-main {
  padding: 46px 0 72px;
}

.my-pdfs-hero {
  align-items: flex-end;
  margin-bottom: 30px;
}

.my-pdfs-hero h1 {
  margin-bottom: 8px;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0;
}

.my-pdfs-shell {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pdf-list-head {
  padding-bottom: 0;
  border-bottom: 1px solid var(--hairline);
}

.pdf-tabs {
  gap: 20px;
}

.pdf-tab {
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.pdf-tab.is-active {
  color: var(--coral-active);
  border-color: var(--coral);
  background: transparent;
}

.pdf-tab.is-active span {
  color: var(--muted);
}

.pdf-list {
  gap: 0;
}

.pdf-card {
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}

.pdf-grade {
  border-radius: var(--r-md);
}

.pdf-card h3 {
  font-size: 16px;
}

.pdf-status {
  padding: 4px 8px;
  border-radius: var(--r-sm);
}

.pdf-actions .btn {
  min-height: 44px;
}

.empty-state {
  padding: 56px 18px;
}

.sample-page {
  padding-bottom: 72px;
}

.sample-hero h1 {
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0;
}

.sample-grade,
.sample-price,
.sample-columns article,
.sample-findings {
  border-radius: var(--r-lg);
  box-shadow: none;
}

/* This panel is also a page-width .container, whose gutter reset would remove
   the card's horizontal inset. Keep the fix local to the sample report. */
.sample-page .sample-findings {
  padding-inline: 22px;
}

/* Privacy and terms pages */
.policy-main {
  padding: 48px 0 80px;
}

.policy-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 780px);
  justify-content: center;
  align-items: start;
  column-gap: 64px;
  row-gap: 30px;
}

.policy-toc {
  position: sticky;
  top: 104px;
  grid-column: 1;
  grid-row: 2;
}

.policy-toc h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
}

.policy-toc nav {
  display: flex;
  flex-direction: column;
}

.policy-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.policy-toc a:hover {
  color: var(--coral-active);
  text-decoration: underline;
}

.policy-article {
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
}

.policy-heading {
  grid-column: 2;
  grid-row: 1;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--hairline);
}

.policy-heading h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.2;
}

.policy-updated {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.policy-lede {
  max-width: 68ch;
  margin: 0;
  color: var(--body);
  font-size: 18px;
  line-height: 1.6;
}

.policy-summary {
  margin-top: 0;
  padding: 22px 24px;
  border-left: 4px solid var(--coral);
  background: var(--action-soft);
}

.policy-summary h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.policy-summary ul,
.policy-section ul {
  margin: 0;
  padding-left: 24px;
}

.policy-summary li,
.policy-section li {
  margin: 8px 0;
}

.policy-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 96px;
}

.policy-article > .policy-section:first-child {
  padding-top: 0;
}

.policy-section h2,
.policy-contact h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.3;
}

.policy-section h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.policy-section p {
  max-width: 72ch;
  margin: 0 0 16px;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-contact {
  padding-top: 32px;
}

.policy-contact p {
  margin: 0;
}

@media (max-width: 960px) {
  .hero-grid,
  .sample-demo-inner,
  .sample-workbench {
    grid-template-columns: 1fr;
  }

  .home-copy,
  .upload-card,
  .home-promises {
    grid-column: auto;
    grid-row: auto;
  }

  .home-promises {
    margin-top: 0;
  }

  .sample-page-preview {
    max-width: 390px;
  }

  .ready-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ready-metric:nth-child(2) {
    border-right: 0;
  }

  .ready-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hairline);
  }

  .ed-split {
    grid-template-columns: 1fr;
  }

  .ocr-inspector-split {
    grid-template-columns: 1fr;
  }

  .editor-mobile-switch {
    width: 100%;
    margin: 0 0 14px;
    padding: 3px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    background: var(--surface-soft);
  }

  .editor-mobile-switch button {
    min-height: 44px;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 700;
  }

  .editor-mobile-switch button[aria-pressed="true"] {
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 1px 2px rgb(23 33 43 / 12%);
  }

  .ed-split.show-reading .ed-page,
  .ed-split.show-preview .ed-list-pane {
    display: none;
  }

  .ed-page {
    position: static;
  }

  .review-workspace {
    height: auto;
    min-height: 0;
    display: block;
  }

  .review-workspace.mobile-order .preview-pane,
  .review-workspace.mobile-preview .task-pane {
    display: none;
  }

  .preview-pane,
  .task-pane.wiz-card {
    height: auto;
    min-height: 0;
  }

  .preview-pane {
    position: static;
    overflow-x: auto;
    overflow-y: visible;
  }

  .task-pane.wiz-card {
    display: block;
    overflow: visible;
    border-left: 0;
  }

  #review-item-state {
    overflow: visible;
  }

  .review-footer-actions {
    position: static;
  }

  .policy-layout {
    grid-template-columns: minmax(0, 780px);
    gap: 32px;
  }

  .policy-heading,
  .policy-toc,
  .policy-article {
    grid-column: auto;
    grid-row: auto;
  }

  .policy-toc {
    position: static;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hairline);
  }

  .policy-toc nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (max-width: 720px) {
  .sample-page .sample-findings {
    padding-inline: 16px;
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  .container,
  .results-wrap {
    width: min(100% - 32px, 1200px);
  }

  .site-header,
  .header-row {
    min-height: 64px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-word {
    font-size: 17px;
  }

  .hero {
    padding: 34px 0 48px;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero h1 {
    font-size: 34px;
    line-height: 1.2;
  }

  .hero-copy {
    font-size: 17px;
  }

  .ocr-inspector-heading {
    flex-direction: column;
  }

  .ocr-inspector-heading .gate-badge {
    max-width: none;
    text-align: left;
  }

  .home-promises {
    display: none;
  }

  .upload-card {
    padding: 20px;
  }

  .upload-outcome {
    padding: 18px 20px;
  }

  .dropzone {
    min-height: 170px;
  }

  .file-selection {
    grid-template-columns: 1fr;
  }

  .file-selection .btn {
    width: 100%;
  }

  .sample-demo {
    padding: 46px 0;
  }

  .sample-demo-actions,
  .sample-demo-actions .btn {
    width: 100%;
  }

  .sample-workbench {
    gap: 18px;
  }

  .container-wide {
    width: min(100% - 32px, 1200px);
  }

  .document-review-tools {
    display: block;
  }

  .review-global-action {
    width: 100%;
    margin-top: 12px;
    white-space: normal;
  }

  .ed-toolbar .spacer {
    display: none;
  }

  .editor-save-state {
    flex-basis: 100%;
    order: 2;
  }

  .review-view-nav {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .review-view-nav button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .review-view-nav button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .review-tool-navigation {
    width: 100%;
  }

  .review-tool-status dl {
    grid-template-columns: 1fr;
  }

  .review-tool-status dl > div,
  .review-tool-status dl > div:first-child {
    padding: 9px 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline-soft);
  }

  .review-tool-status dl > div:last-child {
    border-bottom: 0;
  }

  .tag-tree-row {
    grid-template-columns: 28px 64px minmax(0, 1fr);
  }

  .tag-tree-row .btn-sm {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .advanced-table-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .advanced-table-heading .btn-sm {
    width: 100%;
  }

  .form-edit-toolbar .tool-btn {
    width: 100%;
  }

  .form-widget-order {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .form-widget-order span {
    width: 100%;
    margin-right: 0;
  }

  .table-structure-controls {
    grid-template-columns: 1fr;
  }

  .advanced-table-item {
    padding: 12px;
  }

  .editable-table-wrap {
    overflow-x: visible;
  }

  .editable-review-table,
  .editable-review-table tbody,
  .editable-review-table tr,
  .editable-review-table td {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: block;
  }

  .editable-review-table {
    border-collapse: separate;
  }

  .editable-review-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    overflow: hidden;
  }

  .editable-review-table td {
    padding: 10px;
    border: 0;
    border-bottom: 1px solid var(--hairline-soft);
  }

  .editable-review-table td:last-child {
    border-bottom: 0;
  }

  .editable-review-table td::before {
    content: attr(data-cell-label);
    margin-bottom: 5px;
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .table-review-confirmation .btn {
    width: 100%;
    white-space: normal;
  }

  .review-notifications {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }

  .review-status {
    margin-top: 8px;
  }

  .review-main {
    padding: 22px 0 56px;
  }

  .review-topline {
    display: block;
  }

  .review-topline h1 {
    font-size: 28px;
  }

  .review-progress {
    min-width: 0;
    margin-top: 14px;
    text-align: left;
  }

  .review-progress strong,
  .review-progress > span {
    display: inline;
  }

  .review-progress > span::before {
    content: " | ";
  }

  .review-workspace,
  .preview-pane,
  .task-pane.wiz-card {
    min-height: 0;
  }

  .preview-pane,
  .task-pane.wiz-card {
    padding: 20px;
  }

  .task-pane.wiz-card {
    padding: 0;
  }

  #review-item-state,
  .review-footer-actions {
    padding-inline: 20px;
  }

  .review-actions,
  .review-footer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .review-actions .btn,
  .review-actions .btn-link,
  .review-footer-actions .btn,
  .review-footer-actions .btn-link {
    width: 100%;
  }

  .review-footer-actions > .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ed-pager {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
  }

  .ed-pager .pager-btn {
    min-width: 44px;
    padding-inline: 8px;
  }

  .ed-page-select {
    min-width: 0;
    padding-inline: 8px 28px;
  }

  .ed-page-info {
    text-align: left;
  }

  .summary-band dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .summary-band dl > div {
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
  }

  .summary-band dl > div:last-child {
    border-bottom: 0;
  }

  .review-context {
    margin-bottom: 22px;
  }

  .review-context h1,
  .ready-head {
    font-size: 24px;
  }

  .ready-score {
    grid-template-columns: 1fr;
  }

  .ready-metric,
  .ready-metric:first-child,
  .ready-metric:nth-child(2) {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .ready-metric:last-child {
    border-bottom: 0;
  }

  .ready-actions,
  .ready-actions .btn,
  .wiz-actions .btn,
  .wiz-actions .btn-sm {
    width: 100% !important;
  }

  .refund-disclosure {
    max-width: none;
  }

  .refund-disclosure > div {
    padding-left: 0;
  }

  .refund-disclosure .btn {
    width: auto !important;
    text-align: left;
  }

  .wiz-card {
    padding: 16px;
  }

  .wiz-thumb {
    width: 100%;
    margin: 0 0 16px;
    float: none;
  }

  .ed-toolbar .spacer {
    display: none;
  }

  .audit-outcome {
    gap: 16px;
  }

  .audit-outcome h2 {
    font-size: 26px;
  }

  .audit-stats {
    grid-template-columns: 1fr;
  }

  .audit-stats div,
  .audit-stats div:first-child {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .audit-stats div:last-child {
    border-bottom: 0;
  }

  .audit-tabs {
    max-width: calc(100vw - 32px);
    overflow-x: auto;
  }

  .audit-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .price-math {
    grid-template-columns: 1fr;
  }

  .price-math > small {
    grid-column: auto;
  }

  .result-header {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .remediable {
    text-align: left;
  }

  .result-header-text {
    grid-column: 1 / -1;
  }

  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-actions .btn,
  .verdict .btn {
    width: 100%;
  }

  .buckets {
    grid-template-columns: 1fr;
  }

  .site-footer .container {
    display: block;
  }

  .site-footer p {
    margin-bottom: 10px;
  }

  .job-main {
    padding-top: 32px;
  }

  .job-card {
    padding: 0;
  }

  .my-pdfs-hero h1,
  .sample-hero h1 {
    font-size: 32px;
  }

  .policy-main {
    padding: 32px 0 56px;
  }

  .policy-heading h1 {
    font-size: 32px;
  }

  .policy-lede {
    font-size: 17px;
  }

  .policy-summary {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .policy-toc nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .audit-flow-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "outcome"
      "order"
      "report";
    row-gap: 26px;
  }

  .audit-order-panel {
    position: static;
  }

  .audit-order-panel > .btn-primary {
    width: 100%;
  }

  .audit-report-body .audit-stats {
    margin-top: 4px;
  }
}

@media (max-width: 720px) {
  .document-context-inner {
    padding-block: 14px 16px;
  }

  .document-title-row {
    margin-bottom: 0;
  }

  .document-title-row .btn {
    padding-inline: 10px;
  }

  .lifecycle {
    display: none;
  }

  .mobile-step {
    display: block;
    margin-top: 10px;
  }

  .flow-main,
  .job-main {
    padding: 32px 0 56px;
  }

  .processing-shell,
  .job-card {
    width: min(100% - 32px, 760px);
  }

  .processing-header h1 {
    font-size: 30px;
  }

  .processing-status {
    padding: 20px;
  }

  .job-status-head {
    display: block;
  }

  .job-pill {
    display: inline-block;
    margin-top: 10px;
  }

  .stack-mobile,
  .job-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stack-mobile .btn,
  .job-actions .btn,
  .job-actions .job-action {
    width: 100%;
  }

  .job-fact {
    align-items: flex-start;
  }

  .stage-heading h1,
  .success-heading h1 {
    font-size: 30px;
  }

  .stage-actions,
  .stage-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stage-actions .btn,
  .stage-dialog-actions .btn {
    width: 100%;
  }

  .stage-delete-action {
    margin-left: 0;
  }

  .remaining-item-head {
    display: block;
  }

  .remaining-source {
    display: block;
    margin-top: 3px;
  }

  .download-row {
    grid-template-columns: 1fr;
  }

  .download-row .btn {
    width: 100%;
  }

  .stage-dialog-header,
  .stage-dialog-body,
  .stage-dialog-actions {
    padding: 18px;
  }

  .stage-dialog-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stage-dialog-close {
    align-self: start;
  }

  .audit-document-context {
    padding: 16px;
  }

  .audit-document-title {
    margin-bottom: 8px;
  }

  .audit-document-title .btn {
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .audit-lifecycle {
    display: none;
  }

  .audit-mobile-step {
    display: block;
  }

  .audit-result {
    width: min(100% - 32px, 1200px);
    margin: 32px auto 56px;
  }

  .audit-outcome {
    display: block;
  }

  .audit-outcome .grade-badge {
    width: 54px;
    min-width: 54px;
    height: 54px;
    margin-bottom: 14px;
    font-size: 26px;
  }

  .audit-outcome h1 {
    font-size: 30px;
  }

  .audit-order-panel {
    padding: 18px;
  }

  .audit-order-panel > #do-remediate {
    margin-top: 10px;
  }

  .audit-order-benefits {
    display: none;
  }

  .audit-report-actions {
    grid-template-columns: 1fr;
  }

  .audit-scope-columns {
    grid-template-columns: 1fr;
  }

  .audit-profile-grid {
    grid-template-columns: 1fr;
  }

  .audit-profile-grid > div,
  .audit-profile-grid > div:first-child {
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline-soft);
  }

  .audit-profile-grid > div:last-child {
    border-bottom: 0;
  }

  .audit-scope-section.attention {
    padding: 18px;
    border: 2px solid #d97706;
  }

  .audit-finding-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }

  .audit-finding-row > .sev-pill {
    grid-column: 1;
  }

  .audit-finding-page {
    grid-column: 2;
  }

  .audit-finding-copy,
  .audit-scope-tag {
    grid-column: 1 / -1;
  }

  .audit-loading-state {
    width: min(100% - 32px, 760px);
    margin-block: 48px;
  }
}

@media (forced-colors: active) {
  .grade-badge,
  .audit-scope-tag,
  .audit-evidence-status,
  .audit-lifecycle li::before,
  .lifecycle li::before,
  .process-stage::before,
  .progress-track {
    border: 1px solid CanvasText;
    forced-color-adjust: auto;
  }

  .audit-lifecycle li::after,
  .lifecycle li::after,
  .process-stage::after {
    background: CanvasText;
    forced-color-adjust: none;
  }

  .audit-lifecycle li.done::after,
  .audit-lifecycle li.current::after,
  .lifecycle li.done::after,
  .lifecycle li.current::after,
  .process-stage.done::after {
    background: Highlight;
  }

  .audit-report-spinner {
    border-color: CanvasText;
    border-top-color: Highlight;
    forced-color-adjust: none;
  }

  .page-image-spinner {
    border-color: CanvasText;
    border-top-color: Highlight;
    forced-color-adjust: none;
  }

  .ready-capability-delivery-scope,
  .ready-ai-assessment {
    border-color: CanvasText;
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audit-report-spinner {
    animation: none;
  }

  .page-image-spinner {
    animation: none;
    border-top-color: currentColor;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Explicit, content-owner decisions for AI-suggested semantic descriptions. */
.content-choice-list {
  display: grid;
  gap: 18px;
  margin: 20px 0;
}

.content-choice-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(23, 33, 43, .08);
}

.content-choice-card > .issue-kicker,
.content-choice-card > h3 {
  grid-column: 1 / -1;
  margin: 0;
}

.content-choice-preview {
  min-width: 0;
  align-self: start;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-soft);
}

.content-choice-copy {
  min-width: 0;
}

.content-choice-copy h4 {
  margin: 0 0 7px;
  font-size: .95rem;
}

.content-choice-announced {
  margin: 0;
  padding: 12px;
  border-left: 3px solid var(--focus);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--info-soft);
  color: var(--ink);
  white-space: pre-wrap;
}

.content-choice-reason,
.content-choice-state {
  margin: 13px 0 0;
}

.content-choice-state {
  font-size: .9rem;
  color: var(--body);
}

.content-choice-actions {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  align-items: stretch;
}

.content-choice-actions legend {
  padding: 0;
  margin: 0 0 2px;
  color: var(--ink);
  font-weight: 700;
}

.content-choice-option {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.35;
}

.content-choice-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--focus);
}

.content-choice-option:focus-within {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.content-choice-option:has(input:checked) {
  border-color: var(--focus);
  background: var(--info-soft);
}

.content-choice-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: .7;
}

.content-choice-footer {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .content-choice-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .unified-review-queue {
    grid-template-columns: 1fr;
  }

  .unified-review-card {
    align-items: stretch;
    flex-direction: column;
  }

  .unified-review-card .btn {
    width: 100%;
  }
}
