/* ============================================================
   AFRICA AQUATICS — REFRESH STYLESHEET
   Google Fonts: Inter (body) · Poppins (headings) · JetBrains Mono (times)
   Brand: sky #95d9fe · navy #0e2a3c · yellow #f0ad4e · green #5cb85c
   Prefix: aa-  (no collision with Bootstrap 3 or production CSS)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&family=JetBrains+Mono:wght@600;700&display=swap');

/* ---- Design tokens ---- */
:root {
  --aa-sky:    #95d9fe;
  --aa-navy:   #0e2a3c;
  --aa-yellow: #f0ad4e;
  --aa-green:  #5cb85c;
  --aa-body:   #2d3748;
  --aa-muted:  #6b7280;
  --aa-border: #e2e8f0;
  --aa-bg-alt: #f4f9fd;
  --aa-bg-card:#ffffff;

  --aa-shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --aa-shadow-md: 0 4px 8px rgba(0,0,0,0.07), 0 12px 28px rgba(0,0,0,0.05);
  --aa-shadow-lg: 0 10px 40px rgba(0,0,0,0.13), 0 4px 14px rgba(0,0,0,0.07);

  --aa-radius-sm: 6px;
  --aa-radius-md: 10px;
  --aa-radius-lg: 14px;

  --aa-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   UTILITY
   ================================================================ */
.aa-hidden { display: none !important; }

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.aa-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .5s var(--aa-ease), transform .5s var(--aa-ease);
}
.aa-reveal.aa-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   ZONE BANNER  (zone pages only — shown between header and hero)
   ================================================================ */
.aa-zone-banner {
  background: linear-gradient(90deg, #1a4a6e 0%, var(--aa-navy) 100%);
  padding: 12px 0;
  border-bottom: 3px solid var(--aa-sky);
}
.aa-zone-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.aa-zone-badge {
  background: var(--aa-sky);
  color: var(--aa-navy);
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.aa-zone-name {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ================================================================
   SECTION UTILITIES
   ================================================================ */
.aa-section {
  padding: 80px 0;
  background: #ffffff;
}
.aa-section-alt {
  background: var(--aa-bg-alt);
}
.aa-section-header {
  margin-bottom: 36px;
}
.aa-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--aa-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}
.aa-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--aa-sky);
  margin-top: 8px;
  border-radius: 2px;
}
.aa-section-subtitle {
  color: var(--aa-muted);
  font-size: 14px;
  margin: 12px 0 0;
}
.aa-section-header-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 12px;
}
.aa-view-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--aa-muted);
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .22s var(--aa-ease);
}
.aa-view-all:hover { color: var(--aa-navy); }

/* ================================================================
   NEWS — Uniform 3-card grid
   ================================================================ */
.aa-news-card {
  display: block;
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--aa-shadow-sm);
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
  margin-bottom: 24px;
}
.aa-news-card:hover {
  box-shadow: var(--aa-shadow-lg);
  transform: translateY(-4px);
  text-decoration: none;
}
.aa-news-card-img {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #c1d5e8;
}
.aa-news-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--aa-ease);
}
.aa-news-card:hover .aa-news-card-img img {
  transform: scale(1.06);
}
.aa-news-card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  z-index: 2;
}
.aa-news-tag {
  background: var(--aa-sky);
  color: var(--aa-navy);
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.4;
}
.aa-news-tag-featured {
  background: var(--aa-yellow);
  color: var(--aa-navy);
}
.aa-news-card-date {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  z-index: 2;
  line-height: 1.4;
}
.aa-news-card-body {
  padding: 16px 16px 18px;
}
.aa-news-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 8px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-news-card-excerpt {
  font-size: 13px;
  color: var(--aa-muted);
  line-height: 1.65;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-read-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--aa-navy);
  letter-spacing: 0.3px;
  transition: color .2s var(--aa-ease);
}
.aa-read-more:hover { color: #1a6496; }

/* ================================================================
   UPCOMING EVENTS — Full-image tiles (3 × col-sm-4)
   ================================================================ */
.aa-event-img-card {
  display: block;
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--aa-shadow-md);
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
  margin-bottom: 24px;
}
.aa-event-img-card:hover {
  box-shadow: var(--aa-shadow-lg);
  transform: translateY(-4px);
  text-decoration: none;
}
.aa-event-img-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #1a3a52;
}
.aa-event-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--aa-ease);
  font-size: 0;
  color: transparent;
}
.aa-event-img-card:hover .aa-event-img-wrap img {
  transform: scale(1.04);
}
.aa-event-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 42, 60, 0.88) 0%,
    rgba(14, 42, 60, 0.35) 48%,
    transparent 72%
  );
  transition: background .22s var(--aa-ease);
}
.aa-event-img-card:hover .aa-event-img-overlay {
  background: linear-gradient(
    to top,
    rgba(14, 42, 60, 0.96) 0%,
    rgba(14, 42, 60, 0.46) 48%,
    rgba(14, 42, 60, 0.06) 72%
  );
}
.aa-event-img-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--aa-sky);
  color: var(--aa-navy);
  border-radius: var(--aa-radius-sm);
  padding: 5px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.aa-event-img-day {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.aa-event-img-mon {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.72;
}
.aa-event-img-country {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--aa-navy);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 2;
  white-space: nowrap;
  max-width: calc(100% - 90px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-event-img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px;
  z-index: 2;
}
.aa-event-img-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.aa-event-img-loc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}
.aa-event-img-loc .fa {
  margin-right: 4px;
  color: var(--aa-sky);
}

/* ================================================================
   ADSENSE SLOT PLACEHOLDER
   ================================================================ */
.aa-ad-wrap {
  padding: 16px 0;
  background: #f5f7f9;
  border-top: 1px solid var(--aa-border);
  border-bottom: 1px solid var(--aa-border);
}
.aa-ad-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #bbb;
  text-align: center;
  margin-bottom: 5px;
}
.aa-ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px dashed #d0d5da;
  background: #eef0f2;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.aa-ad-desktop { display: none; max-width: 728px; height: 90px; }
.aa-ad-mobile  { display: flex; max-width: 320px; height: 50px; }

/* ================================================================
   VIDEO HIGHLIGHTS — LANDSCAPE (16:9)
   ================================================================ */
.aa-video-card {
  display: block;
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--aa-shadow-sm);
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
  margin-bottom: 20px;
  cursor: pointer;
}
.aa-video-card:hover {
  box-shadow: var(--aa-shadow-lg);
  transform: translateY(-4px);
  text-decoration: none;
}
.aa-video-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #111;
}
.aa-video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s, transform .45s var(--aa-ease);
}
.aa-video-card:hover .aa-video-thumb img {
  opacity: 0.80;
  transform: scale(1.06);
}
.aa-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.aa-play-overlay .fa {
  font-size: 52px;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
  transition: transform .22s var(--aa-ease);
}
.aa-video-card:hover .aa-play-overlay .fa { transform: scale(1.15); }
.aa-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.80);
  color: #fff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 2;
}
.aa-video-info   { padding: 14px 16px; }
.aa-video-title  {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  margin-bottom: 6px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-video-meta { font-size: 12px; color: var(--aa-muted); }
.aa-yt-row     { text-align: center; margin-top: 16px; }
.aa-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff0000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 26px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  transition: background .18s, transform .18s;
  font-family: inherit;
}
.aa-yt-btn:hover {
  background: #cc0000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ================================================================
   VIDEO HIGHLIGHTS — STORIES (9:16 Instagram-style)
   Desktop: 5 equal-width cards in one row
   Tablet (<992px): wrap to 3+2
   Mobile (<768px): horizontal scroll snap
   ================================================================ */
.aa-stories-row {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
}
.aa-story-card {
  display: block;
  flex: 1 1 0;
  min-width: 130px;
  border-radius: var(--aa-radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 16;
  background: #111;
  text-decoration: none;
  box-shadow: var(--aa-shadow-md);
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
}
.aa-story-card:hover {
  box-shadow: var(--aa-shadow-lg);
  transform: translateY(-6px) scale(1.015);
  text-decoration: none;
}
.aa-story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  position: absolute;
  inset: 0;
  transition: opacity .25s, transform .5s var(--aa-ease);
  font-size: 0;
  color: transparent;
}
.aa-story-card:hover img { opacity: 0.68; transform: scale(1.07); }
.aa-story-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 52px;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: transform .22s var(--aa-ease);
}
.aa-story-card:hover .aa-story-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
}
.aa-story-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 68px 14px 16px;
  background: linear-gradient(transparent, rgba(10,28,42,0.96));
  pointer-events: none;
}
.aa-story-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 7px;
}
.aa-story-date {
  font-size: 10px;
  color: rgba(255,255,255,0.68);
  font-weight: 600;
}
.aa-story-title {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.42;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ================================================================
   TOP RANKINGS WIDGET
   ================================================================ */
.aa-rankings-section {
  background: var(--aa-bg-alt);
  padding: 64px 0;
}
.aa-rankings-inner {
  background: linear-gradient(
    135deg,
    #0b2333 0%,
    #16486e 55%,
    #0d3452 100%
  );
  border-radius: var(--aa-radius-lg);
  padding: 30px 36px 36px;
  box-shadow: 0 8px 40px rgba(14,42,60,0.35);
}
.aa-rankings-inner .aa-section-title { color: #fff; }
.aa-rankings-inner .aa-section-title::after { background: var(--aa-sky); }
.aa-rankings-inner .aa-section-subtitle { color: rgba(255,255,255,0.55); }

.aa-rankings-filters { margin-bottom: 24px; }
.aa-select-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}
.aa-select-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.aa-select-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.52);
  margin: 0;
  display: block;
}
.aa-select-wrap {
  position: relative;
  display: inline-block;
}
.aa-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(149, 217, 254, 0.4);
  border-radius: var(--aa-radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 36px 9px 14px;
  min-width: 200px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s var(--aa-ease), background .2s var(--aa-ease);
  line-height: 1.4;
}
.aa-select:hover {
  border-color: var(--aa-sky);
  background: rgba(149, 217, 254, 0.13);
}
.aa-select:focus {
  border-color: var(--aa-sky);
  background: rgba(149, 217, 254, 0.13);
  outline: none;
  box-shadow: 0 0 0 3px rgba(149, 217, 254, 0.22);
}
.aa-select option {
  background: #0d2a3b;
  color: #fff;
  font-weight: 500;
}
.aa-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.aa-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  padding: 20px 0 0;
  flex-wrap: wrap;
  min-height: 200px;
}
.aa-podium-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: var(--aa-radius-md);
  text-align: center;
  padding: 28px 20px 22px;
  flex: 1;
  max-width: 220px;
  min-width: 150px;
  position: relative;
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
}
.aa-podium-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  transform: translateY(-5px);
}
.aa-podium-card.rank-1 {
  padding-top: 38px;
  border-top: 4px solid #FFD700;
  background: rgba(255,215,0,0.07);
}
.aa-podium-card.rank-2 { border-top: 4px solid #B0B7BC; }
.aa-podium-card.rank-3 { border-top: 4px solid #CD7F32; }

.aa-rank-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid rgba(14,42,60,0.5);
}
.aa-rank-badge.gold   { background: #FFD700; color: #5a4800; }
.aa-rank-badge.silver { background: #B0B7BC; color: #fff; }
.aa-rank-badge.bronze { background: #CD7F32; color: #fff; }

.aa-athlete-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.3;
}
.aa-athlete-country {
  font-size: 11px;
  color: rgba(255,255,255,0.58);
  margin-bottom: 10px;
}
.aa-athlete-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--aa-sky);
  margin-bottom: 5px;
  letter-spacing: 1px;
}
.rank-1 .aa-athlete-time {
  font-size: 26px;
  color: #FFD700;
}
.aa-athlete-club {
  font-size: 10.5px;
  color: rgba(255,255,255,0.42);
  font-style: italic;
}
.aa-rankings-empty {
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.45);
  padding: 40px 0;
  font-style: italic;
}

/* ================================================================
   IMAGE HIGHLIGHTS GALLERY
   ================================================================ */
.aa-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.aa-filter-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--aa-border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-muted);
  cursor: pointer;
  transition: all .2s var(--aa-ease);
  font-family: inherit;
}
.aa-filter-pill:hover {
  border-color: var(--aa-sky);
  color: var(--aa-navy);
  background: rgba(149,217,254,0.08);
}
.aa-filter-pill.active {
  background: var(--aa-navy);
  color: #fff;
  border-color: var(--aa-navy);
}
.aa-highlight-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.aa-highlight-item {
  width: calc(25% - 8px);
  aspect-ratio: 1;
  border-radius: var(--aa-radius-sm);
  overflow: hidden;
  position: relative;
  background: #c1d5e8;
  box-shadow: var(--aa-shadow-sm);
  transition: opacity .3s;
}
.aa-highlight-item a { display: block; width: 100%; height: 100%; }
.aa-highlight-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .38s var(--aa-ease);
  font-size: 0;
  color: transparent;
}
.aa-highlight-item:hover img { transform: scale(1.10); }
.aa-highlight-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,42,60,0);
  transition: background .25s var(--aa-ease);
  pointer-events: none;
}
.aa-highlight-item:hover .aa-highlight-overlay {
  background: rgba(14,42,60,0.46);
}
.aa-highlight-overlay .fa {
  font-size: 28px;
  color: rgba(255,255,255,0);
  transition: color .25s;
}
.aa-highlight-item:hover .aa-highlight-overlay .fa {
  color: rgba(255,255,255,0.92);
}
.aa-highlight-item.aa-hidden { display: none; }

/* ================================================================
   VIDEO MODAL (aaPlayVideo)
   ================================================================ */
.aa-video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aa-video-modal-inner {
  position: relative;
  width: 90%;
  max-width: 900px;
}
.aa-video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 10px;
  opacity: 0.8;
  transition: opacity .2s;
}
.aa-video-modal-close:hover { opacity: 1; }
.aa-video-modal-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.aa-video-modal-container iframe,
.aa-video-modal-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ================================================================
   RESPONSIVE RULES
   ================================================================ */

/* Tablet: ≤992px */
@media (max-width: 992px) {
  .aa-section { padding: 56px 0; }

  .aa-stories-row {
    flex-wrap: wrap;
  }
  .aa-story-card {
    flex: 1 1 calc(33.33% - 12px);
    min-width: 0;
  }

  .aa-select { min-width: 160px; }

  .aa-highlight-item { width: calc(33.33% - 8px); }

  .aa-ad-desktop { display: flex; }
  .aa-ad-mobile  { display: none; }
}

/* Mobile: ≤768px */
@media (max-width: 768px) {
  .aa-section { padding: 40px 0; }

  .aa-section-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Stories: horizontal scroll snap */
  .aa-stories-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    gap: 12px;
  }
  .aa-stories-row::-webkit-scrollbar { height: 4px; }
  .aa-stories-row::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
  .aa-stories-row::-webkit-scrollbar-thumb { background: var(--aa-sky); border-radius: 2px; }
  .aa-story-card {
    flex: 0 0 78vw;
    scroll-snap-align: start;
    aspect-ratio: 9 / 16;
    max-height: 400px;
  }

  .aa-highlight-item { width: calc(50% - 6px); }

  .aa-select-row { flex-direction: column; gap: 16px; }
  .aa-select { min-width: 100%; }

  .aa-rankings-inner { padding: 20px 18px 24px; }

  /* Podium — single vertical column, rank order top-to-bottom */
  .aa-podium {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-height: auto;
  }
  .aa-podium-card {
    max-width: 100%;
    min-width: 0;
    padding: 22px 16px 18px;
  }
  /* Reorder from DOM (silver→gold→bronze) to rank (gold→silver→bronze) */
  .aa-podium-card.rank-1 { order: 1; padding-top: 30px; }
  .aa-podium-card.rank-2 { order: 2; }
  .aa-podium-card.rank-3 { order: 3; }

  .aa-ad-desktop { display: none; }
  .aa-ad-mobile  { display: flex; }

  .aa-video-modal-inner { width: 96%; }
}

/* ============================================================
   === RANKINGS PAGE ===
   Styles for the modernised rankings page (Phase 2 / H).
   Loaded on rankings.blade.php only — no impact on home/zone
   widgets which already have their own rankings widget styles
   from Phase 1.
   ============================================================ */

/* ================================================================
   RANKINGS PAGE HERO BAND
   Slim navy band with wave-bottom edge that the filter card
   overlaps via negative top margin.
   ================================================================ */
.aa-page-hero {
  background: var(--aa-navy);
  padding: 52px 0 76px;
  position: relative;
  overflow: hidden;
}
.aa-page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56'%3E%3Cpath fill='%23f4f9fd' d='M0,28L60,24.5C120,21,240,14,360,18.7C480,23,600,39,720,42C840,45,960,35,1080,29.2C1200,23,1320,21,1380,20L1440,19L1440,56L1380,56C1320,56,1200,56,1080,56C960,56,840,56,720,56C600,56,480,56,360,56C240,56,120,56,60,56L0,56Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
.aa-page-hero-inner       { position: relative; z-index: 2; }
.aa-page-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin-bottom: 8px;
}
.aa-page-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.15;
}
.aa-page-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.68);
  margin: 0;
}

/* ================================================================
   FILTER CARD
   White card, -48px top margin overlaps the hero wave bottom.
   ================================================================ */
.aa-filter-card {
  background: #fff;
  border-radius: var(--aa-radius-lg);
  box-shadow: var(--aa-shadow-lg);
  padding: 28px 32px 24px;
  margin-top: -48px;
  position: relative;
  z-index: 10;
}
.aa-filter-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aa-muted);
  margin: 0 0 10px;
}

/* ---- Segmented controls ---- */
.aa-seg-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.aa-seg-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-muted);
  white-space: nowrap;
  min-width: 80px;
}
.aa-seg-control {
  display: inline-flex;
  background: var(--aa-bg-alt);
  border: 1px solid var(--aa-border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.aa-seg-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  line-height: 1.4;
  white-space: nowrap;
  font-family: inherit;
}
.aa-seg-btn:hover {
  background: rgba(14,42,60,0.06);
  color: var(--aa-navy);
}
.aa-seg-btn.active,
.aa-seg-btn[aria-selected="true"] {
  background: var(--aa-navy);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.aa-seg-btn:focus {
  outline: 3px solid var(--aa-sky);
  outline-offset: 1px;
}

/* ---- Filter grid (dropdown row inside filter card) ---- */
.aa-filter-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: flex-end;
}
.aa-filter-col {
  flex: 1 1 160px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.aa-filter-col label {
  font-size: 11px;
  font-weight: 600;
  color: var(--aa-muted);
  letter-spacing: 0.4px;
  margin: 0;
}

/* Light select — filter card on white background.
   Distinct from .aa-select (dark rankings widget on navy). */
.aa-select-light {
  display: block;
  width: 100%;
  padding: 8px 34px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--aa-navy);
  background: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
  font-family: inherit;
}
.aa-select-light:hover { border-color: #9cb4c5; }
.aa-select-light:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
  outline: none;
}

/* ---- Date range inputs ---- */
.aa-date-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.aa-date-input {
  flex: 1 1 120px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--aa-navy);
  background: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
.aa-date-input:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
  outline: none;
}
.aa-date-sep { font-size: 12px; color: var(--aa-muted); white-space: nowrap; }

/* ---- Collapsible section (qualifying events) ---- */
.aa-collapsible-trigger {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-family: inherit;
}
.aa-collapsible-trigger .fa          { font-size: 10px; transition: transform .2s; color: var(--aa-muted); }
.aa-collapsible-trigger[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.aa-collapsible-body                 { display: none; padding-top: 4px; }
.aa-collapsible-body.aa-open         { display: block; }

/* ---- Chip / multi-select input ---- */
.aa-chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  min-height: 40px;
  cursor: text;
  align-items: center;
  transition: border-color .18s, box-shadow .18s;
}
.aa-chip-input:focus-within {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
}
.aa-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--aa-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px 3px 10px;
  border-radius: 100px;
}
.aa-chip-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.aa-chip-remove:hover       { color: #fff; }
.aa-chip-text-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--aa-navy);
  min-width: 80px;
  flex: 1;
  font-family: inherit;
}

/* Qualifying events checkbox list */
.aa-qe-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 4px;
}
.aa-qe-item                         { display: flex; align-items: center; gap: 6px; }
.aa-qe-item input[type=checkbox]    { accent-color: var(--aa-navy); width: 14px; height: 14px; cursor: pointer; }
.aa-qe-item label                   { font-size: 12px; color: var(--aa-body); cursor: pointer; margin: 0; white-space: nowrap; }

