:root {
  --yellow: #ffd700;
  --yellow-dark: #b88c00;
  --black: #001326;
  --ink: #001326;
  --muted: #5a6574;
  --line: #d4deeb;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-raised: #ffffff;
  --surface-pressed: #e7edf5;
  --ink-soft: #27364a;
  --red: #ff4b4b;
  --energy-blue: #0050b3;
  --energy-red: #ff4b4b;
  --energy-white: #f5f7fa;
  --shadow: 0 20px 48px rgba(0, 19, 38, 0.16);
  --shadow-soft: 0 18px 40px rgba(0, 19, 38, 0.11);
  --shadow-soft-low: 0 10px 24px rgba(0, 19, 38, 0.09);
  --shadow-inset: inset 0 2px 8px rgba(0, 19, 38, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.78);
  --shadow-yellow: 0 16px 34px rgba(255, 215, 0, 0.32), 0 6px 18px rgba(0, 80, 179, 0.12);
  --focus-ring: 0 0 0 4px rgba(255, 215, 0, 0.34), 0 0 0 1px rgba(0, 19, 38, 0.62);
}

body:not(.admin-body):not(.login-body) {
  background:
    linear-gradient(135deg, rgba(0, 80, 179, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 75, 75, 0.05), transparent 34%),
    linear-gradient(180deg, #f5f7fa 0%, #ffffff 44%, #edf2f8 100%) fixed;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.admin-body):not(.login-body) main {
  background:
    linear-gradient(90deg, rgba(0, 80, 179, 0.035) 0 1px, transparent 1px 100%) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(245, 247, 250, 0.4), rgba(245, 247, 250, 0.86));
}

