body {
  background: var(--wl-surface);
  color: var(--wl-ink);
  display: flex;
  flex-direction: column;
  font-family: var(--wl-body-font);
  min-height: 100vh;
}

main { flex: 1; }
h1, h2, h3 { font-family: var(--wl-heading-font); }

.ranch-nav {
  background: var(--wl-header);
  border-bottom: 4px solid var(--wl-action);
}

.ranch-nav .nav-item,
.ranch-nav .nav-item form {
  align-items: center;
  display: flex;
}

.ranch-nav .nav-link,
.ranch-nav .nav-item > .btn,
.ranch-nav .nav-item form > .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1.25;
  min-height: 2.75rem;
}

.ranch-nav .nav-link.active {
  color: var(--wl-header-text);
  font-weight: 700;
}

.btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1.25;
}

.navbar-brand { font-size: 1rem; }

.brand-logo {
  flex: 0 0 auto;
  height: 2.9rem;
  max-width: 10rem;
  object-fit: contain;
  width: 2.9rem;
}

.brand-logo--fallback { filter: drop-shadow(0 .1rem .1rem color-mix(in srgb, var(--wl-header-dark) 45%, transparent)); }

.brand-stack {
  color: var(--wl-header-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}

.brand-title {
  display: block;
  font-family: var(--wl-heading-font);
  font-size: 1.45rem;
}

.brand-eyebrow {
  color: var(--wl-header-text);
  display: block;
  font-family: var(--wl-body-font);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .15em;
  margin-bottom: .18rem;
  text-transform: uppercase;
}

.brand-stack--single .brand-title { font-size: 1.7rem; }

.btn-saddle {
  background: var(--wl-action);
  border-color: var(--wl-action);
  color: var(--wl-on-action);
}

.btn-saddle:hover {
  background: var(--wl-action-hover);
  border-color: var(--wl-action-hover);
  color: var(--wl-on-action);
}

.btn-outline-secondary:is(:hover, :focus, :focus-visible, :active) {
  background: var(--wl-action);
  border-color: var(--wl-action);
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--wl-action) 25%, transparent);
  color: var(--wl-on-action);
}

.btn-login:is(:hover, :focus, :focus-visible, :active) {
  background: var(--wl-surface);
  border-color: var(--wl-action);
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--wl-action) 25%, transparent);
  color: var(--wl-action);
}

.btn-recovery {
  background: var(--wl-surface);
  border-color: var(--wl-action);
  color: var(--wl-action);
}

.btn-recovery:is(:hover, :focus, :focus-visible, :active) {
  background: var(--wl-action);
  border-color: var(--wl-action);
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--wl-action) 25%, transparent);
  color: var(--wl-on-action);
}

.hero {
  align-items: center;
  background: linear-gradient(110deg, color-mix(in srgb, var(--wl-hero-overlay) 93%, transparent), color-mix(in srgb, var(--wl-header) 78%, transparent)), url('https://images.unsplash.com/photo-1510097467424-1d7c7cfb1b8e?auto=format&fit=crop&w=1600&q=75') center / cover;
  border-radius: .75rem;
  color: var(--wl-on-header);
  display: flex;
  min-height: 280px;
}

.eyebrow {
  color: var(--wl-action);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
}

.hero .eyebrow,
.hero-copy .eyebrow,
.home-callout .eyebrow,
.page-hero .eyebrow { color: var(--wl-header-light); }

.ranch-card {
  background: var(--wl-surface);
  border: 1px solid var(--wl-outline);
  box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--wl-ink) 10%, transparent);
}

.metric {
  background: var(--wl-header);
  border-radius: .5rem;
  color: var(--wl-on-header);
  font-family: var(--wl-heading-font);
  font-size: 2.25rem;
  padding: 1rem 1.25rem;
}

.metric span {
  display: block;
  font-family: var(--wl-body-font);
  font-size: 1rem;
}

.ranch-footer {
  background: var(--wl-header-dark);
  color: var(--wl-footer-text);
  margin-top: 2rem;
}

input, select, textarea {
  border: 1px solid var(--wl-outline);
  border-radius: .375rem;
  display: block;
  padding: .375rem .75rem;
  width: 100%;
}

input[type=checkbox] {
  display: inline-block;
  margin-right: .5rem;
  width: auto;
}

