.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 100%);
  backdrop-filter: blur(12px);
}

.site-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  gap: 20px;
}

.site-nav__panel {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__links {
  display: flex;
  gap: 32px;
  font-family: var(--font-heading);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--color-muted);
}

.site-nav__links a {
  padding: 10px 4px;
  min-height: var(--min-touch-target);
  display: inline-flex;
  align-items: center;
  position: relative;
}

.site-nav__links a:hover {
  color: var(--color-text);
}

.site-nav__links a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  box-shadow: var(--focus-ring);
  border-radius: 2px;
  color: var(--color-text);
}

.site-nav__links a.is-active {
  color: var(--color-primary);
}

.site-nav__links a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  border-radius: 999px;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav__actions .btn {
  white-space: nowrap;
}

.user-menu {
  position: relative;
}

.user-menu__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.user-menu__summary:hover,
.user-menu__summary:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.user-menu__summary::-webkit-details-marker {
  display: none;
}

.user-menu__icon {
  font-size: 14px;
}

.user-menu__name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__caret {
  font-size: 12px;
  opacity: 0.7;
}

.user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
}

.user-menu[open] .user-menu__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  /* let a <button> element use this class like an <a> */
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.user-menu__form,
.settings-logout-form {
  margin: 0;
  padding: 0;
}

.user-menu__item:hover,
.user-menu__item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.site-nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  min-height: var(--min-touch-target);
  min-width: var(--min-touch-target);
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  margin-left: auto;
}

.site-nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: -10px;
  min-width: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
}

.brand__mark {
  font-size: 28px;
  font-weight: 900;
  color: var(--color-primary);
}

.brand__name {
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.brand__accent {
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
}

.brand--footer {
  justify-content: center;
}

.btn {
  border: none;
  padding: 14px 24px;
  min-height: var(--min-touch-target);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 0, 0, 0.3);
}

.btn--loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn--loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn--club {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(212, 0, 0, 0.35);
}

.btn--club:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 0, 0, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  min-height: 36px;
}

.section-heading {
  text-align: center;
  margin-bottom: 50px;
}

.section-heading__tag {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.section-heading__title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 2px;
}

.pill {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 2px;
  font-size: 12px; /* Fixed: was 11px, minimum readable size */
  letter-spacing: 1px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: #fff;
}

.site-footer {
  margin-top: 80px;
  text-align: center;
  padding: 50px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer__content {
  margin-bottom: 20px;
}

.site-footer__tagline {
  color: var(--color-muted);
  margin-top: 10px;
}

.site-footer__freshness {
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.site-footer__disclosure {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-dim);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.site-footer__links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.site-footer__social {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.site-footer__social-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--color-muted);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-footer__social-link svg {
  width: 18px;
  height: 18px;
}

.site-footer__social-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.08);
}

.site-footer__link {
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.site-footer__link:hover {
  color: #fff;
}

.site-footer__divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 0 auto 16px;
}

.site-footer__legal {
  font-size: 13px;
  color: var(--color-dim);
  letter-spacing: 1px;
}

.team-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(90deg, rgba(212, 0, 0, 0.2), rgba(255, 107, 107, 0.1));
  border-bottom: 1px solid rgba(212, 0, 0, 0.3);
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
}

.team-banner__link {
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-banner__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(212, 0, 0, 0.3);
}

.page-messages {
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding: 0 40px;
  display: grid;
  gap: 10px;
}

