:root {
  --forest: #174b3b;
  --forest-deep: #103a2d;
  --forest-soft: #e8f2ed;
  --berry: #ba4e52;
  --sun: #efb849;
  --cream: #f8f3e9;
  --paper: #fffdf8;
  --ink: #24322d;
  --muted: #66746e;
  --line: #e3ddd1;
  --warning: #875d17;
  --warning-bg: #fff2d7;
  --danger: #9d3d3d;
  --danger-bg: #fbe9e7;
  --shadow: 0 22px 60px rgba(44, 48, 36, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 8% 4%, #fff2c9 0, transparent 24rem), var(--cream); }
button, input { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .46; }

.test-banner { padding: 9px 20px; background: #5b4529; color: #fff8e9; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.site-header { max-width: 1180px; margin: 0 auto; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; flex: 0 1 220px; }
.brand-logo { display: block; width: 220px; max-width: 100%; height: auto; }
.secure-label { display: flex; align-items: center; gap: 8px; color: var(--forest); font-size: 13px; font-weight: 750; }
.secure-label > span { color: #45a478; font-size: 18px; }

.payment-shell { width: min(1124px, calc(100% - 40px)); margin: 18px auto 56px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 28px; align-items: start; }
.order-column { padding: 20px 4px; }
.eyebrow { margin: 0 0 7px; color: var(--berry); font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; color: var(--forest-deep); font-family: Georgia, serif; font-size: clamp(34px, 4.8vw, 54px); line-height: 1.03; letter-spacing: -.025em; }
.greeting { margin: 12px 0 28px; color: var(--muted); font-size: 17px; }

.event-card { border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: 0 12px 34px rgba(44, 48, 36, .08); }
.event-content { align-self: center; padding: 28px; }
.event-content h2 { margin: 0; color: var(--forest-deep); font-family: Georgia, serif; font-size: 27px; line-height: 1.16; }
.event-meta { margin: 13px 0 0; color: var(--muted); line-height: 1.55; white-space: pre-line; }

.details { margin-top: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; color: var(--forest-deep); font-size: 19px; }
.text-button { border: 0; background: transparent; color: var(--forest); font-weight: 800; }
.order-lines { display: grid; }
.order-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.order-line strong { color: var(--ink); }
.order-line span { color: var(--muted); font-size: 14px; }
.order-line .line-total { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--ink); font-weight: 850; white-space: nowrap; }
.help-note { display: flex; gap: 13px; align-items: flex-start; margin-top: 22px; color: var(--muted); font-size: 14px; }
.help-note p { margin: 0; line-height: 1.5; }
.help-note strong { color: var(--ink); }
.help-icon { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--forest-soft); color: var(--forest); font-weight: 900; }

.payment-card { position: sticky; top: 20px; padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.payment-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.payment-amount { margin: 0; color: var(--forest-deep); font-size: 36px; line-height: 1; letter-spacing: -.035em; }
.state-badge { padding: 7px 10px; border-radius: 999px; background: var(--forest-soft); color: var(--forest); font-size: 12px; font-weight: 800; white-space: nowrap; }
.state-badge.warning { background: var(--warning-bg); color: var(--warning); }
.state-badge.danger { background: var(--danger-bg); color: var(--danger); }
.money-summary { margin: 26px 0 0; }
.money-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; color: var(--muted); font-size: 14px; }
.money-summary dt, .money-summary dd { margin: 0; }
.money-summary dd { color: var(--ink); font-weight: 800; white-space: nowrap; }
.money-summary .debt-row { margin-top: 4px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.debt-row dd { color: var(--berry); font-size: 18px; }
.deadline { margin: 16px 0 0; padding: 11px 13px; border-radius: 12px; background: #f4f1e9; color: var(--muted); font-size: 13px; line-height: 1.4; }
.deadline.expired { background: var(--danger-bg); color: var(--danger); font-weight: 750; }
.message { min-height: 22px; margin: 17px 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.message.success { padding: 12px 13px; border-radius: 12px; background: var(--forest-soft); color: var(--forest); font-weight: 750; }
.message.error { padding: 12px 13px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-weight: 750; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 0 17px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--forest); }
.primary-action, .secondary-action { width: 100%; min-height: 54px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 850; }
.primary-action { background: var(--forest); color: #fff; box-shadow: 0 9px 20px rgba(23, 75, 59, .22); }
.primary-action:not(:disabled):hover { background: var(--forest-deep); }
.secondary-action { margin-top: 10px; background: var(--forest-soft); color: var(--forest); }
#tickets:not(:disabled) { cursor: pointer; }
.provider-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.provider-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #1476f2; color: #fff; font-weight: 900; }
footer { padding: 0 20px 34px; color: var(--muted); font-size: 12px; text-align: center; }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .site-header { padding: 20px; }
  .payment-shell { width: min(680px, calc(100% - 30px)); grid-template-columns: 1fr; margin-top: 0; }
  .order-column { padding-top: 10px; }
  .payment-card { position: static; grid-row: 1; }
}

@media (max-width: 560px) {
  .test-banner { padding: 8px 12px; font-size: 11px; }
  .site-header { padding: 14px 16px; }
  .brand { flex-basis: 104px; }
  .brand-logo { width: 104px; }
  .secure-label { font-size: 0; }
  .secure-label > span { font-size: 18px; }
  .payment-shell { width: min(100% - 22px, 520px); gap: 18px; margin-bottom: 34px; }
  .payment-card { padding: 22px 18px; border-radius: 21px; }
  .payment-card-head { align-items: center; }
  .payment-amount { font-size: 31px; }
  .order-column { padding: 10px 2px; }
  h1 { font-size: 36px; }
  .greeting { margin-bottom: 22px; font-size: 15px; }
  .event-content { padding: 21px; }
  .event-content h2 { font-size: 23px; }
  .details { margin-top: 24px; }
  .order-line { gap: 7px 10px; }
  .order-line .line-total { grid-row: auto; grid-column: 1; justify-self: start; }
}
