:root {
  --bg-base: #0a0e17;
  --bg-surface: #111827;
  --bg-elevated: #1a2235;
  --bg-card: rgba(30, 41, 59, 0.92);
  --bg-input: #1e293b;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #8b9bb5;
  --text-inverse: #0f172a;

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-default: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.28);

  --blue-50: rgba(59, 130, 246, 0.08);
  --blue-100: rgba(59, 130, 246, 0.15);
  --blue-300: #60a5fa;
  --blue-400: #3b82f6;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #60a5fa;
  --green-50: rgba(34, 197, 94, 0.08);
  --green-500: #22c55e;
  --green-600: #22c55e;
  --green-700: #4ade80;
  --amber-50: rgba(245, 158, 11, 0.08);
  --amber-100: rgba(245, 158, 11, 0.12);
  --amber-500: #f59e0b;
  --amber-700: #fbbf24;
  --red-50: rgba(239, 68, 68, 0.08);
  --red-100: rgba(239, 68, 68, 0.12);
  --red-500: #ef4444;
  --red-600: #f87171;
  --red-700: #fca5a5;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-base);
  background-image:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 30%),
    radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.04), transparent 40%);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.gate-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 70;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.15s ease;
}

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

.header {
  padding: 2.4rem 1rem 2rem;
  text-align: center;
  color: #f1f5f9;
  background:
    linear-gradient(135deg, rgba(5, 24, 44, 0.35), transparent 55%),
    linear-gradient(135deg, #0b3a8c, #155e75 58%, #0f766e);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.header-eyebrow {
  margin-bottom: 0.55rem;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.header p {
  margin: 0.6rem auto 0;
  max-width: 44rem;
  font-size: 1rem;
  opacity: 0.88;
}

.header-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.header-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.header-chip {
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  color: rgba(241, 245, 249, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.26);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-link:hover,
.header-link:focus-visible {
  border-color: rgba(226, 232, 240, 0.4);
  background: rgba(15, 23, 42, 0.4);
  box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.header-link-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.container {
  width: min(100%, 46rem);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  padding-left: max(1rem, env(safe-area-inset-left, 1rem));
  padding-right: max(1rem, env(safe-area-inset-right, 1rem));
}

.app-shell {
  display: block;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-dot {
  display: flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.step-dot.active {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 0 0 4px var(--blue-100);
}

.step-dot.done {
  background: var(--green-500);
  color: #fff;
}

.step-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.step-label.active {
  color: var(--blue-300);
}

.step-label.done {
  color: var(--green-500);
}

.step-line {
  width: 2.5rem;
  height: 2px;
  margin: 0 0.4rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  transition: background 0.2s ease;
}

.step-line.done {
  background: var(--green-500);
}

.card {
  margin-bottom: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.card-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.welcome-panel {
  border-color: rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), var(--bg-card));
}

.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
  gap: 1rem;
}

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

.welcome-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.welcome-pill {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.36);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.welcome-grid {
  display: grid;
  gap: 0.85rem;
}

.welcome-box {
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: calc(var(--radius-sm) + 2px);
  background: rgba(15, 23, 42, 0.34);
}

.welcome-box-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 800;
}

.welcome-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.welcome-list li + li {
  margin-top: 0.4rem;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.scope-column {
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: calc(var(--radius-sm) + 2px);
  background: rgba(15, 23, 42, 0.28);
}

.scope-column-caution {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.06);
}

.scope-column-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 800;
}

.scope-column-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.scope-column-list li + li {
  margin-top: 0.45rem;
}

.section-intro {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: calc(var(--radius-sm) + 2px);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.38));
}

.section-intro-accent {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.38));
}

