:root {
  --navy-900: #1a1a2e;
  --navy-800: #232f3e;
  --brand-blue: #2563eb;
  --brand-blue-dark: #1d4ed8;
  --green-700: #2d6a4f;
  --green-600: #3e8a66;
  --orange-500: #ff9900;
  --orange-400: #ffb347;
  --white: #ffffff;
  --slate-50: #f4f7fa;
  --slate-100: #e9edf3;
  --slate-200: #d9e1ea;
  --slate-400: #8b97a8;
  --slate-700: #425268;
  --success: #2f9e44;
  --warning: #d48806;
  --error: #d63939;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 8px 24px rgba(26, 26, 46, 0.08);
  --shadow-md: 0 14px 44px rgba(26, 26, 46, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy-900);
  background:
    radial-gradient(circle at 85% -10%, rgba(255, 153, 0, 0.11) 0, transparent 46%),
    radial-gradient(circle at 4% 16%, rgba(45, 106, 79, 0.1) 0, transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #f2f5f9 68%, #edf1f6 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.75;
  z-index: 0;
}

.bg-orb-1 {
  background: rgba(45, 106, 79, 0.2);
  top: -160px;
  right: -110px;
}

.bg-orb-2 {
  background: rgba(255, 153, 0, 0.18);
  bottom: -180px;
  left: -120px;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  margin: 28px auto;
}

.panel {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(35, 47, 62, 0.09);
  box-shadow: var(--shadow-sm);
}

.card-soft {
  background: linear-gradient(180deg, #fbfcff, #f6f9fd);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.brand-text {
  font-size: 1.52rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.03em;
  line-height: 1;
  width: fit-content;
  position: relative;
}

.brand-text span {
  color: var(--brand-blue);
}

.brand-arrow {
  display: none;
}

.app-subtitle {
  margin: 6px 0 0;
  color: var(--slate-700);
  font-size: 0.92rem;
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all 220ms ease;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.neutral {
  color: var(--slate-700);
  border-color: var(--slate-200);
  background: #f7f9fc;
}

.status-pill.success {
  color: #1d6b31;
  border-color: rgba(47, 158, 68, 0.28);
  background: rgba(47, 158, 68, 0.12);
}

.status-pill.error {
  color: #9f2323;
  border-color: rgba(214, 57, 57, 0.28);
  background: rgba(214, 57, 57, 0.11);
}

.wizard {
  margin-top: 14px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  gap: 0;
  margin-bottom: 24px;
}

.step {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--slate-700);
  font: inherit;
  position: relative;
  padding: 0;
}

.step::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 57%;
  width: 86%;
  height: 2px;
  background: var(--slate-200);
  z-index: 0;
}

.step:last-child::after {
  display: none;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--slate-400);
  color: var(--slate-700);
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  background: var(--white);
  position: relative;
  z-index: 1;
  transition: all 220ms ease;
}

.step-label {
  font-size: 0.8rem;
  text-align: center;
  font-weight: 600;
}

.step.is-active .step-dot {
  background: #2563eb;
  border-color: #2563eb;
  color: var(--white);
  transform: scale(1.03);
}

.step.is-active .step-label {
  color: #2563eb;
}

.step.is-active::after {
  background: linear-gradient(90deg, #2563eb, var(--slate-200));
}

.step.is-complete .step-dot {
  border-color: #2563eb;
  background: #2563eb;
  color: var(--white);
}

.step.is-complete::after {
  background: #2563eb;
}

.step.is-skipped .step-dot {
  border-color: #999;
  background: #e0e0e0;
  color: #999;
}

.step.is-skipped .step-label {
  color: #999;
}

.step.is-skipped .step-label::after {
  content: "skipped";
  display: block;
  font-size: 0.65em;
  color: #d32f2f;
  font-weight: 600;
  margin-top: 1px;
}

.wizard-panel {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(14px);
  transition: opacity 280ms ease, transform 280ms ease, max-height 280ms ease;
  pointer-events: none;
}

.wizard-panel.is-active {
  opacity: 1;
  max-height: 2200px;
  transform: translateY(0);
  pointer-events: auto;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.42rem;
  color: var(--navy-900);
}

h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--navy-900);
}

.muted {
  color: var(--slate-700);
  margin: 0 0 16px;
  line-height: 1.5;
}

.upload-zone {
  border: 1.5px dashed #9fb3c7;
  border-radius: 14px;
  padding: 24px 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.upload-zone:hover {
  border-color: var(--brand-blue);
  border-style: solid;
  background: linear-gradient(180deg, #f0f6ff 0%, #e8f0fb 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
  cursor: pointer;
}

.upload-zone:hover .upload-zone-btn {
  background: var(--brand-blue-dark);
}

.upload-zone input {
  display: none;
}

.upload-zone strong {
  font-size: 1rem;
}

.upload-zone small {
  color: var(--slate-700);
  font-size: 0.8rem;
}

.upload-zone-btn {
  display: inline-block;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 8px;
  transition: background 180ms ease;
  pointer-events: none;
  margin-top: 2px;
}

.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(26, 26, 46, 0.14);
  background: linear-gradient(160deg, rgba(45, 106, 79, 0.16), rgba(45, 106, 79, 0.04));
  position: relative;
}

.upload-icon::before {
  content: "PDF";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green-700);
}

