:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1b2f;
  --ink: #f1f7ff;
  --muted: #aebfd0;
  --quiet: #71859a;
  --line: rgba(167, 207, 255, 0.18);
  --blue: #57b9ff;
  --gold: #d8b15c;
  --green: #56d39a;
  --red: #ff6d6d;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(115deg, rgba(87, 185, 255, 0.14), transparent 34rem),
    linear-gradient(245deg, rgba(216, 177, 92, 0.1), transparent 30rem),
    linear-gradient(180deg, #06101d 0%, var(--bg) 52%, #08111d 100%);
  color: var(--ink);
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.payments-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.88);
}

.brand,
.payments-topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(87, 185, 255, 0.55);
  background: linear-gradient(135deg, rgba(87, 185, 255, 0.26), rgba(216, 177, 92, 0.18));
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.payments-topbar nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.payments-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(22px, 5vw, 70px) 0;
}

.checkout-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 20px;
  align-items: stretch;
}

.checkout-copy,
.checkout-panel,
.readiness-grid article,
.state-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 36, 58, 0.92), rgba(8, 22, 38, 0.88));
}

.checkout-copy {
  min-height: 430px;
  padding: clamp(24px, 5vw, 52px);
}

.kicker,
.panel-label {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.92;
}

.checkout-copy p:not(.kicker),
.checkout-panel p,
.readiness-grid p,
.state-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.checkout-panel {
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 24px;
}

.checkout-stack {
  display: grid;
  gap: 14px;
}

.checkout-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

#checkoutButton,
#tipButton {
  min-height: 52px;
  border: 1px solid rgba(87, 185, 255, 0.72);
  background: var(--blue);
  color: #06101d;
  font-weight: 900;
  cursor: pointer;
}

#checkoutButton:disabled,
#tipButton:disabled {
  border-color: rgba(167, 207, 255, 0.18);
  background: rgba(113, 133, 154, 0.24);
  color: var(--quiet);
  cursor: not-allowed;
}

.tip-panel {
  min-height: 260px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.tip-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(3, 11, 21, 0.48);
}

.tip-row span {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--gold);
  font-weight: 900;
}

.tip-row input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  outline: none;
  padding: 0 14px;
}

.fine-print {
  margin: 0;
  font-size: 13px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.readiness-grid article {
  min-height: 190px;
  padding: 18px;
}

.readiness-grid span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(87, 185, 255, 0.44);
  color: var(--blue);
  font-weight: 900;
}

.readiness-grid strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}

.state-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.state-panel {
  width: min(720px, 100%);
  padding: clamp(24px, 5vw, 52px);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.state-actions a {
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.state-actions a:first-child {
  border-color: rgba(87, 185, 255, 0.72);
  background: var(--blue);
  color: #06101d;
}

@media (max-width: 900px) {
  .payments-topbar,
  .checkout-band {
    grid-template-columns: 1fr;
  }

  .payments-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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