.page-message {
  background: rgba(39, 174, 96, 0.15);
  border: 1px solid rgba(39, 174, 96, 0.4);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.team-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--team-color, #444);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}


@media (max-width: 900px) {
  .site-nav__inner {
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .site-nav__toggle {
    display: inline-flex;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .site-nav__toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .site-nav__toggle:focus-visible {
    outline: var(--focus-outline);
    outline-offset: var(--focus-offset);
  }

  .site-nav__toggle-bar {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* Animate hamburger to X when menu is open */
  .site-nav.is-open .site-nav__toggle-bar:nth-child(2) {
    transform: rotate(45deg) translateY(7px);
  }

  .site-nav.is-open .site-nav__toggle-bar:nth-child(3) {
    opacity: 0;
  }

  .site-nav.is-open .site-nav__toggle-bar:nth-child(4) {
    transform: rotate(-45deg) translateY(-7px);
  }

  /* Panel with slide/fade animation */
  .site-nav__panel {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  }

  .js .site-nav__panel {
    display: flex;
  }

  .site-nav.is-open .site-nav__panel {
    max-height: 600px;
    opacity: 1;
    padding: 16px 0 16px;
  }

  /* Links with better touch targets */
  .site-nav__links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
  }

  .site-nav__links a {
    width: 100%;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
  }

  .site-nav__links a:hover,
  .site-nav__links a:active {
    background: rgba(255, 255, 255, 0.05);
  }

  /* Active link indication */
  .site-nav__links a.is-active {
    color: var(--color-primary);
    background: rgba(212, 0, 0, 0.1);
    border-left: 3px solid var(--color-primary);
    padding-left: 9px;
  }

  /* Actions - full width buttons */
  .site-nav__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-nav__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .user-menu {
    width: 100%;
  }

  .user-menu__summary {
    width: 100%;
    justify-content: center;
  }

  .user-menu__panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
    transform: none;
  }

  .user-menu[open] .user-menu__panel {
    opacity: 1;
  }

  /* Backdrop overlay */
  .site-nav::after {
    content: '';
    position: fixed;
    inset: 0;
    top: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, top 0s linear 0.3s;
    z-index: -1;
  }

  .site-nav.is-open::after {
    top: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease, top 0s linear 0s;
  }

  .brand__name {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .brand__accent {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .page-messages {
    padding: 0 20px;
  }

  .team-banner {
    flex-wrap: wrap;
    text-align: center;
  }
}

/* Team color themes - WCAG 2.1 AA compliant (4.5:1 contrast on #0a0a0a background) */
.team-theme-red-bull-racing {
  --team-color: #3671c6; /* Dark navy blue per official Red Bull livery */
  --team-accent: #ffd700;
}

.team-theme-ferrari {
  --team-color: #ff2b2b; /* Lightened from #d40000 for accessibility */
  --team-accent: #ffeb3b;
}

.team-theme-mercedes {
  --team-color: #27f4d2; /* Already accessible */
  --team-accent: #e0f7fa;
}

.team-theme-mclaren {
  --team-color: #ff8000; /* Already accessible */
  --team-accent: #ffd180;
}

.team-theme-aston-martin {
  --team-color: #2bc799; /* Lightened from #229971 for accessibility */
  --team-accent: #7bdcb5;
}

.team-theme-alpine {
  --team-color: #ff87bc; /* Already accessible */
  --team-accent: #ffc1e3;
}

.team-theme-williams {
  --team-color: #4292d1; /* Darker blue per official Williams-Atlassian livery */
  --team-accent: #7bbce6;
}

.team-theme-rb {
  --team-color: #7aa3ff; /* Lightened from #6692ff for accessibility */
  --team-accent: #b3c7ff;
}

.team-theme-kick-sauber {
  --team-color: #52e252; /* Already accessible */
  --team-accent: #b9f6ca;
}

.team-theme-cadillac {
  --team-color: #8a8a8a; /* Dark grey per official Cadillac livery */
  --team-accent: #b0b0b0;
}

.team-theme-haas {
  --team-color: #ffffff; /* Pure white per official 2026 livery */
  --team-accent: #eeeeee;
}

.quiz-page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 900px) {
  .quiz-page-wrapper {
    padding: 0 20px;
  }
}

.site-footer__button {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  background: rgba(16, 16, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}

.cookie-banner.is-hidden {
  display: none;
}

.cookie-banner__copy {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.4;
}

.cookie-banner__actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-banner__link {
  color: var(--color-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.affiliate-consent-placeholder {
  display: none;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.affiliate-consent-placeholder p {
  margin: 0;
  color: var(--color-dim);
  font-size: 12px;
  line-height: 1.4;
}

/* Lasso non-WordPress embeds render `embed-lasso-*` classes after the
   snippet hydrates. Keep them aligned with our F1 Store ad cards while
   preserving Lasso-managed Amazon images, price freshness, and disclosure. */
.lasso-embed .embed-lasso-container {
  max-width: 100% !important;
  margin: 0 !important;
  font-family: var(--font-body) !important;
}

.lasso-embed .embed-lasso-display {
  position: relative !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  padding: 12px !important;
  background: rgba(8, 8, 8, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  color: #fff !important;
}

.lasso-embed .embed-lasso-box-1,
.lasso-embed .embed-lasso-box-2 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.lasso-embed .embed-lasso-box-2 {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 7px !important;
}

.lasso-embed .embed-lasso-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 218px !important;
  min-height: 218px !important;
  max-height: 218px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: calc(var(--radius-sm) + 2px) !important;
}

.lasso-embed .embed-lasso-image img,
.lasso-embed img.embed-lasso-image-no-lazy {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 218px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.lasso-embed .embed-lasso-box-2::before {
  content: "Available at Amazon" !important;
  display: block !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-family: var(--font-heading) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.lasso-embed .embed-lasso-title {
  display: -webkit-box !important;
  overflow: hidden !important;
  margin: 0 !important;
  color: #fff !important;
  font-family: var(--font-heading) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  text-decoration: none !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow-wrap: anywhere !important;
}

.lasso-embed .embed-lasso-price {
  margin: 0 !important;
  color: #fff !important;
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.lasso-embed .embed-lasso-description,
.lasso-embed .embed-lasso-amazon-prime,
.lasso-embed .clear {
  display: none !important;
}

.lasso-embed .embed-lasso-button-1 {
  display: block !important;
  width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 10px 12px !important;
  background: var(--color-primary) !important;
  border: 0 !important;
  border-radius: calc(var(--radius-sm) + 2px) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: var(--font-heading) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
}

.lasso-embed .embed-lasso-button-1:hover,
.lasso-embed .embed-lasso-button-1:focus-visible {
  background: var(--color-accent) !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
}

.lasso-embed .embed-lasso-end {
  margin-top: 0 !important;
}

.lasso-embed .embed-lasso-disclosure,
.lasso-embed .embed-lasso-disclosure span,
.lasso-embed .embed-lasso-date {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
}

.lasso-embed .embed-lasso-amazon-info {
  display: inline-block !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 900px) {
  .lasso-embed .embed-lasso-display {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 12px !important;
    min-height: 124px !important;
    padding: 10px !important;
    align-items: stretch !important;
  }

  .lasso-embed .embed-lasso-box-1 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
  }

  .lasso-embed .embed-lasso-image {
    width: 104px !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
  }

  .lasso-embed .embed-lasso-image img,
  .lasso-embed img.embed-lasso-image-no-lazy {
    max-width: 104px !important;
    max-height: 104px !important;
  }

  .lasso-embed .embed-lasso-box-2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .lasso-embed .embed-lasso-title {
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .lasso-embed .embed-lasso-price {
    font-size: 12px !important;
  }

  .lasso-embed .embed-lasso-button-1 {
    padding: 9px 10px !important;
    font-size: 11px !important;
  }

  .lasso-embed .embed-lasso-disclosure,
  .lasso-embed .embed-lasso-disclosure span,
  .lasso-embed .embed-lasso-date {
    font-size: 9px !important;
    line-height: 1.2 !important;
  }
}

/* #95 — visible required-field indicator on form labels. Django's form
   renderer emits `required` HTML attribute automatically for required
   fields, which provides the ARIA semantic; this class adds the visible
   * so sighted users know before submit, paired with a form legend. */
label.required-label::after {
  content: " *";
  color: #ff6b6b;
  margin-left: 2px;
  font-weight: 600;
}

.contact-form__legend {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0 0 8px 0;
}

/* HTMX loading indicators (#91). htmx adds `.htmx-request` to the
   triggering element while a swap is in flight, and also to anything
   named by `hx-indicator`. Rather than a global spinner, give each
   element that triggers a swap a subtle in-place busy state, so the
   user always knows "something's happening" without layout shift.

   Default: dim + mini-spinner inline on request. Opt out by setting
   another .htmx-request style further down the cascade. */
.htmx-request {
  opacity: 0.65;
  cursor: wait;
}

.store-sidebar__link.htmx-request {
  position: relative;
}

.store-sidebar__link.htmx-request::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: htmx-spin 0.6s linear infinite;
  vertical-align: middle;
}

/* When the swap target itself is marked via hx-indicator, fade its
   current contents while the new fragment streams in. Layout stays
   the same; users see "the same shape, less crisp" and content snaps
   sharp when the response arrives. */
.htmx-request #product-grid,
#product-grid.htmx-request {
  opacity: 0.55;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
}

@keyframes htmx-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .store-sidebar__link.htmx-request::after {
    animation: none;
    border-top-color: var(--color-primary);
  }
}