.upload-icon.is-csv {
  background: linear-gradient(160deg, rgba(255, 153, 0, 0.2), rgba(255, 153, 0, 0.05));
}

.upload-icon.is-csv::before {
  content: "CSV";
  color: #975d00;
}

.inline-message {
  margin: 12px 0;
  font-size: 0.92rem;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.inline-message.neutral {
  background: #f5f8fc;
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.inline-message.success {
  color: #1f6e33;
  border-color: rgba(47, 158, 68, 0.27);
  background: rgba(47, 158, 68, 0.1);
}

.inline-message.warn {
  color: #916000;
  border-color: rgba(212, 136, 6, 0.25);
  background: rgba(212, 136, 6, 0.11);
}

.inline-message.error {
  color: #9f2323;
  border-color: rgba(214, 57, 57, 0.25);
  background: rgba(214, 57, 57, 0.1);
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
}

th {
  background: #f7f9fc;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.73rem;
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--navy-900);
  font-weight: 500;
}

input[type="text"] {
  border: 1px solid #c8d1dd;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--navy-900);
  background: #fdfefe;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.18);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.formula-box,
.inline-callout {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfdff, #f6f9fc);
}

.formula {
  margin: 0;
  color: var(--slate-700);
}

.cogs-input {
  max-width: 100%;
}

.transfer-input {
  margin-top: 14px;
}

.transfer-reference {
  margin: 0;
  font-size: 0.82rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}

.summary-card {
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 14px;
  background: #fcfdff;
}

.summary-card.full {
  grid-column: 1 / -1;
}

.line-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(139, 151, 168, 0.35);
}

.line-row strong {
  color: var(--navy-900);
}

.help-tip {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  margin-left: 6px;
  font-size: 11px;
  background: #edf2f8;
  color: var(--slate-700);
  cursor: help;
}

.value.warn {
  color: var(--warning);
}

.value.bad {
  color: var(--error);
}

.checklist {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  gap: 24px;
}

.checklist li {
  margin: 6px 0;
  color: var(--slate-700);
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  appearance: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  padding: 10px 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 180ms ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, var(--orange-400), var(--orange-500));
  border-color: #d67f00;
  color: #1d1d1d;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 153, 0, 0.3);
}

.btn.secondary {
  background: #ffffff;
  border-color: #b1bfd0;
  color: var(--navy-900);
}

.btn.secondary:hover {
  border-color: var(--navy-900);
}