/* ---- Filter action bar (Apply / Clear / count) ---- */
.aa-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--aa-border);
  flex-wrap: wrap;
}
.aa-filter-apply {
  background: var(--aa-navy);
  color: #fff;
  border: none;
  border-radius: var(--aa-radius-sm);
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, transform .18s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.aa-filter-apply:hover              { background: #1a4a6b; transform: translateY(-1px); }
.aa-filter-clear {
  background: none;
  border: none;
  color: var(--aa-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}
.aa-filter-clear:hover              { color: #c0392b; }
.aa-results-count-inline            { margin-left: auto; font-size: 12px; color: var(--aa-muted); }

/* ================================================================
   RESULTS AREA
   ================================================================ */
.aa-results-section                 { padding: 32px 0 48px; background: var(--aa-bg-alt); }

/* ---- Sort bar ---- */
.aa-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.aa-sort-bar-left                   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.aa-results-count                   { font-size: 13px; font-weight: 600; color: var(--aa-navy); }
.aa-results-count span              { color: var(--aa-muted); font-weight: 400; }

/* Active filter tags */
.aa-active-tags                     { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aa-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f0f7;
  border: 1px solid #c5d9eb;
  color: var(--aa-navy);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px 4px 10px;
  border-radius: 100px;
}
.aa-active-tag-remove {
  background: none;
  border: none;
  color: #7a9ab3;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.aa-active-tag-remove:hover         { color: #c0392b; }

/* Sort / page-size selects */
.aa-sort-bar-right                  { display: flex; align-items: center; gap: 10px; }
.aa-sort-select,
.aa-pagesize-select {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-navy);
  background: #fff;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%236b7280' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s;
}
.aa-sort-select:focus,
.aa-pagesize-select:focus            { border-color: var(--aa-sky); outline: none; }
.aa-sort-label                       { font-size: 12px; color: var(--aa-muted); white-space: nowrap; }

/* ================================================================
   RANKINGS TABLE
   ================================================================ */
.aa-results-table-wrap {
  background: #fff;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
}
.aa-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.aa-results-table thead th {
  background: var(--aa-navy);
  color: rgba(255,255,255,0.80);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 11px 14px;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.aa-results-table thead th:hover    { background: #1a4a6b; color: #fff; }
.aa-results-table thead th.aa-sorted { background: #1a4a6b; color: #fff; }
.aa-results-table thead th .aa-sort-icon {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.5;
  font-size: 9px;
}
.aa-results-table thead th.aa-sorted .aa-sort-icon { opacity: 1; }

.aa-results-table tbody tr          { border-bottom: 1px solid var(--aa-border); transition: background .14s; }
.aa-results-table tbody tr:last-child { border-bottom: none; }
/* Zebra striping */
.aa-results-table tbody tr:nth-child(even) { background: #f8fbff; }
.aa-results-table tbody tr:hover    { background: #f0f7ff; }
.aa-results-table tbody td          { padding: 10px 14px; vertical-align: middle; }

/* Top-3 medal row: 3px left-border accent */
.aa-results-table tbody tr.aa-row-rank-1 { border-left: 3px solid #f59e0b; }
.aa-results-table tbody tr.aa-row-rank-2 { border-left: 3px solid #94a3b8; }
.aa-results-table tbody tr.aa-row-rank-3 { border-left: 3px solid #d97706; }

/* ---- Rank cell ---- */
.aa-rank-cell                       { text-align: center; min-width: 44px; }
.aa-rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 800;
}
.aa-rank-medal.gold   { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }
.aa-rank-medal.silver { background: #f1f5f9; color: #475569; border: 2px solid #94a3b8; }
.aa-rank-medal.bronze { background: #fef0e8; color: #7c2d12; border: 2px solid #d97706; }
.aa-rank-plain        { font-size: 13px; font-weight: 600; color: var(--aa-muted); }

/* ---- Athlete cell ---- */
.aa-athlete-cell                    { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.aa-athlete-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--aa-border);
  background: var(--aa-bg-alt);
}
/* Scoped: .aa-athlete-name on the rankings page table is navy/body text,
   not the white podium-widget version from Phase 1. */
.aa-rankings-page .aa-athlete-name {
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.2;
  font-size: 13.5px;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  margin-bottom: 0;
}
.aa-athlete-meta                    { font-size: 11px; color: var(--aa-muted); margin-top: 1px; }
.aa-athlete-flag                    { font-size: 14px; margin-right: 3px; }

/* ---- Time cell ---- */
.aa-time-cell                       { white-space: nowrap; }
.aa-time-val {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--aa-navy);
}

/* ---- CANA Points cell ---- */
.aa-fina-cell {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-body);
  white-space: nowrap;
  text-align: right;
}
.aa-fina-bar {
  height: 3px;
  background: var(--aa-border);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
  width: 64px;
}
.aa-fina-fill                       { height: 100%; background: var(--aa-sky); border-radius: 2px; }

/* ---- Meet / event cells ---- */
.aa-meet-name                       { font-size: 12.5px; color: var(--aa-body); font-weight: 500; }
.aa-meet-date                       { font-size: 11px; color: var(--aa-muted); margin-top: 1px; }
.aa-event-cell                      { font-size: 12px; font-weight: 700; color: var(--aa-navy); white-space: nowrap; }
.aa-event-cell small                { font-weight: 500; color: var(--aa-muted); font-size: 11px; display: block; }

/* Column width helpers */
.aa-col-rank                        { width: 52px; }
.aa-col-athlete                     { min-width: 200px; }
.aa-col-event                       { width: 110px; }
.aa-col-time                        { width: 120px; }
.aa-col-fina                        { width: 100px; }
.aa-col-meet                        { min-width: 160px; }
.aa-col-year                        { width: 60px; text-align: center; }
.aa-col-gender                      { width: 70px; text-align: center; }

/* ---- Gender pill ---- */
.aa-gender-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
}
.aa-gender-pill.male                { background: #eff6ff; color: #1d4ed8; }
.aa-gender-pill.female              { background: #fdf2f8; color: #a21caf; }

/* ---- Empty state ---- */
.aa-empty-state                     { text-align: center; padding: 56px 24px; color: var(--aa-muted); }
.aa-empty-state .fa                 { font-size: 40px; margin-bottom: 14px; color: var(--aa-border); }
.aa-empty-state h3                  { font-size: 17px; color: var(--aa-navy); margin-bottom: 8px; }
.aa-empty-state p                   { font-size: 13px; margin: 0; }

/* ================================================================
   MOBILE CARD VIEW  (≤639px — table hidden, card list shown)
   ================================================================ */
.aa-results-cards { display: none; }

@media (max-width: 639px) {
  .aa-results-table-wrap { display: none; }
  .aa-results-cards      { display: block; }
}

.aa-result-card {
  background: #fff;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aa-result-card-rank                { flex-shrink: 0; width: 36px; display: flex; justify-content: center; padding-top: 2px; }
.aa-result-card-body                { flex: 1; min-width: 0; }
.aa-result-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--aa-navy);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-result-card-meta                { font-size: 11px; color: var(--aa-muted); margin-bottom: 6px; }
.aa-result-card-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--aa-navy);
}
.aa-result-card-event               { font-size: 11px; color: var(--aa-muted); margin-top: 1px; }
.aa-result-card-fina                { text-align: right; flex-shrink: 0; }
.aa-result-card-fina-val            { font-size: 12px; font-weight: 700; color: var(--aa-sky); }
.aa-result-card-fina-label          { font-size: 10px; color: var(--aa-muted); }

/* ================================================================
   PAGINATION
   ================================================================ */
.aa-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.aa-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--aa-border);
  background: #fff;
  color: var(--aa-navy);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.aa-page-btn:hover                  { background: var(--aa-bg-alt); border-color: #9cb4c5; }
.aa-page-btn.active                 { background: var(--aa-navy); color: #fff; border-color: var(--aa-navy); }
.aa-page-btn:disabled               { opacity: 0.4; cursor: not-allowed; }
.aa-page-ellipsis                   { font-size: 13px; color: var(--aa-muted); padding: 0 4px; }

/* ================================================================
   "RECORDS TO CHASE" TEASER
   ================================================================ */
.aa-records-section                 { padding: 56px 0 64px; background: #fff; }
.aa-record-card {
  background: var(--aa-bg-alt);
  border-radius: var(--aa-radius-md);
  border: 1px solid var(--aa-border);
  padding: 20px 20px 18px;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 8px;
}
.aa-record-card:hover               { box-shadow: var(--aa-shadow-md); transform: translateY(-3px); }
.aa-record-card-event {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--aa-sky);
}
.aa-record-card-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--aa-navy);
  letter-spacing: -0.5px;
  line-height: 1;
}
.aa-record-card-holder              { font-size: 13px; font-weight: 600; color: var(--aa-body); }
.aa-record-card-flag                { font-size: 16px; margin-right: 4px; }
.aa-record-card-meet                { font-size: 11px; color: var(--aa-muted); }
.aa-record-card-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  background: #dbeafe;
  color: #1d4ed8;
  margin-top: auto;
  align-self: flex-start;
}
.aa-record-card-badge.ar            { background: #dbeafe; color: #1d4ed8; }
.aa-record-card-badge.wr            { background: #fee2e2; color: #b91c1c; }

/* ================================================================
   RECORD BENCHMARKS STRIP
   Navy card above results table. JS toggles .aa-bench-visible.
   ================================================================ */
.aa-benchmark-strip {
  display: none;
  background: var(--aa-navy);
  border-radius: var(--aa-radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.aa-benchmark-strip.aa-bench-visible { display: block; }

/* Pool-lane watermark */
.aa-benchmark-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 48px,
    rgba(149,217,254,0.06) 48px,
    rgba(149,217,254,0.06) 50px
  );
  pointer-events: none;
}
.aa-bench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(149,217,254,0.15);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 6px;
}
.aa-bench-event-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1px;
}
.aa-bench-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aa-sky);
  opacity: 0.8;
}
.aa-bench-rows                      { padding: 6px 0 8px; position: relative; z-index: 1; }
.aa-bench-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px;
  cursor: help;
  transition: background .15s;
  flex-wrap: wrap;
}
.aa-bench-row:hover                 { background: rgba(149,217,254,0.08); }
.aa-bench-row + .aa-bench-row      { border-top: 1px solid rgba(149,217,254,0.07); }

/* Tier badge inside the benchmark strip (dark surface) */
.aa-bench-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.aa-bench-badge.wr                  { background: var(--aa-yellow); color: #7a4a00; }
.aa-bench-badge.ar                  { background: var(--aa-sky);    color: var(--aa-navy); }
.aa-bench-badge.nr                  { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.aa-bench-badge.zr                  { background: rgba(255,255,255,0.18); color: #e0e0e0; }

.aa-bench-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  min-width: 72px;
}
.aa-bench-holder                    { flex: 1; min-width: 0; }
.aa-bench-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-bench-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* % off record sub-text (desktop only, when benchmark strip is visible) */
.aa-pct-off {
  display: none;
  font-size: 10.5px;
  color: var(--aa-muted);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
@media (min-width: 992px) {
  .aa-show-pct .aa-pct-off { display: block; }
}

/* ================================================================
   TIER BADGES — canonical set, reused across rankings & records
   Three variants for three surface types:
     .aa-tier-badge   — light surfaces (filter card, teaser cards)
     .aa-bench-badge  — dark navy surfaces (benchmark strip, above)
     .aa-record-badge — compact inline (inside time cells in table)
   ================================================================ */

/* Light-surface tier badges */
.aa-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  vertical-align: middle;
}
.aa-tier-badge.wr                   { background: #fef3c7; color: #78350f; border: 1px solid #f59e0b; }
.aa-tier-badge.ar                   { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.aa-tier-badge.nr                   { background: transparent; color: var(--aa-navy); border: 1.5px solid var(--aa-navy); }
.aa-tier-badge.zr                   { background: #f1f5f9; color: #475569; border: 1px solid #94a3b8; }
.aa-tier-badge.mr                   { background: #fff3e8; color: #9a3412; border: 1px solid #fb923c; }
.aa-tier-badge.aa-tier-badge-lg     { font-size: 11px; padding: 5px 12px; border-radius: 6px; }
/* Inverse variant for dark surfaces other than the benchmark strip */
.aa-tier-badge-inv.wr               { background: var(--aa-yellow); color: #78350f; border: none; }
.aa-tier-badge-inv.ar               { background: var(--aa-sky);    color: var(--aa-navy); border: none; }
.aa-tier-badge-inv.nr               { background: rgba(255,255,255,0.9); color: var(--aa-navy); border: none; }
.aa-tier-badge-inv.zr               { background: rgba(200,200,200,0.85); color: #1a1a1a; border: none; }
.aa-tier-badge-inv.mr               { background: #fb923c; color: #fff; border: none; }

/* Compact inline record badge — sits next to a time value in a table cell */
.aa-record-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  text-transform: uppercase;
}
.aa-record-badge.wr                 { background: #fee2e2; color: #b91c1c; }
.aa-record-badge.ar                 { background: #dbeafe; color: #1d4ed8; }
.aa-record-badge.nr                 { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.aa-record-badge.zr                 { background: #dcfce7; color: #166534; }

/* ================================================================
   RANKINGS PAGE — PHASE H FILTER CARD LAYOUT
   Defines the new row/column grid structure used by rankings.blade.php
   (Phase H rewrite). Coexists with the older .aa-seg-row + .aa-filter-grid
   styles which are still used elsewhere.
   ================================================================ */

/* ---- Section wrappers ---- */
.aa-rankings-filter-section          { position: relative; z-index: 5; padding-bottom: 24px; }
.aa-ad-section                       { padding: 24px 0; }
.aa-records-teaser-section           { padding: 56px 0 72px; }

/* ---- Filter labels ---- */
.aa-filter-card .aa-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--aa-muted);
  margin: 0 0 6px;
  display: block;
}
.aa-filter-card .aa-filter-label-sm {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--aa-muted);
  margin: 0 0 4px;
  display: block;
}

/* ---- Row 1: Event Type + Gender (inline seg controls, content-width) ---- */
.aa-filter-row-pri {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 8px;
}
.aa-filter-pri-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;   /* keep seg-control content-width */
}

/* ---- Row 2: Course | Stroke | Distance (compact flex, content-width) ---- */
.aa-filter-row-event {
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--aa-border);
}
.aa-filter-row-event .aa-filter-sub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: auto;
}
.aa-filter-row-event .aa-filter-sub-grid > div {
  flex: 0 0 auto;
  width: 180px;
}

/* ---- Row 3: Federation | Zone (compact flex, content-width, no separator) ---- */
.aa-filter-row-loc {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}
.aa-filter-row-loc > div {
  flex: 0 0 auto;
  width: 240px;
}

/* ---- Row 4 (date) / Row 5 (advanced) — legacy class names retained ---- */
.aa-filter-row-c {
  margin-bottom: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--aa-border);
}
.aa-filter-row-d {
  margin-bottom: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--aa-border);
}

/* ---- Event scope / Date scope: inline label + seg-control ---- */
.aa-filter-event-scope,
.aa-filter-date-scope {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.aa-filter-event-scope .aa-filter-label,
.aa-filter-date-scope .aa-filter-label {
  margin: 0;
  min-width: 60px;
}

/* ---- Filter sub-row (conditional content shown by JS) ---- */
.aa-filter-sub-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0 4px;
}
.aa-filter-sub-row > label {
  font-size: 12px;
  color: var(--aa-body);
  font-weight: 500;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.aa-filter-sub-row input[type=checkbox] {
  accent-color: var(--aa-navy);
  width: 14px;
  height: 14px;
}

/* ---- Sub-grid (3 cols: distance / stroke / course) ---- */
.aa-filter-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}

/* ---- Light selects on filter card (override the dark .aa-select base) ---- */
.aa-filter-card .aa-select,
.aa-filter-card .aa-select-sm {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 32px 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--aa-navy);
  background-color: var(--aa-bg-alt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
  line-height: 1.4;
}
.aa-filter-card .aa-select-sm {
  padding: 7px 28px 7px 10px;
  font-size: 12px;
}
.aa-filter-card .aa-select:hover,
.aa-filter-card .aa-select-sm:hover {
  border-color: #9cb4c5;
  background-color: var(--aa-bg-alt);
}
.aa-filter-card .aa-select:focus,
.aa-filter-card .aa-select-sm:focus {
  border-color: var(--aa-sky);
  background-color: var(--aa-bg-alt);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
  outline: none;
}
.aa-filter-card .aa-select option,
.aa-filter-card .aa-select-sm option {
  background: #fff;
  color: var(--aa-navy);
  font-weight: 500;
}

/* ---- Select2 inside filter card: match light theme ---- */
.aa-filter-card .select2-container { width: 100% !important; }
.aa-filter-card .select2-selection {
  background-color: var(--aa-bg-alt) !important;
  border: 1.5px solid var(--aa-border) !important;
  border-radius: var(--aa-radius-sm) !important;
  min-height: 38px !important;
}
.aa-filter-card .select2-selection--single .select2-selection__rendered {
  line-height: 36px !important;
  color: var(--aa-navy) !important;
  padding-left: 12px !important;
}
.aa-filter-card .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}
.aa-filter-card .select2-selection--multiple .select2-selection__choice {
  background: var(--aa-navy) !important;
  border: none !important;
  color: #fff !important;
  font-size: 12px;
  padding: 2px 8px !important;
  border-radius: 100px !important;
}
.aa-filter-card .select2-selection--multiple .select2-selection__choice__remove {
  color: rgba(255,255,255,0.85) !important;
  margin-right: 5px !important;
}

/* ---- Date range row ---- */
.aa-date-range-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.aa-date-range-inputs > div {
  flex: 1 1 160px;
  min-width: 140px;
}
.aa-filter-card .aa-date-input.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--aa-navy);
  background-color: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-family: inherit;
  height: auto;
  box-shadow: none;
  line-height: 1.4;
}
.aa-filter-card .aa-date-input.form-control:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
  outline: none;
}

/* ---- Filter error message ---- */
.aa-filter-error {
  color: #c0392b;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  min-height: 18px;
}

/* ---- Filter actions right cluster ---- */
.aa-filter-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Generic buttons ---- */
.aa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--aa-radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, transform .18s, border-color .18s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.aa-btn-primary {
  background: var(--aa-navy);
  color: #fff;
}
.aa-btn-primary:hover,
.aa-btn-primary:focus {
  background: #1a4a6b;
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}

/* ================================================================
   RANKINGS PAGE — RESULTS TOOLBAR, TABLE, CHIPS
   ================================================================ */
.aa-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 12px;
  flex-wrap: wrap;
}
.aa-table-toolbar-left,
.aa-table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aa-results-count {
  font-size: 12px;
  color: var(--aa-muted);
  font-weight: 500;
}

/* ---- Rankings table ---- */
.aa-rankings-table-wrap {
  background: #fff;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow-x: auto;
}
.aa-rankings-table.table {
  margin-bottom: 0;
  font-size: 13px;
}
.aa-rankings-table thead th {
  background: var(--aa-navy);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 14px 12px;
  border: none;
  white-space: nowrap;
}
.aa-rankings-table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-color: var(--aa-border);
  color: var(--aa-body);
}
.aa-rankings-table tbody tr:hover {
  background: rgba(149,217,254,0.07);
}

/* ---- Active filter chips row ---- */
.aa-active-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}
.aa-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--aa-sky);
  color: var(--aa-navy);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px 4px 12px;
  border-radius: 100px;
}
.aa-chip-x {
  background: none;
  border: none;
  color: var(--aa-navy);
  padding: 0 0 0 4px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}
