:root {
  color-scheme: light;
  --ink: #1a1f29;
  --muted: #627083;
  --line: #dce3ea;
  --paper: #fbfcfd;
  --panel: #ffffff;
  --teal: #0a7772;
  --teal-dark: #07534f;
  --coral: #e85d4f;
  --gold: #f2b84b;
  --blue: #2f6fbe;
  --shadow: 0 18px 48px rgba(16, 35, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(251, 252, 253, 0.92);
  border-bottom: 1px solid rgba(220, 227, 234, 0.85);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 0.82rem;
}

.topbar nav {
  display: flex;
  gap: clamp(12px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar nav a:hover {
  color: var(--ink);
}

.ghost-button,
.secondary-dark-button,
.secondary-button,
.primary-button,
.chip,
.stepper button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ghost-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 18, 24, 0.92), rgba(9, 18, 24, 0.62) 42%, rgba(9, 18, 24, 0.08) 78%);
}

.hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 86px);
  padding: 56px 0 132px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.panel-heading h2,
.split-section h2 {
  margin: 0;
  line-height: 1.04;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.45rem, 7vw, 5.9rem);
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 24px rgba(10, 119, 114, 0.25);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.secondary-dark-button {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 850;
}

.primary-button:hover,
.secondary-button:hover,
.secondary-dark-button:hover,
.ghost-button:hover,
.chip:hover,
.stepper button:hover {
  transform: translateY(-1px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(1120px, calc(100% - 36px));
  margin: -78px auto 0;
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metrics div {
  padding: 22px 26px;
  border-right: 1px solid var(--line);
}

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

.metrics span {
  display: block;
  font-size: 1.65rem;
  font-weight: 850;
}

.metrics p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 74px auto;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2,
.panel-heading h2,
.split-section h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  display: grid;
  min-height: 290px;
  padding: 18px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(27, 47, 68, 0.08);
}

.event-card.selected {
  border-color: var(--teal);
  box-shadow: 0 16px 34px rgba(10, 119, 114, 0.18);
}

.event-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.date-pill {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  border-radius: 8px;
  background: #eef8f7;
  color: var(--teal-dark);
  font-weight: 850;
  line-height: 1;
}

.date-pill small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.event-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tag {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.event-bottom strong {
  display: block;
  font-size: 1.35rem;
}

.event-bottom button {
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: start;
  gap: 22px;
}

.checkout-panel,
.order-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(27, 47, 68, 0.08);
}

.checkout-panel {
  padding: 24px;
}

.order-summary {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.selected-event {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #f2f7f8;
}

.selected-event h3 {
  margin: 0;
}

.selected-event p {
  margin: 0;
  color: var(--muted);
}

.buyer-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0;
}

.quantity-row label,
.payment-methods legend {
  color: var(--ink);
  font-weight: 850;
}

.quantity-row p {
  margin: 3px 0 0;
  color: var(--muted);
}

.stepper {
  display: grid;
  grid-template-columns: 42px 68px 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.stepper button {
  background: #fff;
  color: var(--ink);
  font-size: 1.15rem;
}

.stepper input {
  width: 100%;
  border: 0;
  border-inline: 1px solid var(--line);
  text-align: center;
  color: var(--ink);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0 0 20px;
  border: 0;
}

.payment-methods legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.payment-methods label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.payment-methods label:has(input:checked) {
  border-color: var(--teal);
  background: #eef8f7;
}

.payment-form {
  min-height: 218px;
  padding: 18px;
  border: 1px dashed #b8c7d4;
  border-radius: 8px;
  background: #fbfdfe;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.82rem;
  font-weight: 800;
}

.field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rail-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.rail-note strong {
  color: var(--ink);
}

.rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.rail-actions span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 850;
}

.card-lab {
  display: grid;
  gap: 14px;
}

.card-readiness {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 800;
}

.card-readiness.ready {
  color: var(--teal-dark);
  background: #eef8f7;
  border-color: rgba(10, 119, 114, 0.35);
}

.card-readiness.error {
  color: #8f2a22;
  background: #fff3f1;
  border-color: rgba(232, 93, 79, 0.35);
}

.hosted-card-field {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hosted-card-field iframe {
  min-height: 24px;
}

.test-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.test-card-list button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.paypal-lab {
  display: grid;
  gap: 16px;
}

.venmo-lab {
  display: grid;
  gap: 14px;
}

.venmo-buttons {
  min-height: 48px;
}

.paypal-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.paypal-config input[readonly] {
  background: #f1f5f8;
  color: var(--muted);
}

.paypal-buttons {
  display: grid;
  gap: 10px;
}

.paypal-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.paypal-button:hover {
  transform: translateY(-1px);
}

.paypal-button span {
  font-size: 1.05rem;
}

.paypal-button small {
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.75;
}

.paypal-main {
  color: #10233c;
  background: #ffc439;
  box-shadow: 0 12px 22px rgba(255, 196, 57, 0.3);
}

.paypal-card {
  color: #fff;
  background: #2f6fbe;
  box-shadow: 0 12px 22px rgba(47, 111, 190, 0.22);
}

.paypal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.paypal-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.paypal-status span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}

.paypal-status span.done {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.paypal-json {
  max-height: 320px;
  min-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  color: #d8f7ef;
  background: #13202a;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.order-summary dl {
  display: grid;
  gap: 13px;
  margin: 0 0 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.summary-row.total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.full {
  width: 100%;
}

.fine-print {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.confirmation-panel {
  display: none;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(10, 119, 114, 0.28);
  border-radius: 8px;
  background: #eef8f7;
}

.confirmation-panel.show {
  display: grid;
}

.confirmation-panel h3,
.confirmation-panel p {
  margin: 0;
}

.confirmation-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.confirmation-panel a {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: start;
}

.split-section > div:first-child p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.capability-list {
  display: grid;
  gap: 12px;
}

.capability-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.capability-list span {
  grid-row: span 2;
  color: var(--coral);
  font-weight: 900;
}

.capability-list h3,
.capability-list p {
  margin: 0;
}

.capability-list p {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .topbar {
    align-items: start;
    flex-wrap: wrap;
  }

  .topbar nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 720px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(9, 18, 24, 0.9), rgba(9, 18, 24, 0.54) 58%, rgba(9, 18, 24, 0.2));
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 46px;
  }

  .metrics,
  .event-grid,
  .app-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin-top: -52px;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .section-heading,
  .panel-heading,
  .quantity-row {
    align-items: start;
    flex-direction: column;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: auto;
  }

  .ghost-button {
    width: 100%;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-actions a {
    width: 100%;
  }

  .section-shell {
    width: min(100% - 24px, 1180px);
    margin: 56px auto;
  }

  .payment-methods,
  .form-grid,
  .buyer-info,
  .paypal-config,
  .paypal-status {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }
}