.errorlist {
  color: var(--wl-danger);
  font-size: .9rem;
  list-style: none;
  padding-left: 0;
}

.home-hero { box-shadow: 0 .7rem 2rem color-mix(in srgb, var(--wl-ink) 20%, transparent); }

.hero-slide {
  background: var(--wl-header-dark);
  height: 31rem;
  position: relative;
}

.hero-slide-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-slide-overlay {
  background: linear-gradient(90deg, color-mix(in srgb, var(--wl-header-dark) 94%, transparent) 0%, color-mix(in srgb, var(--wl-header-dark) 65%, transparent) 52%, color-mix(in srgb, var(--wl-header-dark) 12%, transparent) 100%);
  inset: 0;
  position: absolute;
}

.hero-copy {
  bottom: auto;
  color: var(--wl-on-header);
  left: 8%;
  max-width: 42rem;
  right: auto;
  text-align: left;
  top: 50%;
  transform: translateY(-50%);
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.35rem);
  line-height: 1.02;
}

.home-feature,
.info-panel,
.empty-state {
  background: var(--wl-surface);
  border: 1px solid var(--wl-outline);
  border-radius: .75rem;
  box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--wl-ink) 7%, transparent);
  padding: 1.75rem;
}

.home-feature h2,
.info-panel h2 { font-size: 1.55rem; }

.link-saddle {
  color: var(--wl-action);
  font-weight: 700;
  text-decoration-thickness: .12em;
  text-underline-offset: .18em;
}

.link-saddle:hover { color: var(--wl-action-hover); }
.section-heading h2 { margin-bottom: 0; }
.empty-state { padding: 3rem; text-align: center; }

.event-feature {
  align-items: center;
  border: 1px solid var(--wl-outline);
  border-radius: .85rem;
  box-shadow: 0 .45rem 1.35rem color-mix(in srgb, var(--wl-ink) 12%, transparent);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.event-feature--upcoming {
  background: linear-gradient(135deg, color-mix(in srgb, var(--wl-header-light) 22%, var(--wl-surface)), var(--wl-surface));
}

.event-feature--live {
  background: linear-gradient(120deg, var(--wl-header-dark), var(--wl-header));
  border-color: var(--wl-action);
  color: var(--wl-on-header);
}

.event-feature__body { max-width: 48rem; }
.event-feature h3 { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.05; }
.event-feature--upcoming h3 { color: var(--wl-header-dark); }
.event-feature--live .eyebrow { color: var(--wl-header-light); }

.event-feature--live .btn-light {
  background: var(--wl-surface);
  border-color: var(--wl-surface);
  color: var(--wl-header-dark);
}

.event-feature--live .btn-light:is(:hover, :focus, :focus-visible, :active) {
  background: var(--wl-action);
  border-color: var(--wl-action);
  color: var(--wl-on-action);
}

.event-feature-date {
  align-items: center;
  background: var(--wl-surface);
  border: 1px solid var(--wl-outline);
  border-radius: .75rem;
  box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--wl-ink) 10%, transparent);
  color: var(--wl-header-dark);
  display: flex;
  flex: 0 0 7.5rem;
  flex-direction: column;
  justify-content: center;
  min-height: 8.5rem;
  padding: 1rem;
}

.event-feature-date span { color: var(--wl-action); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.event-feature-date strong { font-family: var(--wl-heading-font); font-size: 3.2rem; line-height: 1; }
.event-feature-date small { color: var(--wl-ink-muted); margin-top: .3rem; }

.home-callout {
  align-items: center;
  background: var(--wl-header);
  border-radius: .75rem;
  color: var(--wl-on-header);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 2.25rem;
}

.home-callout h2 { margin-bottom: .5rem; }
.home-callout p:last-child { margin-bottom: 0; }

.features-home-callout {
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--wl-header-light) 18%, var(--wl-surface)), var(--wl-surface));
  border: 1px solid var(--wl-outline);
  border-radius: .75rem;
  box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--wl-ink) 7%, transparent);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 1.75rem;
}

.features-home-callout h2 { font-size: 1.55rem; margin-bottom: .5rem; }

.features-hero { overflow: hidden; }

.feature-highlight {
  background: color-mix(in srgb, var(--wl-surface) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--wl-header-text) 34%, transparent);
  border-radius: .6rem;
  color: var(--wl-on-header);
  padding: 1.2rem;
}