.aa-chip-x:hover { opacity: 1; }
.aa-chip-clear-all {
  background: none;
  border: 1.5px solid var(--aa-border);
  color: var(--aa-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  margin-left: 4px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.aa-chip-clear-all:hover {
  border-color: #c0392b;
  color: #c0392b;
}

/* ================================================================
   RANKINGS PAGE — BENCHMARK STRIP WRAPPER (Phase H)
   ================================================================ */
.aa-bench-wrap                       { margin: 14px 0 8px; }
.aa-bench-panel {
  background: var(--aa-navy);
  color: #fff;
  border-radius: var(--aa-radius-md);
  padding: 14px 18px;
  box-shadow: var(--aa-shadow-sm);
}
.aa-bench-event-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin-bottom: 8px;
}
.aa-bench-cc {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}
.aa-bench-zone {
  color: var(--aa-sky);
  font-size: 11px;
  font-weight: 600;
}
.aa-bench-date {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  margin-left: auto;
}

/* ---- Tier badge uppercase variants emitted by aa-rankings.js ---- */
.aa-tier-badge.aa-tier-WR            { background: #fef3c7; color: #78350f; border: 1px solid #f59e0b; }
.aa-tier-badge.aa-tier-AR            { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.aa-tier-badge.aa-tier-NR            { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.aa-tier-badge.aa-tier-ZR            { background: rgba(255,255,255,0.18); color: #e0e0e0; border: 1px solid rgba(255,255,255,0.25); }

/* ================================================================
   RANKINGS PAGE — RECORDS TEASER (Phase H)
   ================================================================ */
.aa-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin: 0 0 6px;
}
.aa-section-sub {
  font-size: 14px;
  color: var(--aa-muted);
  margin: 4px 0 0;
}
.aa-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-navy);
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
}
.aa-section-link:hover,
.aa-section-link:focus { color: #1a4a6b; text-decoration: none; }
.aa-record-cards-row                 { margin-top: 24px; }

/* ================================================================
   RANKINGS PAGE — RESPONSIVE OVERRIDES
   ================================================================ */
@media (max-width: 991px) {
  .aa-page-hero                     { padding: 40px 0 68px; }
  .aa-page-hero h1                  { font-size: 28px; }
  .aa-filter-card                   { padding: 22px 22px 20px; }
  .aa-filter-col                    { flex: 1 1 140px; }
  .aa-results-table thead th        { font-size: 10px; padding: 9px 10px; }
  .aa-results-table tbody td        { padding: 8px 10px; }
  .aa-athlete-cell                  { min-width: 140px; }
  .aa-col-meet                      { display: none; }
  .aa-bench-header                  { padding: 12px 16px 8px; }
}

@media (max-width: 767px) {
  .aa-page-hero                     { padding: 32px 0 64px; }
  .aa-page-hero h1                  { font-size: 24px; }
  .aa-filter-card                   { padding: 18px 16px 16px; margin-top: -36px; border-radius: var(--aa-radius-md); }
  .aa-seg-row                       { gap: 12px; }
  .aa-seg-label                     { min-width: 60px; font-size: 11px; }
  .aa-seg-btn                       { padding: 5px 10px; font-size: 11px; }
  /* .aa-filter-col 50% rule removed — round-6 forces 100% via higher specificity */
  .aa-filter-actions                { margin-top: 14px; padding-top: 14px; }
  .aa-sort-bar                      { flex-direction: column; align-items: flex-start; }
  .aa-sort-bar-right                { width: 100%; justify-content: flex-end; }
  .aa-records-section               { padding: 40px 0 48px; }
  .aa-bench-header                  { padding: 12px 14px 8px; }
  .aa-bench-event-name              { font-size: 13px; }
  .aa-bench-row                     { padding: 7px 14px; gap: 8px; }
  .aa-bench-time                    { font-size: 14px; min-width: 60px; }
  .aa-bench-name                    { font-size: 12px; }
  .aa-bench-meta                    { font-size: 10px; }
}

@media (max-width: 400px) {
  .aa-bench-holder                  { width: 100%; }
  .aa-bench-meta                    { white-space: normal; }
}

/* ================================================================
   DATATABLES DEFAULT UI SUPPRESSION
   DataTables renders its own length control (Show N entries) and
   search input above the table. The rankings page provides custom
   equivalents (#aa-pagesize-select, no free-text search) so the
   DataTables defaults must be hidden.
   ================================================================ */
.aa-rankings-page .dataTables_length,
.aa-rankings-page .dataTables_filter {
  display: none !important;
}

/* ================================================================
   RANKINGS PAGE — VISUAL TUNING (Phase H feedback round 1)
   ================================================================ */

/* ---- Font smoothing only on small phones (Windows desktop renders     */
/* ---- crisper with the default sub-pixel anti-aliasing) ----            */
@media (max-width: 575px) {
  .aa-rankings-page,
  .aa-rankings-page * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ---- Darken Continental Benchmarks / Records to Chase text ---- */
.aa-records-teaser-section .aa-section-eyebrow {
  color: var(--aa-navy);
}
.aa-records-teaser-section .aa-section-eyebrow .fa {
  color: var(--aa-yellow);
}
.aa-records-teaser-section .aa-section-sub {
  color: var(--aa-body);
}

/* ---- Card "200M FREESTYLE · LC · MEN" line darker for legibility ---- */
.aa-record-card-event {
  color: var(--aa-navy) !important;
}

/* ---- AR badge stronger contrast ---- */
.aa-record-card-badge,
.aa-record-card-badge.ar {
  background: #1d4ed8;
  color: #fff;
}
.aa-record-card-badge.wr {
  background: #b91c1c;
  color: #fff;
}

/* ---- Meet line — slightly darker than muted ---- */
.aa-record-card-meet {
  color: #4b5563;
}

/* ================================================================
   RANKINGS PAGE — VISUAL TUNING (Phase H feedback round 2)
   ================================================================ */

/* (Year dropdown width / .aa-filter-row-c flex layout removed in Phase H */
/*  polish round 3 — superseded by Bootstrap 3 .row + .col-sm-* layout.) */

/* ---- Table redesign: plain white rows, no striping ---- */
.aa-rankings-table.table {
  background: #fff;
  border: none;
}
.aa-rankings-table.table-striped > tbody > tr:nth-of-type(odd),
.aa-rankings-table.table-striped > tbody > tr:nth-of-type(even) {
  background: #fff;
}
.aa-rankings-table tbody tr {
  border-bottom: 1px solid var(--aa-border);
}
.aa-rankings-table tbody tr:last-child {
  border-bottom: none;
}
.aa-rankings-table.table-bordered,
.aa-rankings-table.table-bordered > thead > tr > th,
.aa-rankings-table.table-bordered > tbody > tr > td {
  border-left: none;
  border-right: none;
}
.aa-rankings-table tbody tr:hover {
  background: var(--aa-bg-alt) !important;
}

/* ---- DataTables pagination redesign ---- */
.aa-rankings-page .dataTables_paginate {
  padding: 16px 0 4px;
  display: flex;
  justify-content: flex-end;
}
.aa-rankings-page .dataTables_paginate .pagination {
  margin: 0;
  display: inline-flex;
  gap: 4px;
  padding: 0;
}
.aa-rankings-page .pagination > li > a,
.aa-rankings-page .pagination > li > span {
  border: none !important;
  background: transparent !important;
  color: var(--aa-navy) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  min-width: 32px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.aa-rankings-page .pagination > li > a:hover,
.aa-rankings-page .pagination > li > a:focus {
  background: var(--aa-bg-alt) !important;
  color: var(--aa-navy) !important;
}
.aa-rankings-page .pagination > li.active > a,
.aa-rankings-page .pagination > li.active > a:hover,
.aa-rankings-page .pagination > li.active > a:focus,
.aa-rankings-page .pagination > li.active > span {
  background: var(--aa-navy) !important;
  color: #fff !important;
}
.aa-rankings-page .pagination > li.disabled > a,
.aa-rankings-page .pagination > li.disabled > span {
  color: var(--aa-muted) !important;
  cursor: not-allowed;
  opacity: 0.55;
}
.aa-rankings-page .pagination > li.disabled > a:hover {
  background: transparent !important;
}

/* ---- "Showing X to Y of Z entries" info text ---- */
.aa-rankings-page .dataTables_info {
  padding: 16px 0 4px;
  font-size: 12px;
  color: var(--aa-muted);
}

/* ---- DataTables bottom row layout (info on left, pagination on right) ---- */
.aa-rankings-page .row {
  display: flex;
  align-items: center;
}
.aa-rankings-page .dataTables_wrapper > .row:last-child > [class*="col-"] {
  padding: 0;
}

/* ---- Athlete cell: avatar + name + country (Phase H feedback round 2) ---- */
.aa-athlete-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aa-athlete-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--aa-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aa-muted);
  border: 1.5px solid var(--aa-border);
}
.aa-athlete-avatar .fa {
  font-size: 14px;
}
.aa-athlete-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.aa-athlete-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-navy);
  line-height: 1.25;
}
.aa-athlete-country {
  font-size: 11px;
  color: var(--aa-muted);
  line-height: 1.25;
}

/* ================================================================
   RANKINGS PAGE — PHASE H POLISH (feedback round 3)
   Bootstrap 3 grid filter card · typography · medal badges ·
   inline record pills · mobile benchmark stack
   ================================================================ */

/* ---- Filter rows now use Bootstrap 3 .row / .col-sm-* ------------- */
/* Tighter vertical rhythm than the prior flex layout                   */
.aa-filter-card .aa-filter-row {
  margin-bottom: 16px;
}
.aa-filter-card .aa-filter-row:last-of-type {
  margin-bottom: 8px;
}
.aa-filter-card .aa-filter-col {
  display: flex;
  flex-direction: column;
}

/* Each control sits flush under its label */
.aa-filter-card .aa-filter-col > .aa-filter-label {
  margin-bottom: 6px;
}

/* Row B / C — keep top separators but with tighter padding */
.aa-filter-row-b,
.aa-filter-row-c {
  padding-top: 14px;
  border-top: 1px solid var(--aa-border);
}

/* ---- Filter typography (matches prototype refinements) ----------- */
.aa-filter-card .aa-filter-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c7a89;
  margin: 0 0 6px;
  display: block;
}
.aa-filter-card .aa-select,
.aa-filter-card .form-control {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a2733;
}
.aa-filter-card .aa-select:focus,
.aa-filter-card .form-control:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.3);
}
.aa-filter-card .aa-select {
  /* Override chevron colour from grey #6b7280 → brand-sky */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2395d9fe' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}
.aa-filter-card .aa-seg-btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

/* ---- Date range inputs sit inline horizontally inside their col --- */
.aa-filter-row-c .aa-date-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aa-filter-row-c .aa-date-range-inputs input.form-control {
  flex: 1 1 0;
  min-width: 0;
}

/* ================================================================
   RANK MEDAL BADGES + TOP-3 ROW ACCENTS
   ================================================================ */
.aa-rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.aa-rank-medal--gold {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #4a2e0a;
  box-shadow: 0 0 0 2px #f0ad4e, 0 2px 4px rgba(245,158,11,0.35);
}
.aa-rank-medal--silver {
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  color: #1f2937;
  box-shadow: 0 0 0 2px #94a3b8, 0 2px 4px rgba(148,163,184,0.35);
}
.aa-rank-medal--bronze {
  background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
  color: #ffffff;
  box-shadow: 0 0 0 2px #b45309, 0 2px 4px rgba(180,83,9,0.35);
}
.aa-rank-medal--default {
  background: #ffffff;
  color: var(--aa-navy);
  border: 1.5px solid var(--aa-sky);
}

/* Top-3 row accent: 3px solid left border matching the medal */
.aa-rankings-table tbody tr.aa-row-medal--gold > td:first-child,
.aa-rankings-table tbody tr.aa-row-medal--silver > td:first-child,
.aa-rankings-table tbody tr.aa-row-medal--bronze > td:first-child {
  position: relative;
}
.aa-rankings-table tbody tr.aa-row-medal--gold > td:first-child::before,
.aa-rankings-table tbody tr.aa-row-medal--silver > td:first-child::before,
.aa-rankings-table tbody tr.aa-row-medal--bronze > td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.aa-rankings-table tbody tr.aa-row-medal--gold   > td:first-child::before { background: #f59e0b; }
.aa-rankings-table tbody tr.aa-row-medal--silver > td:first-child::before { background: #94a3b8; }
.aa-rankings-table tbody tr.aa-row-medal--bronze > td:first-child::before { background: #b45309; }

/* ---- Lower hover tint from ~7% → 5% per spec --------------------- */
.aa-rankings-table tbody tr:hover {
  background: rgba(149, 217, 254, 0.05) !important;
}

/* ---- Time-cell layout for inline record pill --------------------- */
.aa-time-val {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 700;
  color: var(--aa-navy);
  letter-spacing: -0.02em;
}

/* Round-3 mobile rules (benchmark strip stack, table scroll fade, BS3   */
/* grid overrides) consolidated into the round-6 mobile block at end.    */
.aa-rankings-table-wrap {
  position: relative;
}

/* ================================================================
   RANKINGS PAGE — PHASE H POLISH (feedback round 4)
   ================================================================ */

/* ---- Page-level overflow safety net ----                             */
/* BS3 .row uses negative -15px margins. On narrow viewports this can   */
/* push the row 15px past .container's content edge and trigger body    */
/* scroll. Clipping at the page wrapper prevents that without affecting */
/* any internal scroll containers.                                       */
.aa-rankings-page {
  overflow-x: hidden;
  max-width: 100%;
}

/* ---- Filter card: kill BS3 .row negative margins inside the card --- */
/* The card already provides its own horizontal padding (32px desktop, */
/* 16px mobile). The negative-margin gutter pattern fights that.        */
.aa-filter-card > .row,
.aa-filter-card .aa-filter-row.row {
  margin-left: 0;
  margin-right: 0;
}
.aa-filter-card .aa-filter-row.row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}
.aa-filter-card .aa-filter-row.row > [class*="col-"]:first-child { padding-left:  0; }
.aa-filter-card .aa-filter-row.row > [class*="col-"]:last-child  { padding-right: 0; }

/* (Round-4 mobile filter padding moved to consolidated round-6 block.) */

/* ================================================================
   RESULTS TABLE — STRIPING NUKE + COLUMN WIDTHS + ALIGNMENT
   ================================================================ */

/* High-specificity overrides for BS3 .table-striped AND DataTables-applied  */
/* .odd/.even stripe classes. !important is needed because dataTables.css    */
/* ships colour rules that win against our default-specificity selectors.    */
.aa-rankings-page table.dataTable.stripe   tbody tr.odd,
.aa-rankings-page table.dataTable.stripe   tbody tr.even,
.aa-rankings-page table.dataTable.display  tbody tr.odd,
.aa-rankings-page table.dataTable.display  tbody tr.even,
.aa-rankings-page table.table-striped      tbody tr,
.aa-rankings-page table.aa-rankings-table  tbody tr {
  background-color: #ffffff !important;
}

/* Hover override survives the nuke — keeps the 5% sky tint */
.aa-rankings-page table.aa-rankings-table tbody tr:hover,
.aa-rankings-page table.dataTable.stripe  tbody tr:hover,
.aa-rankings-page table.dataTable.display tbody tr:hover {
  background-color: rgba(149, 217, 254, 0.05) !important;
}

/* Column alignment + tighter cell padding */
.aa-rankings-table thead th.aa-col-rank,
.aa-rankings-table tbody td.aa-col-rank,
.aa-rankings-table thead th.aa-col-time,
.aa-rankings-table tbody td.aa-col-time,
.aa-rankings-table thead th.aa-col-points,
.aa-rankings-table tbody td.aa-col-points {
  text-align: center;
}
.aa-rankings-table thead th.aa-col-athlete,
.aa-rankings-table tbody td.aa-col-athlete,
.aa-rankings-table thead th.aa-col-event,
.aa-rankings-table tbody td.aa-col-event,
.aa-rankings-table thead th.aa-col-meet,
.aa-rankings-table tbody td.aa-col-meet {
  text-align: left;
}
.aa-rankings-table tbody td {
  padding-left: 12px;
  padding-right: 12px;
}
.aa-rankings-table thead th {
  padding-left: 12px;
  padding-right: 12px;
}

/* Rank cell: center the medal badge inside its narrow column */
.aa-rankings-table tbody td.aa-col-rank > .aa-rank-medal {
  display: inline-flex;          /* override the default block in flex layouts */
}

/* (Round-4 records-teaser mobile rules consolidated into round-6 block.) */

/* (All round-5 mobile blocks removed and replaced by the single round-6  */
/*  consolidated mobile block immediately below.)                          */

/* ================================================================
   RANKINGS PAGE — MOBILE (round-6 consolidated)
   ONE @media (max-width: 767px) block drives all rankings mobile
   styling: filter card 1-up stacking, records-teaser 2-up grid,
   results table CSS-Grid card layout, pagination simplification,
   benchmark strip stack. Plus one @media (max-width: 479px) drop
   for records cards 1-up.

   No other @media block in this file should touch
   .aa-rankings-page filter card, records-teaser row, or the
   results table. If you add a new mobile rule for rankings,
   add it inside this block — do not append another @media block.
   ================================================================ */
@media (max-width: 767px) {

  /* ── A+B. Filter card AND Records cards — display:block force-stack ── */
  /* !important on display + width here is the FINAL fix after specificity */
  /* bumps failed to override a competing rule we could not locate. By     */
  /* switching the .row to display:block and the children to block + 100%  */
  /* width, we bypass flex/float layout entirely. Block formatting context */
  /* enforces width:100% deterministically.                                 */
  .aa-rankings-page .aa-filter-card .row,
  .aa-rankings-page .aa-record-cards-row {
    display:      block !important;
    margin-left:  0 !important;
    margin-right: 0 !important;
  }
  .aa-rankings-page .aa-filter-card .row > *,
  .aa-rankings-page .aa-record-cards-row > * {
    display:       block !important;
    width:         100% !important;
    max-width:     100% !important;
    padding-left:  0 !important;
    padding-right: 0 !important;
    margin-bottom: 14px !important;
  }

  /* Filter card padding tightened for mobile */
  .aa-rankings-page .aa-filter-card                            { padding: 16px 14px 12px; }

  /* Segmented controls fill the row, buttons share width */
  .aa-rankings-page .aa-filter-card .aa-seg-control            { width: 100%; }
  .aa-rankings-page .aa-filter-card .aa-seg-btn                { flex: 1; text-align: center; }

  /* Apply Filters / Clear All — stacked, primary button full width */
  .aa-rankings-page .aa-filter-actions                         { flex-direction: column; align-items: stretch; gap: 10px; }
  .aa-rankings-page .aa-filter-actions-right                   { width: 100%; justify-content: space-between; }
  .aa-rankings-page .aa-btn-primary                            { flex: 1; justify-content: center; }

  /* Records-teaser header stack + tightened section padding */
  .aa-rankings-page .aa-records-teaser-section                 { padding: 32px 0 40px; }
  .aa-rankings-page .aa-records-teaser-section .aa-section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 18px;
  }
  .aa-rankings-page .aa-records-teaser-section .aa-section-link  { align-self: flex-start; }
  .aa-rankings-page .aa-records-teaser-section .aa-section-title { font-size: 22px; }
  .aa-rankings-page .aa-record-card                            { padding: 14px 14px 16px; }
  .aa-rankings-page .aa-record-card-time                       { font-size: 22px; }

  /* ── C. Results table — CSS-Grid card layout ─────────────────── */
  /* Suppress BS3 .table-responsive horizontal scroll on the wrapper. */
  .aa-rankings-page .aa-rankings-table-wrap                    { overflow-x: visible; box-shadow: none; background: transparent; }
  .aa-rankings-page .aa-rankings-table-wrap::after             { display: none; }

  /* Table + tbody collapse to block flow so each tr becomes a card. */
  .aa-rankings-page table.aa-rankings-table,
  .aa-rankings-page table.aa-rankings-table tbody              { display: block; width: 100%; }
  .aa-rankings-page table.aa-rankings-table thead              { display: none; }

  /* Each <tr> = one card, laid out via grid-template-areas:        */
  /*   "rank athlete points"  ← top row                              */
  /*   "time time    time"    ← middle row (full-bleed time)         */
  /*   "event event  event"   ← bottom row (full-bleed event)        */
  /* !important on background needed because DataTables Bootstrap   */
  /* skin ships tr.odd { background: #f9f9f9 } at the same          */
  /* specificity as ours — required to enforce white-only cards.    */
  .aa-rankings-page table.aa-rankings-table tbody tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "rank  athlete points"
      "time  time    time"
      "event event   event";
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    background: #fff !important;
    border: 1px solid var(--aa-border);
    border-left: 4px solid transparent;
    border-radius: var(--aa-radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--aa-shadow-sm);
  }
  .aa-rankings-page table.aa-rankings-table tbody tr:hover     { background: #fff !important; }
  .aa-rankings-page table.aa-rankings-table tbody tr.aa-row-medal--gold   { border-left-color: #f59e0b; }
  .aa-rankings-page table.aa-rankings-table tbody tr.aa-row-medal--silver { border-left-color: #94a3b8; }
  .aa-rankings-page table.aa-rankings-table tbody tr.aa-row-medal--bronze { border-left-color: #b45309; }

  /* Cells become block items inside the grid; hide ::before labels */
  /* (the grid template + visual hierarchy carry the meaning). */
  .aa-rankings-page table.aa-rankings-table tbody td           { display: block; padding: 0; border: none; text-align: left; white-space: normal; }
  .aa-rankings-page table.aa-rankings-table tbody td::before   { display: none; }

  /* Each cell maps to a grid-area via its className. */
  .aa-rankings-page table.aa-rankings-table td.aa-col-rank     { grid-area: rank; align-self: start; }
  .aa-rankings-page table.aa-rankings-table td.aa-col-athlete  { grid-area: athlete; }
  .aa-rankings-page table.aa-rankings-table td.aa-col-points {
    grid-area: points;
    text-align: right;
    align-self: start;
    font-size: 12px;
    font-weight: 700;
    color: var(--aa-sky);
  }
  .aa-rankings-page table.aa-rankings-table td.aa-col-time {
    grid-area: time;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--aa-navy);
  }
  .aa-rankings-page table.aa-rankings-table td.aa-col-event {
    grid-area: event;
    font-size: 13px;
    color: var(--aa-muted);
  }
  .aa-rankings-page table.aa-rankings-table td.aa-col-meet     { display: none; }   /* hidden on mobile per spec */

  /* Athlete cell — shrink the avatar a touch so name has space. */
  .aa-rankings-page table.aa-rankings-table td.aa-col-athlete .aa-athlete-avatar { width: 28px; height: 28px; }
  .aa-rankings-page table.aa-rankings-table td.aa-col-athlete .aa-athlete-name   { font-size: 15px; }

  /* Rank medal — slightly smaller than desktop to fit the grid corner. */
  .aa-rankings-page table.aa-rankings-table td.aa-col-rank .aa-rank-medal { width: 32px; height: 32px; font-size: 12px; }

  /* ── D. Benchmark strip — stack records vertically ───────────── */
  .aa-rankings-page .aa-bench-panel                            { padding: 10px 12px; }
  .aa-rankings-page .aa-bench-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 14px;
  }
  .aa-rankings-page .aa-bench-row .aa-tier-badge               { margin-bottom: 2px; }
  .aa-rankings-page .aa-bench-date                             { margin-left: 0; }

  /* ── E. Pagination — prev / current / next only ──────────────── */
  .aa-rankings-page .pagination > li                           { display: none; }
  .aa-rankings-page .pagination > li.prev,
  .aa-rankings-page .pagination > li.previous,
  .aa-rankings-page .pagination > li.active,
  .aa-rankings-page .pagination > li.next                      { display: inline-block; }
  .aa-rankings-page .pagination > li.disabled.ellipsis,
  .aa-rankings-page .pagination > li > a.ellipsis              { display: none !important; }
}

/* Records cards opt-back-in to 2-up at small-tablet widths (480-767px). */
/* Below 480px the base ≤767px display:block rule above gives 1-up.       */
/* !important parity required because the base mobile rule uses it.       */
@media (min-width: 480px) and (max-width: 767px) {
  .aa-rankings-page .aa-record-cards-row {
    display:   flex !important;
    flex-wrap: wrap !important;
  }
  .aa-rankings-page .aa-record-cards-row > * {
    width:         calc(50% - 6px) !important;
    max-width:     calc(50% - 6px) !important;
    margin-bottom: 12px !important;
  }
  .aa-rankings-page .aa-record-cards-row > *:nth-child(odd) {
    margin-right: 12px;
  }
}

/* ============================================================
   === RECORDS PAGE ===
   Styles for the public records page (Phase 3 / 3D).
   Loaded on records.blade.php only — no impact on rankings
   page or admin records list which have their own styles.
   All selectors scoped under .aa-records-page wrapper.
   ============================================================ */

/* ================================================================
   HERO BAND — photographic + wave bottom + counter chips
   Records hero is structurally identical to the rankings hero
   from Phase 2 but uses its own class so the h1 sizing and
   bottom padding can diverge without specificity gymnastics.
   ================================================================ */
.aa-records-page .aa-records-hero {
  position: relative;
  background: var(--aa-navy);
  padding: 56px 0 88px;
  overflow: hidden;
}
.aa-records-page .aa-records-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.28;
  pointer-events: none;
}
.aa-records-page .aa-records-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56'%3E%3Cpath fill='%23f4f9fd' d='M0,28L60,24.5C120,21,240,14,360,18.7C480,23,600,39,720,42C840,45,960,35,1080,29.2C1200,23,1320,21,1380,20L1440,19L1440,56L1380,56C1320,56,1200,56,1080,56C960,56,840,56,720,56C600,56,480,56,360,56C240,56,120,56,60,56L0,56Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
.aa-records-page .aa-records-hero-inner { position: relative; z-index: 2; }
.aa-records-page .aa-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.aa-records-page .aa-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.aa-records-page .aa-breadcrumb a:hover { color: var(--aa-sky); }
.aa-records-page .aa-breadcrumb-sep { margin: 0 6px; }
.aa-records-page .aa-records-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin-bottom: 10px;
}
.aa-records-page .aa-records-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.1;
}
.aa-records-page .aa-records-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.68);
  max-width: 600px;
  margin: 0 0 32px;
  line-height: 1.6;
}

/* ================================================================
   HERO COUNTER CHIPS — animated counters below hero title
   The count-up animation itself is JS (Phase 3C); CSS handles
   chip appearance and dot colours mapped to tier palette.
   ================================================================ */
.aa-records-page .aa-hero-counters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.aa-records-page .aa-hero-counter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 7px 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.aa-records-page .aa-counter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aa-records-page .aa-counter-dot.wr { background: var(--aa-yellow); }
.aa-records-page .aa-counter-dot.ar { background: var(--aa-sky); }
.aa-records-page .aa-counter-dot.nr { background: rgba(255,255,255,0.7); }
.aa-records-page .aa-counter-dot.zr { background: #c0c0c0; }
.aa-records-page .aa-counter-num {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  min-width: 28px;
}
.aa-records-page .aa-counter-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

/* ================================================================
   SPOTLIGHT CAROUSEL — Swiper 11 visual overrides
   Structural slider/wrapper rules come from Swiper's own CDN
   stylesheet; this block customises appearance only.
   ================================================================ */
.aa-records-page .aa-spotlight-section {
  background: var(--aa-bg-alt);
  padding: 0 0 56px;
}
.aa-records-page .aa-spotlight-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 20px;
  flex-wrap: wrap;
}
.aa-records-page .aa-spotlight-swiper {
  overflow: hidden;
  position: relative;
}
.aa-records-page .aa-spotlight-swiper .swiper-slide { height: auto; }
.aa-records-page .aa-spotlight-card {
  display: block;
  position: relative;
  height: 380px;
  border-radius: var(--aa-radius-lg);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--aa-shadow-md);
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
}
.aa-records-page .aa-spotlight-card:hover {
  box-shadow: var(--aa-shadow-lg);
  transform: translateY(-4px);
}
.aa-records-page .aa-spotlight-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--aa-ease);
}
.aa-records-page .aa-spotlight-card:hover .aa-spotlight-card-img { transform: scale(1.04); }
.aa-records-page .aa-spotlight-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14,42,60,0.18) 0%,
    rgba(14,42,60,0.22) 40%,
    rgba(14,42,60,0.88) 80%,
    rgba(14,42,60,0.96) 100%
  );
}
.aa-records-page .aa-spotlight-card-top {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.aa-records-page .aa-spotlight-card-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.aa-records-page .aa-spotlight-card-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  z-index: 2;
}
.aa-records-page .aa-spotlight-card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
}
.aa-records-page .aa-spotlight-card-country {
  font-size: 13px;
  color: rgba(255,255,255,0.80);
  margin-bottom: 4px;
}
.aa-records-page .aa-spotlight-card-event {
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  margin-bottom: 6px;
}
.aa-records-page .aa-spotlight-card-meet {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}
.aa-records-page .aa-spotlight-card-margin {
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.aa-records-page .aa-spotlight-card-watch {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.30);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 100px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .15s;
  z-index: 3;
}
.aa-records-page .aa-spotlight-card-watch:hover { background: rgba(255,255,255,0.28); }
/* Swiper nav + pagination brand overrides */
.aa-records-page .aa-spotlight-swiper .swiper-pagination-bullet-active { background: var(--aa-sky); }
.aa-records-page .aa-spotlight-swiper .swiper-button-next,
.aa-records-page .aa-spotlight-swiper .swiper-button-prev {
  color: #fff;
  background: rgba(14,42,60,0.55);
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.aa-records-page .aa-spotlight-swiper .swiper-button-next::after,
.aa-records-page .aa-spotlight-swiper .swiper-button-prev::after { font-size: 14px; }

/* ================================================================
   STICKY FILTER BAR — sits above results, animates with scroll
   ================================================================ */
.aa-records-page .aa-records-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.aa-records-page .aa-records-filter-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aa-records-page .aa-rec-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.aa-records-page .aa-rec-filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aa-muted);
  white-space: nowrap;
}
.aa-records-page .aa-rec-select {
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--aa-navy);
  background-color: var(--aa-bg-alt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2395d9fe' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.aa-records-page .aa-rec-select:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.25);
  outline: none;
}

/* Contextual filter (Federation when tier=NR, Zone when tier=ZR)    */
/* Hidden by default; .aa-ctx-visible class added by Phase 3C JS.     */
.aa-records-page .aa-rec-contextual {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width .22s ease, opacity .22s ease;
  pointer-events: none;
}
.aa-records-page .aa-rec-contextual.aa-ctx-visible {
  max-width: 260px;
  opacity: 1;
  pointer-events: auto;
}

/* View toggle — pill of icon buttons (table | card) ----------------- */
.aa-records-page .aa-view-toggle {
  display: inline-flex;
  background: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  margin-left: auto;
}
.aa-records-page .aa-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.aa-records-page .aa-view-btn.active {
  background: #fff;
  color: var(--aa-navy);
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
.aa-records-page .aa-view-btn .fa { font-size: 11px; }

/* ================================================================
   RESULTS — TABLE VIEW
   ================================================================ */
.aa-records-page .aa-records-results-section {
  background: var(--aa-bg-alt);
  padding: 32px 0 48px;
}
.aa-records-page .aa-records-table-wrap {
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  background: #fff;
  overflow: hidden;
  overflow-x: auto;
  position: relative;
}
.aa-records-page .aa-records-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  background: #fff;
}
.aa-records-page .aa-records-table thead th {
  background: var(--aa-navy);
  color: rgba(255,255,255,0.80);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 14px;
  white-space: nowrap;
  border: none;
  text-align: left;
}
.aa-records-page .aa-records-table thead th.col-wr { border-top: 3px solid var(--aa-yellow); }
.aa-records-page .aa-records-table thead th.col-ar { border-top: 3px solid var(--aa-sky); }
.aa-records-page .aa-records-table thead th.col-nr { border-top: 3px solid rgba(255,255,255,0.4); }
.aa-records-page .aa-records-table thead th.col-zr { border-top: 3px solid #94a3b8; }
.aa-records-page .aa-records-table tbody tr {
  border-bottom: 1px solid var(--aa-border);
  cursor: pointer;
  transition: background .14s;
}
.aa-records-page .aa-records-table tbody tr:last-child { border-bottom: none; }
.aa-records-page .aa-records-table tbody tr:hover { background: rgba(149, 217, 254, 0.05); }
.aa-records-page .aa-records-table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
}
.aa-records-page .aa-rec-event-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.3;
}
.aa-records-page .aa-rec-event-meta {
  font-size: 11px;
  color: var(--aa-muted);
  margin-top: 2px;
}
.aa-records-page .aa-rec-time-block { min-width: 100px; }
.aa-records-page .aa-rec-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--aa-navy);
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}
.aa-records-page .aa-rec-holder-line {
  font-size: 11px;
  color: var(--aa-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.aa-records-page .aa-rec-year {
  font-size: 10px;
  color: var(--aa-muted);
  margin-top: 1px;
}
.aa-records-page .aa-rec-detail-link {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--aa-sky);
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  white-space: nowrap;
}
.aa-records-page .aa-records-table tbody tr:hover .aa-rec-detail-link {
  display: inline-flex;
}
/* Video icon — YouTube-red when present, muted when absent */
.aa-records-page .aa-rec-video-icon {
  font-size: 16px;
  color: #cd201f;
}
.aa-records-page .aa-rec-video-icon.is-empty {
  color: var(--aa-border);
}

/* ================================================================
   RESULTS — CARD VIEW (parallel markup; CSS toggles on mobile)
   ================================================================ */
.aa-records-page .aa-records-cards { display: none; }
.aa-records-page .aa-rec-card {
  background: #fff;
  border-radius: var(--aa-radius-md);
  border: 1px solid var(--aa-border);
  box-shadow: var(--aa-shadow-sm);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  margin-bottom: 14px;
}
.aa-records-page .aa-rec-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-2px);
  border-color: var(--aa-sky);
}
.aa-records-page .aa-rec-card-header {
  background: var(--aa-navy);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.aa-records-page .aa-rec-card-event {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.aa-records-page .aa-rec-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aa-records-page .aa-rec-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--aa-border);
}
.aa-records-page .aa-rec-card-row:last-child { border-bottom: none; }
.aa-records-page .aa-rec-card-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--aa-navy);
  min-width: 80px;
}
.aa-records-page .aa-rec-card-holder { flex: 1; min-width: 0; }
.aa-records-page .aa-rec-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-records-page .aa-rec-card-year {
  font-size: 10px;
  color: var(--aa-muted);
}

