/* ==========================================================================
   Paris Brain Institute (Institut du Cerveau - ICM) Light Mode Theme
   TEM Axon & Myelin Challenge - Master Stylesheet
   ========================================================================== */

:root {
  /* Brand Palette */
  --icm-navy: #001A3D;           /* Primary Navy: headers, navigation, footer */
  --icm-deep-blue: #0F2547;      /* Secondary Deep Blue: section titles, table headers, badges */
  --icm-coral: #E63946;          /* ICM Coral-Red Accent: CTA buttons, deadline highlights */
  --icm-coral-hover: #C92A37;    /* Darker coral for active/hover */
  --icm-coral-light: #FDE8E9;    /* Soft coral tint for highlights */
  --icm-clinical: #0077B6;       /* Clinical Blue: links, callout borders, metric highlights */
  --icm-clinical-hover: #005F92;
  --icm-clinical-light: #EBF5FB; /* Soft clinical blue background */

  /* Neutral Surfaces */
  --icm-white: #FFFFFF;          /* Crisp white for cards and primary content */
  --icm-bg-light: #F4F6F9;       /* Soft Ice Gray for alternating sections */
  --icm-bg-alt: #EBF0F6;
  --icm-border: #E2E8F0;         /* Subtle border for cards and inputs */
  --icm-border-strong: #CBD5E1;
  
  /* Typography Colors */
  --icm-text-main: #1A202C;      /* High-contrast body text */
  --icm-text-muted: #5A6B82;     /* Muted secondary body text */
  --icm-text-light: #8A99AD;     /* Subtle captions */

  /* Status Colors */
  --status-success: #10B981;
  --status-success-bg: #ECFDF5;
  --status-warning: #F59E0B;
  --status-warning-bg: #FFFBEB;
  --status-danger: #EF4444;
  --status-danger-bg: #FEF2F2;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 26, 61, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 26, 61, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 26, 61, 0.10);
  --shadow-hover: 0 14px 30px rgba(0, 26, 61, 0.14);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

[hidden], .hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color: var(--icm-text-main);
  background-color: var(--icm-white);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--icm-clinical);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--icm-clinical-hover);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Layout Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  scroll-margin-top: 80px;
  position: relative;
}

.section-alt {
  background-color: var(--icm-bg-light);
  border-top: 1px solid var(--icm-border);
  border-bottom: 1px solid var(--icm-border);
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1024px) {
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* --------------------------------------------------------------------------
   Announcement Notification Strip
   -------------------------------------------------------------------------- */
.top-notice-bar {
  background: linear-gradient(90deg, var(--icm-navy) 0%, var(--icm-deep-blue) 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-notice-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--icm-coral);
  color: #FFFFFF;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.top-deadline-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-weight: 600;
  color: #F8FAFC;
}

/* --------------------------------------------------------------------------
   Sticky Header & Navigation (Light Mode High-Contrast)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--icm-border);
  box-shadow: 0 2px 10px rgba(0, 26, 61, 0.05);
  transition: all var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

/* Logos in Header (Rebalanced footprint & high contrast) */
.header-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.95;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.logo-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.logo-img {
  max-height: 36px;
  height: 32px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-divider {
  width: 1px;
  height: 22px;
  background-color: var(--icm-border);
  flex-shrink: 0;
}

/* Navigation Container */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Navigation Links & Active Pill */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  line-height: 1.2;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--icm-navy);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--icm-navy);
  background: #F1F5F9;
  text-decoration: none;
}

.nav-link.active {
  background: #EEF2F6;
  color: var(--icm-navy);
  font-weight: 600;
}

/* Remove any broken ::before or ::after background pseudo-elements */
.nav-link::before,
.nav-link::after {
  display: none !important;
  content: none !important;
}