.wizard-nav {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

.legend {
  margin-top: 16px;
}
.download-success {
  margin-top: 16px;
  padding: 16px 20px;
  background: #dcfce7;
  border: 2px solid #22c55e;
  border-radius: 10px;
  color: #166534;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.app-footer {
  margin-top: 14px;
  padding: 14px 20px;
  background: linear-gradient(120deg, var(--navy-800), #1e2834);
  border-color: rgba(255, 255, 255, 0.05);
}

.app-footer p {
  margin: 0;
  color: #dbe3ec;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.app-footer strong {
  color: #ffffff;
  letter-spacing: 0.01em;
}

.pdf-template {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 850px;
  background: #ffffff;
  color: #111;
}

.pdf-template.is-rendering {
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.pdf-report {
  width: 7.3in;
  min-height: 10in;
  margin: 0 auto;
  padding: 0.2in 0.1in 0.3in;
  font-family: "Inter", sans-serif;
  font-size: 11pt;
  color: #1e293b;
  background: #ffffff;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e5e7eb;
  background: #ffffff;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-logo-block {
  text-align: left;
}

.pdf-logo-text {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.pdf-logo-subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
}

.pdf-header h1 {
  margin: 0;
  font-size: 2rem;
}

.pdf-tagline {
  margin: 3px 0 0;
  color: #64748b;
  font-weight: 700;
  font-size: 0.95rem;
}

.pdf-meta {
  font-size: 0.9rem;
  text-align: right;
  color: #475569;
}

.pdf-section {
  margin: 0;
  padding-top: 0;
  page-break-before: auto;
  break-before: auto;
  page-break-inside: auto;
}
.pdf-section:first-child {
  page-break-before: avoid;
  break-before: avoid;
}
.pdf-section h2 {
  margin: 0 0 8px;
  color: #ffffff;
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  font-size: 1.1rem;
  padding: 9px 14px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  page-break-after: avoid !important;
  break-after: avoid !important;
}

.pdf-section h3 {
  margin: 8px 0 6px;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 800;
}

/* Section B — Net Profit: Forest Green theme */
.pdf-section-profit h2 {
  background: linear-gradient(90deg, #166534, #22c55e);
}
.pdf-section-profit h3,
.pdf-section-profit h4 {
  color: #166534;
}
.pdf-section-profit .pdf-step h4 {
  color: #166534;
}
.pdf-section-profit .pdf-row-subtotal td {
  background: #dcfce7;
  color: #166534;
}
.pdf-section-profit .pdf-validation-note {
  color: #166534;
}

/* Section C — Write-Offs/Tax Deductions: Red theme */
.pdf-section-writeoffs h2 {
  background: linear-gradient(90deg, #991b1b, #dc2626);
}
.pdf-section-writeoffs h3 {
  color: #b91c1c;
}
.pdf-section-writeoffs .pdf-row-subtotal td {
  background: #fee2e2;
  color: #991b1b;
}
.pdf-section-writeoffs .pdf-table th {
  background: #fef2f2;
  color: #991b1b;
}
.pdf-additions-header {
  color: #166534 !important;
  page-break-after: avoid;
  break-after: avoid;
}
.pdf-table-additions th {
  background: #dcfce7 !important;
  color: #166534 !important;
}
.pdf-table-additions td {
  background: #f0fdf4;
}

.pdf-filing-note {
  margin: 6px 0 12px;
  padding: 0;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

.pdf-filing-note p {
  margin: 0 0 4px;
}

.pdf-filing-note strong {
  color: #475569;
}

.pdf-note {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #334155;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
  font-size: 10pt;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-table th,
.pdf-table td {
  border: 1px solid #d8e2ed;
  padding: 7px 8px;
  vertical-align: top;
}

.pdf-table th {
  background: #eff6ff;
  color: #1e3a5f;
  text-transform: none;
  letter-spacing: normal;
  font-size: 10pt;
}

.pdf-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.pdf-callout {
  margin: 8px 0 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-step {
  margin: 0 0 10px;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-step h4 {
  margin: 0 0 5px;
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 800;
}

.pdf-step-line {
  padding-left: 14px;
}

.pdf-crosscheck {
  margin: 5px 0 0;
  font-size: 0.85rem;
  color: #1e3a5f;
}

.pdf-warning-box {
  margin-top: 8px;
  padding: 8px 10px;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-warning-box p {
  margin: 0 0 4px;
  color: #92400e;
}

.pdf-warning-box ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.88rem;
}

.pdf-bullet-list {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 0.9rem;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-checklist {
  margin: 4px 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.9rem;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-checklist li {
  margin: 0 0 4px;
  border-bottom: 1px solid #e7edf4;
  padding-bottom: 4px;
}

.pdf-brand-banner {
  border: 2px solid #1a1a2e;
  border-left: 10px solid #2563eb;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 8px;
  background: linear-gradient(90deg, #eff6ff 0%, #edf5fc 100%);
}

.pdf-brand-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
}

.pdf-brand-simplify {
  color: #1a1a2e;
}

.pdf-brand-amz {
  color: #2563eb;
  margin-left: 2px;
}

.pdf-header .pdf-brand-simplify {
  color: #1a1a2e;
}

.pdf-header .pdf-brand-amz {
  color: #2563eb;
}

.pdf-brand-subtitle {
  margin: 4px 0 0;
  color: #146eb4;
  font-size: 0.78rem;
  font-weight: 700;
}

.pdf-row-group td {
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  color: #ffffff;
  font-weight: 800;
}

.pdf-row-item td:first-child {
  padding-left: 14px;
}

.pdf-row-subtotal td {
  font-weight: 700;
  background: #dcfce7;
  color: #14532d;
}
.pdf-row-subtotal-green td {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.pdf-table-section-c {
  page-break-inside: avoid;
  break-inside: avoid-page;
}

/* PDF Redesign styles */
/* How to Use This Reconciliation Worksheet box */
.pdf-how-to-use {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: #f0f4f8;
  border-left: 4px solid #2563eb;
  border-radius: 6px;
  font-size: 10pt;
  line-height: 1.5;
  page-break-inside: avoid;
  break-inside: avoid-page;
}
.pdf-how-to-use h3 {
  margin: 0 0 8px;
  font-size: 12pt;
  font-weight: 800;
  color: #1e3a5f;
  background: none !important;
  padding: 0;
}
.pdf-how-to-use p {
  margin: 0 0 6px;
}
.pdf-how-to-use .pdf-how-to-use-subheader {
  margin: 10px 0 4px;
}
.pdf-how-to-use ul {
  margin: 0 0 8px 18px;
  padding: 0;
  list-style-type: disc;
}
.pdf-how-to-use ul li {
  margin-bottom: 3px;
}
.pdf-how-to-use .pdf-how-to-use-disclaimer {
  margin-top: 10px;
  font-size: 9pt;
  color: #64748b;
}

/* Subtle Schedule C line hints next to deduction category names */
.pdf-schedule-hint {
  font-size: 8pt;
  color: #94a3b8;
  font-weight: 400;
  font-style: italic;
}

.pdf-tax-summary-box {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 2px solid #3b82f6;
  border-left: 8px solid #f59e0b;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #fffbeb 100%);
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-tax-summary-box h2 {
  margin: 0 0 8px;
  color: #1e40af;
  font-size: 1.15rem;
  font-weight: 900;
  background: none !important;
  padding: 0;
}

.pdf-tax-summary-box .pdf-table {
  margin-bottom: 6px;
}

.pdf-schedule-c {
  font-size: 8pt;
  color: #1d4ed8;
  font-weight: 600;
}

.pdf-action {
  font-size: 8pt;
  color: #334155;
  line-height: 1.3;
}

.pdf-scorp {
  font-size: 8pt;
  color: #6d28d9;
  font-weight: 600;
  line-height: 1.3;
}

/* Table footer rows */
.pdf-footer-subtotal td {
  font-weight: 700;
  background: #fee2e2 !important;
  color: #991b1b;
  border-top: 2px solid #dc2626;
  font-size: 10pt;
}
.pdf-footer-cogs td {
  font-weight: 700;
  background: #dbeafe !important;
  color: #1e40af;
  border-top: 2px solid #3b82f6;
  font-size: 10pt;
}
.pdf-footer-cogs td.pdf-schedule-c,
.pdf-footer-cogs td:nth-child(4) {
  color: #1d4ed8 !important;
}
.pdf-footer-cogs td.pdf-scorp,
.pdf-footer-cogs td:nth-child(5) {
  color: #6d28d9 !important;
}
.pdf-footer-total td {
  font-weight: 800;
  background: #991b1b !important;
  color: #ffffff;
  font-size: 11pt;
  border-top: 2px solid #7f1d1d;
}

/* CHANGE 7: FBA Fee Sub-Items Visual Hierarchy */
.pdf-row-fee-parent td {
  font-weight: 700;
  font-size: 10pt;
  background: #f8fafc !important;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  border-top: 2px solid #cbd5e1;
  page-break-after: avoid;
  break-after: avoid;
}

.pdf-row-breakdown {
  border-left: 3px solid #e2e8f0;
}

.pdf-row-breakdown td {
  font-size: 9pt;
  color: #64748b;
  background: #fafbfc !important;
  border-bottom: 1px dashed #e2e8f0;
  padding: 4px 7px;
}

.pdf-breakdown-indent {
  padding-left: 24px !important;
}

.pdf-row-net-total {
  border-left: 3px solid #3b82f6;
}

.pdf-row-net-total td {
  font-weight: 700;
  font-size: 9pt;
  color: #1e293b;
  background: #f0f7ff !important;
  border-top: 1px solid #93c5fd;
  border-bottom: 2px solid #3b82f6;
}

.pdf-row-net-total td.pdf-schedule-c {
  color: #1d4ed8 !important;
}

.pdf-row-net-total td.pdf-scorp {
  color: #6d28d9 !important;
}

.pdf-row-net-total td.pdf-action {
  color: #334155 !important;
}

/* Write-off table column widths for portrait */
.pdf-table-writeoffs {
  border-left: 3px solid #dc2626;
  border-right: 3px solid #dc2626;
}
.pdf-table-writeoffs th:nth-child(1),
.pdf-table-writeoffs td:nth-child(1) { width: 20%; }
.pdf-table-writeoffs th:nth-child(2),
.pdf-table-writeoffs td:nth-child(2) { width: 12%; }
.pdf-table-writeoffs th:nth-child(3),
.pdf-table-writeoffs td:nth-child(3) { width: 28%; }
.pdf-table-writeoffs th:nth-child(4),
.pdf-table-writeoffs td:nth-child(4) { width: 20%; }
.pdf-table-writeoffs th:nth-child(5),
.pdf-table-writeoffs td:nth-child(5) { width: 20%; }

.pdf-row-zero td {
  color: #888;
  font-style: italic;
}

.pdf-table-compact {
  font-size: 9pt;
}

.pdf-table-compact th,
.pdf-table-compact td {
  padding: 5px 6px;
}

.pdf-crosscheck-note {
  font-size: 0.72rem;
  color: #555;
  font-style: italic;
  padding: 4px 7px 8px;
  border-bottom: 2px solid #d8e2ed;
}

.pdf-validation-note {
  margin: 5px 0 0;
  font-size: 0.74rem;
  color: #166534;
  font-style: italic;
}

/* ── Page break fixes ───────────────────────────────────── */
@media print {
  @page {
    size: letter portrait;
    margin: 0.4in 0.35in;
  }
}

/* CHANGE 6: Portrait-mode page break rules */
.pdf-section-group {
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-section h2 {
  break-after: avoid;
  page-break-after: avoid;
}

.pdf-section {
  break-before: auto;
  page-break-before: auto;
}

.pdf-table tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-table {
  page-break-inside: auto;
  break-inside: auto;
}

.pdf-table thead {
  display: table-header-group;
}

.pdf-step {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-section-writeoffs,
.pdf-section-profit {
  page-break-before: auto;
}

@media (max-width: 980px) {
  .wizard {
    padding: 20px;
  }

  .wizard-steps {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 14px 8px;
  }

  .step::after {
    display: none;
  }

  .summary-grid,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .checklist {
    columns: 1;
  }
}

@media (max-width: 680px) {
  .accounting-method-cards {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wizard-steps {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .brand-arrow {
    display: none;
  }

  .fork-cards {
    grid-template-columns: 1fr;
  }
}

/* ── Top Navigation (Change 1) ──────────────────────────── */
.wizard-nav-top {
  margin-bottom: 16px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
}

/* ── Fork Screen Cards (Change 2) ───────────────────────── */
.fork-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.fork-card {
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  background: linear-gradient(180deg, #fcfdff, #f6f9fc);
  text-align: center;
  cursor: pointer;
  transition: all 240ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fork-card:hover {
  border-color: var(--orange-500);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 26, 46, 0.12);
}

.fork-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 4px;
}

.fork-title {
  margin: 0;
  font-size: 1.18rem;
  color: var(--navy-900);
  font-weight: 800;
}

.fork-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--green-700);
  font-weight: 600;
  font-style: italic;
}

.fork-desc {
  margin: 4px 0 12px;
  color: var(--slate-700);
  font-size: 0.88rem;
  line-height: 1.5;
}

.fork-btn {
  margin-top: auto;
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
}

/* CHANGE 1: Fork card styling — basic is muted/amber, full is recommended */
.fork-card-basic {
  border-color: #e0c88a;
  background: linear-gradient(180deg, #fffcf5, #fdf6e8);
}

.fork-card-basic:hover {
  border-color: #d4a843;
}

.fork-warning {
  margin: 4px 0 12px;
  padding: 10px 14px;
  background: #fff3cd;
  border: 1px solid #f0d78c;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #856404;
  line-height: 1.5;
  text-align: left;
}

.fork-card-full {
  border-color: var(--green-600);
  border-width: 2.5px;
  background: linear-gradient(180deg, #f0faf4, #e8f5ee);
  position: relative;
}

.fork-card-full:hover {
  border-color: var(--green-700);
}

.fork-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}

/* Upload zone success state — blue tint */
.upload-zone.upload-success {
  border-color: rgba(37, 99, 235, 0.4);
  border-style: solid;
  background: rgba(37, 99, 235, 0.06);
}

.upload-zone.upload-success:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.upload-zone.upload-success .upload-icon {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.05));
  border-color: rgba(37, 99, 235, 0.25);
}

.upload-zone.upload-success .upload-icon::before {
  content: "✓";
  font-size: 1.1rem;
  color: #2563eb;
}

/* CHANGE 3: Helper text for input fields */
.input-helper-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--slate-400);
  font-weight: 400;
  line-height: 1.5;
}

/* ── Accounting Method Toggle ───────────────────────────── */
.accounting-method-section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 24px;
}

.accounting-method-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  margin: 0 0 8px;
}

.accounting-method-intro {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin: 0 0 16px;
  line-height: 1.5;
}

.accounting-method-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: 12px;
}

.method-card {
  position: relative;
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 2px solid var(--slate-200);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
  text-align: left;
}

.method-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.method-card-selected {
  border-color: var(--brand) !important;
  background: #eff6ff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

/* Checkmark indicator on selected card */
.method-card-selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-card-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: #dbeafe;
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 6px;
}

/* "Most Common" badge — green pill */
.most-common-badge {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.method-card-content h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-700);
}

.method-card-selected .method-card-content h4 {
  color: var(--brand);
}

.method-card-content > p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.method-card-hint {
  margin: 0 !important;
  font-size: 0.75rem !important;
  color: var(--slate-500) !important;
  line-height: 1.7 !important;
}

/* ── Accrual Fields Container ───────────────────────────── */
.accrual-fields {
  margin-bottom: 14px;
}

.accrual-cogs-display {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  padding: 12px 16px;
  background: #fefce8;
  border: 1px solid #ca8a04;
  border-radius: 8px;
  max-width: 100%;
}

.accrual-cogs-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #854d0e;
}

.accrual-cogs-value {
  font-size: 1rem;
  font-weight: 700;
  color: #854d0e;
}

.accrual-cogs-formula {
  font-size: 0.78rem;
  color: #a16207;
  font-style: italic;
  margin-left: auto;
}

/* ── PDF: COGS-Total Row (Accrual) ──────────────────────── */
.pdf-footer-cogs-total td {
  font-weight: 800;
  background: #dbeafe !important;
  color: #1e40af;
  border-top: 2px solid #3b82f6;
  font-size: 10.5pt;
}

.pdf-footer-cogs-total td.pdf-schedule-c,
.pdf-footer-cogs-total td:nth-child(4) {
  color: #1d4ed8 !important;
}

.pdf-footer-cogs-total td.pdf-scorp,
.pdf-footer-cogs-total td:nth-child(5) {
  color: #6d28d9 !important;
}

/* ── Amber Callout (Change 3) ───────────────────────────── */
.amber-callout {
  background: #FFF8E1;
  border-left: 4px solid #FF9800;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #5D4037;
  line-height: 1.5;
}

.amber-callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.amber-callout a {
  color: #E65100;
  font-weight: 600;
}

.value.amber {
  color: #E65100;
  font-weight: 600;
}

/* PDF amber callout */
.pdf-amber-callout {
  background: #FFF8E1;
  border-left: 4px solid #FF9800;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 0;
  font-size: 0.78rem;
  color: #5D4037;
  line-height: 1.4;
}

/* DDR Instructions Info Box */
.ddr-instructions-box {
  background: #f0f7ff;
  border: 1px solid #b3d4fc;
  border-left: 4px solid #2196F3;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 1.5rem;
  margin-bottom: 20px;
}

.ddr-instructions-box h4 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  color: #1565C0;
}

.ddr-instructions-box ol {
  margin: 0 0 12px 0;
  padding-left: 20px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--slate-700);
}

.ddr-instructions-box ol li {
  margin-bottom: 2px;
}

.ddr-instructions-warning {
  margin: 0;
  font-size: 0.85rem;
  color: #b45309;
  font-weight: 500;
}

/* ── Settlement Gap Analysis (Section F) ─────────────────── */
.pdf-section-gap-header h2 {
  background: #232f3e;
  color: #ffffff;
  padding: 10px 16px;
  margin: 0 0 16px 0;
  border-radius: 4px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.pdf-gap-numbers-table {
  margin-bottom: 16px;
}

.pdf-gap-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pdf-gap-pct {
  font-size: 0.82em;
  color: #666;
  margin-left: 6px;
}

.pdf-gap-divider-row td {
  padding: 2px 0;
}

.pdf-gap-rule {
  border: none;
  border-top: 2px solid #374151;
  margin: 4px 0;
}

.pdf-gap-total-row td {
  font-size: 1rem;
  padding-top: 4px;
  border-top: none;
}

.pdf-gap-info-box {
  background: #e8f4fd;
  border-left: 4px solid #2196F3;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 0 0 14px 0;
  font-size: 0.88rem;
  color: #0d47a1;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-gap-pro-box {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 0 0 14px 0;
  font-size: 0.88rem;
  color: #1B5E20;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-gap-warning-box {
  background: #FFF8E1;
  border-left: 4px solid #FF9800;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 0 0 14px 0;
  font-size: 0.88rem;
  color: #5D4037;
  page-break-inside: avoid;
  break-inside: avoid-page;
}

.pdf-gap-disclaimer {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
  margin: 12px 0 0 0;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

/* PDF global footer disclaimer */
.pdf-page-footer-disclaimer {
  font-size: 0.70rem;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding: 6px 0 10px 0;
  margin-bottom: 12px;
}

/* Export page disclaimer */
.export-disclaimer {
  font-size: 0.78rem;
  color: #9ca3af;
  text-align: center;
  margin: 12px 0 0 0;
  font-style: italic;
}

/* ── Step 4 Two-Column Layout ──────────────────────────────────────────── */
.step4-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 680px) {
  .step4-columns {
    grid-template-columns: 1fr;
  }
}

/* ── DDR Preview Table — Sales Tax type badge ──────────────────────────── */
.type-sales-tax {
  color: #6b7280;
  font-style: italic;
  font-size: 0.85em;
}

/* ── Paywall & Export Gate ──────────────────────────────────────────────── */

/* Paywall Modal Backdrop */
.paywall-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.paywall-content {
  position: relative;
  background: #1a1d2e;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.paywall-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.paywall-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.paywall-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.paywall-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.paywall-value-prop {
  color: #a5b4fc;
  font-size: 1rem;
  margin: 0 0 1.25rem 0;
  font-weight: 500;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem 0;
  text-align: left;
  display: inline-block;
}

.paywall-features li {
  color: #d1d5db;
  padding: 4px 0;
  font-size: 0.95rem;
}

.paywall-cta-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 0.85rem 2rem !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  transition: opacity 0.2s, transform 0.1s !important;
  width: 100%;
}

.paywall-cta-btn:hover {
  opacity: 0.92 !important;
  transform: translateY(-1px) !important;
}

.paywall-cta-btn:active {
  transform: translateY(0) !important;
}

.paywall-cta-large {
  font-size: 1.05rem !important;
  padding: 1rem 2rem !important;
  margin-bottom: 0.75rem;
  display: block;
}

.paywall-fine-print {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 4px 0;
}

/* Locked export section */
.locked-exports .export-actions {
  margin-bottom: 0.5rem;
}

.locked-exports .export-actions .btn {
  opacity: 0.45;
  cursor: pointer;
  position: relative;
}

.paywall-inline {
  margin-top: 1rem;
  text-align: center;
}

.paywall-subtext {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 6px 0 0;
}

/* Access bar (shown post-payment) */
.access-bar {
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  color: #14532d;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Start Over button in header */
.start-over-btn {
  font-size: 0.82rem;
  padding: 7px 14px;
  color: var(--slate-700);
  border-color: var(--slate-200);
  white-space: nowrap;
}

.start-over-btn:hover {
  border-color: var(--slate-400);
  color: var(--navy-900);
}

/* Payment success banner */
.payment-success-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #6ee7b7;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.toast {
  background: #1a1d2e;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #e5e7eb;
  font-size: 0.88rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: toastIn 0.2s ease;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step 5: Bank Deposits (Optional) ──────────────────────────────── */
.step5-explanation {
  color: var(--slate-700);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 680px;
}

.step5-deposit-card {
  background: linear-gradient(180deg, #fbfcff, #f6f9fd);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  max-width: 520px;
  margin-bottom: 20px;
}

.step5-deposit-card .transfer-input {
  margin-top: 0;
}

.step5-skip-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step5-skip-section .muted {
  margin: 0;
  font-size: 0.88rem;
  flex: 1;
  min-width: 200px;
}

.step5-skip-btn {
  white-space: nowrap;
  padding: 10px 20px;
}

/* Step 4 COGS fields */
.step4-cogs-fields {
  max-width: 680px;
  margin-top: 1.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.step4-cogs-fields.is-visible {
  max-height: 1200px;
  opacity: 1;
}

/* ── COGS Field Row (horizontal label + input layout) ───── */
.cogs-field-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--slate-200);
}

.cogs-field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  font-weight: 500;
}

.cogs-field-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
}

.cogs-input-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 220px;
  border: 1px solid #c8d1dd;
  border-radius: 10px;
  background: #fdfefe;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cogs-input-wrap:focus-within {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.18);
}

.dollar-prefix {
  padding: 0 4px 0 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate-400);
  user-select: none;
  line-height: 1;
}

.cogs-input-wrap input[type="text"] {
  border: none;
  border-radius: 0;
  padding: 11px 12px 11px 0;
  background: transparent;
  width: 100%;
  box-shadow: none;
  font-size: 1rem;
}

.cogs-input-wrap input[type="text"]:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

/* Responsive: stack on mobile */
@media (max-width: 540px) {
  .cogs-field-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cogs-input-wrap {
    width: 100%;
  }
}

/* Hint shown when no method is selected */
.step4-method-hint {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--slate-500);
  text-align: center;
  font-style: italic;
  transition: opacity 0.2s;
}
.step4-method-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Inline Unlock CTA Button (Step 7 paywall) ──────────────────────────── */
.paywall-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
  gap: 8px;
}