/* ================================================================
   HALL OF RECORDS — top-8 athletes grid
   ================================================================ */
.aa-records-page .aa-hall-section {
  background: #fff;
  padding: 56px 0 64px;
}
.aa-records-page .aa-hall-section .aa-section-header-flex {
  margin-bottom: 8px;
}
.aa-records-page .aa-hall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.aa-records-page .aa-hall-card {
  background: var(--aa-bg-alt);
  border-radius: var(--aa-radius-lg);
  border: 1px solid var(--aa-border);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  cursor: pointer;
}
.aa-records-page .aa-hall-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-3px);
  border-color: var(--aa-sky);
}
.aa-records-page .aa-hall-photo-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--aa-shadow-md);
  flex-shrink: 0;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aa-records-page .aa-hall-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Initials-based placeholder when no athlete photo exists */
.aa-records-page .aa-hall-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--aa-sky) 0%, var(--aa-navy) 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.aa-records-page .aa-hall-name {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.2;
}
.aa-records-page .aa-hall-country {
  font-size: 12px;
  color: var(--aa-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aa-records-page .aa-hall-country .aa-hall-flag {
  width: 18px;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
}
.aa-records-page .aa-hall-badge {
  display: inline-block;
  background: var(--aa-sky);
  color: var(--aa-navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
}
/* Optional top-3 gold/silver/bronze accent on hall card */
.aa-records-page .aa-hall-card.is-rank-1 {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(180deg, rgba(252, 211, 77, 0.12) 0%, var(--aa-bg-alt) 60%);
}
.aa-records-page .aa-hall-card.is-rank-2 {
  border-left: 4px solid #94a3b8;
}
.aa-records-page .aa-hall-card.is-rank-3 {
  border-left: 4px solid #b45309;
}

/* ================================================================
   RECORD DETAIL MODAL
   Backdrop + panel + hero + body layout.
   Sized for ~720px desktop / full-screen mobile.
   ================================================================ */
.aa-records-page .aa-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 60, 0.85);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.aa-records-page .aa-modal-backdrop.aa-modal-open { display: flex; }
.aa-records-page .aa-modal-panel {
  background: var(--aa-navy);
  border-radius: 16px;
  box-shadow: var(--aa-shadow-lg);
  width: 100%;
  max-width: 720px;
  position: relative;
  overflow: hidden;
  margin: auto;
  color: #fff;
  animation: aa-modal-in .22s var(--aa-ease) both;
}
@keyframes aa-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.aa-records-page .aa-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .15s;
}
.aa-records-page .aa-modal-close:hover { background: rgba(255,255,255,0.28); }
.aa-records-page .aa-modal-close:focus {
  outline: 2px solid var(--aa-sky);
  outline-offset: 2px;
}
.aa-records-page .aa-modal-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0a1929;
}
.aa-records-page .aa-modal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.aa-records-page .aa-modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,42,60,0.98) 0%, rgba(14,42,60,0.20) 60%);
}
.aa-records-page .aa-modal-hero-content {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 60px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 2;
}
.aa-records-page .aa-modal-hero-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.aa-records-page .aa-modal-hero-event {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  padding-bottom: 4px;
}

/* Body / columns / info rows / video */
.aa-records-page .aa-modal-body { padding: 20px 24px 24px; }
.aa-records-page .aa-modal-cols {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.aa-records-page .aa-modal-col-left  { flex: 0 0 160px; }
.aa-records-page .aa-modal-col-right { flex: 1; min-width: 200px; }
.aa-records-page .aa-modal-athlete-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  margin-bottom: 10px;
  display: block;
}
.aa-records-page .aa-modal-athlete-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.aa-records-page .aa-modal-athlete-country {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.aa-records-page .aa-modal-athlete-club {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  margin-bottom: 10px;
}
.aa-records-page .aa-modal-athlete-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-sky);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.aa-records-page .aa-modal-athlete-link:hover { color: #fff; }
.aa-records-page .aa-modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}
.aa-records-page .aa-modal-info-row:last-child { border-bottom: none; }
.aa-records-page .aa-modal-info-key {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  white-space: nowrap;
}
.aa-records-page .aa-modal-info-val {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  text-align: right;
}
.aa-records-page .aa-modal-info-val strong { color: #fff; font-weight: 700; }
.aa-records-page .aa-modal-margin-pos {
  color: #4ade80;
  font-weight: 700;
}
/* Optional splits row */
.aa-records-page .aa-modal-splits {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.aa-records-page .aa-modal-split {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  min-width: 60px;
}
.aa-records-page .aa-modal-split-label {
  font-size: 9px;
  color: rgba(255,255,255,0.50);
  font-weight: 700;
  display: block;
}
.aa-records-page .aa-modal-split-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
/* Video embed */
.aa-records-page .aa-modal-video {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 16px;
}
.aa-records-page .aa-modal-video-thumb {
  display: block;
  position: relative;
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0a1929;
}
.aa-records-page .aa-modal-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity .2s;
}
.aa-records-page .aa-modal-video-thumb:hover img { opacity: 0.55; }
.aa-records-page .aa-modal-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,0.88);
  pointer-events: none;
}
.aa-records-page .aa-modal-no-video {
  text-align: center;
  padding: 24px;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  font-style: italic;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: var(--aa-radius-md);
}
/* Inputs / links inside the modal pick up the same focus ring */
.aa-records-page .aa-modal-panel a:focus,
.aa-records-page .aa-modal-panel button:focus {
  outline: 2px solid var(--aa-sky);
  outline-offset: 2px;
}

/* ================================================================
   AD SLOT — matches rankings page treatment
   ================================================================ */
.aa-records-page .aa-records-ad-section {
  padding: 24px 0;
}
.aa-records-page .aa-ad-desktop { display: none; }
.aa-records-page .aa-ad-mobile  { display: none; }

/* ================================================================
   RECORDS PAGE — TABLET (≤991px)
   ================================================================ */
@media (max-width: 991px) {
  .aa-records-page .aa-records-hero h1     { font-size: 36px; }
  .aa-records-page .aa-records-hero-sub    { font-size: 14px; }
  .aa-records-page .aa-hall-grid           { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .aa-records-page .aa-rec-holder-line     { max-width: 100px; }
  .aa-records-page .aa-spotlight-card      { height: 340px; }
  /* Desktop ad slot up to large viewports */
  .aa-records-page .aa-ad-desktop          { display: flex; max-width: 728px; height: 90px; margin: 0 auto; }
}

/* ================================================================
   RECORDS PAGE — MOBILE (≤767px) — CONSOLIDATED BLOCK
   ALL rankings-mobile-style force-stacking lives here. Following
   the Phase 2 lesson, this is the SINGLE source of mobile rules
   for the records page — do not add another @media block at this
   breakpoint for records-page rules.
   ================================================================ */
@media (max-width: 767px) {
  /* Hero typography + counter chips compaction */
  .aa-records-page .aa-records-hero        { padding: 40px 0 76px; }
  .aa-records-page .aa-records-hero h1     { font-size: 28px; }
  .aa-records-page .aa-records-hero-sub    { font-size: 14px; margin-bottom: 22px; }
  .aa-records-page .aa-hero-counters       { gap: 8px; }
  .aa-records-page .aa-hero-counter-chip   { padding: 6px 12px; }
  .aa-records-page .aa-counter-num         { font-size: 15px; }
  .aa-records-page .aa-counter-label       { font-size: 11px; }

  /* Spotlight cards shrink slightly */
  .aa-records-page .aa-spotlight-section   { padding: 0 0 40px; }
  .aa-records-page .aa-spotlight-card      { height: 320px; }
  .aa-records-page .aa-spotlight-card-name { font-size: 15px; }
  .aa-records-page .aa-spotlight-header    {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Filter bar — every control on its own row. display:block on the */
  /* inner container, width:100% on children. Same pattern as the    */
  /* rankings page round-6 mobile fix.                                */
  .aa-records-page .aa-records-filter-bar  { padding: 12px 0; }
  .aa-records-page .aa-records-filter-inner {
    display: block !important;
    justify-content: flex-start;
  }
  .aa-records-page .aa-records-filter-inner > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
  }
  .aa-records-page .aa-records-filter-inner > *:last-child {
    margin-bottom: 0 !important;
  }
  .aa-records-page .aa-rec-filter-group    { width: 100%; }
  .aa-records-page .aa-rec-select          { width: 100%; padding-top: 9px; padding-bottom: 9px; }
  .aa-records-page .aa-rec-contextual.aa-ctx-visible { max-width: 100%; }
  .aa-records-page .aa-view-toggle         { margin-left: 0; width: 100%; }
  .aa-records-page .aa-view-btn            { flex: 1; justify-content: center; }

  /* Results — swap table for card view on mobile */
  .aa-records-page .aa-records-table-wrap  { display: none; }
  .aa-records-page .aa-records-cards       { display: block; }
  .aa-records-page .aa-records-results-section { padding: 20px 0 32px; }

  /* Hall of Records — 2-up on tablet-mobile, 1-up below 480 */
  .aa-records-page .aa-hall-section        { padding: 40px 0 48px; }
  .aa-records-page .aa-hall-grid           { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .aa-records-page .aa-hall-card           { padding: 18px 14px 16px; }
  .aa-records-page .aa-hall-photo-wrap     { width: 80px; height: 80px; }
  .aa-records-page .aa-hall-initials       { font-size: 22px; }

  /* Modal — full-screen on mobile */
  .aa-records-page .aa-modal-backdrop      { padding: 0; }
  .aa-records-page .aa-modal-panel         {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    min-height: 100vh;
  }
  .aa-records-page .aa-modal-hero          { height: 180px; }
  .aa-records-page .aa-modal-hero-time     { font-size: 28px; }
  .aa-records-page .aa-modal-body          { padding: 18px 16px 20px; }
  .aa-records-page .aa-modal-cols          { flex-direction: column; gap: 16px; }
  .aa-records-page .aa-modal-col-left      {
    flex: none;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .aa-records-page .aa-modal-athlete-photo { width: 64px; height: 64px; margin-bottom: 0; }

  /* Ad slot: mobile variant */
  .aa-records-page .aa-ad-desktop          { display: none; }
  .aa-records-page .aa-ad-mobile           { display: flex; max-width: 320px; height: 50px; margin: 0 auto; }
}

/* ================================================================
   RECORDS PAGE — VERY NARROW (≤479px) — finer mobile adjustments
   ================================================================ */
@media (max-width: 479px) {
  .aa-records-page .aa-records-hero h1     { font-size: 24px; }
  .aa-records-page .aa-hero-counter-chip   { padding: 5px 10px; }
  .aa-records-page .aa-counter-num         { font-size: 14px; }
  .aa-records-page .aa-counter-label       { font-size: 10px; }
  .aa-records-page .aa-hero-counters       { gap: 6px; }

  /* Hall: drop to 1-up on phones */
  .aa-records-page .aa-hall-grid           { grid-template-columns: 1fr; }

  /* Spotlight cards even tighter */
  .aa-records-page .aa-spotlight-card      { height: 280px; }
  .aa-records-page .aa-spotlight-card-time { font-size: 18px; }
  .aa-records-page .aa-spotlight-card-name { font-size: 14px; }
}

/* ================================================================
   ATHLETE MODAL — opens from Hall of Records cards
   Reuses .aa-modal-backdrop / .aa-modal-panel / .aa-modal-close
   infrastructure. Modifier classes change the hero look and add
   a records-list body section.
   ================================================================ */

/* Hall cards: signal interactivity */
.aa-records-page .aa-hall-card[data-athlete-name] {
  cursor: pointer;
}
.aa-records-page .aa-hall-card[data-athlete-name]:focus {
  outline: 2px solid var(--aa-sky);
  outline-offset: 3px;
}

/* Athlete hero — overrides the photo-record-detail hero look:        */
/* gradient navy/sky background, no overlay, content centered          */
/* vertically with the avatar + text rendered side-by-side.            */
.aa-records-page .aa-modal-hero.is-athlete {
  background: linear-gradient(135deg, var(--aa-sky) 0%, var(--aa-navy) 100%);
  height: auto;
  min-height: 140px;
  padding: 24px;
  display: flex;
  align-items: center;
}
.aa-records-page .aa-modal-hero.is-athlete .aa-modal-hero-overlay { display: none; }
.aa-records-page .aa-modal-hero-content.is-athlete {
  position: static;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  bottom: auto;
  left: auto;
  right: auto;
  flex-wrap: nowrap;
}

/* Initials avatar */
.aa-records-page .aa-modal-athlete-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 3px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.aa-records-page .aa-modal-athlete-initials {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Athlete header text */
.aa-records-page .aa-modal-athlete-info {
  flex: 1;
  min-width: 0;
}
.aa-records-page .aa-modal-athlete-name-lg {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}
.aa-records-page .aa-modal-athlete-country-lg {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Records list inside the athlete modal body */
.aa-records-page .aa-modal-records-list {
  display: flex;
  flex-direction: column;
}
.aa-records-page .aa-modal-records-list-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.aa-records-page .aa-modal-record-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background .15s;
  border-radius: 6px;
}
.aa-records-page .aa-modal-record-row:hover,
.aa-records-page .aa-modal-record-row:focus {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
.aa-records-page .aa-modal-record-row:last-child {
  border-bottom: none;
}
.aa-records-page .aa-modal-record-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 110px;
}
.aa-records-page .aa-modal-record-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.aa-records-page .aa-modal-record-row-mid {
  flex: 1;
  min-width: 0;
}
.aa-records-page .aa-modal-record-event {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}
.aa-records-page .aa-modal-record-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}
.aa-records-page .aa-modal-record-row-right {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  flex-shrink: 0;
}
.aa-records-page .aa-modal-record-row:hover .aa-modal-record-row-right {
  color: var(--aa-sky);
}
.aa-records-page .aa-modal-no-records {
  text-align: center;
  padding: 32px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-style: italic;
}

/* ── Athlete modal — mobile (consolidated into records-page block) ── */
@media (max-width: 767px) {
  .aa-records-page .aa-modal-hero.is-athlete             { min-height: 120px; padding: 18px 16px; }
  .aa-records-page .aa-modal-hero-content.is-athlete     { gap: 12px; }
  .aa-records-page .aa-modal-athlete-avatar              { width: 64px; height: 64px; border-width: 2px; }
  .aa-records-page .aa-modal-athlete-initials            { font-size: 22px; }
  .aa-records-page .aa-modal-athlete-name-lg             { font-size: 18px; }
  .aa-records-page .aa-modal-athlete-country-lg          { font-size: 12px; }
  .aa-records-page .aa-modal-record-row-left             { min-width: 90px; gap: 8px; }
  .aa-records-page .aa-modal-record-time                 { font-size: 13px; }
  .aa-records-page .aa-modal-record-event                { font-size: 12px; }
  .aa-records-page .aa-modal-record-row-right            { display: none; }
}

/* ================================================================
   NEWS LIST PAGE — aa-news-page
   ================================================================ */

/* ── Hero ────────────────────────────────────────────────────── */
.aa-news-page .aa-news-hero {
  background: linear-gradient(135deg, var(--aa-navy) 0%, #1a3f58 100%);
  padding: 56px 0 48px;
  text-align: center;
}
.aa-news-page .aa-news-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.15;
}
.aa-news-page .aa-news-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  margin: 0;
}

/* ── Featured band ───────────────────────────────────────────── */
.aa-news-page .aa-news-featured-band {
  background: var(--aa-bg-alt);
  padding: 32px 0;
  border-bottom: 1px solid var(--aa-border);
}
.aa-news-page .aa-news-featured-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-lg);
  box-shadow: var(--aa-shadow-md);
  overflow: hidden;
}
.aa-news-page .aa-news-featured-img-wrap {
  flex: 0 0 420px;
  max-width: 420px;
  height: 280px;
  overflow: hidden;
}
.aa-news-page .aa-news-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-news-page .aa-news-featured-body {
  flex: 1;
  padding: 28px 28px 28px 0;
}
.aa-news-page .aa-news-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.aa-news-page .aa-news-featured-badge {
  display: inline-block;
  background: var(--aa-yellow);
  color: var(--aa-navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.aa-news-page .aa-news-featured-title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
}
.aa-news-page .aa-news-featured-title a {
  color: var(--aa-navy);
  text-decoration: none;
}
.aa-news-page .aa-news-featured-title a:hover {
  color: var(--aa-sky);
}
.aa-news-page .aa-news-featured-excerpt {
  color: var(--aa-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 18px;
}
.aa-news-page .aa-news-featured-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--aa-muted);
}
.aa-news-page .aa-news-featured-foot .fa {
  margin-right: 4px;
}
.aa-news-page .aa-news-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--aa-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--aa-radius-sm);
  text-decoration: none;
  margin-left: auto;
  transition: background .2s var(--aa-ease);
}
.aa-news-page .aa-news-featured-cta:hover {
  background: #1a3f58;
  color: #fff;
  text-decoration: none;
}

/* ── Filter bar ──────────────────────────────────────────────── */
.aa-news-page .aa-news-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.aa-news-page .aa-news-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aa-news-page .aa-news-filter-group {
  display: flex;
  align-items: center;
}
.aa-news-page .aa-news-filter-search {
  flex: 1;
  min-width: 180px;
  position: relative;
}
.aa-news-page .aa-news-select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  color: var(--aa-body);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  min-width: 130px;
}
.aa-news-page .aa-news-select:focus {
  border-color: var(--aa-sky);
}
.aa-news-page .aa-news-search-input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 12px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  color: var(--aa-body);
  outline: none;
  transition: border-color .2s;
}
.aa-news-page .aa-news-search-input:focus {
  border-color: var(--aa-sky);
}
.aa-news-page .aa-news-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--aa-muted);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}
.aa-news-page .aa-news-search-btn:hover {
  color: var(--aa-navy);
}

/* Filter chips */
.aa-news-page .aa-news-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.aa-news-page .aa-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--aa-bg-alt);
  border: 1px solid var(--aa-border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--aa-body);
}
.aa-news-page .aa-filter-chip-remove {
  color: var(--aa-muted);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}
.aa-news-page .aa-filter-chip-remove:hover {
  color: #c0392b;
  text-decoration: none;
}
.aa-news-page .aa-filter-chip--clear {
  background: none;
  border-color: transparent;
  color: var(--aa-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aa-news-page .aa-filter-chip--clear:hover {
  color: var(--aa-navy);
  text-decoration: none;
}

/* ── Tag pills (global .aa-tag, scoped colours) ──────────────── */
.aa-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.aa-tag:hover {
  opacity: .75;
  text-decoration: none;
}
/* type-based defaults (overridden by inline color when set) */
.aa-tag--event   { color: #1a73e8; }
.aa-tag--athlete { color: #0b8a5c; }
.aa-tag--topic   { color: #9333ea; }
.aa-tag--zone    { color: #d97706; }
/* active state in sidebar tag cloud */
.aa-tag--active {
  background: currentColor;
}
.aa-tag--active span,
.aa-tag.aa-tag--active {
  color: #fff !important;
}

/* ── Article grid section ────────────────────────────────────── */
.aa-news-page .aa-news-body-section {
  padding: 36px 0 56px;
  background: var(--aa-bg-alt);
}

/* ── News card ───────────────────────────────────────────────── */
.aa-news-page .aa-news-card {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s var(--aa-ease), transform .25s var(--aa-ease);
}
.aa-news-page .aa-news-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-3px);
}
.aa-news-page .aa-news-card-img-wrap {
  display: block;
  overflow: hidden;
  height: 190px;
}
.aa-news-page .aa-news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--aa-ease);
}
.aa-news-page .aa-news-card:hover .aa-news-card-img {
  transform: scale(1.04);
}
.aa-news-page .aa-news-card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.aa-news-page .aa-news-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.aa-news-page .aa-news-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}
.aa-news-page .aa-news-card-title a {
  color: var(--aa-navy);
  text-decoration: none;
}
.aa-news-page .aa-news-card-title a:hover {
  color: var(--aa-sky);
}
.aa-news-page .aa-news-card-excerpt {
  font-size: 13px;
  color: var(--aa-muted);
  line-height: 1.6;
  margin: 0 0 auto;
  padding-bottom: 12px;
}
.aa-news-page .aa-news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--aa-muted);
  border-top: 1px solid var(--aa-border);
  padding-top: 10px;
  margin-top: auto;
}
.aa-news-page .aa-news-card-readtime {
  background: var(--aa-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Empty state */
.aa-news-page .aa-news-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--aa-muted);
}
.aa-news-page .aa-news-empty .fa {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: .35;
}
.aa-news-page .aa-news-empty p {
  margin-bottom: 16px;
}

/* ── Pagination override (Bootstrap 3) ───────────────────────── */
.aa-news-page .aa-news-pagination {
  margin-top: 8px;
}
.aa-news-page .aa-news-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.aa-news-page .aa-news-pagination .pagination > li > a,
.aa-news-page .aa-news-pagination .pagination > li > span {
  border: 1px solid var(--aa-border);
  color: var(--aa-navy);
  border-radius: var(--aa-radius-sm) !important;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
.aa-news-page .aa-news-pagination .pagination > .active > a,
.aa-news-page .aa-news-pagination .pagination > .active > span {
  background: var(--aa-navy);
  border-color: var(--aa-navy);
  color: #fff;
}
.aa-news-page .aa-news-pagination .pagination > li > a:hover {
  background: var(--aa-bg-alt);
  color: var(--aa-navy);
  text-decoration: none;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.aa-news-page .aa-news-sidebar {
  padding-top: 4px;
}
.aa-news-page .aa-sidebar-widget {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 20px 18px;
  margin-bottom: 22px;
}
.aa-news-page .aa-sidebar-widget-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--aa-sky);
}

/* Trending list */
.aa-news-page .aa-trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aa-news-page .aa-trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--aa-border);
}
.aa-news-page .aa-trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.aa-news-page .aa-trending-num {
  flex: 0 0 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--aa-border);
  line-height: 1;
  padding-top: 2px;
}
.aa-news-page .aa-trending-info {
  flex: 1;
}
.aa-news-page .aa-trending-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-body);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 3px;
}
.aa-news-page .aa-trending-title:hover {
  color: var(--aa-sky);
  text-decoration: none;
}
.aa-news-page .aa-trending-date {
  font-size: 11px;
  color: var(--aa-muted);
}