.section-intro-step {
  color: var(--blue-300);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro-title {
  margin: 0.35rem 0 0;
  color: var(--text-primary);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-intro-copy {
  margin: 0.55rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.summary-chip {
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.summary-chip.lead {
  color: var(--text-primary);
}

.summary-chip.active {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-700);
}

.summary-chip.subtle {
  color: var(--text-muted);
}

.step-jump-nav {
  position: sticky;
  top: 0.75rem;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--radius-sm) + 2px);
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(10px);
}

.step-jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.78rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.step-jump-link:hover,
.step-jump-link:focus-visible {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(37, 99, 235, 0.12);
  color: var(--text-primary);
}

#step2 > .card[id] {
  scroll-margin-top: 5.75rem;
}

.entry-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.95fr);
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--blue-100);
  border-radius: calc(var(--radius-sm) + 2px);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(17, 24, 39, 0.6));
}

.entry-guide-copy {
  min-width: 0;
}

.entry-guide-eyebrow {
  margin-bottom: 0.35rem;
  color: var(--blue-300);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-guide-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.entry-guide-list {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.entry-guide-list li + li {
  margin-top: 0.35rem;
}

.entry-guide-list strong {
  color: var(--text-primary);
}

.entry-guide-note {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.entry-guide-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-diagram {
  width: 100%;
  max-width: 20rem;
  height: auto;
}

.form-paper {
  fill: rgba(30, 41, 59, 0.9);
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1.5;
}

.form-band {
  fill: rgba(37, 99, 235, 0.2);
}

.form-box {
  fill: rgba(17, 24, 39, 0.6);
  stroke: rgba(148, 163, 184, 0.3);
  stroke-width: 1.4;
}

.form-box-highlight {
  fill: rgba(37, 99, 235, 0.15);
  stroke: rgba(96, 165, 250, 0.7);
  stroke-width: 1.8;
}

.form-label {
  fill: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.form-label-strong {
  fill: var(--blue-300);
  font-size: 9.5px;
  font-weight: 800;
}

.form-caption {
  fill: var(--text-muted);
  font-size: 8px;
  font-weight: 600;
}

.notice-card {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), var(--bg-card));
}

.trust-panel {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), var(--bg-card));
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.trust-item {
  padding: 0.95rem;
  border: 1px solid var(--border-default);
  border-radius: calc(var(--radius-sm) + 2px);
  background: rgba(15, 23, 42, 0.3);
}

.trust-item-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.trust-item-copy {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-size: 0.83rem;
}

.support-review-card {
  border-color: rgba(96, 165, 250, 0.18);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), var(--bg-card));
}

.support-review-card[data-status="ready"] {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), var(--bg-card));
}

.support-review-card[data-status="unsupported"] {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), var(--bg-card));
}

.support-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.support-review-badge {
  display: inline-flex;
  min-width: 7rem;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-review-badge.pending {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-300);
}

.support-review-badge.ready {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-700);
}

.support-review-badge.attention {
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber-700);
}

.support-review-badge.unsupported {
  background: rgba(239, 68, 68, 0.14);
  color: var(--red-700);
}

