:root {
  --brand-navy: #0d3472;
  --brand-orange: #f68a1f;
  --brand-midnight: #05142e;
  --brand-sky: #e9f1ff;
  --brand-cream: #fefcf7;
  --brand-muted: #6c7a99;
  --card-shadow: 0 15px 35px rgba(13, 52, 114, 0.08);
}

body {
  background: radial-gradient(circle at top, rgba(13, 52, 114, 0.18), transparent 55%),
    linear-gradient(135deg, #f6f9ff, #fefefe);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--brand-midnight);
}

main.container {
  max-width: 1200px;
}

.card {
  border: none;
  border-radius: 1.25rem;
  box-shadow: var(--card-shadow);
  background-color: var(--brand-cream);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}

.admin-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
}

.brand-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  width: fit-content;
  margin: 0 auto;
}

.brand-banner img {
  max-height: 48px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.brand-banner__tagline {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: #3d4e6c;
  white-space: nowrap;
}

.brand-banner__logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-banner__logo-chip img {
  max-height: 36px;
  filter: none;
}

#categoryPills {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
}

#categoryPills button {
  flex: 0 0 auto;
  min-width: 116px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  scroll-snap-align: start;
}

#categoryPills .btn-outline-primary {
  color: var(--brand-navy);
  border-color: rgba(13, 52, 114, 0.35);
}

#categoryPills .btn-outline-primary:hover {
  border-color: var(--brand-navy);
}

.btn-primary {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.btn-outline-primary {
  color: var(--brand-orange);
  border-color: rgba(246, 138, 31, 0.7);
}

.btn-outline-primary:hover {
  background-color: rgba(246, 138, 31, 0.1);
  border-color: var(--brand-orange);
}

.filter-card label {
  font-weight: 600;
  color: var(--brand-navy);
}

.table thead th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-muted);
  border-bottom-width: 0;
}

.table tbody td {
  border-top-color: rgba(13, 52, 114, 0.08);
}

.heat-card {
  background-color: #fff;
}

.heat-participant {
  border: 1px dashed #dee2e6;
  border-radius: 0.8rem;
  padding: 0.65rem 0.85rem;
  background-color: #fdfdfd;
}

.heat-participant.has-result {
  border-color: rgba(25, 135, 84, 0.45);
  background-color: #f2fff4;
}

.heat-wod-result {
  border: 1px solid rgba(13, 52, 114, 0.08);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  background: #fcfdff;
}

.heat-result-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(13, 52, 114, 0.08);
  border-radius: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(13, 52, 114, 0.06);
}

.heat-result-rank {
  font-weight: 700;
  font-size: 0.95rem;
  width: 2.5rem;
  text-align: center;
  padding: 0.25rem 0;
  border-radius: 999px;
  background: var(--brand-sky);
  color: var(--brand-midnight);
}

.heat-result-rank-1 .heat-result-rank {
  background: linear-gradient(120deg, #ffd700, #ffef9f);
  color: #5f4600;
}

.heat-result-rank-2 .heat-result-rank {
  background: linear-gradient(120deg, #d6d6d6, #f5f5f5);
  color: #3f3f3f;
}

.heat-result-rank-3 .heat-result-rank {
  background: linear-gradient(120deg, #c98947, #f4c08f);
  color: #4a2906;
}

.results-meta small {
  color: var(--brand-muted);
}

.schedule-cta {
  padding: 0.95rem 2.5rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(120deg, var(--brand-orange), #ffb347);
  border: none;
  color: #fff;
  box-shadow: 0 12px 30px rgba(246, 138, 31, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.heat-wod-panel {
  border: 1px solid rgba(13, 52, 114, 0.12);
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  background: #fff;
}

.heat-wod-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.heat-wod-panel summary::-webkit-details-marker {
  display: none;
}

.heat-wod-panel[open] summary {
  border-bottom: 1px solid rgba(13, 52, 114, 0.08);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.heat-wod-panel-body {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .heat-wod-panel-body {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.heat-wod-form {
  border: 1px solid rgba(13, 52, 114, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fb;
}

.heat-wod-form form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.heat-wod-form .row.g-2 {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.5rem;
}

.schedule-cta:hover,
.schedule-cta:focus-visible {
  color: #fff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 35px rgba(246, 138, 31, 0.4);
}

.schedule-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

footer.site-footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--brand-muted);
}

@media (max-width: 992px) {
  .brand-banner {
    flex-direction: column;
    border-radius: 1.25rem;
    text-align: center;
    gap: 0.75rem;
  }

  .brand-banner__tagline {
    white-space: normal;
    line-height: 1.4;
  }

  .brand-banner__logo-chip {
    width: 100%;
  }
}

@media (max-width: 576px) {
  #categoryPills button {
    width: auto;
  }
  #heatCategoryPills button {
    width: 100%;
  }

  header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .results-meta {
    width: 100%;
    align-items: stretch !important;
  }

  .schedule-cta {
    width: 100%;
  }

  .card {
    border-radius: 1rem;
  }
}