/* Tag cloud */
.aa-news-page .aa-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Subscribe widget */
.aa-news-page .aa-sidebar-subscribe-text {
  font-size: 13px;
  color: var(--aa-muted);
  margin-bottom: 12px;
}
.aa-news-page .aa-subscribe-form {
  margin: 0;
}
.aa-news-page .aa-subscribe-row {
  display: flex;
  gap: 6px;
}
.aa-news-page .aa-subscribe-input {
  flex: 1;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.aa-news-page .aa-subscribe-input:focus {
  border-color: var(--aa-sky);
}
.aa-news-page .aa-subscribe-btn {
  height: 38px;
  padding: 0 14px;
  background: var(--aa-navy);
  color: #fff;
  border: none;
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.aa-news-page .aa-subscribe-btn:hover {
  background: #1a3f58;
}

/* ================================================================
   NEWS LIST PAGE — TABLET (≤991px)
   ================================================================ */
@media (max-width: 991px) {
  .aa-news-page .aa-news-featured-img-wrap {
    flex: 0 0 280px;
    max-width: 280px;
    height: 220px;
  }
  .aa-news-page .aa-news-featured-body {
    padding: 20px 20px 20px 0;
  }
  .aa-news-page .aa-news-featured-title {
    font-size: 19px;
  }
  .aa-news-page .aa-news-hero-title {
    font-size: 30px;
  }
}

/* ================================================================
   NEWS LIST PAGE — MOBILE (≤767px)
   ================================================================ */
@media (max-width: 767px) {
  .aa-news-page .aa-news-hero {
    padding: 36px 0 30px;
  }
  .aa-news-page .aa-news-hero-title {
    font-size: 26px;
  }
  .aa-news-page .aa-news-featured-inner {
    flex-direction: column;
    gap: 0;
  }
  .aa-news-page .aa-news-featured-img-wrap {
    flex: none;
    max-width: 100%;
    width: 100%;
    height: 200px;
  }
  .aa-news-page .aa-news-featured-body {
    padding: 18px;
  }
  .aa-news-page .aa-news-featured-cta {
    margin-left: 0;
    margin-top: 4px;
  }
  .aa-news-page .aa-news-filter-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .aa-news-page .aa-news-filter-group {
    width: 100%;
  }
  .aa-news-page .aa-news-select {
    width: 100%;
  }
  .aa-news-page .aa-news-filter-search {
    min-width: 0;
    width: 100%;
  }
  .aa-news-page .aa-news-card-img-wrap {
    height: 170px;
  }
  .aa-news-page .aa-news-sidebar {
    margin-top: 8px;
  }
}

/* ================================================================
   ARTICLE PAGE — aa-article-page
   ================================================================ */

/* ── Reading progress bar ────────────────────────────────────── */
.aa-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--aa-sky);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Hero ────────────────────────────────────────────────────── */
.aa-article-page .aa-article-hero {
  position: relative;
  height: 460px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.aa-article-page .aa-article-hero-img-wrap {
  position: absolute;
  inset: 0;
}
.aa-article-page .aa-article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-article-page .aa-article-hero-no-img {
  background: linear-gradient(135deg, var(--aa-navy) 0%, #1a3f58 100%);
}
.aa-article-page .aa-article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,42,60,0.92) 0%, rgba(14,42,60,0.45) 60%, rgba(14,42,60,0.1) 100%);
}
.aa-article-page .aa-article-hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 36px;
}
.aa-article-page .aa-article-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.aa-article-page .aa-article-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.aa-article-page .aa-article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.aa-article-page .aa-article-hero-meta .fa {
  margin-right: 5px;
  color: var(--aa-sky);
}

/* ── Body section ────────────────────────────────────────────── */
.aa-article-page .aa-article-body-section {
  padding: 36px 0 52px;
  background: var(--aa-bg-alt);
}

/* Share bar */
.aa-article-page .aa-article-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.aa-article-page .aa-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.aa-article-page .aa-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  color: #fff;
}
.aa-article-page .aa-share-btn:hover {
  opacity: .85;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.aa-article-page .aa-share-fb { background: #1877f2; }
.aa-article-page .aa-share-tw { background: #1da1f2; }
.aa-article-page .aa-share-wa { background: #25d366; }
.aa-article-page .aa-share-copy {
  background: var(--aa-bg-card);
  border: 1px solid var(--aa-border);
  color: var(--aa-body);
}
.aa-article-page .aa-share-copy:hover { color: var(--aa-navy); }
.aa-article-page .aa-copy-confirm {
  font-size: 12px;
  color: var(--aa-green);
  font-weight: 600;
  opacity: 0;
  transition: opacity .2s;
}
.aa-article-page .aa-copy-confirm--show { opacity: 1; }

/* Article body typography */
.aa-article-page .aa-article-body {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 32px 36px;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--aa-body);
}
.aa-article-page .aa-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--aa-radius-sm);
  margin: 16px 0;
}
.aa-article-page .aa-article-body h2,
.aa-article-page .aa-article-body h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--aa-navy);
  margin-top: 28px;
}
.aa-article-page .aa-article-body a {
  color: var(--aa-sky);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aa-article-page .aa-article-body blockquote {
  border-left: 4px solid var(--aa-sky);
  margin: 20px 0;
  padding: 10px 20px;
  background: var(--aa-bg-alt);
  border-radius: 0 var(--aa-radius-sm) var(--aa-radius-sm) 0;
  font-style: italic;
  color: var(--aa-muted);
}

/* Bottom tags */
.aa-article-page .aa-article-bottom-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.aa-article-page .aa-article-bottom-tags-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-muted);
  margin-right: 4px;
}

/* Article ad slot */
.aa-article-page .aa-article-ad {
  margin-bottom: 20px;
  text-align: center;
}
.aa-article-page .aa-article-ad img {
  max-width: 100%;
  height: auto;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.aa-article-page .aa-article-sidebar {
  padding-top: 4px;
}
.aa-article-page .aa-sidebar-widget {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 20px 18px;
  margin-bottom: 22px;
}
.aa-article-page .aa-sidebar-widget-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--aa-sky);
}

/* Article info list */
.aa-article-page .aa-article-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--aa-body);
}
.aa-article-page .aa-article-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--aa-border);
}
.aa-article-page .aa-article-info-list li:last-child { border-bottom: none; }
.aa-article-page .aa-article-info-list .fa {
  flex: 0 0 16px;
  color: var(--aa-sky);
  margin-top: 2px;
}

/* Latest news sidebar */
.aa-article-page .aa-sidebar-latest {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aa-article-page .aa-sidebar-latest-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--aa-border);
}
.aa-article-page .aa-sidebar-latest-item:last-child { border-bottom: none; padding-bottom: 0; }
.aa-article-page .aa-sidebar-latest-img-wrap {
  flex: 0 0 64px;
  width: 64px;
  height: 54px;
  overflow: hidden;
  border-radius: var(--aa-radius-sm);
}
.aa-article-page .aa-sidebar-latest-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-article-page .aa-sidebar-latest-info { flex: 1; }
.aa-article-page .aa-sidebar-latest-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-body);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 4px;
}
.aa-article-page .aa-sidebar-latest-title:hover {
  color: var(--aa-sky);
  text-decoration: none;
}
.aa-article-page .aa-sidebar-latest-date {
  font-size: 11px;
  color: var(--aa-muted);
}
.aa-article-page .aa-sidebar-ad img { max-width: 100%; height: auto; }

/* ── Related articles ────────────────────────────────────────── */
.aa-article-page .aa-article-related {
  background: #fff;
  padding: 44px 0 56px;
  border-top: 1px solid var(--aa-border);
}
.aa-article-page .aa-article-related-title {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 24px;
}

/* Reuse .aa-news-card styles from news list — no extra CSS needed */

/* ================================================================
   ARTICLE PAGE — MOBILE (≤767px)
   ================================================================ */
@media (max-width: 767px) {
  .aa-article-page .aa-article-hero {
    height: 320px;
  }
  .aa-article-page .aa-article-hero-title {
    font-size: 22px;
  }
  .aa-article-page .aa-article-hero-meta {
    gap: 10px;
    font-size: 12px;
  }
  .aa-article-page .aa-article-body {
    padding: 20px 18px;
    font-size: 15px;
  }
  .aa-article-page .aa-article-sidebar {
    margin-top: 8px;
  }
  .aa-article-page .aa-article-related {
    padding: 32px 0 40px;
  }
}

/* ================================================================
   NEWS CARD — shared styles (works in both aa-news-page and
   aa-article-page related section)
   ================================================================ */
.aa-article-page .aa-news-card {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s var(--aa-ease), transform .25s var(--aa-ease);
}
.aa-article-page .aa-news-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-3px);
}
.aa-article-page .aa-news-card-img-wrap {
  display: block;
  overflow: hidden;
  height: 180px;
  flex-shrink: 0;
}
.aa-article-page .aa-news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--aa-ease);
}
.aa-article-page .aa-news-card:hover .aa-news-card-img {
  transform: scale(1.04);
}
.aa-article-page .aa-news-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.aa-article-page .aa-news-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 auto;
  padding-bottom: 10px;
}
.aa-article-page .aa-news-card-title a {
  color: var(--aa-navy);
  text-decoration: none;
}
.aa-article-page .aa-news-card-title a:hover {
  color: var(--aa-sky);
}
.aa-article-page .aa-news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--aa-muted);
  border-top: 1px solid var(--aa-border);
  padding-top: 8px;
  margin-top: auto;
}

/* X (formerly Twitter) share button */
.aa-article-page .aa-share-x {
  background: #000;
  font-weight: 900;
  font-size: 15px;
  font-family: 'Arial Black', Arial, sans-serif;
  line-height: 1;
  letter-spacing: -.5px;
  color: #fff;
}
.aa-article-page .aa-share-x:hover { color: #fff; }

/* ================================================================
   NEWS CARD IMAGE — DEFENSIVE OVERRIDES
   Legacy site CSS (library.css / styles.css) sets global rules
   on <img> and <a> that break object-fit. Force the geometry
   with !important and absolute positioning so the img always
   fills its wrap regardless of natural dimensions.
   ================================================================ */
.aa-news-page .aa-news-card-img-wrap,
.aa-article-page .aa-news-card-img-wrap {
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 200px !important;
  background: #e8eef3;
}
.aa-news-page .aa-news-card-img-wrap > img,
.aa-news-page .aa-news-card-img,
.aa-article-page .aa-news-card-img-wrap > img,
.aa-article-page .aa-news-card-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Article hero image — same defensive treatment */
.aa-article-page .aa-article-hero-img-wrap {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden !important;
}
.aa-article-page .aa-article-hero-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* ============================================================
   === VIDEOS PAGE ===
   Styles for the refreshed videos page (Phase 5 / 5D).
   Loaded on more-video.blade.php only.
   All selectors scoped under .aa-videos-page wrapper.
   ============================================================ */

/* ================================================================
   HERO BAND — photographic + wave bottom
   Structurally identical to records-hero (Phase 3) but without
   counter chips. Own class to allow independent sizing.
   Wave fill is white (%23ffffff) — pills bar below is white.
   ================================================================ */
.aa-videos-page .aa-videos-hero {
  position: relative;
  background: var(--aa-navy);
  padding: 56px 0 88px;
  overflow: hidden;
}
.aa-videos-page .aa-videos-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.28;
  pointer-events: none;
}
.aa-videos-page .aa-videos-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56'%3E%3Cpath fill='%23ffffff' d='M0,28L60,24.5C120,21,240,14,360,18.7C480,23,600,39,720,42C840,45,960,35,1080,29.2C1200,23,1320,21,1380,20L1440,19L1440,56L1380,56C1320,56,1200,56,1080,56C960,56,840,56,720,56C600,56,480,56,360,56C240,56,120,56,60,56L0,56Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
.aa-videos-page .aa-videos-hero-inner { position: relative; z-index: 2; }
.aa-videos-page .aa-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.aa-videos-page .aa-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.aa-videos-page .aa-breadcrumb a:hover    { color: var(--aa-sky); }
.aa-videos-page .aa-breadcrumb-sep        { margin: 0 6px; }
.aa-videos-page .aa-videos-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin-bottom: 10px;
}
.aa-videos-page .aa-videos-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.1;
}
.aa-videos-page .aa-videos-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.68);
  max-width: 600px;
  margin: 0;
  line-height: 1.6;
}

/* ================================================================
   DISCIPLINE FILTER PILLS
   Horizontal flex row, wraps on desktop, scrolls on mobile.
   ================================================================ */
.aa-videos-page .aa-discipline-pills {
  background: #fff;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--aa-border);
  margin-bottom: 40px;
}
.aa-videos-page .aa-discipline-pills-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.aa-videos-page .aa-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid var(--aa-border);
  border-radius: 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--aa-body);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background .15s var(--aa-ease), border-color .15s var(--aa-ease), color .15s var(--aa-ease);
}
.aa-videos-page .aa-pill:hover {
  background: var(--aa-bg-alt);
  border-color: var(--aa-sky);
  color: var(--aa-navy);
}
.aa-videos-page .aa-pill.is-active {
  background: var(--aa-navy);
  border-color: var(--aa-navy);
  color: #fff;
}

/* ================================================================
   PAGE SECTIONS — shared spacing wrapper
   ================================================================ */
.aa-videos-page .aa-videos-section {
  padding: 40px 0 48px;
  background: #fff;
}
.aa-videos-page .aa-videos-section--stories {
  background: var(--aa-bg-alt);
  padding: 40px 0 48px;
}
.aa-videos-page .aa-videos-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.aa-videos-page .aa-videos-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--aa-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.aa-videos-page .aa-videos-section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--aa-sky);
  margin-top: 6px;
  border-radius: 2px;
}
.aa-videos-page .aa-videos-section-title .fa {
  margin-right: 8px;
  color: var(--aa-sky);
  font-size: 0.9em;
}
.aa-videos-page .aa-videos-count {
  font-size: 12px;
  color: var(--aa-muted);
  font-weight: 500;
}

/* ================================================================
   LANDSCAPE VIDEOS GRID (3-col → 2-col tablet → 1-col mobile)
   ================================================================ */
.aa-videos-page .aa-landscape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- Landscape card ------------------------------------------ */
.aa-videos-page .aa-vcard {
  background: var(--aa-bg-card);
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .2s var(--aa-ease), box-shadow .2s var(--aa-ease);
}
.aa-videos-page .aa-vcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--aa-shadow-md);
}

/* Thumbnail wrapper — 16:9 via padding-bottom trick */
.aa-videos-page .aa-vcard-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: var(--aa-navy);
}
.aa-videos-page .aa-vcard-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s, transform .4s var(--aa-ease);
}
.aa-videos-page .aa-vcard:hover .aa-vcard-thumb img {
  opacity: 0.8;
  transform: scale(1.05);
}

/* Play button — centred circle */
.aa-videos-page .aa-vcard-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.90);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aa-navy);
  font-size: 18px;
  pointer-events: none;
  z-index: 2;
  transition: background .15s var(--aa-ease), transform .15s var(--aa-ease), color .15s var(--aa-ease);
}
/* fa-play renders slightly left-heavy; nudge right */
.aa-videos-page .aa-vcard-play .fa { margin-left: 3px; }
.aa-videos-page .aa-vcard:hover .aa-vcard-play {
  background: var(--aa-sky);
  color: var(--aa-navy);
  transform: translate(-50%, -50%) scale(1.12);
}

/* Duration badge — bottom-right */
.aa-videos-page .aa-vcard-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  pointer-events: none;
  z-index: 3;
}

/* Card body */
.aa-videos-page .aa-vcard-body {
  padding: 14px 16px 16px;
}
.aa-videos-page .aa-vcard-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--aa-navy);
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-videos-page .aa-vcard-desc {
  font-size: 13px;
  color: var(--aa-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline-play state — JS adds .is-playing to .aa-vcard-thumb */
.aa-videos-page .aa-vcard-thumb.is-playing { padding-bottom: 56.25%; }
.aa-videos-page .aa-vcard-thumb.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.aa-videos-page .aa-vcard-thumb.is-playing img,
.aa-videos-page .aa-vcard-thumb.is-playing .aa-vcard-play,
.aa-videos-page .aa-vcard-thumb.is-playing .aa-vcard-duration { display: none; }

/* ================================================================
   STORIES GRID (4-col → 3-col tablet → 2-col mobile → 1-col narrow)
   Portrait 9:16 cards, title overlay at bottom.
   ================================================================ */
.aa-videos-page .aa-stories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* ---- Story card --------------------------------------------- */
.aa-videos-page .aa-scard {
  position: relative;
  border-radius: var(--aa-radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--aa-navy);
  transition: transform .2s var(--aa-ease), box-shadow .2s var(--aa-ease);
}
.aa-videos-page .aa-scard:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--aa-shadow-lg);
}

/* Thumbnail wrapper — 9:16 aspect */
.aa-videos-page .aa-scard-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 177.78%; /* 100 / (9/16) */
  overflow: hidden;
}
.aa-videos-page .aa-scard-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity .25s, transform .4s var(--aa-ease);
}
.aa-videos-page .aa-scard:hover .aa-scard-thumb img {
  opacity: 0.68;
  transform: scale(1.06);
}

/* Duration badge — top-right (clears title overlay at bottom) */
.aa-videos-page .aa-scard-duration {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  pointer-events: none;
  z-index: 3;
}

/* Play circle — smaller than landscape */
.aa-videos-page .aa-scard-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aa-navy);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
  transition: background .15s var(--aa-ease), transform .15s var(--aa-ease);
}
.aa-videos-page .aa-scard-play .fa { margin-left: 2px; }
.aa-videos-page .aa-scard:hover .aa-scard-play {
  background: var(--aa-sky);
  transform: translate(-50%, -50%) scale(1.12);
}

/* Title overlay — gradient from bottom, 2-line clamp */
.aa-videos-page .aa-scard-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 56px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  pointer-events: none;
  z-index: 2;
}
.aa-videos-page .aa-scard-title {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline-play state for stories */
.aa-videos-page .aa-scard-thumb.is-playing { padding-bottom: 177.78%; }
.aa-videos-page .aa-scard-thumb.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.aa-videos-page .aa-scard-thumb.is-playing img,
.aa-videos-page .aa-scard-thumb.is-playing .aa-scard-play,
.aa-videos-page .aa-scard-thumb.is-playing .aa-scard-duration { display: none; }
.aa-videos-page .aa-scard.is-playing .aa-scard-overlay         { display: none; }

/* ================================================================
   VIEW MORE BUTTON
   ================================================================ */
.aa-videos-page .aa-view-more-wrap {
  text-align: center;
  padding: 40px 0 60px;
  background: #fff;
}
.aa-videos-page .aa-view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--aa-navy);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--aa-radius-sm);
  cursor: pointer;
  transition: background .15s var(--aa-ease), transform .15s var(--aa-ease);
}
.aa-videos-page .aa-view-more-btn:hover {
  background: #1a6496;
  transform: translateY(-1px);
}
.aa-videos-page .aa-view-more-btn.is-loading {
  opacity: 0.6;
  cursor: wait;
}
.aa-videos-page .aa-view-more-btn.is-loading .aa-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aa-spin .7s linear infinite;
}
.aa-videos-page .aa-view-more-btn:not(.is-loading) .aa-btn-spinner { display: none; }
.aa-videos-page .aa-view-more-btn.is-hidden { display: none; }

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

/* ================================================================
   SUBSCRIBE CTA BAND
   Dark navy full-width section with YouTube-red button.
   YouTube red (#ff0000) is the only hardcoded colour exception.
   ================================================================ */
.aa-videos-page .aa-subscribe-cta {
  background: var(--aa-navy);
  padding: 60px 0;
}
.aa-videos-page .aa-subscribe-cta-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Channel avatar circle */
.aa-videos-page .aa-channel-avatar {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--aa-sky) 0%, #1a6496 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  flex-shrink: 0;
}

/* Center: heading + subtitle */
.aa-videos-page .aa-subscribe-center {
  flex: 1;
  min-width: 0;
}
.aa-videos-page .aa-subscribe-center h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.25;
}
.aa-videos-page .aa-subscribe-center p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin: 0;
  line-height: 1.55;
}

/* Right: subscribe button */
.aa-videos-page .aa-subscribe-right { flex-shrink: 0; }
.aa-videos-page .aa-yt-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #ff0000;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s var(--aa-ease), transform .15s var(--aa-ease);
}
.aa-videos-page .aa-yt-subscribe-btn:hover {
  background: #cc0000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.aa-videos-page .aa-yt-subscribe-btn .fa { font-size: 16px; }

/* ================================================================
   AD SLOT — margin wrapper for the videos page position
   ================================================================ */
.aa-videos-page .aa-videos-ad-section {
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid var(--aa-border);
  border-bottom: 1px solid var(--aa-border);
}

/* ================================================================
   VIDEO MODAL — inline playback overlay
   References existing @keyframes aa-modal-in (defined in Phase 3).
   ================================================================ */
.aa-videos-page .aa-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.aa-videos-page .aa-video-modal:not([hidden]) { display: flex; }
.aa-videos-page .aa-video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14,42,60,0.88);
  cursor: pointer;
}
.aa-videos-page .aa-video-modal-panel {
  position: relative;
  background: var(--aa-navy);
  border-radius: var(--aa-radius-lg);
  box-shadow: var(--aa-shadow-lg);
  width: 100%;
  max-width: 860px;
  z-index: 2;
  overflow: hidden;
  animation: aa-modal-in .22s var(--aa-ease) both;
}
.aa-videos-page .aa-video-modal-panel.is-story { max-width: 440px; }
.aa-videos-page .aa-video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(0,0,0,0.25);
  gap: 12px;
}
.aa-videos-page .aa-video-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aa-videos-page .aa-video-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.aa-videos-page .aa-video-modal-close:hover  { background: rgba(255,255,255,0.25); }
.aa-videos-page .aa-video-modal-close:focus  {
  outline: 2px solid var(--aa-sky);
  outline-offset: 2px;
}
/* Frame — 16:9 for landscape, 9:16 for story */
.aa-videos-page .aa-video-modal-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}
.aa-videos-page .aa-video-modal-panel.is-story .aa-video-modal-frame {
  padding-bottom: 177.78%;
}
.aa-videos-page .aa-video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.aa-videos-page .aa-video-modal-footer {
  padding: 10px 16px;
  background: rgba(0,0,0,0.18);
  text-align: right;
}
.aa-videos-page .aa-modal-yt-link {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .15s;
}
.aa-videos-page .aa-modal-yt-link:hover          { color: #fff; text-decoration: none; }
.aa-videos-page .aa-modal-yt-link .fa             { color: #ff0000; }

/* ================================================================
   VIDEOS PAGE — TABLET (≤991px)
   ================================================================ */
@media (max-width: 991px) {
  .aa-videos-page .aa-landscape-grid         { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .aa-videos-page .aa-stories-grid           { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .aa-videos-page .aa-videos-hero h1         { font-size: 36px; }
  .aa-videos-page .aa-videos-hero-sub        { font-size: 14px; }
  .aa-videos-page .aa-subscribe-cta-inner    { gap: 24px; }
  .aa-videos-page .aa-channel-avatar         { width: 64px; height: 64px; font-size: 26px; }
  .aa-videos-page .aa-subscribe-center h2    { font-size: 19px; }
  .aa-videos-page .aa-ad-desktop             { display: flex; max-width: 728px; height: 90px; margin: 0 auto; }
}

/* ================================================================
   VIDEOS PAGE — MOBILE (≤767px) — CONSOLIDATED BLOCK
   Single source of mobile rules for the videos page. Do NOT add
   a second @media (max-width: 767px) block for videos-page rules.
   ================================================================ */
@media (max-width: 767px) {
  /* Hero */
  .aa-videos-page .aa-videos-hero            { padding: 40px 0 76px; }
  .aa-videos-page .aa-videos-hero h1         { font-size: 28px; }
  .aa-videos-page .aa-videos-hero-sub        { font-size: 14px; }

  /* Discipline pills: switch to horizontal scroll on narrow screens */
  .aa-videos-page .aa-discipline-pills       { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .aa-videos-page .aa-discipline-pills-inner { flex-wrap: nowrap; padding-bottom: 4px; }

  /* Landscape grid: 1-up */
  .aa-videos-page .aa-landscape-grid         { grid-template-columns: 1fr; gap: 16px; }
  .aa-videos-page .aa-vcard-body             { padding: 12px 14px 14px; }
  .aa-videos-page .aa-vcard-title            { font-size: 14px; }
  .aa-videos-page .aa-vcard-play             { width: 44px; height: 44px; font-size: 16px; }

  /* Stories grid: 2-up at 480–767px */
  .aa-videos-page .aa-stories-grid           { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .aa-videos-page .aa-scard-play             { width: 36px; height: 36px; font-size: 12px; }
  .aa-videos-page .aa-scard-title            { font-size: 13px; }

  /* View More */
  .aa-videos-page .aa-view-more-btn          { padding: 12px 24px; font-size: 13px; }

  /* Subscribe CTA: column layout */
  .aa-videos-page .aa-subscribe-cta          { padding: 40px 0; }
  .aa-videos-page .aa-subscribe-cta-inner    {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .aa-videos-page .aa-subscribe-center h2    { font-size: 18px; }
  .aa-videos-page .aa-subscribe-center p     { font-size: 13px; }
  .aa-videos-page .aa-yt-subscribe-btn       { padding: 12px 24px; font-size: 13px; }

  /* Ad slot */
  .aa-videos-page .aa-videos-ad-section      { padding: 16px 0; }
  .aa-videos-page .aa-ad-desktop             { display: none; }
  .aa-videos-page .aa-ad-mobile              { display: flex; max-width: 320px; height: 50px; margin: 0 auto; }

  /* Modal: full-screen on mobile */
  .aa-videos-page .aa-video-modal            { padding: 0; align-items: stretch; }
  .aa-videos-page .aa-video-modal-panel      {
    max-width: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .aa-videos-page .aa-video-modal-frame      { flex: 1; padding-bottom: 0; height: 0; }
  .aa-videos-page .aa-video-modal-frame iframe {
    position: static;
    width: 100%;
    height: 100%;
    min-height: 240px;
  }
}

/* ================================================================
   VIDEOS PAGE — VERY NARROW (≤479px)
   Stories drop to 1-up at the narrowest breakpoint.
   ================================================================ */
@media (max-width: 479px) {
  .aa-videos-page .aa-videos-hero h1         { font-size: 24px; }
  .aa-videos-page .aa-stories-grid           { grid-template-columns: 1fr; }
  .aa-videos-page .aa-subscribe-center h2    { font-size: 16px; }
}

/* Featured band image — same defensive treatment */
.aa-news-page .aa-news-featured-img-wrap {
  position: relative !important;
  overflow: hidden !important;
}
.aa-news-page .aa-news-featured-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  display: block !important;
}

/* ================================================================
   RELATED ARTICLES CARD — tighten title + drop divider
   ================================================================ */
.aa-article-page .aa-news-card-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: ellipsis;
  /* Reserve exactly 2 lines so the date pill sits clear */
  min-height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);
  padding-bottom: 12px !important;
}
.aa-article-page .aa-news-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-article-page .aa-news-card-meta {
  border-top: none !important;
  padding-top: 0 !important;
}

/* ================================================================
   RELATED ARTICLES CARD — enforce title/date spacing
   The legacy library.css styles .date as a dark pill at fixed
   coords. Force static positioning and add a guaranteed gap.
   ================================================================ */
.aa-article-page .aa-news-card-body {
  padding: 16px 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 130px;
}
.aa-article-page .aa-news-card-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: ellipsis;
  height: calc(1.35em * 2) !important;
  max-height: calc(1.35em * 2) !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
}
.aa-article-page .aa-news-card-meta {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  position: static !important;
}
.aa-article-page .aa-news-card-date,
.aa-article-page .aa-news-card-meta .aa-news-card-date,
.aa-article-page .aa-news-card-meta em,
.aa-article-page .aa-news-card-meta .date {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  float: none !important;
}

/* ================================================================
   ATHLETES LIST PAGE (Phase 6C)
   All selectors scoped under .aa-athletes-page wrapper.
   Mirrors the records-page hero + filter-bar pattern.
   ================================================================ */

/* ---- Hero band ------------------------------------------------- */
.aa-athletes-page .aa-athletes-hero {
  position: relative;
  background: var(--aa-navy);
  padding: 56px 0 88px;
  overflow: hidden;
}
.aa-athletes-page .aa-athletes-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.28;
  pointer-events: none;
}
.aa-athletes-page .aa-athletes-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56'%3E%3Cpath fill='%23f4f9fd' d='M0,28L60,24.5C120,21,240,14,360,18.7C480,23,600,39,720,42C840,45,960,35,1080,29.2C1200,23,1320,21,1380,20L1440,19L1440,56L1380,56C1320,56,1200,56,1080,56C960,56,840,56,720,56C600,56,480,56,360,56C240,56,120,56,60,56L0,56Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
.aa-athletes-page .aa-athletes-hero-inner { position: relative; z-index: 2; }
.aa-athletes-page .aa-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.aa-athletes-page .aa-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.aa-athletes-page .aa-breadcrumb a:hover { color: var(--aa-sky); }
.aa-athletes-page .aa-breadcrumb-sep { margin: 0 6px; }
.aa-athletes-page .aa-athletes-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--aa-sky);
  margin-bottom: 10px;
}
.aa-athletes-page .aa-athletes-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.1;
}
.aa-athletes-page .aa-athletes-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.68);
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
}

