/* ==========================================================================
   LIVE GYM SCORER - LIGHT THEME DESIGN SYSTEM
   Adhering to Apple Fluid Motion & Strict Functional UI Patterns
   ========================================================================== */

:root {
  /* Surface & Base Colours (Logo-Inspired Clean Stadium Palette) */
  --bg-primary: #f4f8fb;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-hover: #eaf2f8;
  --bg-subtle: #edf4fa;
  
  /* Dominant Logo Midnight Navy & Slate Theme */
  --color-logo-navy: #0b1727;
  --color-logo-navy-deep: #070f1a;
  --color-logo-slate: #152535;
  --color-logo-card: #122235;
  --color-logo-card-hover: #162b42;
  --color-logo-border: #1d3650;
  --color-logo-border-subtle: #162a3f;
  --color-logo-text-muted: #94a9be;
  
  /* Section Alt (Dominant Navy from Logo) */
  --bg-section-alt: #0b1727;

  /* Text & Content (High Contrast Slate & Deep Navy) */
  --text-primary: #0b1727;
  --text-secondary: #3b5066;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Borders & Dividers (Ice-Tinted Slate) */
  --border-subtle: #dbe6f0;
  --border-medium: #cbd8e5;
  --border-focus: #187dd5;

  /* Semantic Color Ramps (Lighter Blue Shade from Logo) */
  --color-brand: #187dd5;
  --color-brand-hover: #1268b8;
  --color-brand-light: #e6f2fb;

  --color-star: #eab308;
  --color-star-light: #fef9c3;

  --color-success: #059669;
  --color-success-hover: #047857;
  --color-success-bg: #ecfdf5;

  --color-info: #187dd5;
  --color-info-bg: #f0f9ff;

  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;

  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Corner Radii (Strictly rectangular / subtle radius - NO PILL BUTTONS) */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Layout & Spacing */
  --container-max: 1200px;
  --header-height: 132px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Motion & Physics (Emil Kowalski Apple Fluid Motion Framework) */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-instant: cubic-bezier(0.2, 0, 0, 1);
  --transition-fast: 120ms var(--ease-instant);
  --transition-smooth: 220ms var(--ease-spring);
  --transition-spring: 340ms var(--ease-spring);
}

/* ==========================================================================
   Fluid Motion & Physics Keyframes (Apple & Emil Kowalski Framework)
   ========================================================================== */

@keyframes fluid-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fluid-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes live-ring-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(5, 150, 105, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

.live-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  animation: live-ring-pulse 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

/* Real-time Apparatus Live Stream Update Animation */
@keyframes live-card-pulse {
  0% {
    background-color: rgba(14, 165, 233, 0.09);
    border-color: rgba(14, 165, 233, 0.4);
  }
  40% {
    background-color: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.4);
  }
  100% {
    background-color: var(--bg-surface);
    border-color: var(--border-medium);
  }
}

.card-live-updating {
  animation: live-card-pulse 1.8s var(--ease-spring) forwards;
}

.live-update-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-success);
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.125rem 0.45rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.25s var(--ease-spring), transform 0.25s var(--ease-spring);
  pointer-events: none;
}

.card-live-updating .live-update-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Motion Entrance Utility Classes */
.animate-fade-in-up {
  animation: fluid-fade-in-up 0.4s var(--ease-spring) both;
}