/* Header Actions & CTA Button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  height: auto;
  background-color: var(--icm-coral);
  color: #FFFFFF !important;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none !important;
}

.header-cta-btn:hover {
  background-color: var(--icm-coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: #F8FAFC;
  border: 1px solid var(--icm-border);
  color: var(--icm-navy);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

@media (max-width: 960px) {
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    padding: 16px 24px;
    box-shadow: 0 12px 25px rgba(0, 26, 61, 0.12);
    border-top: 1px solid var(--icm-border);
    border-bottom: 1px solid var(--icm-border);
  }

  .main-nav.mobile-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 10px 16px;
    justify-content: flex-start;
  }

  .header-logos .logo-divider:nth-of-type(2),
  .header-logos .logo-link:nth-of-type(3) {
    display: none;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, var(--icm-navy) 0%, var(--icm-deep-blue) 75%, #0B335E 100%);
  color: #FFFFFF;
  padding: 70px 0 60px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: 
    radial-gradient(circle at 85% 20%, rgba(0, 119, 182, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(230, 57, 70, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.hero-badge.coral {
  background-color: rgba(230, 57, 70, 0.25);
  border-color: var(--icm-coral);
  color: #FFE5E7;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.85rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #CBD5E1;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 820px;
}

/* Key Metadata Chips */
.hero-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.hero-chip-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px 18px;
  backdrop-filter: blur(4px);
}

.chip-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94A3B8;
  margin-bottom: 4px;
}

.chip-value {
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
}

/* Hero Action Row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--icm-coral);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.975rem;
  padding: 12px 26px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
  transition: all var(--transition-fast);
  text-decoration: none !important;
}

.btn-primary:hover {
  background-color: var(--icm-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.45);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none !important;
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Section Headers & Titles
   -------------------------------------------------------------------------- */
.section-header-block {
  margin-bottom: 40px;
}

.section-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--icm-clinical);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--icm-deep-blue);
  line-height: 1.25;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--icm-text-muted);
  margin-top: 8px;
  max-width: 760px;
}

/* --------------------------------------------------------------------------
   Markdown Content Typography & Styling
   -------------------------------------------------------------------------- */
.markdown-container {
  color: var(--icm-text-main);
  line-height: 1.7;
}

.markdown-container h1 {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--icm-deep-blue);
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--icm-border);
}

.markdown-container h1:first-child {
  margin-top: 0;
}

.markdown-container h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--icm-deep-blue);
  margin-top: 32px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.markdown-container h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--icm-deep-blue);
  margin-top: 24px;
  margin-bottom: 10px;
}

.markdown-container p {
  margin-bottom: 16px;
}

.markdown-container ul,
.markdown-container ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.markdown-container li {
  margin-bottom: 6px;
}

.markdown-container hr {
  border: 0;
  height: 1px;
  background-color: var(--icm-border);
  margin: 36px 0;
}

/* Markdown Tables */
.markdown-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.925rem;
  background-color: var(--icm-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--icm-border);
}

.markdown-container th {
  background-color: var(--icm-deep-blue);
  color: #FFFFFF;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.markdown-container td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--icm-border);
}

.markdown-container tr:last-child td {
  border-bottom: none;
}

.markdown-container tr:nth-child(even) td {
  background-color: #F8FAFC;
}

/* Code Blocks & Inline Code */
.markdown-container code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
  background-color: #F1F5F9;
  color: #0F172A;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #E2E8F0;
}

.markdown-container pre {
  background-color: #001529;
  color: #E2E8F0;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.markdown-container pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

/* GitHub Alerts / Callout Boxes */
.markdown-container blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background-color: var(--icm-clinical-light);
  border-left: 4px solid var(--icm-clinical);
  border-radius: 0 8px 8px 0;
  color: #0C4A6E;
  font-size: 0.95rem;
}

.markdown-container blockquote p:last-child {
  margin-bottom: 0;
}

/* KaTeX Formulas Styling */
.katex-display-container {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 18px;
  margin: 18px 0;
  background-color: #F8FAFC;
  border: 1px solid var(--icm-border);
  border-radius: 8px;
  text-align: center;
}