/* ---- Filter bar ------------------------------------------------ */
.aa-athletes-page .aa-athletes-filter {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.aa-athletes-page .aa-athletes-filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aa-athletes-page .aa-athletes-filter-group {
  display: flex;
  align-items: center;
}
.aa-athletes-page .aa-athletes-filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.aa-athletes-page .aa-athletes-filter-search .fa {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--aa-muted);
  font-size: 13px;
  pointer-events: none;
}
.aa-athletes-page .aa-athletes-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  color: var(--aa-navy);
  background-color: var(--aa-bg-alt);
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.aa-athletes-page .aa-athletes-search-input:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.25);
  outline: none;
}
.aa-athletes-page .aa-athletes-select {
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--aa-navy);
  background-color: var(--aa-bg-alt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2395d9fe' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  min-width: 150px;
  transition: border-color .15s, box-shadow .15s;
}
.aa-athletes-page .aa-athletes-select:focus {
  border-color: var(--aa-sky);
  box-shadow: 0 0 0 3px rgba(149,217,254,0.25);
  outline: none;
}
.aa-athletes-page .aa-athletes-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.aa-athletes-page .aa-athletes-filter-submit {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--aa-sky);
  border: none;
  border-radius: var(--aa-radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.aa-athletes-page .aa-athletes-filter-submit:hover { background: #6cc4f5; }
.aa-athletes-page .aa-athletes-filter-clear {
  font-size: 12px;
  color: var(--aa-muted);
  text-decoration: none;
  padding: 7px 6px;
}
.aa-athletes-page .aa-athletes-filter-clear:hover { color: var(--aa-navy); }

/* ---- Grid section --------------------------------------------- */
.aa-athletes-page .aa-athletes-grid-section {
  background: var(--aa-bg-alt);
  padding: 32px 0 48px;
}
.aa-athletes-page .aa-athletes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1199px) {
  .aa-athletes-page .aa-athletes-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Athlete card --------------------------------------------- */
.aa-athletes-page .aa-athlete-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .22s var(--aa-ease), box-shadow .22s var(--aa-ease), border-color .22s var(--aa-ease);
}
.aa-athletes-page .aa-athlete-card:hover,
.aa-athletes-page .aa-athlete-card:focus {
  transform: translateY(-2px);
  box-shadow: var(--aa-shadow-md);
  border-color: var(--aa-sky);
  outline: none;
}
.aa-athletes-page .aa-athlete-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--aa-bg-alt);
}
.aa-athletes-page .aa-athlete-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .35s var(--aa-ease);
}
.aa-athletes-page .aa-athlete-card:hover .aa-athlete-card-photo img {
  transform: scale(1.05);
}
.aa-athletes-page .aa-athlete-card-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--aa-sky) 0%, var(--aa-navy) 100%);
  letter-spacing: 1px;
}
.aa-athletes-page .aa-athlete-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aa-athletes-page .aa-athlete-card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-athletes-page .aa-athlete-card-country {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--aa-muted);
  font-weight: 500;
  margin: 0;
}
.aa-athletes-page .aa-athlete-card-flag {
  font-size: 14px;
  line-height: 1;
}
.aa-athletes-page .aa-athlete-card-country-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-athletes-page .aa-athlete-card-pill {
  align-self: flex-start;
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--aa-sky);
  border-radius: 100px;
}

/* ---- Empty state ---------------------------------------------- */
.aa-athletes-page .aa-athletes-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--aa-muted);
}
.aa-athletes-page .aa-athletes-empty .fa {
  font-size: 42px;
  margin-bottom: 14px;
  display: block;
  opacity: 0.5;
}
.aa-athletes-page .aa-athletes-empty-msg {
  font-size: 16px;
  font-weight: 600;
  color: var(--aa-navy);
  margin: 0 0 10px;
}
.aa-athletes-page .aa-athletes-empty-clear {
  display: inline-block;
  font-size: 13px;
  color: var(--aa-sky);
  text-decoration: none;
  font-weight: 600;
}
.aa-athletes-page .aa-athletes-empty-clear:hover { text-decoration: underline; }

/* ---- Pagination ----------------------------------------------- */
.aa-athletes-page .aa-athletes-pagination {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}
.aa-athletes-page .aa-athletes-pagination ul.pagination,
.aa-athletes-page .aa-athletes-pagination nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.aa-athletes-page .aa-athletes-pagination li,
.aa-athletes-page .aa-athletes-pagination span,
.aa-athletes-page .aa-athletes-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aa-athletes-page .aa-athletes-pagination a,
.aa-athletes-page .aa-athletes-pagination span.page-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  background: #fff;
  color: var(--aa-navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.aa-athletes-page .aa-athletes-pagination a:hover {
  background: var(--aa-bg-alt);
  border-color: var(--aa-sky);
}
.aa-athletes-page .aa-athletes-pagination .active span,
.aa-athletes-page .aa-athletes-pagination .active a {
  background: var(--aa-sky);
  color: #fff;
  border-color: var(--aa-sky);
}
.aa-athletes-page .aa-athletes-pagination .disabled span {
  color: var(--aa-muted);
  background: var(--aa-bg-alt);
  cursor: not-allowed;
}

/* ---- Mobile consolidation ------------------------------------- */
@media (max-width: 767px) {
  .aa-athletes-page .aa-athletes-hero { padding: 40px 0 64px; }
  .aa-athletes-page .aa-athletes-hero h1 { font-size: 32px; }
  .aa-athletes-page .aa-athletes-hero-sub { font-size: 14px; }

  .aa-athletes-page .aa-athletes-filter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .aa-athletes-page .aa-athletes-filter-group,
  .aa-athletes-page .aa-athletes-filter-search { width: 100% !important; }
  .aa-athletes-page .aa-athletes-select { width: 100%; min-width: 0; }
  .aa-athletes-page .aa-athletes-filter-actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .aa-athletes-page .aa-athletes-filter-submit { flex: 1; }

  .aa-athletes-page .aa-athletes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .aa-athletes-page .aa-athlete-card-body { padding: 10px 12px 12px; }
  .aa-athletes-page .aa-athlete-card-name { font-size: 14px; }
  .aa-athletes-page .aa-athlete-card-country { font-size: 11px; }
  .aa-athletes-page .aa-athlete-card-initials { font-size: 36px; }
}
@media (max-width: 479px) {
  .aa-athletes-page .aa-athletes-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   ATHLETE DETAIL PAGE (Phase 6D)
   All selectors scoped under .aa-athlete-page wrapper (singular —
   distinct from the .aa-athletes-page list page from Phase 6C).
   ================================================================ */

/* ---- Hero band (full-bleed photographic + dark overlay) ------- */
.aa-athlete-page .aa-athlete-hero {
  position: relative;
  background: var(--aa-navy);
  padding: 80px 0 100px;
  overflow: hidden;
  min-height: 360px;
}
.aa-athlete-page .aa-athlete-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  opacity: 0.50;
  pointer-events: none;
}
.aa-athlete-page .aa-athlete-hero-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--aa-sky) 0%, var(--aa-navy) 100%);
  pointer-events: none;
}
.aa-athlete-page .aa-athlete-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(14,42,60,0.50) 0%,
    rgba(14,42,60,0.65) 60%,
    rgba(14,42,60,0.88) 100%);
  pointer-events: none;
}
.aa-athlete-page .aa-athlete-hero-inner { position: relative; z-index: 2; }
.aa-athlete-page .aa-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.60);
  margin-bottom: 24px;
}
.aa-athlete-page .aa-breadcrumb a {
  color: rgba(255,255,255,0.60);
  text-decoration: none;
}
.aa-athlete-page .aa-breadcrumb a:hover { color: var(--aa-sky); }
.aa-athlete-page .aa-breadcrumb-sep { margin: 0 6px; }

.aa-athlete-page .aa-athlete-hero-content { color: #fff; }
.aa-athlete-page .aa-athlete-hero-country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 8px;
}
.aa-athlete-page .aa-athlete-hero-flag {
  font-size: 20px;
  line-height: 1;
}
.aa-athlete-page .aa-athlete-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.05;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.aa-athlete-page .aa-athlete-hero-subtitle {
  font-size: 16px;
  color: rgba(149,217,254,0.95);
  font-weight: 500;
  margin: 0 0 28px;
}
.aa-athlete-page .aa-athlete-hero-dot {
  margin: 0 8px;
  color: rgba(255,255,255,0.5);
}

/* Hero stats row (each tile self-hides via Blade if value is 0/null) */
.aa-athlete-page .aa-athlete-hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.aa-athlete-page .aa-athlete-hero-stat {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 12px 18px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  min-width: 110px;
}
.aa-athlete-page .aa-athlete-hero-stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.aa-athlete-page .aa-athlete-hero-stat-label {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ---- Section common (used by main column sections) ----------- */
.aa-athlete-page .aa-athlete-section { margin-bottom: 36px; }
.aa-athlete-page .aa-athlete-section:last-child { margin-bottom: 0; }
.aa-athlete-page .aa-athlete-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--aa-border);
}
.aa-athlete-page .aa-athlete-section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0;
}
.aa-athlete-page .aa-athlete-section-subtitle {
  font-size: 13px;
  color: var(--aa-muted);
  margin: 0;
  width: 100%;
}
.aa-athlete-page .aa-athlete-section-link {
  font-size: 13px;
  color: var(--aa-sky);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.aa-athlete-page .aa-athlete-section-link:hover { text-decoration: underline; }

/* ---- Bio/info section (two-column layout) -------------------- */
.aa-athlete-page .aa-athlete-bio-info-section {
  background: var(--aa-bg-alt);
  padding: 40px 0 56px;
}

/* ---- Sidebar card blocks ------------------------------------- */
.aa-athlete-page .aa-athlete-card-block {
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--aa-shadow-sm);
  /* Long URLs / unbroken strings inside admin-entered HTML must not
     push the card past the sidebar column boundary. */
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
}
.aa-athlete-page .aa-athlete-card-block:last-child { margin-bottom: 0; }
.aa-athlete-page .aa-athlete-card-block-title {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--aa-muted);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--aa-border);
}
.aa-athlete-page .aa-athlete-bio-text {
  font-size: 14px;
  color: var(--aa-navy);
  line-height: 1.6;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
/* Style the HTML elements admin's rich-text editor may emit inside the bio */
.aa-athlete-page .aa-athlete-bio-text p {
  margin: 0 0 12px;
}
.aa-athlete-page .aa-athlete-bio-text p:last-child {
  margin-bottom: 0;
}
.aa-athlete-page .aa-athlete-bio-text a {
  color: var(--aa-sky);
  text-decoration: underline;
  /* Break long URLs across lines so they don't blow out the column */
  word-break: break-word;
}
.aa-athlete-page .aa-athlete-bio-text a:hover {
  color: var(--aa-navy);
}
.aa-athlete-page .aa-athlete-bio-text ul,
.aa-athlete-page .aa-athlete-bio-text ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.aa-athlete-page .aa-athlete-bio-text strong,
.aa-athlete-page .aa-athlete-bio-text b {
  font-weight: 700;
  color: var(--aa-navy);
}
.aa-athlete-page .aa-athlete-bio-text em,
.aa-athlete-page .aa-athlete-bio-text i {
  font-style: italic;
}

/* Personal info dl/dt/dd (two-column grid) */
.aa-athlete-page .aa-athlete-info-dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  font-size: 13px;
  align-items: baseline;
}
.aa-athlete-page .aa-athlete-info-dl dt {
  font-weight: 700;
  color: var(--aa-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
}
.aa-athlete-page .aa-athlete-info-dl dd {
  margin: 0;
  color: var(--aa-navy);
}

/* Discipline pills (in sidebar) */
.aa-athlete-page .aa-athlete-discipline-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aa-athlete-page .aa-athlete-discipline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--aa-bg-alt);
  border: 1px solid var(--aa-border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-navy);
}
.aa-athlete-page .aa-athlete-discipline-pill.is-primary {
  background: var(--aa-sky);
  border-color: var(--aa-sky);
  color: #fff;
}
.aa-athlete-page .aa-athlete-discipline-pill-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* ---- Season stats grid --------------------------------------- */
.aa-athlete-page .aa-season-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.aa-athlete-page .aa-season-stat-card {
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  padding: 16px 18px;
  box-shadow: var(--aa-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .2s var(--aa-ease);
}
.aa-athlete-page .aa-season-stat-card:hover { box-shadow: var(--aa-shadow-md); }
.aa-athlete-page .aa-stat-event {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--aa-sky);
  line-height: 1.3;
}
.aa-athlete-page .aa-stat-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.1;
  margin: 2px 0;
}
.aa-athlete-page .aa-stat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}
.aa-athlete-page .aa-stat-rank { color: var(--aa-navy); }
.aa-athlete-page .aa-stat-points { color: var(--aa-muted); }
.aa-athlete-page .aa-stat-meet {
  font-size: 12px;
  color: var(--aa-muted);
  line-height: 1.4;
}
.aa-athlete-page .aa-stat-meet-name {
  color: var(--aa-navy);
  font-weight: 500;
}
.aa-athlete-page .aa-stat-swims {
  font-size: 11px;
  color: var(--aa-muted);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--aa-border);
}

/* Historical seasons collapsed */
.aa-athlete-page .aa-historical-seasons { margin-top: 20px; }
.aa-athlete-page .aa-historical-seasons summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 16px;
  background: var(--aa-bg-alt);
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-navy);
  list-style: none;
  transition: background .15s;
}
.aa-athlete-page .aa-historical-seasons summary::-webkit-details-marker { display: none; }
.aa-athlete-page .aa-historical-seasons summary:hover { background: #fff; }
.aa-athlete-page .aa-historical-chevron {
  transition: transform .2s var(--aa-ease);
}
.aa-athlete-page .aa-historical-seasons[open] .aa-historical-chevron {
  transform: rotate(180deg);
}
.aa-athlete-page .aa-historical-year { margin-top: 18px; }
.aa-athlete-page .aa-historical-year-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 12px;
}

/* ---- Records list -------------------------------------------- */
.aa-athlete-page .aa-records-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aa-athlete-page .aa-record-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
}
.aa-athlete-page .aa-record-event {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-navy);
}
.aa-athlete-page .aa-record-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--aa-navy);
}
.aa-athlete-page .aa-record-meet {
  font-size: 12px;
  color: var(--aa-muted);
}
.aa-athlete-page .aa-record-meet-name { color: var(--aa-navy); }
.aa-athlete-page .aa-record-meet-sep { margin: 0 4px; }
.aa-athlete-page .aa-record-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--aa-sky);
  color: #fff;
  border: none;
  border-radius: var(--aa-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.aa-athlete-page .aa-record-video-btn:hover { background: #6cc4f5; }
.aa-athlete-page .aa-record-video-btn .fa { font-size: 14px; }

/* ---- Videos grid --------------------------------------------- */
.aa-athlete-page .aa-athlete-videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.aa-athlete-page .aa-athlete-video-card {
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--aa-shadow-sm);
  transition: box-shadow .2s var(--aa-ease), transform .2s var(--aa-ease);
}
.aa-athlete-page .aa-athlete-video-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-2px);
}
.aa-athlete-page .aa-athlete-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--aa-bg-alt);
  overflow: hidden;
}
.aa-athlete-page .aa-athlete-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-athlete-page .aa-athlete-video-thumb iframe,
.aa-athlete-page .aa-athlete-video-thumb video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.aa-athlete-page .aa-athlete-video-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--aa-sky), var(--aa-navy));
  color: rgba(255,255,255,0.40);
  font-size: 48px;
}
.aa-athlete-page .aa-athlete-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aa-navy);
  font-size: 18px;
  transition: background .15s, transform .15s var(--aa-ease);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.aa-athlete-page .aa-athlete-video-card:hover .aa-athlete-video-play {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}
.aa-athlete-page .aa-athlete-video-card.is-playing .aa-athlete-video-play,
.aa-athlete-page .aa-athlete-video-card.is-playing .aa-athlete-video-duration {
  display: none;
}
.aa-athlete-page .aa-athlete-video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 7px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.aa-athlete-page .aa-athlete-video-info { padding: 12px 14px 14px; }
.aa-athlete-page .aa-athlete-video-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aa-athlete-page .aa-athlete-video-meta {
  font-size: 11px;
  color: var(--aa-muted);
  margin: 0;
}

/* ---- News cards (horizontal layout) -------------------------- */
.aa-athlete-page .aa-athlete-news-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aa-athlete-page .aa-athlete-news-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s var(--aa-ease), transform .2s var(--aa-ease);
}
.aa-athlete-page .aa-athlete-news-card:hover {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-2px);
}
.aa-athlete-page .aa-athlete-news-thumb {
  flex: 0 0 120px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--aa-radius-sm);
  background: var(--aa-bg-alt);
}
.aa-athlete-page .aa-athlete-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-athlete-page .aa-athlete-news-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aa-athlete-page .aa-athlete-news-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--aa-sky);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.aa-athlete-page .aa-athlete-news-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0;
  line-height: 1.3;
}
.aa-athlete-page .aa-athlete-news-excerpt {
  font-size: 13px;
  color: var(--aa-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Related athletes (full-width section) ------------------- */
.aa-athlete-page .aa-athlete-related {
  background: #fff;
  padding: 40px 0 56px;
  margin-bottom: 0;
  border-top: 1px solid var(--aa-border);
}
.aa-athlete-page .aa-related-athletes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.aa-athlete-page .aa-related-athlete-card {
  display: flex;
  flex-direction: column;
  background: var(--aa-bg-alt);
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--aa-ease), box-shadow .2s var(--aa-ease), border-color .2s var(--aa-ease);
}
.aa-athlete-page .aa-related-athlete-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--aa-shadow-md);
  border-color: var(--aa-sky);
}
.aa-athlete-page .aa-related-athlete-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.aa-athlete-page .aa-related-athlete-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .35s var(--aa-ease);
}
.aa-athlete-page .aa-related-athlete-card:hover .aa-related-athlete-photo img {
  transform: scale(1.05);
}
.aa-athlete-page .aa-related-athlete-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--aa-sky) 0%, var(--aa-navy) 100%);
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}
.aa-athlete-page .aa-related-athlete-info { padding: 10px 12px 12px; }
.aa-athlete-page .aa-related-athlete-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 2px;
  line-height: 1.3;
}
.aa-athlete-page .aa-related-athlete-discipline {
  font-size: 11px;
  color: var(--aa-muted);
  font-weight: 500;
}

/* ---- Empty states (shared) ----------------------------------- */
.aa-athlete-page .aa-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--aa-muted);
  background: var(--aa-bg-alt);
  border-radius: var(--aa-radius-md);
}
.aa-athlete-page .aa-empty-state .fa {
  font-size: 40px;
  opacity: 0.4;
  margin-bottom: 12px;
  display: block;
}
.aa-athlete-page .aa-empty-state p {
  font-size: 14px;
  margin: 0;
}
.aa-athlete-page .aa-empty-state-subtle {
  background: transparent;
  padding: 32px 20px;
  border: 1px dashed var(--aa-border);
}

/* ---- Utility class (scoped) ---------------------------------- */
.aa-athlete-page .aa-muted {
  color: var(--aa-muted);
  font-weight: 400;
}

/* ================================================================
   RECORD VIDEO MODAL — D1 = (b) inline iframe embed.
   Placed outside the .aa-athlete-page scope so it can position
   fixed over the entire viewport. ID-based selectors are unique.
   ================================================================ */