.inline-unlock-btn {
  display: inline-block;
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  padding: 14px 40px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  width: auto !important;
  max-width: 360px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
  text-align: center;
  letter-spacing: 0.01em;
}

.inline-unlock-btn:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45) !important;
  transform: scale(1.02) !important;
  cursor: pointer;
}

/* ── Promo / Access Code Section ─────────────────────────── */
.promo-section {
  margin-top: 1rem;
  text-align: center;
}

.promo-toggle-link {
  font-size: 0.85rem;
  color: var(--blue-600, #2563eb);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, opacity 0.15s;
}

.promo-toggle-link:hover {
  color: var(--blue-700, #1d4ed8);
  text-decoration: underline;
  opacity: 0.9;
}

.promo-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.promo-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.promo-input {
  width: 200px;
  padding: 8px 12px;
  font-size: 0.88rem;
  border: 1px solid #c8d1dd;
  border-radius: 8px;
  background: #fdfefe;
  font-family: inherit;
}

.promo-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.promo-apply-btn {
  padding: 8px 16px !important;
  font-size: 0.85rem !important;
  white-space: nowrap;
}

.promo-message {
  font-size: 0.82rem;
  min-height: 1.2em;
}

.promo-message.promo-error {
  color: var(--error);
}

/* ── Personal Access Code Section ────────────────────────── */
.access-code-section {
  background: #f8fafb;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  text-align: center;
}

.access-code-header {
  font-size: 0.95rem;
  font-weight: 600;
  color: #059669;
  margin-bottom: 6px;
}

.access-code-label {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 500;
  margin: 0 0 8px;
}

.access-code-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 10px;
}

.access-code-value {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.06em;
  user-select: all;
}

.access-code-copy-btn {
  padding: 8px 16px !important;
  font-size: 0.85rem !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

.access-code-copy-btn:hover {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
}

.access-code-copy-btn.copied {
  background: #059669 !important;
  color: #fff !important;
  border-color: #059669 !important;
}

.access-code-hint {
  font-size: 0.88rem;
  color: var(--slate-700);
  margin: 0 0 6px;
  line-height: 1.6;
}

.access-code-email {
  font-size: 0.82rem;
  color: var(--slate-400);
  margin: 0;
}

/* ── Welcome Page (Step 0) ──────────────────────────────── */
.welcome-page {
  margin-top: 14px;
  padding: 48px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.welcome-content {
  max-width: 600px;
  margin: 0 auto;
}

.welcome-headline {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 0 0 28px;
  line-height: 1.25;
}

.welcome-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.welcome-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--slate-100);
  font-size: 0.95rem;
  color: var(--slate-700);
  line-height: 1.55;
}

.welcome-bullets li:last-child {
  border-bottom: none;
}

.welcome-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.welcome-bullets strong {
  color: var(--navy-900);
}

.welcome-cogs-note {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin: 0 0 28px;
  font-style: italic;
}

.welcome-cta {
  display: inline-block;
  background: var(--brand-blue) !important;
  color: #fff !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  padding: 16px 48px !important;
  border-radius: 12px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3) !important;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s !important;
}