.katex {
  font-size: 1.05em;
}

/* --------------------------------------------------------------------------
   Registration Card & Interactive Form (Section 1)
   -------------------------------------------------------------------------- */
.registration-card {
  background-color: var(--icm-white);
  border: 1px solid var(--icm-border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 96px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.registration-card-header {
  border-bottom: 1px solid var(--icm-border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.reg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--icm-coral-light);
  color: var(--icm-coral);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.reg-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--icm-deep-blue);
  margin-bottom: 4px;
}

.reg-card-subtitle {
  font-size: 0.85rem;
  color: var(--icm-text-muted);
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--icm-deep-blue);
  margin-bottom: 6px;
}

.form-label .required-star {
  color: var(--icm-coral);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--icm-text-main);
  background-color: #FFFFFF;
  border: 1px solid var(--icm-border);
  border-radius: 6px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--icm-clinical);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.form-input::placeholder {
  color: var(--icm-text-light);
}

/* Team Checkbox Toggle & Slide Container */
.team-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--icm-coral);
  cursor: pointer;
}

.checkbox-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--icm-deep-blue);
}

.team-details-slider {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
}

.team-details-slider.revealed {
  max-height: 180px;
  opacity: 1;
  margin-top: 14px;
}

/* Form Alerts & Feedback */
.form-status-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

.form-status-alert.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--icm-clinical-light);
  border: 1px solid #BAE6FD;
  color: #0369A1;
}

.form-status-alert.success {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--status-success-bg);
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.form-status-alert.error {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--status-danger-bg);
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* Auto-Closed Notice */
.reg-closed-notice {
  display: none;
  padding: 16px;
  background-color: #FFF7ED;
  border: 1px solid #FFEDD5;
  border-radius: 8px;
  color: #9A3412;
  margin-bottom: 18px;
}

.reg-closed-notice.visible {
  display: block;
}

/* Submit Button */
.btn-submit-reg {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
}

.btn-submit-reg:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Small helper / setup notes */
.webhook-help-toggle {
  margin-top: 16px;
  font-size: 0.775rem;
  color: var(--icm-text-light);
  text-align: center;
  cursor: pointer;
  display: block;
  text-decoration: underline;
}

.webhook-help-toggle:hover {
  color: var(--icm-clinical);
}

/* --------------------------------------------------------------------------
   Dataset Section Cards (Section 2)
   -------------------------------------------------------------------------- */
.data-cta-card {
  background: #FFFFFF;
  border: 1px solid var(--icm-border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.data-cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--icm-coral) 0%, var(--icm-clinical) 100%);
}

.data-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 768px) {
  .data-card-grid {
    grid-template-columns: 1fr;
  }
}

.data-info-side h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--icm-deep-blue);
  margin-bottom: 6px;
}

.data-info-side p {
  font-size: 0.925rem;
  color: var(--icm-text-muted);
  line-height: 1.5;
}

.data-buttons-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-data-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none !important;
  transition: all var(--transition-fast);
}

.btn-data-download.train {
  background-color: var(--icm-coral);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
}

.btn-data-download.train:hover {
  background-color: var(--icm-coral-hover);
  transform: translateY(-2px);
}

.btn-data-download.test {
  background-color: var(--icm-clinical);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.25);
}

.btn-data-download.test:hover {
  background-color: var(--icm-clinical-hover);
  transform: translateY(-2px);
}

.btn-data-download.disabled {
  background-color: #E2E8F0;
  color: #64748B !important;
  cursor: not-allowed;
  box-shadow: none;
  border: 1px dashed #CBD5E1;
  pointer-events: none;
}

/* Dataset Spec Quick Pills */
.spec-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: var(--icm-bg-light);
  border: 1px solid var(--icm-border);
  color: var(--icm-text-main);
  font-weight: 500;
}