.aa-record-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.aa-record-modal.is-open { display: flex; }
.aa-record-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14,42,60,0.92);
  cursor: pointer;
}
.aa-record-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--aa-navy);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.aa-record-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
  opacity: 0.85;
}
.aa-record-modal-close:hover { opacity: 1; }
.aa-record-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.aa-record-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Mobile consolidation ------------------------------------ */
@media (max-width: 991px) {
  /* Two-column drops to stacked (BS3 col-md-* already handles this at md/sm).
     Add bottom margin between main and the now-stacked sidebar. */
  .aa-athlete-page .aa-athlete-main { margin-bottom: 32px; }

  /* Related athletes 3-up at tablet */
  .aa-athlete-page .aa-related-athletes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .aa-athlete-page .aa-athlete-hero { padding: 56px 0 72px; min-height: 280px; }
  .aa-athlete-page .aa-athlete-hero h1 { font-size: 32px; }
  .aa-athlete-page .aa-athlete-hero-subtitle { font-size: 14px; margin-bottom: 20px; }

  /* Hero stats 2-up */
  .aa-athlete-page .aa-athlete-hero-stats { gap: 8px; }
  .aa-athlete-page .aa-athlete-hero-stat {
    flex: 1 1 calc(50% - 4px);
    padding: 10px 12px;
    min-width: 0;
  }
  .aa-athlete-page .aa-athlete-hero-stat-value { font-size: 20px; }
  .aa-athlete-page .aa-athlete-hero-stat-label { font-size: 9px; }

  /* Section headings smaller */
  .aa-athlete-page .aa-athlete-section-header h2 { font-size: 18px; }

  /* Season stats grid 1-up */
  .aa-athlete-page .aa-season-stats-grid { grid-template-columns: 1fr; }

  /* Records rows: stack vertically within each row */
  .aa-athlete-page .aa-record-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: flex-start;
  }
  .aa-athlete-page .aa-record-row .aa-tier-badge { justify-self: start; }
  .aa-athlete-page .aa-record-time { font-size: 22px; }
  .aa-athlete-page .aa-record-video-btn {
    justify-self: stretch;
    justify-content: center;
    margin-top: 4px;
  }

  /* Videos 1-up */
  .aa-athlete-page .aa-athlete-videos-grid { grid-template-columns: 1fr; }

  /* News cards stack image above text */
  .aa-athlete-page .aa-athlete-news-card { flex-direction: column; }
  .aa-athlete-page .aa-athlete-news-thumb {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  /* Related athletes 2-up */
  .aa-athlete-page .aa-related-athletes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .aa-athlete-page .aa-related-athlete-name { font-size: 12px; }
  .aa-athlete-page .aa-related-athlete-initials { font-size: 28px; }

  /* Sidebar card blocks compact */
  .aa-athlete-page .aa-athlete-card-block { padding: 14px 16px; }
  .aa-athlete-page .aa-athlete-bio-info-section { padding: 32px 0 40px; }

  /* Modal close button repositioned for narrow viewports */
  .aa-record-modal-close { top: -36px; right: 4px; }
}

@media (max-width: 479px) {
  .aa-athlete-page .aa-athlete-hero h1 { font-size: 26px; }

  /* Hero stats 1-up */
  .aa-athlete-page .aa-athlete-hero-stats { flex-direction: column; }
  .aa-athlete-page .aa-athlete-hero-stat { flex: 1 1 auto; }

  /* Related athletes 1-up */
  .aa-athlete-page .aa-related-athletes-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   === RESULTS PAGES ===
   Styles for the public results list (Phase 7 / 7D) and
   result detail page. Loaded on both pages via shared
   stylesheet. All selectors scoped under either
   .aa-results-page (list) or .aa-result-detail-page (detail).
   ============================================================ */

/* ---- Shared: Status pills + live dot ---- */
.aa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  line-height: 1.4;
}
.aa-status-pill-live {
  background: #e53935;
  color: #fff;
}
.aa-status-pill-live .aa-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: aa-pulse-dot 1.4s ease-in-out infinite;
}
@keyframes aa-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .aa-live-dot { animation: none; }
}
.aa-status-pill-recent   { background: var(--aa-green); color: #fff; }
.aa-status-pill-archived { background: #6b7280; color: #fff; }

/* ---- Results list page: hero ---- */
.aa-results-page .aa-results-hero {
  background: linear-gradient(135deg, var(--aa-navy) 0%, #0a3d5c 100%);
  color: #fff;
  padding: 52px 0 44px;
  position: relative;
  overflow: hidden;
}
.aa-results-page .aa-results-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent, transparent 40px,
    rgba(149,217,254,0.03) 40px, rgba(149,217,254,0.03) 80px
  );
  pointer-events: none;
}
.aa-results-page .aa-results-hero-h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  margin: 10px 0 10px;
}
.aa-results-page .aa-results-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  margin: 0 0 24px;
  max-width: 520px;
}
.aa-results-page .aa-results-hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.aa-results-page .aa-results-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: #fff;
}
.aa-results-page .aa-results-hero-chip-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--aa-sky);
}

/* Hero layout variant (with background image) */
.aa-results-page .aa-results-hero {
  background-size: cover !important;
  background-position: center !important;
}
.aa-results-page .aa-results-hero-overlay {
  position: absolute; inset: 0;
  background: rgba(10,39,68,0.75);
}
.aa-results-page .aa-results-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  color: #fff;
}
.aa-results-page .aa-results-hero-text { flex: 1 1 320px; }
.aa-results-page .aa-results-hero-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--aa-sky); margin-bottom: 10px;
}
.aa-results-page .aa-results-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  color: #fff; margin: 0 0 10px; line-height: 1.1;
}
.aa-results-page .aa-results-hero-sub {
  font-size: 16px; color: rgba(255,255,255,0.72);
  margin: 0; max-width: 480px;
}
.aa-results-page .aa-results-hero-stats {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  align-self: flex-end;
}
.aa-results-page .aa-results-hero-stat {
  text-align: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--aa-radius-md);
  padding: 12px 18px;
  min-width: 80px;
}
.aa-results-page .aa-results-hero-stat-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700; color: var(--aa-sky); line-height: 1;
}
.aa-results-page .aa-results-hero-stat-label {
  display: block; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.65); margin-top: 4px;
}

/* ---- Results list page: featured events row ---- */
.aa-results-page .aa-results-recent-section {
  padding: 52px 0 40px;
  background: #fff;
}
.aa-results-page .aa-results-recent-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.aa-results-page .aa-result-hero-card {
  flex: 1 1 280px;
  min-width: 0;
  border-radius: var(--aa-radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--aa-shadow-md);
  transition: transform .24s var(--aa-ease), box-shadow .24s var(--aa-ease);
}
.aa-results-page .aa-result-hero-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--aa-shadow-lg);
}
.aa-results-page .aa-result-hero-card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.aa-results-page .aa-result-hero-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--aa-ease);
}
.aa-results-page .aa-result-hero-card:hover .aa-result-hero-card-img-wrap img {
  transform: scale(1.06);
}
.aa-results-page .aa-result-hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,24,40,0.90) 0%,
    rgba(8,24,40,0.45) 50%,
    rgba(8,24,40,0.10) 100%
  );
}
.aa-results-page .aa-result-hero-card-pills {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.aa-results-page .aa-result-hero-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
}
.aa-results-page .aa-result-hero-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 5px;
}
.aa-results-page .aa-result-hero-card-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}
.aa-results-page .aa-result-hero-card-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.aa-results-page .aa-result-hero-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.90);
  font-weight: 600;
}

/* Recent events hero row supplements */
.aa-results-page .aa-result-hero-row {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.aa-results-page .aa-result-hero-card--placeholder {
  min-height: 220px; background: var(--aa-bg-alt);
}

/* Discipline pill (on cards) */
.aa-results-page .aa-disc-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(14,42,60,0.82);
  color: var(--aa-sky);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  backdrop-filter: blur(4px);
}
.aa-results-page .aa-disc-pill-light {
  background: rgba(149,217,254,0.15);
  border: 1px solid rgba(149,217,254,0.3);
  color: var(--aa-sky);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
}

/* Ad band */
.aa-results-page .aa-results-ad-band {
  background: var(--aa-bg-alt);
  padding: 20px 0;
}

/* ---- Results list page: sticky filter bar ---- */
.aa-results-page .aa-results-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.aa-results-page .aa-results-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aa-results-page .aa-results-filter-search-wrap {
  position: relative;
  flex: 1 1 200px;
}
.aa-results-page .aa-results-filter-search-wrap .fa {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--aa-muted);
  font-size: 14px;
  pointer-events: none;
}
.aa-results-page .aa-results-search {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--aa-body);
  background: var(--aa-bg-alt);
  transition: border-color .18s;
}
.aa-results-page .aa-results-search:focus { border-color: var(--aa-sky); background: #fff; outline: none; }
.aa-results-page .aa-results-filter-select {
  flex: 0 1 148px;
  padding: 8px 28px 8px 10px;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--aa-body);
  background: var(--aa-bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  transition: border-color .18s;
}
.aa-results-page .aa-results-filter-select:focus { border-color: var(--aa-sky); background-color: #fff; outline: none; }
.aa-results-page .aa-results-filter-count {
  font-size: 13px;
  color: var(--aa-muted);
  white-space: nowrap;
  margin-left: auto;
  font-weight: 500;
}

/* Active filter chips row */
.aa-results-page .aa-results-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
}
.aa-results-page .aa-results-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(149,217,254,0.15);
  border: 1px solid rgba(149,217,254,0.4);
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aa-navy);
}
.aa-results-page .aa-results-filter-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--aa-muted);
  padding: 0;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.aa-results-page .aa-results-filter-chip-remove:hover { color: #e53935; }

/* Search wrap variant */
.aa-results-page .aa-results-search-wrap {
  position: relative; flex: 1 1 200px;
}
.aa-results-page .aa-results-search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--aa-muted);
  font-size: 14px; pointer-events: none;
}
.aa-results-page .aa-results-search-input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--aa-border); border-radius: var(--aa-radius-sm);
  font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--aa-body); background: var(--aa-bg-alt); transition: border-color .18s;
}
.aa-results-page .aa-results-search-input:focus { border-color: var(--aa-sky); background: #fff; outline: none; }

/* Status chips (all / live / recent / archived) */
.aa-results-page .aa-results-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.aa-results-page .aa-results-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--aa-border);
  background: #fff; color: var(--aa-muted);
  font-family: 'Inter', sans-serif; transition: all .16s;
}
.aa-results-page .aa-results-chip:hover { border-color: var(--aa-sky); color: var(--aa-sky); }
.aa-results-page .aa-results-chip.is-active {
  background: var(--aa-navy); border-color: var(--aa-navy); color: #fff;
}
.aa-results-page .aa-results-select {
  flex: 0 1 148px; padding: 8px 28px 8px 10px;
  border: 1.5px solid var(--aa-border); border-radius: var(--aa-radius-sm);
  font-size: 13px; font-family: 'Inter', sans-serif;
  color: var(--aa-body);
  background: var(--aa-bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  transition: border-color .18s;
}
.aa-results-page .aa-results-select:focus { border-color: var(--aa-sky); background-color: #fff; outline: none; }

/* ---- Results list page: all-events grid + cards ---- */
.aa-results-page .aa-results-grid-section { padding: 28px 0 0; }
.aa-results-page .aa-results-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}
.aa-results-page .aa-results-grid-col { margin-bottom: 20px; }

.aa-results-page .aa-event-card {
  width: 33.333%;
  padding: 10px;
  display: block;
  text-decoration: none;
  color: inherit;
}
@media (max-width: 991px) { .aa-results-page .aa-event-card { width: 50%; } }
@media (max-width: 599px) { .aa-results-page .aa-event-card { width: 100%; } }

.aa-results-page .aa-event-card-inner {
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
}
.aa-results-page .aa-event-card:hover .aa-event-card-inner,
.aa-results-page .aa-event-card:focus .aa-event-card-inner {
  box-shadow: var(--aa-shadow-md);
  transform: translateY(-4px);
}
.aa-results-page .aa-event-card:focus { outline: none; }
.aa-results-page .aa-event-card:focus .aa-event-card-inner { outline: 3px solid var(--aa-sky); outline-offset: 2px; }

.aa-results-page .aa-event-card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--aa-bg-alt);
}
.aa-results-page .aa-event-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--aa-ease);
}
.aa-results-page .aa-event-card:hover .aa-event-card-img-wrap img { transform: scale(1.05); }
.aa-results-page .aa-event-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,24,40,0.55) 0%, transparent 60%);
}

.aa-results-page .aa-event-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aa-results-page .aa-event-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.aa-results-page .aa-event-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.aa-results-page .aa-event-card-date {
  font-size: 12px;
  color: var(--aa-muted);
}
.aa-results-page .aa-event-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--aa-border);
  font-size: 11px;
  color: var(--aa-muted);
  flex-wrap: wrap;
}
.aa-results-page .aa-event-card-footer-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Event result card variant (used in grid + related events) */
.aa-results-page .aa-event-result-card {
  background: var(--aa-bg-card); border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm); overflow: hidden;
  height: 100%; display: flex; flex-direction: column;
  transition: box-shadow .22s var(--aa-ease), transform .22s var(--aa-ease);
}
.aa-results-page .aa-event-result-card:hover { box-shadow: var(--aa-shadow-md); transform: translateY(-3px); }
.aa-results-page .aa-event-result-card-img-wrap {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: var(--aa-bg-alt); display: block; text-decoration: none;
}
.aa-results-page .aa-event-result-card-img-wrap .aa-status-pill {
  position: absolute; top: 10px; left: 10px;
}
.aa-results-page .aa-event-result-card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s var(--aa-ease);
}
.aa-results-page .aa-event-result-card-img-wrap:hover .aa-event-result-card-img { transform: scale(1.05); }
.aa-results-page .aa-event-result-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.aa-results-page .aa-event-result-card-meta { font-size: 11px; color: var(--aa-muted); font-weight: 500; }
.aa-results-page .aa-event-result-card-title {
  font-family: 'Poppins', sans-serif; font-size: 14px;
  font-weight: 700; color: var(--aa-navy); line-height: 1.3; margin: 0;
}
.aa-results-page .aa-event-result-card-title a { color: inherit; text-decoration: none; }
.aa-results-page .aa-event-result-card-title a:hover { color: var(--aa-sky); }
.aa-results-page .aa-event-result-card-dates { font-size: 12px; color: var(--aa-muted); }
.aa-results-page .aa-event-result-card-stats {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto;
  padding-top: 8px; border-top: 1px solid var(--aa-border);
}
.aa-results-page .aa-erc-stat { font-size: 11px; color: var(--aa-muted); display: flex; align-items: center; gap: 3px; }
.aa-results-page .aa-erc-stat strong { color: var(--aa-navy); }

/* ---- Results list page: empty state + pagination ---- */
.aa-results-page .aa-results-empty {
  width: 100%;
  padding: 60px 20px;
  text-align: center;
  color: var(--aa-muted);
}
.aa-results-page .aa-results-empty .fa { font-size: 40px; margin-bottom: 14px; display: block; opacity: 0.5; }

.aa-results-page .aa-results-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 40px;
  flex-wrap: wrap;
}
/* Phase 7D polish: override Laravel's Bootstrap-3 pagination markup
   (<ul class="pagination">) to match the AA design system. Mirrors
   the athletes-page pagination block above. */
.aa-results-page .aa-results-pagination ul.pagination,
.aa-results-page .aa-results-pagination nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.aa-results-page .aa-results-pagination li,
.aa-results-page .aa-results-pagination span,
.aa-results-page .aa-results-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aa-results-page .aa-results-pagination a,
.aa-results-page .aa-results-pagination span.page-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  background: #fff;
  color: var(--aa-navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.aa-results-page .aa-results-pagination a:hover {
  background: var(--aa-bg-alt);
  border-color: var(--aa-sky);
}
.aa-results-page .aa-results-pagination .active span,
.aa-results-page .aa-results-pagination .active a {
  background: var(--aa-sky);
  color: #fff;
  border-color: var(--aa-sky);
}
.aa-results-page .aa-results-pagination .disabled span {
  color: var(--aa-muted);
  background: var(--aa-bg-alt);
  cursor: not-allowed;
}

/* ---- Results list page: records teaser ---- */
.aa-results-page .aa-results-records-section {
  background: var(--aa-bg-alt);
  padding: 52px 0 48px;
}
.aa-results-page .aa-results-records-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.aa-results-page .aa-results-record-card {
  flex: 1 1 200px;
  background: var(--aa-bg-card);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 16px;
  border-top: 3px solid var(--aa-sky);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .22s, transform .22s;
}
.aa-results-page .aa-results-record-card:hover { box-shadow: var(--aa-shadow-md); transform: translateY(-3px); }
.aa-results-page .aa-results-record-card-tier {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.aa-results-page .aa-results-record-card-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1;
  margin-bottom: 5px;
}
.aa-results-page .aa-results-record-card-athlete {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-body);
  margin-bottom: 2px;
}
.aa-results-page .aa-results-record-card-event {
  font-size: 11px;
  color: var(--aa-muted);
}

/* Records teaser band */
.aa-results-page .aa-results-records-teaser {
  background: var(--aa-navy); padding: 36px 0;
}
.aa-results-page .aa-results-records-teaser-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; color: #fff;
}
.aa-results-page .aa-results-records-teaser-text {
  display: flex; align-items: center; gap: 18px; flex: 1;
}
.aa-results-page .aa-results-records-icon { font-size: 36px; color: var(--aa-sky); flex-shrink: 0; }
.aa-results-page .aa-results-records-title {
  font-family: 'Poppins', sans-serif; font-size: 22px;
  font-weight: 700; color: #fff; margin: 0 0 4px;
}
.aa-results-page .aa-results-records-sub { font-size: 14px; color: rgba(255,255,255,0.72); margin: 0; }

/* ---- Detail page: breadcrumb + hero ---- */
.aa-result-detail-page .aa-breadcrumb-bar {
  background: var(--aa-navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0;
}
.aa-result-detail-page .aa-breadcrumb {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
  font-size: 12px; color: rgba(255,255,255,0.5);
}
.aa-result-detail-page .aa-breadcrumb li { display: flex; align-items: center; gap: 5px; }
.aa-result-detail-page .aa-breadcrumb li + li::before { content: '/'; opacity: 0.4; }
.aa-result-detail-page .aa-breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; }
.aa-result-detail-page .aa-breadcrumb a:hover { color: var(--aa-sky); }
.aa-result-detail-page .aa-breadcrumb [aria-current] { color: rgba(255,255,255,0.85); }

.aa-result-detail-page .aa-rdetail-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--aa-navy);
}
.aa-result-detail-page .aa-rdetail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(0.3);
  transform: scale(1.06); /* prevent blur edges */
}
.aa-result-detail-page .aa-rdetail-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14,42,60,0.68);
}
.aa-result-detail-page .aa-rdetail-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 44px 0 40px;
  color: #fff;
}
.aa-result-detail-page .aa-rdetail-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.aa-result-detail-page .aa-rdetail-hero-breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color .18s; }
.aa-result-detail-page .aa-rdetail-hero-breadcrumb a:hover { color: var(--aa-sky); }
.aa-result-detail-page .aa-rdetail-hero-breadcrumb-sep { opacity: 0.4; }
.aa-result-detail-page .aa-rdetail-hero-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.aa-result-detail-page .aa-rdetail-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.1;
}
.aa-result-detail-page .aa-rdetail-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
}
.aa-result-detail-page .aa-rdetail-hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  max-width: 680px;
  line-height: 1.65;
  margin: 0;
}

/* Event hero — inner layout supplements */
.aa-result-detail-page .aa-rdetail-hero-inner {
  position: relative; z-index: 1;
  padding: 44px 0 70px; color: #fff; width: 100%;
}
.aa-result-detail-page .aa-rdetail-hero-top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.aa-result-detail-page .aa-rdetail-hero-badges {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.aa-result-detail-page .aa-rdetail-hero-disc {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px; padding: 2px 10px;
}
.aa-result-detail-page .aa-rdetail-hero-subtitle {
  font-size: 14px; color: rgba(255,255,255,0.7); margin: 0 0 16px;
}
.aa-result-detail-page .aa-rdetail-hero-stats {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px;
}
.aa-result-detail-page .aa-rdetail-hero-stats span {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px; padding: 4px 13px;
  font-size: 12px; color: rgba(255,255,255,0.85);
}
.aa-result-detail-page .aa-rdetail-hero-stats strong { color: var(--aa-sky); font-family: 'JetBrains Mono', monospace; }

/* result-details.html — wave on the blurred-photo hero (no .aa-hero class) */
.aa-result-detail-page .aa-rdetail-hero { min-height: 280px; } /* harmonise with other utility heroes */
.aa-result-detail-page .aa-rdetail-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56'%3E%3Cpath fill='%23ffffff' d='M0,28L60,24.5C120,21,240,14,360,18.7C480,23,600,39,720,42C840,45,960,35,1080,29.2C1200,23,1320,21,1380,20L1440,19L1440,56L1380,56C1320,56,1200,56,1080,56C960,56,840,56,720,56C600,56,480,56,360,56C240,56,120,56,60,56L0,56Z'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
/* Raise result-details content above the wave pseudo-element */
.aa-result-detail-page .aa-rdetail-hero-inner { z-index: 2; }

/* ---- Detail page: meta bar + race tabs ---- */
.aa-result-detail-page .aa-rdetail-meta-bar {
  background: #0a3d5c;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.aa-result-detail-page .aa-rdetail-meta-bar-inner {
  display: flex;
  flex-wrap: wrap;
}
.aa-result-detail-page .aa-rdetail-meta-tile {
  flex: 1 0 100px;
  text-align: center;
  padding: 16px 10px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.aa-result-detail-page .aa-rdetail-meta-tile:last-child { border-right: none; }
.aa-result-detail-page .aa-rdetail-meta-tile-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--aa-sky);
  line-height: 1;
}
.aa-result-detail-page .aa-rdetail-meta-tile-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
  font-weight: 600;
}

/* Race navigation (tabs) */
.aa-result-detail-page .aa-race-nav-wrap {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  position: sticky;
  top: 0;
  z-index: 88;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.aa-result-detail-page .aa-race-nav-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 6px;
  gap: 12px;
}
.aa-result-detail-page .aa-show-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-muted);
  background: none;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  padding: 5px 12px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.aa-result-detail-page .aa-show-all-toggle:hover { border-color: var(--aa-sky); color: var(--aa-sky); }
.aa-result-detail-page .aa-show-all-toggle.is-active {
  background: var(--aa-navy);
  border-color: var(--aa-navy);
  color: #fff;
}
.aa-result-detail-page .aa-race-tabs-scroll {
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.aa-result-detail-page .aa-race-tabs-scroll::-webkit-scrollbar { display: none; }
.aa-result-detail-page .aa-race-tablist {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  min-width: min-content;
}
.aa-result-detail-page .aa-race-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--aa-border);
  background: #fff;
  color: var(--aa-body);
  transition: all .18s var(--aa-ease);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.aa-result-detail-page .aa-race-tab:hover { border-color: var(--aa-sky); color: var(--aa-sky); }
.aa-result-detail-page .aa-race-tab[aria-selected="true"] {
  background: var(--aa-navy);
  border-color: var(--aa-navy);
  color: #fff;
}
.aa-result-detail-page .aa-race-tab-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--aa-sky);
  background: transparent;
  color: var(--aa-sky);
  position: relative;
  font-family: 'Inter', sans-serif;
}
.aa-result-detail-page .aa-race-tab-more-btn:hover { background: var(--aa-sky); color: #fff; }
.aa-result-detail-page .aa-race-tab-overflow-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-md);
  z-index: 200;
  min-width: 200px;
  padding: 6px 0;
  display: none;
}
.aa-result-detail-page .aa-race-tab-overflow-menu.is-open { display: block; }
.aa-result-detail-page .aa-race-tab-overflow-item {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--aa-body);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background .15s;
  font-family: 'Inter', sans-serif;
}
.aa-result-detail-page .aa-race-tab-overflow-item:hover { background: var(--aa-bg-alt); }
.aa-result-detail-page .aa-race-tab-overflow-item[aria-selected="true"] { color: var(--aa-sky); font-weight: 700; }

/* Race nav additions */
.aa-result-detail-page .aa-race-nav-inner { display: flex; align-items: center; padding: 10px 0 6px; }
.aa-result-detail-page .aa-race-tabs-wrap {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.aa-result-detail-page .aa-race-tabs-wrap::-webkit-scrollbar { display: none; }

/* .is-active alias for aria-selected tab */
.aa-result-detail-page .aa-race-tab.is-active,
.aa-result-detail-page .aa-race-tab[aria-selected="true"] {
  background: var(--aa-navy); border-color: var(--aa-navy); color: #fff;
}

/* Record badge inside a race tab */
.aa-result-detail-page .aa-race-tab-record {
  display: inline-block; font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--aa-sky); color: var(--aa-navy); margin-left: 4px;
}