.animate-delay-1 { animation-delay: 60ms; }
.animate-delay-2 { animation-delay: 120ms; }
.animate-delay-3 { animation-delay: 180ms; }
.animate-delay-4 { animation-delay: 240ms; }

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.mono-num {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-alt {
  background-color: var(--color-logo-navy);
  color: #ffffff;
  border-top: 1px solid var(--color-logo-border-subtle);
  border-bottom: 1px solid var(--color-logo-border-subtle);
  position: relative;
}

.section-alt .section-title,
.section-alt h1,
.section-alt h2,
.section-alt h3,
.section-alt h4 {
  color: #ffffff;
}

.section-alt .section-description,
.section-alt .section-header p,
.section-alt > .container > p,
.section-alt > .container > div > p {
  color: #ffffff;
}

/* Cards inside .section-alt (card container maintains structured contrast) */
.section-alt .card {
  background-color: var(--color-logo-card);
  border: 1px solid var(--color-logo-border);
  color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

.section-alt .card h2,
.section-alt .card h3 {
  color: #ffffff;
}

.section-alt .card p {
  color: #94a9be;
}

.section-alt .card ul {
  color: #cbd5e1 !important;
}

.section-alt .card ul li {
  color: #cbd5e1 !important;
}

/* Comparison Table inside .section-alt is explicitly light for maximum visual impact */

/* Call To Action Banner Card (Dominant Logo Navy Gradient) */
.cta-banner-card {
  background: linear-gradient(145deg, #0b1727 0%, #132438 100%);
  border: 1px solid var(--color-logo-border);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

.cta-banner-card h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.cta-banner-card p {
  color: #ffffff;
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner-card .btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #2b4562;
  color: #ffffff;
}

.cta-banner-card .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: #3b5c82;
  color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  background-color: var(--color-brand-light);
  color: var(--color-brand-hover);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Header & Main Navigation (Dark Theme) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(11, 23, 39, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-logo-border);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-logo-img {
  height: 112px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-link {
  font-size: 1.125rem;
  font-weight: 600;
  color: #cbd5e1;
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-brand);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Navigation Toggle */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-logo-border);
  color: #ffffff;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.mobile-menu-btn .menu-icon-close {
  display: none;
}

.mobile-menu-btn .menu-icon-hamburger {
  display: block;
}

.mobile-menu-btn[aria-expanded="true"] .menu-icon-hamburger {
  display: none;
}

.mobile-menu-btn[aria-expanded="true"] .menu-icon-close {
  display: block;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

/* Fluid Mobile Nav Overlay (Dark Theme) */
.mobile-nav-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 23, 39, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  border-top: 1px solid var(--color-logo-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth), visibility var(--transition-smooth);
  pointer-events: none;
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-link {
  font-size: 1.375rem;
  font-weight: 600;
  color: #f1f5f9;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-logo-border);
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-brand);
}

/* Clean Rectangular Buttons (Strictly NO PILL SHAPE) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast) var(--ease-spring);
}

.btn:active {
  transform: scale(0.982);
  transition-duration: 40ms;
}

.btn-primary {
  background-color: var(--color-brand);
  color: #ffffff;
  border-color: var(--color-brand);
  box-shadow: 0 1px 3px rgba(24, 125, 213, 0.28);
}

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

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--color-success-hover);
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Cards & Surface Containers */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card-elevated {
  background-color: #ffffff;
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Centered Feature Cards Grid (5-card balanced layout) */
.features-centered-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.features-centered-grid > .card {
  flex: 0 1 calc(33.333% - 1.1rem);
  min-width: 300px;
  max-width: 360px;
}

@media (max-width: 960px) {
  .features-centered-grid > .card {
    flex: 0 1 calc(50% - 1rem);
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .features-centered-grid > .card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Skeleton Loaders (Gray skeleton placeholders) */
.skeleton {
  background: linear-gradient(
    90deg,
    #f1f5f9 0%,
    #e2e8f0 50%,
    #f1f5f9 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.75rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-table-row {
  height: 3rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
}

/* Comparison Matrix (Light High-Contrast Table for Maximum Legibility) */
.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  background-color: #ffffff;
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.comparison-table-wrapper .comparison-table th,
.comparison-table-wrapper .comparison-table td {
  text-align: center;
}

.comparison-table th {
  background-color: #f1f5f9;
  font-weight: 800;
  font-size: 1.0625rem;
  color: #0b1727;
  letter-spacing: -0.01em;
  border-bottom: 2px solid #cbd5e1;
}

.comparison-table td {
  font-size: 1rem;
  color: #334155;
  background-color: #ffffff;
  line-height: 1.55;
}

.comparison-table td[style*="font-weight: 700"],
.comparison-table td:first-child {
  color: #0b1727 !important;
  font-size: 1.125rem;
  font-weight: 800;
}

.comparison-table tr:hover td {
  background-color: #f8fafc;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.table-cell-desc {
  margin-top: 0.65rem;
  font-size: 1rem;
  color: #475569;
  line-height: 1.5;
}

/* Solid Badges with Bold White Text */
.table-badge-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.45rem 0.95rem;
  background-color: #dc2626;
  color: #ffffff !important;
  border: 1px solid #b91c1c;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.22);
}

.table-badge-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.45rem 0.95rem;
  background-color: #059669;
  color: #ffffff !important;
  border: 1px solid #047857;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.22);
}

/* Forms & Inputs (Sanitized, Accessible) */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label .required {
  color: var(--color-danger);
  margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--color-danger);
}

.form-error-msg {
  color: var(--color-danger);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  display: none;
}

.form-error-msg.visible {
  display: block;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Status Banners */
.banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9375rem;
}

.banner-success {
  background-color: var(--color-success-bg);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.banner-danger {
  background-color: var(--color-danger-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.banner-info {
  background-color: var(--color-info-bg);
  border: 1px solid #bae6fd;
  color: #075985;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 580px;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  z-index: 1100;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth), visibility var(--transition-smooth);
  pointer-events: none;
}

.cookie-banner.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cookie-text a {
  color: var(--color-brand);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Footer (Dark Theme) */
.site-footer {
  background-color: var(--bg-section-alt);
  border-top: 1px solid var(--color-logo-border);
  padding-top: 4rem;
  padding-bottom: 2.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand .brand-logo-img {
  height: 128px;
}

.footer-brand p {
  margin-top: 1.25rem;
  max-width: 340px;
  font-size: 0.875rem;
  color: var(--color-logo-text-muted);
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-logo-text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--color-logo-border-subtle);
  font-size: 0.8125rem;
  color: var(--color-logo-text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links .footer-link {
  color: var(--color-logo-text-muted);
}

.footer-legal-links .footer-link:hover {
  color: #ffffff;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 110px;
  }

  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Universal Mobile Site Center-Alignment */
  h1, h2, h3, h4, h5, h6 {
    text-align: center;
  }

  p {
    text-align: center;
  }

  .section-header {
    text-align: center;
  }

  .section-title,
  .section-description {
    text-align: center;
  }

  .section-badge {
    margin-left: auto;
    margin-right: auto;
  }

  /* Hero Section Center Alignment */
  .hero-content-col {
    text-align: center;
  }

  .hero-content-col h1,
  .hero-content-col p {
    text-align: center;
  }

  .hero-content-col > div {
    justify-content: center;
  }

  /* Cards & Grid Containers */
  .card {
    text-align: center;
  }

  .card h2,
  .card h3,
  .card h4,
  .card p {
    text-align: center;
  }

  .cta-banner-card {
    text-align: center;
  }

  .cta-banner-card h2,
  .cta-banner-card p {
    text-align: center;
  }

  .cta-banner-card > div {
    justify-content: center;
  }

  /* Scoreboard Preview Header & Cards */
  .scoreboard-preview-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .scoreboard-preview-title-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .scoreboard-preview-title-row {
    justify-content: center;
  }

  .scoreboard-preview-header p {
    text-align: center;
  }

  .scoreboard-header-slot {
    justify-content: center;
    width: 100%;
  }

  .demo-aa-summary-card {
    text-align: center;
  }

  .demo-aa-summary-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.85rem;
  }

  .demo-aa-gymnast-col {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .demo-aa-total-col {
    text-align: center !important;
  }

  /* Mobile Drawer Menu */
  .mobile-nav-overlay {
    text-align: center;
    align-items: center;
  }

  .mobile-nav-link {
    text-align: center;
    width: 100%;
  }

  /* Results Directory & Subheadings */
  .results-title-block {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .results-filter-panel {
    text-align: center;
  }

  .results-filter-panel label {
    text-align: center;
    display: block;
  }

  .apparatus-tabs {
    justify-content: center;
  }

  /* Homepage Comparison Table - No Horizontal Scroll on Mobile */
  .comparison-table-wrapper {
    overflow-x: hidden;
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .comparison-table {
    min-width: 0 !important;
    width: 100% !important;
    display: block;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table tbody {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }

  .comparison-table tr {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 1.35rem 1.15rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    gap: 0.85rem;
    text-align: center;
  }

  .comparison-table td {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    border-bottom: none;
    text-align: center;
  }

  .comparison-table td:first-child {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-logo-navy) !important;
    background-color: #f1f5f9;
    border: 1px solid var(--border-subtle);
    padding: 0.65rem 1rem;
    margin-bottom: 0.15rem;
  }

  /* Old Way Block */
  .comparison-table td:nth-child(2) {
    background-color: #fff5f5;
    border: 1px solid #fecaca;
  }

  .comparison-table td:nth-child(2)::before {
    content: "Old Paper & Runner Way";
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #991b1b;
    margin-bottom: 0.4rem;
  }

  /* Live Gym Scorer Way Block */
  .comparison-table td:nth-child(3) {
    background-color: #ecfdf5;
    border: 1.5px solid #a7f3d0;
  }

  .comparison-table td:nth-child(3)::before {
    content: "Live Gym Scorer Way";
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #065f46;
    margin-bottom: 0.4rem;
  }

  .comparison-table .table-cell-desc {
    margin-top: 0.45rem;
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.5;
    text-align: center;
  }

  .nav-links,
  .nav-actions .btn-desktop {
    display: none;
  }

  .brand-logo-img {
    height: 92px;
  }

  .footer-brand .brand-logo-img {
    height: 104px;
    margin: 0 auto;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .site-footer {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-links {
    align-items: center;
    text-align: center;
  }

  .footer-link {
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal-links {
    justify-content: center;
    width: 100%;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-actions .btn {
    flex: 1;
  }
}

/* ==========================================================================
   OFFICIAL RESULTS BULLETIN COMPONENT & PRINT ARCHITECTURE
   ========================================================================== */

.bulletin-sheet {
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.bulletin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #0f172a;
}

.bulletin-kicker {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.25rem;
}

.bulletin-title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.2;
}

.bulletin-subtitle {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.bulletin-header-meta {
  text-align: right;
  flex-shrink: 0;
}

.bulletin-badge-standings {
  display: inline-block;
  background-color: #0d1e38;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
}

.bulletin-date-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.bulletin-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #0f172a;
  margin-top: 1.25rem;
  margin-bottom: 0;
  background-color: #ffffff;
  position: relative;
}

.bulletin-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.875rem;
}

.bulletin-table th,
.bulletin-table td {
  padding: 0.5rem 0.4rem;
  border-right: 1px solid var(--border-medium);
  border-bottom: 1px solid var(--border-medium);
}

.bulletin-table th:last-child,
.bulletin-table td:last-child {
  border-right: none;
}

/* Master Dark Navy Header */
.bulletin-table thead tr.master-header th {
  background-color: #0d1e38;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 0.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid #0d1e38;
}

.bulletin-table thead tr.master-header th.th-athlete {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: #0d1e38;
  text-align: left;
  padding-left: 0.875rem;
  box-shadow: 2px 0 6px -1px rgba(0, 0, 0, 0.25);
}

.bulletin-table thead tr.master-header th.th-allaround {
  background-color: #1d4ed8;
  color: #ffffff;
}

/* Sub-Header Row */
.bulletin-table thead tr.sub-header th {
  background-color: #f1f5f9;
  color: #334155;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.25rem;
  border-bottom: 2px solid #0f172a;
}

.bulletin-table thead tr.sub-header th.sub-allaround {
  background-color: #e0e7ff;
  color: #1e40af;
}

/* Athlete Cell Layout - Pinned Sticky on Horizontal Scroll */
.bulletin-athlete-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  background-color: #ffffff;
  text-align: left !important;
  padding-left: 0.875rem !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  box-shadow: 2px 0 6px -1px rgba(0, 0, 0, 0.08);
}

.bulletin-table tbody tr:nth-child(even) .bulletin-athlete-cell {
  background-color: #f8fafc;
}

.bulletin-table tbody tr:hover .bulletin-athlete-cell {
  background-color: #f1f5f9;
}

.bulletin-bib {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-mono);
  margin-right: 0.35rem;
}

.bulletin-athlete-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9375rem;
  display: inline;
}

.bulletin-club-name {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Metrics and Highlight */
.bulletin-score {
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.bulletin-d-score {
  color: #475569;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.bulletin-rank {
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-mono);
}

.bulletin-aa-total {
  font-weight: 800;
  color: #1d4ed8;
  font-size: 0.9375rem;
  font-family: var(--font-mono);
}

.bulletin-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.bulletin-table tbody tr:hover {
  background-color: #f1f5f9;
}

.bulletin-col-highlight {
  background-color: rgba(2, 132, 199, 0.08) !important;
}

.bulletin-allaround-col {
  background-color: rgba(224, 231, 255, 0.4);
}

/* Podium places 1-3 direct cell highlights for piece scores and ranks in results bulletin */
.podium-1,
.podium-2,
.podium-3 {
  background-color: #000000 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  border: 1px solid #000000 !important;
}

/* Print Optimization for Official Results Bulletin */
@media print {
  @page {
    size: landscape;
    margin: 8mm;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .site-header,
  .site-footer,
  .cookie-banner,
  .results-filter-panel,
  .btn-print-action,
  #backToCompetitionsBtn,
  #competitionsDirectoryView {
    display: none !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  #competitionDetailView {
    display: block !important;
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .bulletin-sheet {
    box-shadow: none !important;
    border: 1.5px solid #000000 !important;
    padding: 1.25rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
  }

  .bulletin-table {
    border: 1px solid #000000 !important;
    font-size: 8.5pt !important;
  }

  .bulletin-table th,
  .bulletin-table td {
    border-color: #94a3b8 !important;
    padding: 3pt 2pt !important;
  }

  .bulletin-table thead tr.master-header th {
    background-color: #0d1e38 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bulletin-table thead tr.master-header th.th-allaround {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bulletin-table thead tr.sub-header th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bulletin-badge-standings {
    background-color: #0d1e38 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .podium-1, .podium-2, .podium-3 {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

@media (max-width: 768px) {
  .bulletin-sheet {
    padding: 1.25rem 0.875rem;
    border-radius: var(--radius-md);
  }

  .bulletin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .bulletin-header-meta {
    text-align: left;
  }

  .bulletin-athlete-cell,
  .bulletin-table thead tr.master-header th.th-athlete {
    min-width: 175px;
  }

  .mobile-table-hint {
    display: flex !important;
  }
}

.mobile-table-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  padding: 0.4rem 0.75rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Strict Accessibility: Respect Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Live Counters & Interactive Competition Map
   ========================================================================== */
.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-counter-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-counter-num {
  font-size: 3.65rem;
  font-weight: 900;
  color: var(--color-brand);
  line-height: 1;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Hero Split Header & Centered Counting Stats Card */
.hero-split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-stats-col {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-stats-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.hero-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-stat-block {
  padding: 1.15rem 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.hero-stat-num {
  font-size: 3.65rem;
  font-weight: 900;
  color: var(--color-brand);
  font-family: var(--font-mono);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .hero-stat-num,
  .stat-counter-num {
    font-size: 2.75rem;
  }
}

.hero-stat-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-align: center;
}

.hero-stat-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: center;
  max-width: 320px;
  margin: 0 auto;
}

.hero-stats-card-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 960px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-content-col {
    text-align: center;
  }

  .hero-content-col h1 {
    text-align: center;
  }

  .hero-content-col p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content-col > div {
    justify-content: center;
  }

  .hero-stats-card {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-stats-card {
    padding: 1.25rem;
  }
}

/* Interactive Judge Scoring Demo */
.interactive-scorer-container {
  overflow: hidden;
  position: relative;
}

.judge-tablet-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.live-display-feed-card {
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.judge-tablet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.apparatus-btn-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.apparatus-choice-btn {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.65rem 0.25rem;
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition-fast) var(--ease-spring), border-color var(--transition-fast) var(--ease-spring), color var(--transition-fast) var(--ease-spring), transform var(--transition-fast) var(--ease-spring);
  user-select: none;
}

.apparatus-choice-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background-color: #f0f9ff;
}

.apparatus-choice-btn:active {
  transform: scale(0.96);
}

.apparatus-choice-btn.active {
  background-color: var(--color-brand);
  color: #ffffff;
  border-color: var(--color-brand);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

/* Active Gymnast Badge Card (Non-editable Floor Queue) */
.active-gymnast-badge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.active-gymnast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

/* D-Score Bonus Chips */
.d-bonus-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.d-bonus-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  background-color: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast) var(--ease-spring), border-color var(--transition-fast) var(--ease-spring), color var(--transition-fast) var(--ease-spring), transform var(--transition-fast) var(--ease-spring);
  user-select: none;
}

.d-bonus-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background-color: #f0f9ff;
}

.d-bonus-btn:active {
  transform: scale(0.94);
}

.d-bonus-btn.active {
  background-color: var(--color-brand-light);
  color: var(--color-brand);
  border-color: var(--color-brand);
  font-weight: 800;
}

.d-bonus-reset-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.d-bonus-reset-btn:hover {
  color: var(--color-danger);
  text-decoration: underline;
}

/* Centered & Prominent Live Score Showcase */
.score-display-showcase {
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-sm);
}

.score-display-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.score-display-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.score-hero-num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-brand);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: color var(--transition-fast);
}

.score-display-breakdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breakdown-divider {
  color: var(--text-muted);
  font-weight: 700;
}

.bonus-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-brand);
  background-color: var(--color-brand-light);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.score-submit-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: background-color var(--transition-fast) var(--ease-spring), border-color var(--transition-fast) var(--ease-spring), transform var(--transition-fast) var(--ease-spring), box-shadow var(--transition-fast) var(--ease-spring);
}

.score-submit-cta:hover {
  background-color: var(--color-brand-hover);
}

.score-submit-cta:active {
  transform: scale(0.98);
}

/* Permanent Live Score Flash Announcement Banner */
.live-flash-announcement {
  background-color: #0f172a;
  color: #ffffff;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.22);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: banner-ambient-pulse 3s ease-in-out infinite alternate;
}

@keyframes banner-ambient-pulse {
  0% {
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.18), 0 0 0 1px rgba(56, 189, 248, 0.2);
  }
  100% {
    box-shadow: 0 6px 26px rgba(2, 132, 199, 0.35), 0 0 0 2px rgba(56, 189, 248, 0.4);
  }
}

.live-flash-announcement.flash-broadcasting {
  animation: banner-broadcast-flash 0.8s ease-in-out infinite alternate;
}

@keyframes banner-broadcast-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4), 0 8px 30px rgba(2, 132, 199, 0.45);
    border-color: #38bdf8;
  }
  100% {
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.7), 0 12px 38px rgba(2, 132, 199, 0.65);
    border-color: #7dd3fc;
  }
}

.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.flash-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flash-beacon-dot {
  width: 10px;
  height: 10px;
  background-color: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
  animation: flash-dot-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes flash-dot-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.flash-title {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
}

.flash-time-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.flash-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.flash-app-badge {
  font-size: 0.8125rem;
  font-weight: 800;
  background-color: var(--color-brand);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.flash-gymnast-info {
  flex: 1;
  min-width: 0;
}

.flash-gymnast-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flash-breakdown {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.flash-score-total {
  font-size: 2rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.02em;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.flash-timer-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.flash-timer-fill {
  height: 100%;
  width: 100%;
  background: #38bdf8;
  transform-origin: left;
  animation: flash-timer-drain 4s linear forwards;
}

@keyframes flash-timer-drain {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

/* Live Scoreboard Centered Overlay & Flight Animation */
.scoreboard-apparatus-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
}

.scoreboard-center-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: var(--radius-lg);
  z-index: 20;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
}

.scoreboard-center-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scoreboard-header-slot {
  min-height: 36px;
  min-width: 148px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.scoreboard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(24, 125, 213, 0.32);
  white-space: nowrap;
  user-select: none;
  border: 1.5px solid var(--color-brand);
  background-color: var(--color-brand);
  color: #ffffff;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

.scoreboard-action-btn:hover {
  background-color: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
}

.scoreboard-action-btn:active {
  transform: scale(0.97);
}

.scoreboard-action-btn.btn-scores-submitted {
  background-color: var(--color-success) !important;
  border-color: var(--color-success-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.28) !important;
}

.scoreboard-action-btn.btn-scores-submitted:hover {
  background-color: var(--color-success-hover) !important;
  border-color: #065f46 !important;
}

/* Live Scoreboard Blank & Sequential Fade-in Animations */
.preview-apparatus-card {
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color 0.3s ease;
}

.preview-apparatus-card .preview-score-counter,
.preview-apparatus-card .preview-sub-info,
.demo-aa-summary-card #previewAllAroundTotal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.preview-apparatus-card.is-scored {
  border-left-color: #000000 !important;
  background-color: #ffffff !important;
}

.preview-apparatus-card.is-scored .preview-score-counter,
.preview-apparatus-card.is-scored .preview-sub-info {
  opacity: 1;
  transform: translateY(0);
  color: #000000 !important;
}

.preview-apparatus-card.is-scored .preview-sub-info span,
.preview-apparatus-card.is-scored .preview-sub-counter,
.preview-apparatus-card.is-scored .gymnast-name {
  color: #000000 !important;
  font-weight: 700;
}

.preview-apparatus-card.is-scored .live-update-badge {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.preview-apparatus-card.card-active-flash {
  border-left-color: #000000 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}

.preview-apparatus-card.card-active-flash .preview-score-counter {
  color: #000000 !important;
  opacity: 1;
  transform: translateY(0);
}

.preview-apparatus-card.card-active-flash .live-update-badge {
  background-color: #000000 !important;
  color: #ffffff !important;
  font-weight: 800;
}

.demo-feedback-notice {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  animation: fluid-fade-in-up 0.3s ease-out;
}

/* All-Around (AA) Live Calculation Summary Card */
.demo-aa-summary-card {
  background-color: #f8fafc;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast) var(--ease-spring), background-color var(--transition-fast) var(--ease-spring), box-shadow var(--transition-fast) var(--ease-spring);
}

.demo-aa-summary-card.aa-updating {
  border-color: #000000;
  background-color: #f8fafc;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.demo-aa-summary-card.is-scored {
  border-color: #000000;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.demo-aa-summary-card.is-scored #previewAllAroundTotal,
.demo-aa-summary-card.aa-updating #previewAllAroundTotal {
  opacity: 1;
  transform: translateY(0);
  color: #000000 !important;
}

@media (max-width: 960px) {
  .interactive-scorer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .apparatus-btn-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .score-hero-num {
    font-size: 2.35rem;
  }

  .flash-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .flash-score-total {
    align-self: flex-start;
    font-size: 1.75rem;
  }
}

/* Clubs Logo Scrolling Carousel Marquee */
.clubs-marquee-section {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.clubs-marquee-title {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.clubs-marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.clubs-marquee-track {
  display: flex;
  gap: 1.75rem;
  width: max-content;
  animation: clubs-scroll 35s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.club-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

.club-logo-img {
  height: 48px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}

@keyframes clubs-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clubs-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Off-screen Section Render Optimization */
.clubs-marquee-section,
.comparison-section,
.faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}