.spec-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-axon { background-color: var(--icm-coral); }
.dot-myelin { background-color: var(--icm-clinical); }
.dot-bg { background-color: #64748B; }

/* --------------------------------------------------------------------------
   Submission Checklist & Upload Card (Section 3)
   -------------------------------------------------------------------------- */
.submission-sidebar-card {
  background-color: var(--icm-white);
  border: 1px solid var(--icm-border);
  border-radius: 12px;
  padding: 26px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 96px;
}

.submission-sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--icm-deep-blue);
  margin-bottom: 4px;
}

.checklist-container {
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--icm-border);
  border-radius: 8px;
  background-color: #F8FAFC;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checklist-item:hover {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
}

.checklist-item.checked {
  background-color: var(--status-success-bg);
  border-color: #A7F3D0;
}

.checklist-checkbox {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--status-success);
}

.checklist-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--icm-text-main);
  line-height: 1.4;
}

.checklist-progress-bar-wrap {
  margin-bottom: 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--icm-text-muted);
  margin-bottom: 4px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--icm-coral);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-fill.complete {
  background-color: var(--status-success);
}

.btn-upload-onedrive {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--icm-coral);
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.3);
  text-decoration: none !important;
  transition: all var(--transition-fast);
}

.btn-upload-onedrive:hover {
  background-color: var(--icm-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.4);
}

.upload-notice-text {
  font-size: 0.775rem;
  color: var(--icm-text-light);
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Winners Section & Podium / Leaderboard (Section 4)
   -------------------------------------------------------------------------- */
.winners-banner-pending {
  background: linear-gradient(135deg, #001A3D 0%, #0F2547 100%);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.winners-banner-pending::after {
  content: "🏆";
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 140px;
  opacity: 0.08;
  pointer-events: none;
}

.pending-trophy-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.pending-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pending-desc {
  font-size: 1.05rem;
  color: #CBD5E1;
  max-width: 680px;
  margin: 0 auto 20px auto;
}

.sipaim-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #F59E0B;
  color: #FCD34D;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 999px;
}

/* Podium UI (Active when WINNERS_ANNOUNCED: true) */
.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 40px;
}

@media (max-width: 820px) {
  .podium-container {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.podium-card {
  background: #FFFFFF;
  border: 1px solid var(--icm-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
  position: relative;
}

.podium-card:hover {
  transform: translateY(-4px);
}

.podium-card.first {
  border-color: #F59E0B;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.18);
  order: 2;
  padding: 32px 24px;
}

.podium-card.second {
  order: 1;
}

.podium-card.third {
  order: 3;
}

@media (max-width: 820px) {
  .podium-card.first { order: 1; }
  .podium-card.second { order: 2; }
  .podium-card.third { order: 3; }
}

.podium-medal {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.podium-card.first .podium-medal {
  font-size: 3.2rem;
}

.podium-rank-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.badge-gold { background-color: #FEF3C7; color: #92400E; }
.badge-silver { background-color: #F1F5F9; color: #475569; }
.badge-bronze { background-color: #FFEDD5; color: #9A3412; }

.podium-team-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--icm-deep-blue);
  margin-bottom: 4px;
}

.podium-affiliation {
  font-size: 0.825rem;
  color: var(--icm-text-muted);
  margin-bottom: 12px;
}

.podium-score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--icm-coral);
}

.podium-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--icm-text-light);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--icm-navy);
  color: #CBD5E1;
  padding: 60px 0 30px 0;
  margin-top: auto;
  border-top: 3px solid var(--icm-coral);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-about h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 480px;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-logo-img {
  height: 38px;
  width: auto;
  background-color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: #64748B;
}

/* --------------------------------------------------------------------------
   Back to Top & Utilities
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--icm-navy);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: var(--icm-coral);
  transform: translateY(-2px);
}

/* Modal for Apps Script Setup Guide */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 26, 61, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--icm-text-muted);
}

.modal-close-btn:hover {
  color: var(--icm-coral);
}