/* Overflow wrap */
.aa-result-detail-page .aa-race-tab-overflow-wrap { position: relative; }
.aa-result-detail-page .aa-race-tab-more {
  /* inherits .aa-race-tab styles */
  border-color: var(--aa-sky); color: var(--aa-sky); font-size: 12px;
}
.aa-result-detail-page .aa-race-tab-more:hover { background: var(--aa-sky); color: #fff; border-color: var(--aa-sky); }

/* Phase 7D polish: race picker bar — alternative to horizontal tab strip.
   Sticky to top, clean single bar. Shows active race + select dropdown
   for switching + prev/next navigation. Handles 200+ races gracefully. */
.aa-result-detail-page .aa-race-picker-bar {
  background: #fff;
  border-bottom: 1px solid var(--aa-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.aa-result-detail-page .aa-race-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.aa-result-detail-page .aa-race-picker-current {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aa-result-detail-page .aa-race-picker-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--aa-muted);
  font-weight: 600;
}
.aa-result-detail-page .aa-race-picker-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aa-result-detail-page .aa-race-picker-count {
  font-size: 11px;
  color: var(--aa-muted);
}
.aa-result-detail-page .aa-race-picker-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.aa-result-detail-page .aa-race-picker-select {
  min-width: 240px;
  max-width: 360px;
  height: 38px;
  padding: 0 32px 0 12px;
  background: var(--aa-bg-alt) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%230e2a3c' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 12px center / 10px 7px;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  color: var(--aa-navy);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.aa-result-detail-page .aa-race-picker-select:focus {
  outline: none;
  border-color: var(--aa-sky);
  background-color: #fff;
}
.aa-result-detail-page .aa-race-picker-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  color: var(--aa-navy);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.aa-result-detail-page .aa-race-picker-btn:hover {
  border-color: var(--aa-sky);
  color: var(--aa-sky);
}
.aa-result-detail-page .aa-race-picker-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 767px) {
  .aa-result-detail-page .aa-race-picker { gap: 10px; }
  .aa-result-detail-page .aa-race-picker-controls { width: 100%; }
  .aa-result-detail-page .aa-race-picker-select { flex: 1; min-width: 0; }
}

/* Race context card */
.aa-result-detail-page .aa-race-context-section { padding: 24px 0 0; }
.aa-result-detail-page .aa-race-context-card {
  background: var(--aa-bg-alt);
  border-radius: var(--aa-radius-md);
  border-left: 4px solid var(--aa-sky);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.aa-result-detail-page .aa-race-context-info { flex: 1; min-width: 0; }
.aa-result-detail-page .aa-race-context-title {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0 0 4px;
}
.aa-result-detail-page .aa-race-context-sub {
  font-size: 12px;
  color: var(--aa-muted);
  margin-bottom: 12px;
}
.aa-result-detail-page .aa-race-context-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.aa-result-detail-page .aa-race-context-stat {
  display: flex;
  flex-direction: column;
}
.aa-result-detail-page .aa-race-context-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--aa-navy);
}
.aa-result-detail-page .aa-race-context-stat-label {
  font-size: 10px;
  color: var(--aa-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}
.aa-result-detail-page .aa-race-context-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #e53935;
  color: #fff;
  border-radius: var(--aa-radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .18s;
  white-space: nowrap;
  align-self: center;
}
.aa-result-detail-page .aa-race-context-watch:hover { opacity: 0.87; color: #fff; }

/* Race context card inner layout (populated by JS) */
.aa-result-detail-page .aa-race-context-label {
  font-family: 'Poppins', sans-serif; font-size: 16px;
  font-weight: 700; color: var(--aa-navy); margin-bottom: 6px;
}
.aa-result-detail-page .aa-race-context-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--aa-muted); margin-bottom: 12px;
}
.aa-result-detail-page .aa-race-context-meta span {
  display: inline-flex; align-items: center; gap: 4px;
}
.aa-result-detail-page .aa-race-context-meta span::before {
  content: '·'; margin-right: 2px; opacity: 0.4;
}
.aa-result-detail-page .aa-race-context-meta span:first-child::before { display: none; }
.aa-result-detail-page .aa-race-context-stats span {
  font-size: 13px; color: var(--aa-muted);
}
.aa-result-detail-page .aa-race-context-stats strong {
  color: var(--aa-navy); font-family: 'JetBrains Mono', monospace;
  font-size: 15px; font-weight: 700;
}
.aa-result-detail-page .aa-race-context-actions { margin-top: 12px; }

/* ---- Detail page: results table + medal/score/diff ---- */
.aa-result-detail-page .aa-rdetail-results-section { padding: 0 0 32px; }
.aa-result-detail-page .aa-rdetail-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.aa-result-detail-page .aa-rdetail-table-count {
  font-size: 13px;
  color: var(--aa-muted);
  font-weight: 500;
}
.aa-result-detail-page .aa-rdetail-table-controls {
  display: flex;
  gap: 8px;
}
.aa-result-detail-page .aa-rdetail-table-select {
  padding: 6px 26px 6px 10px;
  border: 1.5px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--aa-body);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 8px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.aa-result-detail-page .aa-rdetail-table-select:focus { border-color: var(--aa-sky); outline: none; }

/* Results table */
.aa-result-detail-page .aa-rdetail-table-wrap {
  overflow-x: auto;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
}
.aa-result-detail-page .aa-rdetail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  min-width: 540px;
}
.aa-result-detail-page .aa-rdetail-table caption {
  caption-side: top;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.aa-result-detail-page .aa-rdetail-table th {
  background: var(--aa-navy);
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
.aa-result-detail-page .aa-rdetail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--aa-border);
  color: var(--aa-body);
  vertical-align: middle;
}
.aa-result-detail-page .aa-rdetail-table tr:last-child td { border-bottom: none; }

/* Medal row treatments */
.aa-result-detail-page .aa-rdetail-row-1 td:first-child { border-left: 3px solid #ffd700; }
.aa-result-detail-page .aa-rdetail-row-2 td:first-child { border-left: 3px solid #c0c0c0; }
.aa-result-detail-page .aa-rdetail-row-3 td:first-child { border-left: 3px solid #cd7f32; }

/* Row hover + athlete link affordance */
.aa-result-detail-page .aa-rdetail-table tbody tr {
  cursor: pointer;
  transition: background .14s;
}
.aa-result-detail-page .aa-rdetail-table tbody tr:hover { background: rgba(149,217,254,0.07); }
.aa-result-detail-page .aa-rdetail-view-athlete {
  display: none;
  font-size: 10px;
  color: var(--aa-sky);
  font-weight: 600;
  margin-left: 6px;
}
.aa-result-detail-page .aa-rdetail-table tbody tr:hover .aa-rdetail-view-athlete { display: inline; }

/* Rank cell */
.aa-result-detail-page .aa-rdetail-rank-cell {
  font-weight: 700;
  color: var(--aa-navy);
  white-space: nowrap;
}
.aa-result-detail-page .aa-rdetail-medal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}
.aa-result-detail-page .aa-rdetail-medal-1 { background: #ffd700; color: #5a4000; }
.aa-result-detail-page .aa-rdetail-medal-2 { background: #c0c0c0; color: #333; }
.aa-result-detail-page .aa-rdetail-medal-3 { background: #cd7f32; color: #fff; }
.aa-result-detail-page .aa-sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Athlete cell */
.aa-result-detail-page .aa-rdetail-athlete-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.aa-result-detail-page .aa-rdetail-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aa-result-detail-page .aa-rdetail-athlete-name {
  font-weight: 600;
  color: var(--aa-navy);
  line-height: 1.2;
}
.aa-result-detail-page .aa-rdetail-athlete-code {
  font-size: 10px;
  color: var(--aa-muted);
  margin-top: 1px;
}

/* Athlete cell (alternative) */
.aa-result-detail-page .aa-rdetail-athlete {
  display: flex; align-items: center; gap: 8px; min-width: 140px;
}
.aa-result-detail-page .aa-rdetail-athlete-meta {
  font-size: 10px; color: var(--aa-muted); margin-top: 1px;
}
.aa-result-detail-page .aa-time-cell {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  color: var(--aa-navy); white-space: nowrap;
}
.aa-result-detail-page .aa-score-cell {
  font-family: 'JetBrains Mono', monospace; font-size: 16px;
  font-weight: 700; color: var(--aa-navy); white-space: nowrap;
}
.aa-result-detail-page .aa-rec-cell { font-size: 12px; color: var(--aa-muted); }

/* Seed time delta */
.aa-result-detail-page .aa-seed-delta {
  display: inline-block; font-size: 10px; font-weight: 600;
  margin-left: 4px; font-family: 'JetBrains Mono', monospace;
}
.aa-result-detail-page .aa-delta-fast { color: var(--aa-green); }
.aa-result-detail-page .aa-delta-slow { color: #e53935; }

/* Time cell */
.aa-result-detail-page .aa-rdetail-time {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--aa-navy);
  font-size: 14px;
  white-space: nowrap;
}
.aa-result-detail-page .aa-rdetail-seed {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--aa-muted);
  display: block;
  margin-top: 2px;
}
.aa-result-detail-page .aa-rdetail-delta-fast { color: var(--aa-green); font-size: 10px; }
.aa-result-detail-page .aa-rdetail-delta-slow { color: #e53935; font-size: 10px; }

/* Score cell (water polo) */
.aa-result-detail-page .aa-rdetail-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--aa-navy);
  white-space: nowrap;
}
.aa-result-detail-page .aa-rdetail-diff-pos { color: var(--aa-green); font-weight: 700; }
.aa-result-detail-page .aa-rdetail-diff-neg { color: #e53935; font-weight: 700; }

/* Team cell */
.aa-result-detail-page .aa-rdetail-team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.aa-result-detail-page .aa-rdetail-team-crest {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* Record badges (inline on time) */
.aa-result-detail-page .aa-rdetail-rec-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}
.aa-result-detail-page .aa-rdetail-rec-WR { background: #e53935; color: #fff; }
.aa-result-detail-page .aa-rdetail-rec-AR { background: var(--aa-navy); color: var(--aa-sky); }
.aa-result-detail-page .aa-rdetail-rec-ZR { background: var(--aa-green); color: #fff; }

/* AR/WR column cells for key=0 */
.aa-result-detail-page .aa-rdetail-rec-col-held { color: var(--aa-navy); font-weight: 700; }
.aa-result-detail-page .aa-rdetail-rec-col-other { color: var(--aa-muted); font-size: 12px; }

/* Empty state */
.aa-result-detail-page .aa-rdetail-empty {
  text-align: center; padding: 50px 20px; color: var(--aa-muted);
}
.aa-result-detail-page .aa-rdetail-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; opacity: 0.4; }

/* Pagination on result details */
.aa-result-detail-page .aa-rdetail-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 0 32px;
  flex-wrap: wrap;
}

/* ---- Detail page: results mobile card list ---- */
.aa-result-detail-page .aa-rdetail-mobile-card {
  background: #fff;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: box-shadow .18s;
}
.aa-result-detail-page .aa-rdetail-mobile-card:hover { box-shadow: var(--aa-shadow-md); }
.aa-result-detail-page .aa-rdetail-mobile-card.rank-1 { border-left-color: #ffd700; }
.aa-result-detail-page .aa-rdetail-mobile-card.rank-2 { border-left-color: #c0c0c0; }
.aa-result-detail-page .aa-rdetail-mobile-card.rank-3 { border-left-color: #cd7f32; }
.aa-result-detail-page .aa-rdetail-mobile-rank {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--aa-navy);
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.aa-result-detail-page .aa-rdetail-mobile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aa-result-detail-page .aa-rdetail-mobile-info { flex: 1; min-width: 0; }
.aa-result-detail-page .aa-rdetail-mobile-name { font-weight: 600; font-size: 14px; color: var(--aa-navy); }
.aa-result-detail-page .aa-rdetail-mobile-team { font-size: 11px; color: var(--aa-muted); margin-top: 1px; }
.aa-result-detail-page .aa-rdetail-mobile-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--aa-navy);
  text-align: right;
  flex-shrink: 0;
}

/* Water polo mobile match cards */
.aa-result-detail-page .aa-polo-mobile-card {
  background: #fff;
  border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.aa-result-detail-page .aa-polo-mobile-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.aa-result-detail-page .aa-polo-mobile-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-navy);
  flex: 1;
  text-align: center;
}
.aa-result-detail-page .aa-polo-mobile-team-flag { font-size: 24px; }
.aa-result-detail-page .aa-polo-mobile-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--aa-navy);
  text-align: center;
  flex: 0 0 auto;
  padding: 0 10px;
}

/* Mobile card parts (rdmc = result details mobile card) */
.aa-result-detail-page .aa-rdmc-rank {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 15px; color: var(--aa-navy);
  min-width: 22px; text-align: center; flex-shrink: 0;
}
.aa-result-detail-page .aa-rdmc-body { flex: 1; min-width: 0; }
.aa-result-detail-page .aa-rdmc-athlete {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.aa-result-detail-page .aa-rdmc-meta { font-size: 11px; color: var(--aa-muted); margin-top: 1px; }
.aa-result-detail-page .aa-rdmc-time {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  font-weight: 700; color: var(--aa-navy); margin-top: 4px;
}
.aa-result-detail-page .aa-rdmc-teams {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--aa-body);
}
.aa-result-detail-page .aa-rdmc-vs { font-size: 11px; color: var(--aa-muted); font-weight: 600; }
.aa-result-detail-page .aa-rdmc-score {
  font-family: 'JetBrains Mono', monospace; font-size: 18px;
  font-weight: 700; color: var(--aa-navy); margin-top: 4px;
}

/* ---- Detail page: records broken section ---- */
.aa-result-detail-page .aa-rdetail-records-section { padding: 44px 0 40px; }

.aa-result-detail-page .aa-records-broken-section {
  margin-top: 24px; margin-bottom: 8px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: var(--aa-radius-md); padding: 16px 18px;
}
.aa-result-detail-page .aa-records-broken-head {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: 14px;
  font-weight: 700; color: var(--aa-navy); margin-bottom: 12px;
}
.aa-result-detail-page .aa-records-broken-head .fa { color: #f5a623; }
.aa-result-detail-page .aa-records-broken-list { display: flex; flex-direction: column; gap: 8px; }
.aa-result-detail-page .aa-record-broken-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; flex-wrap: wrap;
}
.aa-result-detail-page .aa-rec-broken-name { font-weight: 600; color: var(--aa-navy); flex: 1; }
.aa-result-detail-page .aa-rec-broken-country { color: var(--aa-muted); font-size: 12px; }
.aa-result-detail-page .aa-rec-broken-time {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  color: var(--aa-navy); font-size: 13px;
}

/* ---- Detail page: sidebar cards + related events ---- */
.aa-result-detail-page .aa-rdetail-related-section {
  background: var(--aa-bg-alt);
  padding: 52px 0 48px;
}

/* Section header flex (used on detail page for related events) */
.aa-result-detail-page .aa-results-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}
.aa-result-detail-page .aa-results-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--aa-navy);
  margin: 0;
}
.aa-result-detail-page .aa-results-section-sub {
  font-size: 14px;
  color: var(--aa-muted);
  margin: 4px 0 0;
}
.aa-result-detail-page .aa-results-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--aa-sky);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s;
}
.aa-result-detail-page .aa-results-view-all:hover { color: var(--aa-navy); }

/* Sidebar cards */
.aa-result-detail-page .aa-rdetail-sidebar-card {
  background: var(--aa-bg-card); border-radius: var(--aa-radius-md);
  box-shadow: var(--aa-shadow-sm); padding: 16px 18px;
  margin-bottom: 18px;
}
.aa-result-detail-page .aa-rdetail-sidebar-title {
  font-family: 'Poppins', sans-serif; font-size: 13px;
  font-weight: 700; color: var(--aa-navy); margin: 0 0 12px;
  display: flex; align-items: center; gap: 6px;
}
.aa-result-detail-page .aa-rdetail-sidebar-links {
  list-style: none; margin: 0 0 4px; padding: 0;
}
.aa-result-detail-page .aa-rdetail-sidebar-links li { border-bottom: 1px solid var(--aa-border); }
.aa-result-detail-page .aa-rdetail-sidebar-links li:last-child { border-bottom: none; }
.aa-result-detail-page .aa-rdetail-sidebar-links a {
  display: block; padding: 7px 0; font-size: 13px;
  color: var(--aa-body); text-decoration: none;
  transition: color .16s;
}
.aa-result-detail-page .aa-rdetail-sidebar-links a:hover { color: var(--aa-sky); }

/* Record key legend */
.aa-result-detail-page .aa-rdetail-record-legend {
  display: flex; flex-direction: column; gap: 7px; font-size: 13px;
}
.aa-result-detail-page .aa-rdetail-record-legend div {
  display: flex; align-items: center; gap: 8px; color: var(--aa-body);
}

/* Related events alternative wrapper */
.aa-result-detail-page .aa-related-events-section {
  background: var(--aa-bg-alt); padding: 52px 0 48px;
}

/* Phase 7D polish: related-events grid sized to match the
   "More Athletes" / related-news pattern from earlier phases —
   4 compact cards per row, not the full-width 3-up grid the list
   page uses. */
.aa-result-detail-page .aa-related-events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.aa-result-detail-page .aa-related-event-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--aa-ease),
              box-shadow .2s var(--aa-ease),
              border-color .2s var(--aa-ease);
}
.aa-result-detail-page .aa-related-event-card:hover,
.aa-result-detail-page .aa-related-event-card:focus {
  transform: translateY(-2px);
  box-shadow: var(--aa-shadow-md);
  border-color: var(--aa-sky);
  outline: none;
}
.aa-result-detail-page .aa-related-event-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--aa-bg-alt);
}
.aa-result-detail-page .aa-related-event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--aa-ease);
}
.aa-result-detail-page .aa-related-event-card:hover .aa-related-event-img img {
  transform: scale(1.05);
}
.aa-result-detail-page .aa-related-event-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aa-result-detail-page .aa-related-event-title {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--aa-navy);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.aa-result-detail-page .aa-related-event-meta {
  font-size: 11px;
  color: var(--aa-muted);
  margin: 0;
  line-height: 1.4;
}
@media (max-width: 991px) {
  .aa-result-detail-page .aa-related-events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 479px) {
  .aa-result-detail-page .aa-related-events-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Mobile @media (≤767px) ---- */
@media (max-width: 767px) {
  /* List page */
  .aa-results-page .aa-results-hero-inner { padding: 36px 0 32px; }
  .aa-results-page .aa-results-hero-stats { justify-content: center; width: 100%; }
  .aa-results-page .aa-results-records-teaser-inner { flex-direction: column; text-align: center; }
  .aa-results-page .aa-results-records-teaser-text { flex-direction: column; }

  /* Detail page — meta tiles wrap to 3-up grid */
  .aa-result-detail-page .aa-rdetail-meta-tile {
    flex: 0 0 33.333%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .aa-result-detail-page .aa-rdetail-meta-tile:nth-child(3n) { border-right: none; }

  /* Detail page — hero top stacks */
  .aa-result-detail-page .aa-rdetail-hero-top { flex-direction: column; align-items: flex-start; }
  .aa-result-detail-page .aa-rdetail-sidebar-card { margin-top: 0; }

  /* Detail page — table swaps to mobile card list */
  .aa-result-detail-page .aa-rdetail-table-wrap { display: none; }
  .aa-result-detail-page .aa-rdetail-mobile-list { display: flex; flex-direction: column; gap: 8px; }
}
@media (min-width: 768px) {
  .aa-result-detail-page .aa-rdetail-mobile-list { display: none; }
}

/* ================================================================
   PHASE 8E — RECORDS PAGE TILE VIEW
   ================================================================
   Adds a third view mode (Tiles) alongside the Phase 3B Table/Card
   pair. Visibility for all three views is coordinated by an
   `is-view-{tile|card|table}` class on `.aa-records-page` set by
   aa-records.js setActiveView(). The 3-class selector beats every
   Phase 3B rule on specificity, including the mobile media-query
   swap at line ~3935 — so visibility is consistent across viewports.
   ================================================================ */

/* View-visibility coordination ----------------------------------- */
.aa-records-page.is-view-tile  .aa-records-tiles      { display: grid; }
.aa-records-page.is-view-tile  .aa-records-cards      { display: none; }
.aa-records-page.is-view-tile  .aa-records-table-wrap { display: none; }

.aa-records-page.is-view-card  .aa-records-cards      { display: grid; }
.aa-records-page.is-view-card  .aa-records-tiles      { display: none; }
.aa-records-page.is-view-card  .aa-records-table-wrap { display: none; }

.aa-records-page.is-view-table .aa-records-table-wrap { display: block; }
.aa-records-page.is-view-table .aa-records-tiles      { display: none; }
.aa-records-page.is-view-table .aa-records-cards      { display: none; }

/* Tile grid container -------------------------------------------- */
.aa-records-page .aa-records-tiles {
  display: none;                       /* enabled by wrapper class */
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Tile card base ------------------------------------------------- */
.aa-records-page .aa-record-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 20px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
  box-shadow: var(--aa-shadow-sm);
  font-family: inherit;
  text-align: left;
}
.aa-records-page .aa-record-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--aa-shadow-md);
  filter: brightness(1.05);
}
.aa-records-page .aa-record-tile:focus {
  outline: 2px solid var(--aa-sky, #38bdf8);
  outline-offset: 2px;
}

/* Tier color variants ------------------------------------------- */
.aa-records-page .aa-record-tile--wr {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
  color: #fff;
}
.aa-records-page .aa-record-tile--ar {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
}
.aa-records-page .aa-record-tile--nr {
  background: #fff;
  color: var(--aa-navy);
  border: 1.5px solid #93c5fd;
}
.aa-records-page .aa-record-tile--nr:hover {
  filter: none;
  box-shadow: 0 8px 20px rgba(30,64,175,0.18);
}
.aa-records-page .aa-record-tile--zr {
  background: linear-gradient(135deg, #cbd5e1 0%, #64748b 100%);
  color: #fff;
}
.aa-records-page .aa-record-tile--mr {
  background: linear-gradient(135deg, #fb923c 0%, #9a3412 100%);
  color: #fff;
}

/* Tile inner sections ------------------------------------------- */
.aa-records-page .aa-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.aa-records-page .aa-tile-year {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.5px;
}
.aa-records-page .aa-tile-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
  min-width: 0;
}
.aa-records-page .aa-tile-time {
  font-family: var(--aa-font-mono, 'JetBrains Mono', 'Courier New', monospace);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  word-break: break-all;
}
.aa-records-page .aa-tile-event {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.3;
}
.aa-records-page .aa-tile-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.aa-records-page .aa-tile-holder {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.aa-records-page .aa-tile-country {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.88;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.aa-records-page .aa-tile-flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.4);
}
.aa-records-page .aa-record-tile--nr .aa-tile-flag {
  border-color: rgba(0,0,0,0.1);
}
.aa-records-page .aa-tile-meet {
  font-size: 11px;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tier badge inside tiles — invert white-on-color for contrast */
.aa-records-page .aa-record-tile--wr .aa-tier-badge,
.aa-records-page .aa-record-tile--ar .aa-tier-badge,
.aa-records-page .aa-record-tile--zr .aa-tier-badge,
.aa-records-page .aa-record-tile--mr .aa-tier-badge {
  background: rgba(255,255,255,0.95);
  color: var(--aa-navy);
  border: none;
}

/* Video indicator (bottom-right pill) --------------------------- */
.aa-records-page .aa-tile-video-indicator {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  pointer-events: none;
  z-index: 2;
}
.aa-records-page .aa-record-tile--nr .aa-tile-video-indicator {
  background: var(--aa-navy);
}

/* Empty state inside tiles container */
.aa-records-page .aa-records-tiles .aa-empty-state {
  grid-column: 1 / -1;
}

/* Responsive tile grid ------------------------------------------ */
@media (max-width: 1199px) {
  .aa-records-page .aa-records-tiles { grid-template-columns: repeat(3, 1fr); }
  .aa-records-page .aa-tile-time     { font-size: 36px; }
}
@media (max-width: 767px) {
  .aa-records-page .aa-records-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .aa-records-page .aa-record-tile   { padding: 16px; }
  .aa-records-page .aa-tile-time     { font-size: 28px; }
  .aa-records-page .aa-tile-event    { font-size: 12px; }
  .aa-records-page .aa-tile-holder   { font-size: 14px; }
}
@media (max-width: 479px) {
  .aa-records-page .aa-records-tiles { grid-template-columns: 1fr; }
  .aa-records-page .aa-record-tile   { aspect-ratio: 4 / 3; }
  .aa-records-page .aa-tile-time     { font-size: 36px; }
}