.feature-highlight h2 { font-size: 1.3rem; margin-bottom: .55rem; }

.features-statement {
  border-left: .35rem solid var(--wl-action);
  color: var(--wl-header-dark);
  font-family: var(--wl-heading-font);
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.25;
  margin-left: auto;
  margin-right: auto;
  max-width: 58rem;
  padding: .45rem 0 .45rem 1.35rem;
  text-align: center;
}

.features-statement p { margin: 0; }

.feature-card {
  background: var(--wl-surface);
  border: 1px solid var(--wl-outline);
  border-radius: .75rem;
  box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--wl-ink) 7%, transparent);
  padding: 1.6rem;
}

.feature-card h2 { font-size: 1.5rem; margin-bottom: .7rem; }

.page-hero {
  background: linear-gradient(120deg, var(--wl-header-dark), var(--wl-header));
  border-radius: .75rem;
  color: var(--wl-on-header);
  padding: clamp(2rem, 5vw, 4rem);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  max-width: 54rem;
}

.page-hero .lead { max-width: 46rem; }
.info-panel ul { margin: 0; padding-left: 1.2rem; }
.info-panel li + li { margin-top: .55rem; }

.rules-note {
  background: color-mix(in srgb, var(--wl-action) 10%, var(--wl-surface));
  border-left: 4px solid var(--wl-action);
  padding: 1rem 1.25rem;
}

.contact-form-section .ranch-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--wl-header-light) 22%, var(--wl-surface)), var(--wl-surface));
}

.demo-login-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--wl-action) 10%, var(--wl-surface)), var(--wl-surface));
}

.demo-login-card h2 { font-size: 1.7rem; }
.demo-login-list { border-top: 1px solid var(--wl-outline); }

.demo-login-list article {
  border-bottom: 1px solid var(--wl-outline);
  padding: .9rem 0;
}

.demo-login-list h3 {
  font-family: var(--wl-body-font);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.demo-login-list code {
  background: color-mix(in srgb, var(--wl-header) 9%, var(--wl-surface));
  border-radius: .25rem;
  color: var(--wl-header-dark);
  display: inline-block;
  font-size: .86rem;
  padding: .2rem .35rem;
}

.demo-login-list p {
  font-size: .92rem;
  margin-top: .55rem;
}

.login-account-actions {
  border-top: 1px solid var(--wl-outline);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.login-account-actions p {
  font-size: 1rem;
  margin: 0 0 .55rem;
}

.login-account-actions .btn + .btn { margin-top: .65rem; }

.login-account-actions p:not(:first-child) { margin-top: 1.25rem; }

.rider-role-group {
  border: 1px solid var(--wl-outline);
  border-radius: .5rem;
  margin: 0;
  padding: 1rem 1.15rem;
}

.rider-role-group legend {
  color: var(--wl-header-dark);
  float: none;
  font-family: var(--wl-heading-font);
  font-size: 1.15rem;
  margin: 0;
  padding: 0 .35rem;
  width: auto;
}

@media (max-width: 991.98px) {
  .home-hero { border-radius: 0; margin-left: -.75rem; margin-right: -.75rem; }
  .hero-copy { left: 10%; right: 10%; }
  .navbar-nav { padding-top: .75rem; }
  .ranch-nav .nav-link,
  .ranch-nav .nav-item > .btn,
  .ranch-nav .nav-item form > .btn { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
  .hero-slide { height: 35rem; }
  .hero-slide-overlay { background: linear-gradient(0deg, color-mix(in srgb, var(--wl-header-dark) 94%, transparent) 0%, color-mix(in srgb, var(--wl-header-dark) 64%, transparent) 62%, color-mix(in srgb, var(--wl-header-dark) 18%, transparent) 100%); }
  .hero-copy { bottom: 2rem; top: auto; transform: none; }
  .hero-copy h1 { font-size: 2.35rem; }
  .hero-copy .lead { font-size: 1.05rem; }
  .home-callout { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  .features-home-callout { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  .event-feature { align-items: stretch; flex-direction: column-reverse; }
  .event-feature-date { align-self: flex-start; flex: 0 0 auto; min-height: auto; width: 7.5rem; }
  .brand-title { font-size: 1.22rem; }
  .brand-stack--single .brand-title { font-size: 1.42rem; }
}
