.demo-page {
  background: #f6f8f6;
  color: #18221f;
  overflow-x: hidden;
}

.demo-hero,
.demo-grid,
.demo-cta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  padding: 64px 0 28px;
}

.demo-hero h1 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.95;
  overflow-wrap: break-word;
}

.demo-hero p {
  max-width: 720px;
  margin: 0;
  color: #5f6d68;
  font-size: 1.08rem;
}

.demo-summary {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid #d9e2de;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(20, 47, 42, 0.08);
}

.demo-summary span,
.demo-summary small {
  color: #5f6d68;
}

.demo-summary strong {
  font-size: 1.12rem;
}

.workflow-strip {
  position: sticky;
  top: 72px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 20px;
  padding: 8px;
  border: 1px solid #d9e2de;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.step {
  min-height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: #5f6d68;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.step.active {
  border-color: #20765f;
  background: #e5f2ee;
  color: #142f2a;
}

.demo-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 40px;
}

.statement-preview,
.review-panel,
.demo-cta {
  border: 1px solid #d9e2de;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(20, 47, 42, 0.08);
}

.statement-preview {
  position: sticky;
  top: 146px;
  padding: 24px;
}

.pdf-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  background: #cf2f28;
  color: #fff;
  font-weight: 800;
}

.statement-preview h2 {
  margin: 22px 0 16px;
  font-size: 2rem;
}

.statement-preview dl {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.statement-preview dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7eeeb;
  padding-bottom: 8px;
}

.statement-preview dt {
  color: #5f6d68;
}

.statement-preview dd {
  margin: 0;
  font-weight: 800;
}

.statement-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.statement-preview th,
.statement-preview td {
  border-bottom: 1px solid #e7eeeb;
  padding: 8px 4px;
  text-align: left;
}

.statement-preview td:last-child,
.statement-preview th:last-child {
  text-align: right;
}

.sample-warning {
  margin: 18px 0 0;
  color: #5f6d68;
  font-size: 0.88rem;
}

.review-panel {
  overflow: hidden;
}

.panel {
  padding: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef7f3 100%);
}

.panel-heading {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: start;
}

.panel h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
}

.panel p:not(.eyebrow) {
  max-width: 720px;
  margin: 16px 0 0;
  color: #5f6d68;
}

.status-pill,
.row-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.good,
.row-status.ok {
  background: #dff2e8;
  color: #20765f;
}

.status-pill.warn,
.row-status.warn {
  background: #fff2d4;
  color: #8b5a00;
}

.balance-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border-top: 1px solid #d9e2de;
  border-bottom: 1px solid #d9e2de;
  background: #fbfcfb;
}

.balance-cards article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d9e2de;
  background: #ffffff;
}

.balance-cards span {
  color: #5f6d68;
  font-size: 0.82rem;
}

.balance-cards strong {
  font-size: 1.35rem;
}

.table-wrap {
  overflow-x: auto;
}

.transaction-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.transaction-table th,
.transaction-table td {
  border-bottom: 1px solid #e7eeeb;
  padding: 14px 16px;
  text-align: left;
}

.transaction-table th {
  background: #f4f7f5;
  color: #5f6d68;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.transaction-table td:nth-child(4),
.transaction-table td:nth-child(5),
.transaction-table td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.needs-review {
  background: #fffaf0;
}

.needs-review button {
  border: 0;
  background: transparent;
  color: #8b5a00;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  background: #fbfcfb;
}

.export-actions button {
  min-height: 44px;
  border: 1px solid #20765f;
  background: #ffffff;
  color: #142f2a;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.export-actions button.active,
.export-actions button:hover {
  background: #20765f;
  color: #ffffff;
}

.demo-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 56px;
  padding: 28px;
}

.demo-cta h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.demo-cta p:not(.eyebrow) {
  margin: 0;
  color: #5f6d68;
}

@media (max-width: 900px) {
  .demo-hero,
  .demo-grid,
  .demo-cta {
    width: calc(100% - 28px);
    max-width: 1180px;
  }

  .demo-hero,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-hero {
    padding-top: 48px;
  }

  .demo-hero h1 {
    font-size: clamp(2rem, 9.4vw, 2.55rem);
    line-height: 1;
    max-width: 320px;
  }

  .demo-hero p {
    max-width: 320px;
  }

  .workflow-strip {
    top: 64px;
    width: calc(100% - 28px);
    max-width: 1180px;
    grid-template-columns: 1fr;
  }

  .statement-preview {
    position: static;
  }

  .statement-preview dl div {
    display: grid;
  }

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

  .panel-heading,
  .demo-cta {
    flex-direction: column;
    align-items: stretch;
  }
}
