:root {
  --ink: #14211a;
  --muted: #667168;
  --soft: #eef0eb;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #d9ddd3;
  --pine: #132019;
  --pine-2: #22372a;
  --rust: #a64f2b;
  --clay: #c78952;
  --gold: #d6ad55;
  --green: #407c55;
  --danger: #a33c2e;
  --shadow: 0 18px 45px rgba(20, 33, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(19, 32, 25, 0.04), transparent 360px),
    var(--soft);
  font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px max(18px, calc((100% - 1180px) / 2));
  color: #fff;
  background: rgba(19, 32, 25, 0.96);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  width: 108px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.brand strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 22px;
}

.brand small,
.eyebrow,
.quick-strip span,
.entry-total span,
.stats span,
.review-item small {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand small {
  display: block;
  color: #d9cab3;
  font-size: 11px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.top-actions a,
.ghost-button,
.install-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  cursor: pointer;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: stretch;
  min-height: 390px;
}

.hero-media {
  display: grid;
  place-items: center;
  min-height: 330px;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(18px, 4vw, 42px);
  background: #f8f7f1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rust);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font: 700 clamp(42px, 6vw, 72px)/1.02 Georgia, serif;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions,
.confirmation-actions,
.organizer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 850;
}

.button-primary {
  color: #fff;
  background: var(--rust);
}

.button-primary:hover {
  background: #8e3f22;
}

.button-secondary {
  color: var(--pine);
  border: 1px solid var(--line);
  background: #fff;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.quick-strip div {
  min-height: 86px;
  padding: 18px;
  background: var(--panel);
}

.quick-strip span,
.entry-total span,
.stats span,
.review-item small {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.quick-strip strong {
  font-size: 16px;
}

.schedule-board,
.entry-panel,
.organizer,
.confirmation {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-heading,
.panel-heading,
.step-split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.section-heading h2,
.panel-heading h2,
.confirmation h2 {
  margin: 0;
  font: 700 32px/1.12 Georgia, serif;
}

.section-heading p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.5;
}

.schedule-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.schedule-list article {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f1;
}

.schedule-list time {
  display: block;
  margin-bottom: 14px;
  color: var(--rust);
  font-weight: 900;
}

.schedule-list strong,
.schedule-list span {
  display: block;
}

.schedule-list span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notice {
  margin-top: 18px;
  padding: 15px 18px;
  color: #5f3b1f;
  border: 1px solid #ecd0a7;
  border-radius: 8px;
  background: #fff5e8;
  line-height: 1.5;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.steps li.active {
  color: #fff;
  border-color: var(--pine);
  background: var(--pine);
}

.form-step {
  display: none;
  margin-top: 30px;
}

.form-step.active {
  display: block;
}

.form-step h3 {
  margin-bottom: 8px;
  font: 700 26px/1.2 Georgia, serif;
}

.supporting-text {
  max-width: 720px;
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

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

.rodeo-choice,
.event {
  position: relative;
  display: flex;
  gap: 12px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.rodeo-choice:has(input:checked),
.event:has(input:checked) {
  border-color: var(--rust);
  box-shadow: inset 0 0 0 1px var(--rust);
  background: #fff8f0;
}

.rodeo-choice.upcoming,
.rodeo-choice.closed {
  cursor: not-allowed;
  background: #f5f6f2;
}

.rodeo-choice input,
.event input,
.check input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--rust);
}

.rodeo-choice strong,
.rodeo-choice small,
.event strong,
.event small {
  display: block;
}

.rodeo-choice strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.rodeo-choice small,
.event small {
  color: var(--muted);
  line-height: 1.4;
}

.rodeo-note,
.event-fee {
  color: var(--rust) !important;
  font-weight: 850;
}

.rodeo-status {
  display: inline-block !important;
  margin-top: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--green);
  font-weight: 850;
}

.rodeo-choice.upcoming .rodeo-status {
  color: #4e351c !important;
  background: #f4ddb6;
}

.rodeo-choice.closed .rodeo-status {
  color: #5d625c !important;
  background: #e1e4dc;
}

.entry-total {
  min-width: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f1;
}

.entry-total strong {
  display: block;
  font-size: 34px;
}

.entry-total small {
  color: var(--muted);
}

.payment-notice,
.review-payment,
.organizer-alert,
.form-error {
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.5;
}

.payment-notice,
.review-payment,
.organizer-alert {
  margin: 0 0 18px;
  color: #5f3b1f;
  border: 1px solid #ecd0a7;
  background: #fff5e8;
}

.payment-notice {
  display: grid;
  gap: 4px;
}

.organizer-mode-banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  color: #fff;
  border-radius: 8px;
  background: #5f3b1f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

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

.event {
  min-height: 126px;
  padding: 15px;
}

.event strong {
  margin-bottom: 6px;
}

.event-age {
  margin-bottom: 7px;
  white-space: pre-line;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.form-grid .field {
  margin-top: 0;
}

.field-wide,
.review-item.wide {
  grid-column: 1 / -1;
}

.field span {
  color: #2d392f;
  font-size: 14px;
  font-weight: 750;
}

.field b,
.field span small {
  margin-left: 6px;
  color: var(--rust);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field span small {
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #cfd5ca;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid rgba(166, 79, 43, 0.25);
  border-color: var(--rust);
}

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

.rulebook,
.waiver,
.review-card,
.organizer-login,
.empty-state {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f1;
}

.rulebook,
.waiver {
  line-height: 1.55;
}

.rulebook h4,
.waiver h4,
.organizer-login h3,
.empty-state h3 {
  margin-bottom: 8px;
  font: 700 21px/1.2 Georgia, serif;
}

.waiver-link {
  display: inline-block;
  margin: 12px 0;
  color: var(--rust);
  font-weight: 850;
}

.rule-highlights {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

.checkbox-stack {
  display: grid;
  gap: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.45;
}

.signature {
  max-width: 620px;
}

.signature small {
  color: var(--muted);
}

.review-card {
  background: #fff;
}

.review-item {
  min-height: 58px;
}

.review-item strong {
  line-height: 1.35;
}

.form-error {
  margin-top: 20px;
  color: var(--danger);
  background: #fdebe6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.confirmation {
  text-align: center;
}

.confirmation-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 22px;
  color: #fff;
  border-radius: 50%;
  background: var(--pine);
  font: 700 24px Georgia, serif;
}

.confirmation p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px auto 26px;
  color: var(--muted);
  line-height: 1.55;
}

.confirmation-actions {
  justify-content: center;
}

.organizer-heading {
  align-items: center;
}

.text-button {
  border: 0;
  color: var(--rust);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}

.organizer-login {
  max-width: 440px;
  margin: 28px auto 0;
}

.organizer-login .button {
  width: 100%;
  margin-top: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 24px 0 16px;
}

.stats div {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 30px;
}

.toolbar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.empty-state {
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 30px 16px 42px;
  color: var(--muted);
}

footer strong {
  color: var(--ink);
}

@media (max-width: 980px) {
  .hero,
  .quick-strip,
  .schedule-list,
  .event-grid,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .panel-heading,
  .step-split {
    flex-direction: column;
  }

  .entry-total {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
  }

  main {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
  }

  .hero,
  .quick-strip,
  .schedule-list,
  .rodeo-grid,
  .event-grid,
  .form-grid,
  .agreement-grid,
  .review-card,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 230px;
  }

  h1 {
    font-size: 42px;
  }

  .brand span {
    display: none;
  }

  .form-actions,
  .hero-actions,
  .confirmation-actions,
  .organizer-actions {
    flex-direction: column;
  }

  .button,
  .top-actions a,
  .ghost-button,
  .install-button {
    width: 100%;
  }
}

@media print {
  .site-header,
  .hero,
  .quick-strip,
  .schedule-board,
  .notice,
  .entry-panel,
  .organizer,
  footer {
    display: none !important;
  }

  .confirmation {
    display: block !important;
    box-shadow: none;
  }
}