body:not(.admin-body):not(.login-body) h1,
body:not(.admin-body):not(.login-body) h2,
body:not(.admin-body):not(.login-body) h3,
.calendar-track,
.challenge-hero-stats strong,
.countdown-grid strong,
.result-board-head,
.result-row strong,
.result-row em {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

body:not(.admin-body):not(.login-body) h1 {
  font-weight: 900;
}

.site-header {
  background: rgba(0, 19, 38, 0.96);
  color: #fff;
  border-bottom-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 16px 36px rgba(0, 19, 38, 0.22);
}

.site-header::after {
  bottom: -4px;
  height: 4px;
  background:
    linear-gradient(90deg, #0050b3 0 34%, #ffd700 34% 66%, #ff4b4b 66% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  background-size: 180% 100%, 100% 100%;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.36);
  animation: energyHeaderLine 3s linear infinite;
}

.brand {
  background: #f5f7fa;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.site-nav a,
.header-social a {
  color: #f5f7fa;
  background: rgba(245, 247, 250, 0.06);
  border: 1px solid rgba(245, 247, 250, 0.14);
  box-shadow: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a.is-active {
  background: #ffd700;
  color: #001326;
  border-color: #ffd700;
  box-shadow: 0 12px 28px rgba(255, 215, 0, 0.28);
}

.header-social a:hover,
.header-social a:focus {
  background: #ff4b4b;
  color: #fff;
  border-color: #ff4b4b;
  box-shadow: 0 12px 28px rgba(255, 75, 75, 0.28);
}

.nav-toggle {
  background: rgba(245, 247, 250, 0.08);
  border-color: rgba(245, 247, 250, 0.22);
}

.nav-toggle span {
  background: #fff;
}

.hero-slider::after {
  background:
    linear-gradient(102deg, rgba(0, 19, 38, 0.93), rgba(0, 19, 38, 0.72) 34%, rgba(0, 80, 179, 0.48) 58%, rgba(255, 75, 75, 0.2) 76%, rgba(255, 215, 0, 0.14)),
    linear-gradient(180deg, rgba(0, 19, 38, 0.06), rgba(0, 19, 38, 0.72));
}

.page-hero {
  background-image:
    linear-gradient(106deg, rgba(0, 19, 38, 0.94), rgba(0, 19, 38, 0.68) 47%, rgba(0, 80, 179, 0.34) 66%, rgba(255, 75, 75, 0.22)),
    var(--page-hero-image);
}

.challenge-hero::before,
.result-hero::before {
  background:
    linear-gradient(102deg, rgba(0, 19, 38, 0.86), rgba(0, 19, 38, 0.52) 46%, rgba(0, 80, 179, 0.32) 68%, rgba(255, 215, 0, 0.12)),
    linear-gradient(180deg, rgba(0, 19, 38, 0.08), rgba(0, 19, 38, 0.66));
}

.hero-home::before,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  height: auto;
  pointer-events: none;
  background: repeating-linear-gradient(118deg, transparent 0 38px, rgba(245, 247, 250, 0.032) 38px 39px, transparent 39px 84px);
  mix-blend-mode: screen;
}

.hero-copy h1,
.challenge-hero-content h1,
.result-hero-copy h1,
.page-hero h1 {
  color: #fff;
  text-shadow: 0 15px 38px rgba(0, 19, 38, 0.68), 3px 3px 0 rgba(255, 75, 75, 0.18);
}

.hero-lead,
.page-hero p {
  color: rgba(245, 247, 250, 0.9);
}

.eyebrow {
  gap: 14px;
  color: #ffd700;
  font-weight: 900;
  text-shadow: none;
}

.eyebrow::before {
  flex: 0 0 52px;
  width: 52px;
  height: 5px;
  background:
    linear-gradient(90deg, #ff4b4b 0 17px, #0050b3 17px 35px, #ffd700 35px 100%);
  box-shadow: none;
}

.btn,
.dashboard-card-action,
.drag-handle,
.photo-clear {
  border-radius: 8px;
  box-shadow: var(--shadow-soft-low);
}

.btn {
  min-height: 48px;
  font-weight: 900;
}

.btn-primary {
  color: #001326;
  border-color: rgba(255, 215, 0, 0.86);
  background:
    linear-gradient(180deg, #ffe45c 0%, #ffd700 58%, #e9bb00 100%);
  box-shadow: var(--shadow-yellow);
}

.btn-secondary,
.dashboard-card-action-secondary {
  color: #001326;
  border-color: rgba(0, 80, 179, 0.24);
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
}

.hero-actions .btn-secondary {
  color: #fff;
  border-color: rgba(245, 247, 250, 0.28);
  background: rgba(245, 247, 250, 0.12);
  backdrop-filter: blur(10px);
}

.btn:hover,
.btn:focus,
.dashboard-card-action:hover,
.dashboard-card-action:focus {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 19, 38, 0.18);
}

.btn-primary .btn-graphic,
.feature-icon,
.calendar-icon,
.dashboard-action-icon {
  background: #001326;
  color: #ffd700;
}

.btn-secondary .btn-graphic,
.contact-icon,
.panel-icon,
.format-icon,
.result-highlight-icon,
.spec-icon,
.dashboard-section-icon,
.dashboard-info-icon,
.photo-slot-badge {
  background: #0050b3;
  color: #fff;
}

.feature-card,
.format-card,
.rich-panel,
.announcement-card,
.contact-card,
.info-block,
.toolbox-item,
.sponsor-card,
.empty-state,
.member-priority-card,
.calendar-item,
.result-highlight,
.sheet-frame,
.contact-form,
.filters,
.race-entry-stepper,
.form-fieldset,
.parts-category,
.parts-quote-summary,
.choice-card,
.mandatory-parts label,
.member-announcement-image,
.photo-slot,
.quote-price-box,
.member-list-item,
.quote-answer,
.result-board,
.challenge-hero-stats span {
  background:
    linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
  border-color: rgba(0, 80, 179, 0.16);
  box-shadow: var(--shadow-soft);
}

.feature-card,
.format-card,
.rich-panel,
.announcement-card,
.contact-card,
.info-block,
.toolbox-item,
.sponsor-card,
.result-highlight,
.calendar-item {
  border-top: 3px solid #0050b3;
}

.feature-card:nth-child(3n + 2),
.format-card:nth-child(3n + 2),
.rich-panel:nth-child(3n + 2),
.announcement-card:nth-child(3n + 2),
.contact-card:nth-child(3n + 2),
.info-block:nth-child(3n + 2),
.toolbox-item:nth-child(3n + 2),
.sponsor-card:nth-child(3n + 2),
.result-highlight:nth-child(3n + 2),
.calendar-item:nth-child(3n + 2) {
  border-top-color: #ffd700;
}

.feature-card:nth-child(3n),
.format-card:nth-child(3n),
.rich-panel:nth-child(3n),
.announcement-card:nth-child(3n),
.contact-card:nth-child(3n),
.info-block:nth-child(3n),
.toolbox-item:nth-child(3n),
.sponsor-card:nth-child(3n),
.result-highlight:nth-child(3n),
.calendar-item:nth-child(3n) {
  border-top-color: #ff4b4b;
}

.feature-card::before,
.format-card::before,
.rich-panel::before,
.announcement-card::before,
.contact-card::before,
.info-block::before,
.toolbox-item::before,
.sponsor-card::before,
.result-highlight::before {
  background:
    linear-gradient(112deg, transparent 0 58%, rgba(0, 80, 179, 0.12) 58% 63%, transparent 63% 67%, rgba(255, 75, 75, 0.12) 67% 70%, transparent 70% 100%);
}

.feature-card:hover,
.format-card:hover,
.rich-panel:hover,
.announcement-card:hover,
.contact-card:hover,
.info-block:hover,
.toolbox-item:hover,
.sponsor-card:hover,
.result-highlight:hover,
.calendar-item:hover,
.calendar-item:focus {
  transform: translateY(-6px);
  border-color: rgba(0, 80, 179, 0.42);
  box-shadow: 0 24px 48px rgba(0, 19, 38, 0.15);
}

.feature-card:hover .feature-icon,
.calendar-item:hover .calendar-icon,
.calendar-item:focus .calendar-icon {
  background: #ff4b4b;
  color: #fff;
}

.section-muted {
  background:
    linear-gradient(135deg, rgba(0, 80, 179, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(255, 215, 0, 0.16), transparent 32%),
    #f5f7fa;
}

.section-dark {
  background:
    linear-gradient(135deg, rgba(0, 80, 179, 0.34), transparent 32%),
    linear-gradient(180deg, #001326 0%, #000814 100%);
  color: #fff;
}

.section-dark .rich-panel,
.section-dark .info-block,
.race-countdown {
  background: #001326;
  border-color: rgba(255, 215, 0, 0.42);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
}

.section-dark .info-block {
  color: #fff;
}

.section-dark .info-block .rich-text {
  color: rgba(245, 247, 250, 0.86);
}

.race-countdown {
  border-left: 5px solid #ffd700;
}

.race-countdown::before {
  content: none;
}

.countdown-grid span {
  background: #f5f7fa;
  color: #001326;
  box-shadow: inset 0 -3px 0 rgba(0, 80, 179, 0.16), 0 10px 18px rgba(0, 0, 0, 0.2);
}

.countdown-grid strong {
  color: #0050b3;
}

.calendar-status,
.doc-kind {
  background: #001326;
  color: #fff;
}

.calendar-item:hover .calendar-status,
.toolbox-item:hover .doc-kind,
.toolbox-item:focus .doc-kind {
  background: #ff4b4b;
}

.calendar-track {
  color: #001326;
}

.spec-item {
  border-left-color: #ff4b4b;
  background:
    linear-gradient(145deg, #f5f7fa 0%, #ffffff 100%);
}

.spec-icon {
  background: #ffd700;
}

.spec-icon img {
  width: 24px;
  height: 24px;
}

.spec-item:nth-child(2) .spec-icon img {
  width: 23px;
  height: 23px;
  transform: translateY(1px);
}

.text-link,
.doc-link,
.footer-bottom a,
.footer-social,
.dashboard-action-link,
.regulation-link {
  text-decoration-color: #ff4b4b;
}

.text-link:hover,
.doc-link:hover,
.footer-bottom a:hover,
.footer-social:hover,
.dashboard-action-link:hover,
.regulation-link:hover {
  color: #0050b3;
}

.result-board-head strong,
.result-row.is-first span,
.result-badge {
  background: #ffd700;
  color: #001326;
}

.result-row span {
  background: #0050b3;
}

.result-row em {
  color: #ff4b4b;
}

.result-progress {
  background: #d4deeb;
}

.result-progress span {
  background:
    linear-gradient(90deg, #0050b3, #ffd700, #ff4b4b);
}

.split-image,
.split-slider {
  border: 4px solid #fff;
  box-shadow: 0 22px 48px rgba(0, 19, 38, 0.18), -10px 10px 0 rgba(0, 80, 179, 0.16);
}

.split-slider {
  background: #001326;
}

.split-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 19, 38, 0.22));
}

.media-slider-btn,
.media-slider-dots {
  background: rgba(0, 19, 38, 0.78);
}

.media-slider-btn:hover,
.media-slider-btn:focus,
.media-slider-dot.is-active {
  background: #ffd700;
  color: #001326;
}

.site-footer {
  background:
    linear-gradient(135deg, rgba(0, 80, 179, 0.36), transparent 38%),
    #001326;
}

.footer-logo {
  background: #f5f7fa;
}

/* Energy+ refinements: public, members and admin */
body.admin-body,
body.login-body {
  background:
    linear-gradient(135deg, rgba(0, 80, 179, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 215, 0, 0.12), transparent 30%),
    linear-gradient(180deg, #f5f7fa 0%, #ffffff 42%, #edf2f8 100%) fixed;
  color: #001326;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-body h1,
body.admin-body h2,
body.admin-body h3,
body.login-body h1,
body.login-body h2,
body.login-body h3,
.admin-collapse > summary span,
.dashboard-action-content strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-shell {
  background:
    linear-gradient(90deg, rgba(0, 80, 179, 0.04) 0 1px, transparent 1px 100%) 0 0 / 40px 40px,
    linear-gradient(180deg, rgba(245, 247, 250, 0.86), rgba(237, 242, 248, 0.9));
}

.admin-sidebar {
  position: sticky;
  background:
    linear-gradient(180deg, rgba(0, 80, 179, 0.18), transparent 38%),
    linear-gradient(180deg, #001326 0%, #000814 100%);
  border-right: 1px solid rgba(255, 215, 0, 0.28);
  box-shadow: 18px 0 44px rgba(0, 19, 38, 0.22);
}

.admin-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0050b3 0 34%, #ffd700 34% 66%, #ff4b4b 66% 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.28);
}

.admin-brand img,
.login-panel img {
  background: #f5f7fa;
  border-color: rgba(245, 247, 250, 0.26);
  box-shadow: 0 14px 32px rgba(0, 19, 38, 0.24);
}

.admin-nav-heading {
  color: #ffd700;
}

.admin-nav a {
  border-color: rgba(245, 247, 250, 0.12);
  background: rgba(245, 247, 250, 0.06);
  color: rgba(245, 247, 250, 0.9);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.admin-nav a:hover,
.admin-nav a:focus,
.admin-nav a.is-active {
  transform: translateX(4px);
  border-color: #ffd700;
  background: #ffd700;
  color: #001326;
  box-shadow: 0 12px 28px rgba(255, 215, 0, 0.24);
}

.feature-card,
.format-card,
.rich-panel,
.announcement-card,
.contact-card,
.info-block,
.toolbox-item,
.sponsor-card,
.result-highlight,
.member-priority-card,
.contact-form,
.filters,
.race-entry-stepper,
.form-fieldset,
.choice-card,
.parts-category,
.parts-quote-summary,
.member-announcement-image,
.photo-slot,
.quote-price-box,
.member-list-item,
.quote-answer,
.calendar-item,
.dashboard-action-card,
.dashboard-info-card,
.admin-card,
.admin-table-wrap,
.message-card,
.login-panel,
.admin-stat,
.admin-queue-item,
.admin-queue-empty,
.settings-group,
.admin-collapse,
.media-picker,
.media-picker-current,
.media-picker-panel,
.media-picker-item,
.admin-media-grid figure,
.quote-price-line,
.admin-clean-list li {
  position: relative;
  border-top: 5px solid #0050b3;
  box-shadow: 0 20px 44px rgba(0, 19, 38, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease, border-top-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.feature-card:nth-child(3n + 2),
.format-card:nth-child(3n + 2),
.rich-panel:nth-child(3n + 2),
.announcement-card:nth-child(3n + 2),
.contact-card:nth-child(3n + 2),
.info-block:nth-child(3n + 2),
.toolbox-item:nth-child(3n + 2),
.sponsor-card:nth-child(3n + 2),
.result-highlight:nth-child(3n + 2),
.member-priority-card:nth-child(3n + 2),
.choice-card:nth-child(3n + 2),
.member-list-item:nth-child(3n + 2),
.calendar-item:nth-child(3n + 2),
.dashboard-action-card:nth-child(3n + 2),
.dashboard-info-card:nth-child(3n + 2),
.admin-card:nth-of-type(3n + 2),
.admin-stat:nth-child(3n + 2) {
  border-top-color: #ffd700;
}

.feature-card:nth-child(3n),
.format-card:nth-child(3n),
.rich-panel:nth-child(3n),
.announcement-card:nth-child(3n),
.contact-card:nth-child(3n),
.info-block:nth-child(3n),
.toolbox-item:nth-child(3n),
.sponsor-card:nth-child(3n),
.result-highlight:nth-child(3n),
.member-priority-card:nth-child(3n),
.choice-card:nth-child(3n),
.member-list-item:nth-child(3n),
.calendar-item:nth-child(3n),
.dashboard-action-card:nth-child(3n),
.dashboard-info-card:nth-child(3n),
.admin-card:nth-of-type(3n),
.admin-stat:nth-child(3n) {
  border-top-color: #ff4b4b;
}

.feature-card:hover,
.format-card:hover,
.rich-panel:hover,
.announcement-card:hover,
.contact-card:hover,
.info-block:hover,
.toolbox-item:hover,
.sponsor-card:hover,
.result-highlight:hover,
.member-priority-card:hover,
.member-priority-card:focus,
.choice-card:hover,
.choice-card:focus-within,
.calendar-item:hover,
.calendar-item:focus,
.dashboard-action-card:hover,
.dashboard-action-card:focus,
.dashboard-info-card:hover,
.dashboard-info-card:focus,
.media-picker-item:hover,
.media-picker-item:focus,
.media-picker-item.is-selected {
  transform: translateY(-7px);
  border-color: rgba(0, 80, 179, 0.46);
  border-top-color: #ff4b4b;
  box-shadow: 0 28px 58px rgba(0, 19, 38, 0.18), 0 12px 22px rgba(255, 75, 75, 0.1);
}

.contact-form:focus-within,
.filters:focus-within,
.form-fieldset:focus-within {
  border-color: rgba(0, 80, 179, 0.42);
  border-top-color: #ff4b4b;
  box-shadow: 0 24px 46px rgba(0, 19, 38, 0.14);
}

.member-list-item:hover,
.member-list-item:focus-within {
  transform: translateX(4px);
  border-color: rgba(0, 80, 179, 0.38);
  border-top-color: #ff4b4b;
  box-shadow: 0 16px 30px rgba(0, 19, 38, 0.12);
}

.race-entry-form .engagement-choice-grid,
.race-entry-form .event-choice-grid {
  gap: 12px;
}

.race-entry-form .engagement-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.race-entry-form .engagement-choice-grid > .choice-card,
.race-entry-form .event-choice-grid > .choice-card {
  border-top-width: 1px;
  border-top-color: var(--line);
  border-left: 4px solid transparent;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 19, 38, 0.07);
  transform: none;
}

.race-entry-form .engagement-choice-grid > .choice-card:hover,
.race-entry-form .engagement-choice-grid > .choice-card:focus-within,
.race-entry-form .event-choice-grid > .choice-card:hover,
.race-entry-form .event-choice-grid > .choice-card:focus-within {
  border-color: rgba(0, 80, 179, 0.24);
  border-top-color: rgba(0, 80, 179, 0.24);
  border-left-color: #0050b3;
  box-shadow: 0 14px 30px rgba(0, 19, 38, 0.1);
  transform: none;
}

.race-entry-form .engagement-choice-grid > .choice-card:has(input:checked),
.race-entry-form .event-choice-grid > .choice-card:has(input:checked) {
  border-color: rgba(214, 170, 0, 0.72);
  border-top-color: rgba(214, 170, 0, 0.72);
  border-left-color: #ffd700;
  background: #fffaf0;
  box-shadow: 0 14px 30px rgba(214, 170, 0, 0.14);
}

.race-entry-form .engagement-choice-grid > .choice-card {
  min-height: 72px;
  padding: 14px 16px;
}

.race-entry-form .event-choice-card {
  min-height: 72px;
  align-items: flex-start;
  padding: 13px 14px;
}

.race-entry-form .event-choice-card input {
  margin-top: 4px;
  flex: 0 0 auto;
}

.race-entry-form .event-choice-copy {
  gap: 4px;
  min-width: 0;
}

.race-entry-form .event-choice-copy strong {
  line-height: 1.22;
}

.race-entry-form .event-choice-date {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.2;
}

.race-entry-form .event-choice-card:has(input:checked) .event-choice-date {
  color: #6b5600;
}

.race-entry-form .event-choice-grid .choice-card.is-locked {
  opacity: 1;
}

.race-entry-form .event-choice-grid .choice-card.is-locked:not(:has(input:checked)) {
  opacity: 0.58;
}

.race-entry-form .event-choice-grid .choice-card.is-locked:hover,
.race-entry-form .event-choice-grid .choice-card.is-locked:focus-within {
  border-color: var(--line);
  border-top-color: var(--line);
  border-left-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 19, 38, 0.07);
}

.race-entry-form .event-choice-grid .choice-card.is-locked:has(input:checked) {
  border-color: rgba(214, 170, 0, 0.72);
  border-left-color: #ffd700;
}

.race-entry-form.contact-form {
  border-color: rgba(0, 80, 179, 0.16);
  border-top-width: 1px;
  border-top-color: rgba(0, 80, 179, 0.16);
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 19, 38, 0.1);
}

.race-entry-form .race-entry-stepper,
.race-entry-form .form-fieldset {
  border-color: rgba(0, 80, 179, 0.14);
  border-top-width: 1px;
  border-top-color: rgba(0, 80, 179, 0.14);
  background: #f8fafc;
  box-shadow: none;
}

.race-entry-form .race-entry-stepper {
  padding: 6px;
}

.race-entry-form .race-entry-stepper button.is-active {
  border-color: rgba(214, 170, 0, 0.5);
  box-shadow: none;
}

.race-entry-form .form-fieldset {
  padding: 20px 18px;
}

.race-entry-form .form-fieldset legend {
  color: #001326;
}

.race-entry-form .choice-card,
.race-entry-form .engagement-choice-grid > .choice-card,
.race-entry-form .event-choice-grid > .choice-card,
.race-entry-form .mandatory-parts label {
  border: 1px solid rgba(0, 80, 179, 0.14);
  background: #fff;
  box-shadow: none;
  transform: none;
}

.race-entry-form .engagement-choice-grid > .choice-card,
.race-entry-form .event-choice-grid > .choice-card {
  border-left-width: 1px;
}

.race-entry-form .choice-card:hover,
.race-entry-form .choice-card:focus-within,
.race-entry-form .engagement-choice-grid > .choice-card:hover,
.race-entry-form .engagement-choice-grid > .choice-card:focus-within,
.race-entry-form .event-choice-grid > .choice-card:hover,
.race-entry-form .event-choice-grid > .choice-card:focus-within {
  border-color: rgba(0, 80, 179, 0.28);
  box-shadow: 0 10px 22px rgba(0, 19, 38, 0.08);
  transform: none;
}

.race-entry-form .choice-card:has(input:checked),
.race-entry-form .engagement-choice-grid > .choice-card:has(input:checked),
.race-entry-form .event-choice-grid > .choice-card:has(input:checked) {
  border-color: rgba(214, 170, 0, 0.68);
  background: #fffdf2;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.28);
}

.race-entry-form .event-choice-grid .choice-card.is-locked:hover,
.race-entry-form .event-choice-grid .choice-card.is-locked:focus-within {
  border-color: rgba(0, 80, 179, 0.14);
  box-shadow: none;
}

.race-entry-form .event-choice-grid .choice-card.is-locked:has(input:checked) {
  border-color: rgba(214, 170, 0, 0.68);
}

.race-entry-form.contact-form:focus-within,
.race-entry-form .form-fieldset:focus-within {
  border-color: rgba(0, 80, 179, 0.24);
  border-top-color: rgba(0, 80, 179, 0.24);
  box-shadow: 0 0 0 3px rgba(0, 80, 179, 0.06);
}

.race-entry-form.contact-form {
  border: 1px solid rgba(0, 80, 179, 0.16) !important;
  box-shadow: 0 18px 40px rgba(0, 19, 38, 0.08);
}

.race-entry-form.contact-form:focus-within {
  border: 1px solid rgba(0, 80, 179, 0.16) !important;
  box-shadow: 0 18px 40px rgba(0, 19, 38, 0.08) !important;
}

.race-entry-form .race-entry-stepper {
  border: 0;
  background: #f4f7fb;
  box-shadow: inset 0 0 0 1px rgba(0, 80, 179, 0.12);
}

.race-entry-form .form-fieldset {
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.race-entry-form .form-fieldset legend {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.race-entry-form .choice-grid,
.race-entry-form .event-choice-grid,
.race-entry-form .mandatory-parts {
  padding: 0;
  border: 0;
  background: transparent;
}

.race-entry-form .choice-card,
.race-entry-form .engagement-choice-grid > .choice-card,
.race-entry-form .event-choice-grid > .choice-card,
.race-entry-form .mandatory-parts label {
  border: 1px solid rgba(0, 80, 179, 0.14) !important;
  border-left-width: 1px !important;
  border-top-width: 1px !important;
  background: #fff;
  box-shadow: none !important;
}

.race-entry-form .choice-card:has(input:checked),
.race-entry-form .engagement-choice-grid > .choice-card:has(input:checked),
.race-entry-form .event-choice-grid > .choice-card:has(input:checked) {
  border-color: rgba(214, 170, 0, 0.72) !important;
  background: #fffdf2;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.26) !important;
}

.race-entry-form .choice-card:hover,
.race-entry-form .choice-card:focus-within,
.race-entry-form .engagement-choice-grid > .choice-card:hover,
.race-entry-form .engagement-choice-grid > .choice-card:focus-within,
.race-entry-form .event-choice-grid > .choice-card:hover,
.race-entry-form .event-choice-grid > .choice-card:focus-within {
  border-color: rgba(0, 80, 179, 0.26) !important;
  box-shadow: 0 8px 18px rgba(0, 19, 38, 0.07) !important;
}

.race-entry-form .event-choice-grid .choice-card.is-locked:hover,
.race-entry-form .event-choice-grid .choice-card.is-locked:focus-within {
  border-color: rgba(0, 80, 179, 0.14) !important;
  box-shadow: none !important;
}

.feature-icon,
.calendar-icon,
.member-priority-icon,
.dashboard-section-icon,
.dashboard-action-icon,
.dashboard-info-icon,
.panel-icon,
.format-icon,
.toolbox-icon,
.contact-icon,
.result-highlight-icon {
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover .feature-icon,
.calendar-item:hover .calendar-icon,
.calendar-item:focus .calendar-icon,
.member-priority-card:hover .member-priority-icon,
.member-priority-card:focus .member-priority-icon,
.dashboard-action-card:hover .dashboard-action-icon,
.dashboard-action-card:focus .dashboard-action-icon,
.dashboard-info-card:hover .dashboard-info-icon,
.dashboard-info-card:focus .dashboard-info-icon,
.rich-panel:hover .panel-icon,
.format-card:hover .format-icon,
.toolbox-item:hover .toolbox-icon,
.toolbox-item:focus .toolbox-icon,
.contact-card:hover .contact-icon,
.result-highlight:hover .result-highlight-icon {
  transform: translateY(-2px) rotate(-7deg) scale(1.08);
  background: #ff4b4b;
  color: #fff;
  box-shadow: 0 16px 28px rgba(255, 75, 75, 0.24);
}

.member-beta-banner {
  background: linear-gradient(90deg, #001326 0%, #0050b3 42%, #ff4b4b 100%);
  border-bottom-color: rgba(255, 215, 0, 0.46);
  box-shadow: 0 10px 24px rgba(0, 19, 38, 0.18);
}

.member-beta-banner-track span::before {
  border-color: rgba(255, 215, 0, 0.72);
  background: #ffd700;
  color: #001326;
}

.member-priority-card.task-primary,
.dashboard-action-card:nth-child(4n + 1),
.admin-stat:nth-child(4n + 1) {
  border-top-color: #ffd700;
}

.member-priority-card.task-success,
.dashboard-action-card:nth-child(4n + 2),
.admin-stat:nth-child(4n + 2) {
  border-top-color: #0050b3;
}

.member-priority-card.task-warning,
.dashboard-action-card:nth-child(4n + 3),
.admin-stat:nth-child(4n + 3) {
  border-top-color: #ff4b4b;
}

.btn,
.dashboard-card-action,
.admin-nav a,
.media-slider-btn,
.media-slider-dot {
  will-change: transform;
}

.btn:active,
.dashboard-card-action:active,
.admin-nav a:active,
.media-slider-btn:active,
.media-slider-dot:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: var(--shadow-inset);
}

.js .reveal {
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.34s ease, transform 0.42s cubic-bezier(0.18, 0.9, 0.24, 1);
}

.js .reveal.is-visible {
  transform: translateY(0) scale(1);
}

.calendar-grid {
  align-items: stretch;
}

.calendar-item {
  min-height: 150px;
  overflow: hidden;
  border-top-width: 0;
  border-left: 6px solid #0050b3;
  background:
    linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
}

.calendar-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 58%, rgba(0, 80, 179, 0.1) 58% 62%, transparent 62% 67%, rgba(255, 75, 75, 0.12) 67% 70%, transparent 70% 100%);
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.calendar-item:hover::after,
.calendar-item:focus::after {
  opacity: 1;
  transform: translateX(0);
}

.calendar-item.is-next {
  grid-column: span 2;
  min-height: 174px;
  border-left-color: #ffd700;
  background:
    linear-gradient(112deg, rgba(255, 215, 0, 0.16), transparent 28%),
    linear-gradient(145deg, #001326 0%, #042d61 62%, #0050b3 100%);
  color: #fff;
  box-shadow: 0 28px 62px rgba(0, 19, 38, 0.24), 0 0 0 1px rgba(255, 215, 0, 0.34);
}

.calendar-item.is-next::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 14px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd700, #ff4b4b, #0050b3);
  opacity: 0.86;
}

.calendar-item.is-next .calendar-track,
.calendar-item.is-next .calendar-date {
  color: #fff;
}

.calendar-item.is-next .calendar-date {
  color: rgba(245, 247, 250, 0.84);
}

.calendar-item.is-next .calendar-icon {
  background: #ffd700;
  color: #001326;
}

.calendar-item.is-next .calendar-status {
  background: #ffd700;
  color: #001326;
}

.calendar-item.is-upcoming {
  border-left-color: #0050b3;
}

.calendar-item.is-upcoming:nth-child(3n) {
  border-left-color: #ff4b4b;
}

.calendar-item.is-upcoming:nth-child(3n + 2) {
  border-left-color: #ffd700;
}

.calendar-item.is-past {
  border-left-color: #8995a5;
  opacity: 0.66;
  filter: saturate(0.76);
}

.calendar-status {
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.calendar-item.is-upcoming .calendar-status {
  background: #0050b3;
}

.race-countdown {
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid rgba(255, 215, 0, 0.42);
  font-variant-numeric: tabular-nums;
}

.race-countdown::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  z-index: 1;
  width: 58%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #ffd700, #ff4b4b, transparent);
  animation: raceTimingSweep 1.45s linear infinite;
}

.race-countdown::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(110deg, transparent 0 30px, rgba(245, 247, 250, 0.055) 30px 31px, transparent 31px 62px);
}

.race-countdown > * {
  position: relative;
  z-index: 2;
}

.countdown-grid span {
  position: relative;
  overflow: hidden;
}

.countdown-grid span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0050b3, #ffd700, #ff4b4b);
  opacity: 0.78;
}

.countdown-grid span:last-child {
  animation: raceSecondPulse 1s steps(2, end) infinite;
}

@keyframes raceTimingSweep {
  to {
    transform: translateX(260%);
  }
}

@keyframes raceSecondPulse {
  50% {
    transform: translateY(-2px);
    box-shadow: inset 0 -3px 0 rgba(255, 75, 75, 0.18), 0 12px 22px rgba(255, 75, 75, 0.22);
  }
}

@keyframes energyHeaderLine {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: -180% 0, 0 0;
  }
}

@media (max-width: 820px) {
  .site-nav {
    background:
      linear-gradient(145deg, #001326 0%, #062447 100%);
    border-color: rgba(245, 247, 250, 0.18);
    box-shadow: 0 20px 46px rgba(0, 19, 38, 0.34);
  }

  .site-nav a {
    border-color: rgba(245, 247, 250, 0.12);
  }

  .calendar-item.is-next {
    grid-column: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header::after,
  .race-countdown::before,
  .countdown-grid span:last-child {
    animation: none;
  }

  .js .reveal {
    transition: none;
    transform: none;
  }
}