.welcome-cta:hover {
  background: var(--brand-blue-dark) !important;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45) !important;
  transform: translateY(-2px) !important;
}

.welcome-fine-print {
  font-size: 0.78rem;
  color: var(--slate-400);
  margin: 14px 0 0;
}

/* ── Loading Spinner for PDF Parsing ────────────────────── */
.upload-zone.upload-loading {
  pointer-events: none;
  border-color: var(--brand-blue);
  border-style: solid;
  background: linear-gradient(180deg, #f0f6ff 0%, #e8f0fb 100%);
}

.upload-zone.upload-loading .upload-icon,
.upload-zone.upload-loading .upload-zone-btn,
.upload-zone.upload-loading small,
.upload-zone.upload-loading .muted {
  display: none;
}

.upload-zone.upload-loading::after {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 8px auto 0;
}

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

/* ── Start Over Confirmation Modal ──────────────────────── */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.confirm-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.confirm-content h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--navy-900);
}

.confirm-content p {
  margin: 0 0 24px;
  color: var(--slate-700);
  font-size: 0.95rem;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
  border-color: #b91c1c;
  font-weight: 700;
}

.btn.danger:hover {
  background: #b91c1c;
}

/* ── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .app-shell {
    width: 100%;
    margin: 0 auto;
    padding: 0 8px;
  }

  .wizard {
    padding: 16px 12px;
  }

  .wizard-steps {
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .step-label {
    display: none;
  }

  .step::after {
    width: 70%;
    left: 60%;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .upload-zone {
    padding: 20px 16px;
  }

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

  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 500px;
  }

  .cogs-field-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cogs-input-wrap {
    width: 100%;
  }

  .fork-cards {
    grid-template-columns: 1fr;
  }

  .paywall-content {
    width: 95%;
    padding: 2rem 1.25rem;
  }

  .accounting-method-cards {
    grid-template-columns: 1fr;
  }

  .step5-skip-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .export-actions {
    flex-direction: column;
  }

  .export-actions .btn {
    width: 100%;
  }

  .welcome-headline {
    font-size: 1.5rem;
  }

  .welcome-cta {
    width: 100%;
    padding: 14px 24px !important;
  }

  .checklist {
    columns: 1;
  }

  h2 {
    font-size: 1.2rem;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  .start-over-btn {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 0 4px;
  }

  .wizard {
    padding: 12px 10px;
    border-radius: var(--radius-md);
  }

  .wizard-panel.is-active {
    max-height: none;
  }

  .step-dot {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .step::after {
    display: none;
  }

  .upload-zone {
    padding: 18px 12px;
  }

  .formula-box, .inline-callout {
    padding: 10px 12px;
  }

  .formula {
    font-size: 0.82rem;
    word-break: break-word;
  }

  .line-row {
    font-size: 0.85rem;
    gap: 8px;
  }

  .summary-card {
    padding: 10px;
  }

  .welcome-page {
    padding: 32px 16px;
  }

  .welcome-bullets li {
    font-size: 0.88rem;
    gap: 10px;
  }

  .confirm-content {
    padding: 24px 20px;
  }

  .app-footer p {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .ddr-instructions-box {
    padding: 12px 14px;
  }

  .access-code-value {
    font-size: 1.1rem;
  }

  .access-code-box {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }

  .accrual-cogs-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .accrual-cogs-formula {
    margin-left: 0;
  }
}
