:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(99, 91, 255, 0.1), transparent 34rem),
    #f5f7fb;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.card {
  overflow: hidden;
  border: 1px solid #e5e9f2;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(27, 39, 67, 0.11);
}

.loading-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #667085;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e7e9ff;
  border-top-color: #635bff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.hero {
  padding: 34px 38px 28px;
  background: linear-gradient(135deg, #161c2d, #252c46 75%);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8bcff;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero p {
  margin: 12px 0 0;
  max-width: 580px;
  color: #d9dded;
  line-height: 1.6;
}

.content {
  padding: 34px 38px 38px;
}

.summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid #e6e9f0;
  border-radius: 16px;
  background: #fafbfe;
}

.summary-label,
.muted {
  color: #687083;
}

.summary-label {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.account {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f1f4f9;
  color: #535d72;
  font-size: 14px;
}

.actions {
  margin-top: 26px;
}

.button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  background: #635bff;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 9px 24px rgba(99, 91, 255, 0.25);
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(99, 91, 255, 0.3);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.payment-box {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #e5e9f2;
  border-radius: 16px;
}

.payment-box[hidden] {
  display: none;
}

#payment-element {
  min-height: 48px;
}

#pay-button {
  margin-top: 20px;
}

.notice {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 14px;
}

.notice.error {
  border: 1px solid #f6c8c8;
  background: #fff4f4;
  color: #9f2f2f;
}

.notice.success {
  border: 1px solid #bfe7d0;
  background: #effbf4;
  color: #18633a;
}

.notice.info {
  border: 1px solid #cad8f4;
  background: #f2f6ff;
  color: #2f4f88;
}

.secure-note {
  margin: 18px 0 0;
  text-align: center;
  color: #7c8497;
  font-size: 12px;
  line-height: 1.5;
}

.portal-only {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #172033;
  background: #f5f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 760px);
    padding: 20px 0;
  }

  .hero,
  .content {
    padding-left: 22px;
    padding-right: 22px;
  }

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

  .amount {
    font-size: 24px;
  }
}
