:root {
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --ink: #181b22;
  --muted: #697281;
  --quiet: #8b94a3;
  --line: #dde2e8;
  --line-strong: #c8d0da;
  --accent: #b4232e;
  --accent-dark: #861824;
  --accent-soft: #fff1f2;
  --green: #138a5b;
  --shadow: 0 22px 60px rgba(24, 27, 34, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, var(--page) 340px),
    var(--page);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.registration-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 28px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.registration-pane,
.checkout-pane {
  min-width: 0;
}

.tournament-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.brand-lockup strong,
.checkout-header h2,
.section-heading h2,
.tournament-summary h1 {
  margin: 0;
  letter-spacing: 0;
}

.brand-lockup strong {
  display: block;
  font-size: 15px;
}

.brand-lockup small,
.registration-status,
.section-heading span,
.tournament-facts dt,
.checkout-header p,
.checkout-header span,
.line-item small,
.integration-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.registration-status {
  padding: 7px 10px;
  border: 1px solid #bfe6d3;
  border-radius: 999px;
  color: var(--green);
  background: #edfbf4;
}

.registration-closed .registration-status {
  border-color: #e7c4c6;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.registration-closed .pay-button,
.pay-button:disabled {
  cursor: not-allowed;
  border-color: var(--line-strong);
  background: #c8ccd2;
  color: #fff;
}

.tournament-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 26px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.tournament-summary h1 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
}

.tournament-summary p {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.tournament-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.tournament-facts div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tournament-facts dt {
  margin-bottom: 6px;
  text-transform: uppercase;
}

.tournament-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
}

.registration-form {
  display: grid;
  gap: 22px;
  padding-top: 26px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(24, 27, 34, 0.04);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  font-size: 18px;
}

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

.competitor-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: #3b4350;
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 35, 46, 0.12);
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.event-option:has(input:checked) {
  border-color: rgba(180, 35, 46, 0.36);
  background: var(--accent-soft);
}

.event-option input,
.custom-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.event-option strong {
  display: block;
  margin-bottom: 2px;
}

.event-option span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.event-option em {
  color: var(--ink);
  font-style: normal;
  font-weight: 850;
}

.checkout-pane {
  position: relative;
}

.checkout-card {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.checkout-header p {
  margin: 0 0 4px;
  text-transform: uppercase;
}

.checkout-header h2 {
  font-size: 22px;
}

.checkout-header span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #684412;
  background: #fff7db;
}

.order-summary {
  display: grid;
  gap: 12px;
}

.line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.line-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.line-item small {
  display: block;
  line-height: 1.45;
}

.line-item span {
  font-weight: 850;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 850;
}

.checkout-total strong {
  font-size: 25px;
}

.checkout-divider {
  height: 1px;
  background: var(--line);
}

.payment-mock {
  display: grid;
  gap: 14px;
}

.payment-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.payment-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
}

.payment-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(24, 27, 34, 0.12);
}

.card-fields {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.card-fields label {
  gap: 0;
  color: var(--quiet);
  font-size: 11px;
  padding: 8px 10px 0;
}

.card-fields input {
  min-height: 36px;
  padding: 5px 0 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.split-card-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
}

.split-card-fields label + label {
  border-left: 1px solid var(--line-strong);
}

.billing-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.billing-check input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.pay-button,
.success-dialog button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

.pay-button:hover,
.success-dialog button:hover {
  background: var(--accent-dark);
}

.integration-note {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: var(--radius);
  color: #394150;
  background: #f2f4f7;
  font-size: 13px;
  line-height: 1.45;
}

.integration-note code {
  font-size: 12px;
}

.custom-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.success-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 27, 34, 0.42);
}

.success-dialog {
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 26px;
  font-weight: 900;
}

.success-dialog h2 {
  margin: 0 0 10px;
}

.success-dialog p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.success-dialog button {
  width: 100%;
}

@media (max-width: 980px) {
  .registration-shell {
    grid-template-columns: 1fr;
  }

  .checkout-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .registration-shell {
    width: min(100% - 28px, 1220px);
    padding: 18px 0;
  }

  .tournament-header,
  .section-heading,
  .tournament-summary {
    align-items: start;
  }

  .tournament-header,
  .section-heading,
  .tournament-summary,
  .field-grid,
  .competitor-fields,
  .tournament-facts {
    grid-template-columns: 1fr;
  }

  .tournament-header,
  .section-heading {
    flex-direction: column;
  }

  .tournament-summary h1 {
    font-size: 38px;
  }

  .form-section,
  .checkout-card {
    padding: 18px;
  }

  .event-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .event-option em {
    grid-column: 2;
  }

  .split-card-fields {
    grid-template-columns: 1fr;
  }

  .split-card-fields label + label {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }
}