.support-review-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.support-review-title {
  margin: 0 0 0.6rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-review-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.support-review-list li + li {
  margin-top: 0.45rem;
}

.notice-eyebrow {
  margin-bottom: 0.45rem;
  color: var(--amber-500);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-copy {
  margin: 0.55rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.notice-copy-strong {
  color: var(--red-600);
  font-weight: 700;
}

.app-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.trust-panel .app-toolbar {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.toolbar-status {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-toggle {
  min-height: 2.75rem;
  font-size: 0.82rem;
}

.btn-small {
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
}

.field {
  margin-bottom: 1rem;
}

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

.field-note {
  display: flex;
  align-items: flex-end;
}

.field label {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-hint {
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.field-error-inline {
  display: block;
  margin-top: 0.3rem;
  color: var(--red-400, #f87171);
  font-size: 0.76rem;
  font-weight: 600;
}

.field [aria-invalid="true"] {
  border-color: var(--red-400, #f87171);
}

.field input:not([type="checkbox"]),
.field select {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.96rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.ssn-field {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.ssn-field .ssn-input {
  flex: 1;
}

.ssn-toggle {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.ssn-toggle:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-input);
}

.ssn-toggle[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(37, 99, 235, 0.14);
  color: var(--text-primary);
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2rem;
}

.field input:not([type="checkbox"])::placeholder {
  color: var(--text-muted);
}

.field input:not([type="checkbox"]):focus,
.field select:focus,
.btn:focus-visible,
.ssn-toggle:focus-visible,
.btn-add-w2:focus-visible,
.status-option:focus-visible,
.w2-advanced-toggle:focus-visible,
.lines-toggle:focus-visible,
.upload-preview-remove:focus-visible {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.field input:not([type="checkbox"])[aria-invalid="true"] {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px var(--red-100);
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.inline-note {
  min-height: 2.9rem;
  padding: 0.72rem 0.8rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.checkbox-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 0.85rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.checkbox-field input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--blue-500);
}

.status-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.status-option {
  display: flex;
  min-height: 6rem;
  padding: 1rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: inherit;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.status-option:hover {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.status-option.selected {
  border-color: var(--blue-500);
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.status-option[aria-checked="true"] {
  border-color: var(--blue-500);
}

.status-title {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 800;
}

.status-desc {
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.w2-card,
.dependent-card {
  margin-bottom: 0.85rem;
  padding: 1.15rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-surface));
}

.w2-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.w2-card-header h3 {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 800;
}

.w2-advanced {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.w2-advanced-toggle,
.lines-toggle {
  display: inline-flex;
  width: 100%;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--blue-300);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.w2-advanced-toggle:hover,
.lines-toggle:hover {
  color: var(--blue-400);
}

.w2-advanced-fields,
.lines-container {
  display: none;
}

.w2-advanced-fields.open,
.lines-container.open {
  display: block;
}

.arrow {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.arrow.open {
  transform: rotate(90deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.78rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled),
.btn-add-w2:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled,
.btn-add-w2:disabled,
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), #1d4ed8);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #2563eb);
  box-shadow: var(--shadow);
}

.btn-secondary {
  border: 1.5px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-input);
}

.btn-ghost {
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--red-500);
  background: var(--red-50);
}

.btn-add-w2 {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-add-w2:hover:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.5);
  background: var(--blue-50);
  color: var(--blue-300);
}

.btn-block {
  width: 100%;
}

.actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.actions .btn {
  flex: 1;
}

.compute-help {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.compute-help.ready {
  color: var(--green-700);
}

.compute-help.attention {
  color: var(--amber-700);
}

.compute-help.pending {
  color: var(--text-secondary);
}

.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fade-in 0.24s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-banner {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--red-500);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--red-50), var(--red-100));
  color: var(--red-600);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-line;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.gate-card {
  width: min(100%, 42rem);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), var(--bg-surface));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}

.gate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.gate-title {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gate-copy {
  margin: 0.8rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.gate-side-note {
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: calc(var(--radius-sm) + 2px);
  background: rgba(15, 23, 42, 0.35);
}

.gate-side-title {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gate-side-list {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.gate-side-list li + li {
  margin-top: 0.4rem;
}

.gate-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.gate-list li + li {
  margin-top: 0.45rem;
}

.gate-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.1rem;
  padding: 0.95rem 1rem;
  border: 1.5px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  background: var(--red-50);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.gate-check input {
  margin-top: 0.1rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--red-500);
}

.gate-card .btn {
  margin-top: 1rem;
}

.result-warning-card {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(180deg, var(--red-50), var(--bg-card));
}

.result-hero {
  padding: 2rem 1rem 1.6rem;
  text-align: center;
}

.result-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.amount {
  margin-top: 0.4rem;
  color: var(--text-primary);
  font-size: clamp(2.3rem, 6vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.amount.refund {
  color: var(--green-500);
}

.amount.owe {
  color: var(--red-500);
}

.amount.neutral {
  color: var(--text-muted);
}

.result-sub {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.draft-card {
  overflow: hidden;
}

.draft-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
  justify-content: flex-end;
}

.draft-sheet {
  position: relative;
  overflow: hidden;
  margin-top: 0.2rem;
  padding: 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: calc(var(--radius-sm) + 2px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98)),
    linear-gradient(180deg, rgba(37, 99, 235, 0.04), transparent 40%);
  color: var(--text-inverse);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.draft-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(220, 38, 38, 0.08);
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-22deg);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.draft-sheet-header,
.draft-summary-grid,
.draft-sections {
  position: relative;
  z-index: 1;
}

.draft-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.draft-form-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.draft-form-subtitle {
  max-width: 30rem;
  margin-top: 0.35rem;
  color: #475569;
  font-size: 0.82rem;
}

.draft-form-badge {
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.draft-summary-item {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.88);
}

.draft-summary-label {
  color: #64748b;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-summary-value {
  margin-top: 0.35rem;
  color: #0f172a;
  font-size: 0.91rem;
  font-weight: 700;
}

.draft-sections {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.draft-section {
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.draft-section-title {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
}

.draft-section-subtitle {
  margin-top: 0.25rem;
  color: #475569;
  font-size: 0.79rem;
}

.draft-line-row {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.draft-section .draft-line-row:first-of-type {
  margin-top: 0.75rem;
}

.draft-line-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.draft-line-row.emphasis {
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  border-radius: 10px;
  border-bottom-color: transparent;
  background: rgba(37, 99, 235, 0.06);
}

.draft-line-code {
  color: #475569;
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
}

.draft-line-label {
  color: #1e293b;
  font-size: 0.86rem;
}

.draft-line-row.emphasis .draft-line-label,
.draft-line-row.emphasis .draft-line-value {
  color: #1d4ed8;
}

.draft-line-value {
  min-width: 7rem;
  color: #0f172a;
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.meta-item {
  padding: 0.95rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(15, 23, 42, 0.45));
}

.meta-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  margin-top: 0.45rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.scope-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.scope-list li + li {
  margin-top: 0.45rem;
}

.breakdown-section {
  padding: 0.85rem 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.93rem;
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row .label {
  color: var(--text-secondary);
}

.breakdown-row .value {
  color: var(--text-primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.breakdown-row.highlight {
  margin: 0 -1.4rem;
  padding: 0.72rem 1.4rem;
  border-bottom: none;
  background: var(--blue-50);
  border-radius: 8px;
}

.breakdown-row.highlight .label,
.breakdown-row.highlight .value {
  color: var(--blue-300);
}

.lines-toggle {
  margin-bottom: 0.8rem;
}

.line-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.81rem;
}

.line-row:nth-child(even) {
  background: rgba(148, 163, 184, 0.05);
}

.line-row .ln {
  min-width: 4.5rem;
  color: var(--text-muted);
}

.line-row .lv {
  color: var(--text-secondary);
  text-align: right;
  word-break: break-word;
}

.trace-container {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-secondary);
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow: auto;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

.loading {
  padding: 4rem 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--blue-500);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

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

/* ── Local form preview ── */
.upload-zone-wrapper {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.upload-zone {
  padding: 1.5rem 1rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.04);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.upload-zone-icon {
  display: block;
  margin: 0 auto 0.5rem;
  color: var(--text-muted);
}

.upload-zone-text {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.upload-zone-text strong {
  color: var(--amber-700);
}

.upload-zone-hint {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-feedback {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
}

.upload-feedback.info {
  border-color: rgba(96, 165, 250, 0.28);
  background: var(--blue-50);
  color: var(--blue-300);
}

.upload-feedback.error {
  border-color: rgba(248, 113, 113, 0.28);
  background: var(--red-50);
  color: var(--red-700);
}

.upload-preview-container {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.upload-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.upload-preview-count {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.upload-preview-clear {
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.upload-preview-clear:hover,
.upload-preview-clear:focus-visible {
  border-color: rgba(248, 113, 113, 0.28);
  background: var(--red-50);
  color: var(--red-700);
}

.upload-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.upload-preview-card {
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}

.upload-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.upload-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.upload-preview-type {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.upload-preview-type-pdf {
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber-700);
}

.upload-preview-type-image {
  background: rgba(34, 197, 94, 0.14);
  color: var(--green-700);
}

.upload-preview-name {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.upload-preview-remove {
  padding: 0.3rem 0.5rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
}

.upload-preview-remove:hover {
  color: var(--red-500);
  background: var(--red-50);
}

.upload-preview-body {
  padding: 0.5rem;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}

.upload-preview-body img {
  width: 100%;
  max-width: 100%;
  max-height: 18rem;
  border-radius: 6px;
  object-fit: contain;
}

.upload-preview-body object {
  width: 100%;
  height: 18rem;
  border-radius: 6px;
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .header-chips,
  .welcome-layout,
  .scope-grid,
  .trust-grid,
  .gate-grid {
    grid-template-columns: 1fr;
  }

  .welcome-grid {
    grid-template-columns: 1fr;
  }

  .header-link {
    width: 100%;
  }

  .upload-preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-preview-list {
    grid-template-columns: 1fr;
  }

  .app-toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions > * {
    width: 100%;
  }

  .row,
  .status-options,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .entry-guide {
    grid-template-columns: 1fr;
  }

  .step-jump-nav {
    top: 0.5rem;
    padding: 0.75rem;
  }

  .result-meta {
    grid-template-columns: 1fr;
  }

  .draft-card-header {
    flex-direction: column;
  }

  .draft-actions,
  .draft-actions .btn {
    width: 100%;
  }

  .draft-summary-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    align-items: center;
  }

  .step-item {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
    min-width: 0;
  }

  .step-line {
    flex: 1 1 1.6rem;
    width: auto;
    margin: 0 0.3rem;
    align-self: center;
  }

  .section-intro,
  .gate-card {
    padding: 1rem;
  }

  .w2-card-header,
  .support-review-header,
  .breakdown-row,
  .line-row,
  .draft-line-row,
  .draft-sheet-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-review-badge {
    min-width: 0;
  }

  .line-row .lv {
    text-align: left;
  }

  .draft-line-row {
    grid-template-columns: 1fr;
  }

  .draft-line-value {
    min-width: 0;
    text-align: left;
  }

  .container {
    padding-bottom: 5rem;
  }

  .status-option {
    min-height: 3.5rem;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .status-desc {
    margin-top: 0;
  }

  body {
    font-size: 1.02rem;
  }

  .field label {
    font-size: 0.86rem;
  }

  .field input:not([type="checkbox"]),
  .field select {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .btn {
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .btn-add-w2 {
    min-height: 3rem;
  }

  .ssn-toggle {
    min-height: 2.75rem;
  }

  .btn-ghost {
    min-height: 2.75rem;
    padding: 0.6rem 0.8rem;
  }

  #step2 > .actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin: 1.35rem -1rem 0;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  }
}

@media print {
  @page {
    margin: 0.5in;
  }

  html,
  body {
    background: #fff !important;
  }

  body {
    color: #111827;
  }

  .header,
  .app-toolbar,
  .steps,
  #error,
  .footer,
  .result-warning-card,
  .draft-card-header,
  #step3 > .card:not(#draftCard),
  #step3 > .actions {
    display: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .app-shell,
  #step3,
  #step3.step-section {
    display: block !important;
  }

  .card {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  #draftCard {
    display: block !important;
  }

  .draft-sheet {
    margin: 0;
    padding: 0.35in;
    border: 1px solid #d1d5db;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .draft-watermark {
    color: rgba(220, 38, 38, 0.08);
    font-size: 72pt;
  }

  .draft-summary-item,
  .draft-section {
    background: #fff;
    border-color: #cbd5e1;
  }

  .draft-line-row.emphasis {
    background: #eff6ff;
  }

  .draft-form-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
