/* ========================================
   LAVENDER PALETTE - CSS VARIABLES
   ======================================== */
:root {
  /* Color Palette */
  --lavender-main: #D8D4E6;
  --lavender-light: #EBE9F5;
  --lavender-dark: #B6B1CA;
  --surface: #F9F9FC;
  --slate: #696285;
  --carbon: #1D1D1F;
  --platinum: #F5F5F7;

  /* Accent (low-saturation mint) */
  /* Tuned to stay low-sat but avoid washing out on the lavender-tinted background */
  --mint-light: #BFD9CF;
  --mint-mid: #9FC2B4;
  --mint-dark: #4E776B;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", Times, serif;

  /* Spacing */
  --spacing-xl: 120px;
  --spacing-lg: 80px;
  --spacing-md: 40px;
  --spacing-sm: 24px;
}

/* ========================================
   GLOBAL OVERRIDES
   ======================================== */

/* Hide Bootstrap's default navbar */
.navbar.navbar-default {
  display: none !important;
}

/* Global body styles */
body {
  font-family: var(--font-sans);
  color: var(--carbon);
  background: var(--surface);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  padding-top: 60px;
  overflow-x: hidden; /* prevent horizontal drag bar from layout calc/gutters */
}

/* Site root homepage: hide theme footer attribution ("Documentation built with MkDocs.") */
html.rp-site-home footer.col-md-12 {
  display: none !important;
}

/* Typography: serif headings + sans body */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
}

/* Keep UI chrome sans */
.apple-navbar,
.apple-navbar * {
  font-family: var(--font-sans);
}

/* Homepage - no sidebar, full width */
.real-homepage .bs-sidebar,
.real-homepage .col-md-3 {
  display: none !important;
}

/* IMPORTANT: `content-wrapper` is inserted as a direct child of Bootstrap `.row` (a flex container).
   If we don't force it to take the full row width, the whole homepage can appear "stuck on the left"
   with a large blank area on the right. */
.content-wrapper.real-homepage {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 100%;
  min-width: 0;
}

/* Homepage + Leaderboard: scaled-desktop mode (content only).
   When <768px, we keep a 768px desktop layout and scale it down to fit the screen. */
.content-wrapper.rp-scale-outer {
  /* `content-wrapper` is a direct child of Bootstrap `.row` (flex). Keep it full width even
     when the inner content becomes absolutely positioned during scaling. */
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}

.content-wrapper.rp-scale-outer > .rp-scale-inner {
  position: relative;
  width: 100%;
}

.content-wrapper.rp-scale-outer.rp-scale-active {
  overflow: hidden;
}

.content-wrapper.rp-scale-outer.rp-scale-active > .rp-scale-inner {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transform: scale(var(--rp-page-scale, 1));
  will-change: transform;
}

/* Leaderboard: keep 2-column metric grid in scaled-desktop mode (ignore the 1100px -> 1 column breakpoint). */
.content-wrapper.real-leaderboard.rp-scale-active .rp-leaderboard-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.real-homepage .col-md-9 {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.real-homepage .row {
  margin: 0 !important;
}

/* Leaderboard - custom layout (no sidebar, wide container like homepage)
   IMPORTANT: doc-page sidebar rules are very specific + !important, so we must override with higher specificity. */
.content-wrapper.real-leaderboard:not(.real-homepage) .bs-sidebar,
.content-wrapper.real-leaderboard:not(.real-homepage) .col-md-3 {
  display: none !important;
}

.content-wrapper.real-leaderboard:not(.real-homepage) .col-md-9 {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: var(--surface) !important;
}

.content-wrapper.real-leaderboard:not(.real-homepage) .row {
  margin: 0 !important;
}

.content-wrapper.real-leaderboard:not(.real-homepage) .rp-sidebar-toggle-floating {
  display: none !important;
}

.real-leaderboard .rp-leaderboard-fullbleed {
  /* Keep full width without using `100vw` breakout (can trigger overflow + “shrink-to-fit” on some mobile WebViews). */
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.real-leaderboard .rp-leaderboard-container {
  max-width: 1560px; /* intentionally wider than doc pages */
  margin: 0 auto;
  padding: 48px 28px 80px;
}

@media (max-width: 900px) {
  .real-leaderboard .rp-leaderboard-container {
    padding: 32px 18px 64px;
  }
}

@media (max-width: 767.98px) {
  /* In scaled-desktop mode (<768px) we keep the >=768 layout and shrink it, so avoid extra
     "true mobile" padding changes. Keep this rule as a fallback when scaling isn't active. */
  .content-wrapper.real-leaderboard:not(.rp-scale-active) .rp-leaderboard-container {
    padding: 28px 16px 56px;
  }
}

.real-leaderboard .rp-leaderboard-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  border: 0;
  padding: 0;
  color: var(--carbon);
}

.real-leaderboard .rp-leaderboard-intro {
  margin: 0 0 18px;
  max-width: 980px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(29, 29, 31, 0.9);
}

/* Remove Bootstrap container restrictions */
.container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--lavender-main);
  color: var(--carbon);
}

/* ========================================
   NAVIGATION BAR (Global)
   ======================================== */

/* Hide the default Bootstrap navbar content but keep the wrapper for our apple-navbar */
.navbar.fixed-top.navbar-dark.bg-primary {
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  padding: 0 !important;
}

/* Hide Bootstrap navbar elements */
.navbar.fixed-top > .container > .navbar-brand,
.navbar.fixed-top > .container > .navbar-toggler,
.navbar.fixed-top .navbar-collapse > .nav.navbar-nav {
  display: none !important;
}

/* The collapse wrapper should not have Bootstrap styling */
.navbar.fixed-top .navbar-collapse {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
}

.apple-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(249, 249, 252, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(216, 212, 230, 0.3);
  height: 60px;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-brand {
  /* Ensure the center link group is truly centered even when left/right widths differ */
  flex: 1 1 0;
  min-width: 0;
}

.navbar-brand a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--carbon);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.navbar-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.navbar-links a {
  font-size: 0.875rem;
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.navbar-links a:hover {
  color: var(--carbon);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lavender-main);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar-links a:hover::after {
  transform: scaleX(1);
}

.navbar-search {
  display: flex;
  align-items: center;
  /* Match .navbar-brand flex so .navbar-links centers within the full header width */
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-end;
}

.search-btn {
  background: none;
  border: none;
  color: var(--slate);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: var(--carbon);
}

/* Mobile hamburger toggle */
.rp-nav-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  margin-left: 8px;
}

.rp-nav-toggle-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--slate);
  position: relative;
  transition: background 0.2s ease;
}

.rp-nav-toggle-icon::before,
.rp-nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--slate);
  transition: transform 0.3s ease, top 0.3s ease;
}

.rp-nav-toggle-icon::before {
  top: -6px;
}

.rp-nav-toggle-icon::after {
  top: 6px;
}

/* When menu is open, transform to X */
.rp-nav-open .rp-nav-toggle-icon {
  background: transparent;
}

.rp-nav-open .rp-nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.rp-nav-open .rp-nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Mobile menu backdrop */
.rp-nav-backdrop {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Slightly condense nav so it still fits nicely at compact desktop / tablet widths. */
@media (max-width: 1200px) {
  .navbar-container {
    padding: 0 16px;
  }

  .navbar-links {
    gap: 18px;
  }

  .navbar-links a {
    font-size: 0.85rem;
  }
}

/* Responsive navbar (switch to hamburger below 992px to avoid overlap in the pre-hamburger range) */
@media (max-width: 991.98px) {
  .rp-nav-toggle {
    display: block;
  }

  /* Avoid two hamburgers on doc pages below the top-nav breakpoint: keep only the top-nav menu. */
  .content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating {
    display: none !important;
  }

  .rp-nav-open .rp-nav-backdrop {
    display: block;
    opacity: 1;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(249, 249, 252, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid rgba(216, 212, 230, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    z-index: 1001;
  }

  .rp-nav-open .navbar-links {
    display: flex;
  }

  .navbar-links a {
    padding: 14px 24px;
    font-size: 1rem;
    border-bottom: none;
  }

  .navbar-links a::after {
    display: none;
  }

  .navbar-links a:hover {
    background: var(--lavender-light);
  }
}

/* ========================================
   HOMEPAGE STYLES
   ======================================== */

.real-homepage {
  background: var(--surface);
  min-height: 100vh;
  /* Precompute affiliation logo height to avoid layout shift on load.
     Requirement: logo height = hero CTA button height * 1.25 */
  --rp-hero-cta-font-size: 1rem;
  --rp-hero-cta-line-height: 1.6; /* inherited from body (numeric, stable before fonts load) */
  /* Primary CTA has 14px vertical padding; secondary CTA has 12px padding + 2px border = 14px total.
     So “outer” vertical contribution per side is 14px across CTA buttons. */
  --rp-hero-cta-outer-y: 14px;
  --rp-hero-cta-btn-h: calc(
    (var(--rp-hero-cta-outer-y) * 2) +
    (var(--rp-hero-cta-font-size) * var(--rp-hero-cta-line-height))
  );
  --rp-affil-logo-h: calc(var(--rp-hero-cta-btn-h) * 1.25);
}

/* Centered container for homepage */
.real-homepage .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
}

/* Mesh gradient background: moved to section-level full-bleed backgrounds (no fixed global overlay). */

/* Hero Section */
.real-homepage .hero-section {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  text-align: center;
}

.real-homepage h1,
.real-homepage .hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1.5rem;
  color: var(--carbon);
}

.real-homepage .rp-hero-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

.real-homepage .rp-hero-subtitle {
  font-size: 1.5rem;
  color: var(--slate);
  margin: 2rem 0 1.25rem;
  font-weight: 300;
  line-height: 1.6;
}

.real-homepage .rp-hero-inner p {
  max-width: 760px;
}

.real-homepage .rp-hero-authors {
  max-width: 760px;
  color: var(--slate);
}

/* Homepage: author block is separated from the hero/banner by a simple divider section. */
.real-homepage .rp-home-authors {
  /* Light full-width band (requested) */
  background: rgba(235, 233, 245, 0.62);
  border-top: 1px solid rgba(105, 98, 133, 0.14);
  border-bottom: 1px solid rgba(105, 98, 133, 0.08);
  padding: 18px 0 20px;
}

/* Homepage: affiliations strip (logos carousel + lab badge) */
.real-homepage .rp-affil-strip {
  display: grid;
  grid-template-columns: 1fr 2fr; /* 1:2 ratio (requested) */
  column-gap: 28px;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 0 10px;
}

.real-homepage .rp-affil-carousel {
  position: relative;
  overflow: hidden;
  /* Center the marquee viewport in the left grid column */
  justify-self: center;
  display: flex; /* prevents initial (pre-JS) logos from stacking vertically */
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  width: 100%;
  max-width: 380px;
  /* Lock height so the strip never expands from stacked fallback content */
  height: calc(var(--rp-affil-logo-h, 34px) + 12px);
  padding: 6px 0;
  /* Soft edges for a cleaner marquee look */
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  transition: opacity 120ms ease;
}

/* Prevent FOUC on refresh: when JS is enabled, keep the carousel hidden until it is measured and aligned. */
html.rp-js .real-homepage .rp-affil-carousel:not(.rp-affil--ready) {
  opacity: 0;
}

.real-homepage .rp-affil-carousel.rp-affil--pending {
  opacity: 0;
}

.real-homepage .rp-affil-logo {
  height: var(--rp-affil-logo-h, 34px);
  width: auto;
  max-width: 110px;
  object-fit: contain;
  display: block;
  opacity: 0.92;
  filter: saturate(0.98);
  transition: transform 160ms ease, opacity 160ms ease, filter 160ms ease;
  transform: translateY(0);
}

.real-homepage .rp-affil-logo:hover {
  opacity: 1;
  filter: saturate(1.1);
  transform: translateY(-1px) scale(1.04);
}

.real-homepage .rp-affil-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  flex: 0 0 auto;
  transform: translate3d(var(--rp-affil-start-offset, 0), 0, 0);
  /* Two copies inside track → shift by 50% (one group width) for seamless loop */
  animation: rp-affil-marquee 16s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.real-homepage .rp-affil-carousel:not(.rp-affil--ready) .rp-affil-marquee-track {
  animation: none;
}

.real-homepage .rp-affil-marquee-group {
  display: flex;
  align-items: center;
  gap: 18px;
  /* Add a trailing gap so two groups can butt together while still having spacing */
  padding-right: 18px;
  flex: 0 0 auto;
}

.real-homepage .rp-affil-carousel:hover .rp-affil-marquee-track,
.real-homepage .rp-affil-carousel:focus-within .rp-affil-marquee-track {
  animation-play-state: paused;
}

.real-homepage .rp-affil-carousel.rp-affil--static .rp-affil-marquee-track {
  animation: none;
}

@keyframes rp-affil-marquee {
  0%   { transform: translate3d(var(--rp-affil-start-offset, 0), 0, 0); }
  100% { transform: translate3d(calc(var(--rp-affil-start-offset, 0) + var(--rp-affil-shift, 50%)), 0, 0); }
}

.real-homepage .rp-lab-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--carbon);
  border-radius: 14px;
  justify-self: start;
  cursor: pointer;
  /* Remove card-like hover; keep clean base */
  transition: color 120ms ease, opacity 120ms ease;
}

.real-homepage .rp-lab-badge:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 4px;
}

.real-homepage .rp-lab-badge-logo {
  height: var(--rp-affil-logo-h, 38px);
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  transition: transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.real-homepage .rp-lab-badge-text {
  font-family: var(--font-sans);
  font-weight: 750;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--slate);
  transition: color 160ms ease;
}

.real-homepage .rp-lab-badge:hover .rp-lab-badge-text {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.real-homepage .rp-lab-badge:hover .rp-lab-badge-logo,
.real-homepage .rp-lab-badge:focus-visible .rp-lab-badge-logo {
  opacity: 0.92;
  filter: saturate(1.05);
  transform: translateY(-1px);
}

.real-homepage .rp-hero-authors-names {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 400;
  /* Prefer natural wrapping at spaces (avoid breaking inside names). */
  overflow-wrap: normal;
  word-break: normal;
}

.real-homepage .rp-hero-authors-meta {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.9;
  overflow-wrap: anywhere;
}

.real-homepage .rp-hero-authors-emails {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  opacity: 0.92;
}

.real-homepage .rp-hero-authors-note {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.real-homepage .rp-hero-authors sup {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

@media (max-width: 767.98px) {
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-hero-authors-names {
    font-size: 0.92rem;
  }

  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-hero-authors-meta {
    font-size: 0.84rem;
  }
}

.real-homepage .rp-hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.real-homepage .rp-hero-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rp-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
}

.apple-navbar .navbar-links a.rp-nav-external {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.apple-navbar .navbar-links a.rp-nav-external .rp-icon {
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

/* ========================================
   HERO VIDEO CAROUSEL (Homepage)
   ======================================== */

.real-homepage .rp-hero-carousel {
  position: relative;
  margin: 0 auto 28px;
  max-width: 1200px;
  --rp-split: 50%;
  --rp-carousel-gutter: 64px; /* space on left/right so nav buttons don't sit on the videos */
  --rp-carousel-nav-size: 42px;
}

.real-homepage .rp-carousel-viewport {
  /* Clip overflowing slides so only the active slide is visible (no side "peeking"). */
  overflow: hidden;
  padding: 0 var(--rp-carousel-gutter);
  /* Also clip the padded gutter area itself, so translated slides can't "peek" into the gutters. */
  clip-path: inset(0 var(--rp-carousel-gutter) 0 var(--rp-carousel-gutter));
  -webkit-clip-path: inset(0 var(--rp-carousel-gutter) 0 var(--rp-carousel-gutter));
}

.real-homepage .rp-carousel-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  opacity: 1;
  /* Switch slides via a quick fade; JS updates transform while hidden. */
  transition: opacity 180ms ease;
  will-change: opacity;
}

.real-homepage .rp-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}

.real-homepage .rp-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.real-homepage .rp-compare {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(216, 212, 230, 0.35);
  box-shadow: 0 18px 48px rgba(33, 33, 33, 0.08);
  cursor: ew-resize;
  touch-action: none; /* pointer-driven drag */
}

.real-homepage .rp-compare video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop square/vertical sources into 3:2 */
}

.real-homepage .rp-compare-overlay {
  position: absolute;
  inset: 0;
  /* show overlay on the LEFT side up to the shared split */
  clip-path: inset(0 calc(100% - var(--rp-split)) 0 0);
}

.real-homepage .rp-compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  mix-blend-mode: overlay;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
  user-select: none;
  pointer-events: none;
}

/* Base label sits above base video, but is hidden under overlay region by the overlay video layer. */
.real-homepage .rp-compare-label--base {
  right: 16px;
  z-index: 1;
}

/* Overlay label is clipped together with overlay region. */
.real-homepage .rp-compare-overlay .rp-compare-label--overlay {
  left: 16px;
  z-index: 3;
}

/* Ensure overlay video sits above base label */
.real-homepage .rp-compare-overlay {
  z-index: 2;
}

/* Shared divider line (visual). */
.real-homepage .rp-compare::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rp-split);
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(33, 33, 33, 0.12), 0 6px 18px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 6; /* keep divider visible over both videos + knob */
}

/* Draggable "knob" (focusable for keyboard). */
.real-homepage .rp-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rp-split);
  transform: translateX(-50%);
  width: 44px; /* comfortable grab target */
  outline: none;
  z-index: 5; /* keep knob above overlay video (prevents "half missing") */
}

.real-homepage .rp-compare-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(249, 249, 252, 0.85);
  border: 1px solid rgba(216, 212, 230, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.real-homepage .rp-compare-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(105, 98, 133, 0.22);
  border: 1px solid rgba(105, 98, 133, 0.32);
}

.real-homepage .rp-compare-handle:focus-visible::before {
  box-shadow: 0 0 0 3px rgba(185, 175, 215, 0.55), 0 10px 26px rgba(0, 0, 0, 0.18);
}

.real-homepage .rp-carousel-meta {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: center;
  margin-top: 12px;
  color: var(--slate);
}

.real-homepage .rp-carousel-kicker {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.real-homepage .rp-carousel-hint {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
}

/* Carousel controls (auto-hidden if only 1 slide, via JS). */
.real-homepage .rp-carousel-nav {
  position: absolute;
  top: 50%;
  width: var(--rp-carousel-nav-size);
  height: var(--rp-carousel-nav-size);
  border-radius: 999px;
  border: 1px solid rgba(182, 177, 202, 0.88); /* lavender-dark */
  background: rgba(235, 233, 245, 0.92); /* lavender-light */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(105, 98, 133, 0.18); /* slate-tinted */
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  z-index: 5;
}

.real-homepage .rp-carousel-prev {
  left: calc((var(--rp-carousel-gutter) - var(--rp-carousel-nav-size)) / 2);
}

.real-homepage .rp-carousel-next {
  right: calc((var(--rp-carousel-gutter) - var(--rp-carousel-nav-size)) / 2);
}

.real-homepage .rp-carousel-prev::before,
.real-homepage .rp-carousel-next::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(105, 98, 133, 0.85); /* slate */
  border-bottom: 2px solid rgba(105, 98, 133, 0.85); /* slate */
  transform: rotate(135deg);
}

.real-homepage .rp-carousel-next::before {
  transform: rotate(-45deg);
}

.real-homepage .rp-carousel-nav:hover {
  background: rgba(216, 212, 230, 0.92); /* lavender-main */
  border-color: rgba(182, 177, 202, 0.98);
  box-shadow: 0 14px 34px rgba(105, 98, 133, 0.22);
  transform: translateY(-50%) scale(1.03);
}

.real-homepage .rp-carousel-nav:active {
  transform: translateY(-50%) scale(0.98);
}

.real-homepage .rp-carousel-nav:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 4px;
}

.real-homepage .rp-carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.real-homepage .rp-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(105, 98, 133, 0.25);
  border: 1px solid rgba(105, 98, 133, 0.22);
  cursor: pointer;
}

.real-homepage .rp-carousel-dot.is-active {
  background: rgba(185, 175, 215, 0.95);
  border-color: rgba(185, 175, 215, 0.95);
}

@media (max-width: 900px) {
  .real-homepage .rp-compare-grid {
    gap: 14px;
  }
}

/* Homepage: true mobile layout below 768px (avoid “frozen desktop layout” + shrink-to-fit behavior). */
@media (max-width: 767.98px) {
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-hero-carousel {
    --rp-carousel-gutter: 24px;
  }

  /* Keep the two compare cards side-by-side on phones (requested). */
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Evaluation metrics cards: 2 → 1 column on narrow screens. */
  .content-wrapper.real-homepage:not(.rp-scale-active) #evaluation-metrics .rp-eval-grid {
    grid-template-columns: 1fr;
  }

  /* Full-bleed backgrounds: avoid 100vw overflow quirks on narrow screens. */
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-fullbleed::before,
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-challenge-section::before {
    left: 0;
    width: 100%;
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-hero-carousel {
    --rp-carousel-gutter: 16px;
  }

  /* Arrow buttons can overlap small videos; dots are enough on phones. */
  .content-wrapper.real-homepage:not(.rp-scale-active) .rp-carousel-nav {
    display: none;
  }

  /* Keep metric lists readable (single column) on very small screens. */
  .content-wrapper.real-homepage:not(.rp-scale-active) #evaluation-metrics .rp-metrics-list {
    grid-template-columns: 1fr;
  }
}

/* Fallback for WebViews that "shrink-to-fit" scale the page:
   media queries may not trigger if the layout viewport stays at 768px, so we also
   apply mobile layout off a JS-set class based on `visualViewport.width`. */
html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) .hero-title {
  white-space: normal !important;
}

html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) .rp-hero-carousel {
  --rp-carousel-gutter: 16px;
}

html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) .rp-compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) #evaluation-metrics .rp-eval-grid {
  grid-template-columns: 1fr;
}

html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) #evaluation-metrics .rp-metrics-list {
  grid-template-columns: 1fr;
}

html.rp-narrow .content-wrapper.real-homepage:not(.rp-scale-active) .rp-carousel-nav {
  display: none;
}

/* Navbar fallback under rp-narrow (for shrink-to-fit WebViews where media queries may not match). */
html.rp-narrow .rp-nav-toggle {
  display: block;
}

html.rp-narrow .navbar-links {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(249, 249, 252, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 16px 0;
  border-bottom: 1px solid rgba(216, 212, 230, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  z-index: 1001;
}

html.rp-narrow body.rp-nav-open .navbar-links {
  display: flex;
}

html.rp-narrow body.rp-nav-open .rp-nav-backdrop {
  display: block;
  opacity: 1;
}

html.rp-narrow .navbar-links a {
  padding: 14px 24px;
  font-size: 1rem;
}

html.rp-narrow .navbar-links a::after {
  display: none;
}

html.rp-narrow .navbar-links a:hover {
  background: var(--lavender-light);
}

html.rp-narrow .content-wrapper.real-leaderboard:not(.rp-scale-active) .rp-leaderboard-container {
  padding: 28px 16px 56px;
}

/* Hero gradient text for "Sim-to-Real" */
.real-homepage .hero-gradient {
  background: linear-gradient(135deg, var(--lavender-dark) 0%, var(--slate) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero gradient text for "RealPDE" (muted mint so it doesn't fight the lavender palette) */
.real-homepage .hero-gradient-mint {
  background: linear-gradient(
    135deg,
    var(--mint-light) 0%,
    var(--mint-mid) 55%,
    var(--mint-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.real-homepage .subtitle {
  font-size: 0.95rem;
  color: var(--slate);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.2;
}

.real-homepage .rp-section-hint {
  margin: 0 0 18px;
  max-width: 920px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--slate);
}

.real-homepage .section-title {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 18px;
}

/* Glass Cards (Homepage Only) */
.real-homepage .glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.real-homepage .glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.real-homepage .card-lavender {
  background: linear-gradient(135deg, rgba(235, 233, 245, 0.9), rgba(216, 212, 230, 0.7));
}

.real-homepage .card-platinum {
  background: linear-gradient(135deg, rgba(249, 249, 252, 0.9), rgba(245, 245, 247, 0.7));
}

.real-homepage .card-slate {
  background: linear-gradient(135deg, rgba(105, 98, 133, 0.15), rgba(182, 177, 202, 0.1));
}

/* Bento Grid (Homepage Only) */
.real-homepage .bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 24px;
  margin: var(--spacing-lg) 0;
}

.real-homepage .bento-item {
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  position: relative;
}

.real-homepage .bento-grid .bento-item {
  display: block;
  color: inherit;
  text-decoration: none;
}

.real-homepage .bento-grid .bento-item:hover {
  text-decoration: none;
}

.real-homepage .bento-grid .bento-item:focus-visible {
  outline: 2px solid rgba(182, 177, 202, 0.95);
  outline-offset: 4px;
}

.real-homepage .bento-large {
  grid-column: span 8;
  grid-row: span 2;
  min-height: 500px;
}

.real-homepage .bento-medium {
  grid-column: span 4;
  min-height: 240px;
}

.real-homepage .bento-small {
  grid-column: span 4;
  min-height: 240px;
}

.real-homepage .bento-wide {
  grid-column: span 8;
  min-height: 300px;
}

@media (max-width: 767.98px) {
  .content-wrapper.real-homepage:not(.rp-scale-active) .bento-large,
  .content-wrapper.real-homepage:not(.rp-scale-active) .bento-medium,
  .content-wrapper.real-homepage:not(.rp-scale-active) .bento-small,
  .content-wrapper.real-homepage:not(.rp-scale-active) .bento-wide {
    grid-column: span 12;
    min-height: 300px;
  }
}

/* Challenge section (Homepage Only) */
.real-homepage .rp-challenge-section {
  position: relative;
  z-index: 0; /* ensure ::before isn't hidden by neighboring sections */
  overflow: visible;
}

.real-homepage .rp-challenge-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: linear-gradient(
    180deg,
    rgba(235, 233, 245, 0.55) 0%,
    rgba(249, 249, 252, 1) 70%
  );
  z-index: -1;
}

.real-homepage .rp-challenge-header {
  max-width: 760px;
  margin: 0;
  text-align: left;
}

.real-homepage .rp-challenge-lead {
  font-size: 1.25rem;
  color: var(--slate);
  line-height: 1.8;
  margin: 0 0 2.25rem;
}

.real-homepage .rp-challenge-lead strong {
  color: var(--carbon);
  font-weight: 700;
}

.real-homepage .rp-challenge-grid {
  display: grid;
  gap: 24px;
  width: 100%;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .real-homepage .rp-challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .real-homepage .rp-challenge-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .real-homepage .rp-challenge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .real-homepage .rp-challenge-card:last-child {
    grid-column: auto;
  }
}

.real-homepage .rp-challenge-card {
  position: relative;
  padding: 28px 28px 26px;
  text-align: left;
  border: 1px solid rgba(216, 212, 230, 0.35);
  min-height: 168px;
  box-shadow: 0 8px 22px rgba(20, 20, 24, 0.06);
}

.real-homepage .rp-challenge-card:hover {
  border-color: rgba(182, 177, 202, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(20, 20, 24, 0.08);
}

.real-homepage .rp-challenge-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(249, 249, 252, 0.72) 100%);
}

.real-homepage .rp-challenge-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(235, 233, 245, 0.68) 100%);
}

.real-homepage .rp-challenge-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(245, 245, 247, 0.70) 100%);
}

.real-homepage .rp-challenge-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--carbon);
}

.real-homepage .rp-challenge-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate);
}

/* Metrics hover definitions (Homepage Only) */
.real-homepage .rp-metrics-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--slate);
}

.real-homepage .rp-metric-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.real-homepage .rp-metric-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(105, 98, 133, 0.55);
  flex: 0 0 auto;
}

.real-homepage .rp-metric-item:hover {
  background: rgba(235, 233, 245, 0.55);
}

.real-homepage .rp-metric-abbr {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--carbon);
  outline: none;
}

.real-homepage .rp-metric-abbr:focus-visible {
  outline: 2px solid rgba(182, 177, 202, 0.85);
  outline-offset: 4px;
  border-radius: 10px;
}

.real-homepage .rp-metric-item::after {
  content: attr(data-desc);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  /* Keep the tooltip on a single line (no awkward wrapping) */
  display: block;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 212, 230, 0.75);
  box-shadow: 0 12px 30px rgba(20, 20, 24, 0.12);
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate(-50%, -4px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 10;
}

.real-homepage .rp-metric-item:hover::after,
.real-homepage .rp-metric-item:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Evaluation metrics (Homepage Only): narrower 2-card layout + denser lists */
.real-homepage #evaluation-metrics .rp-eval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 460px));
  justify-content: center;
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
}

.real-homepage #evaluation-metrics .rp-eval-card-body {
  padding: 28px;
}

.real-homepage #evaluation-metrics .rp-eval-card-body h3 {
  margin-bottom: 1.1rem !important;
}

.real-homepage #evaluation-metrics .rp-metrics-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 12px;
}

/* Baseline models (Homepage Only) */
.real-homepage #baseline-models .card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(216, 212, 230, 0.40);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(20, 20, 24, 0.06);
  padding: 24px 24px 18px;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.real-homepage #baseline-models .card:hover {
  transform: translateY(-2px);
  border-color: rgba(182, 177, 202, 0.60);
  box-shadow: 0 14px 34px rgba(20, 20, 24, 0.08);
}

.real-homepage #baseline-models .card h4 {
  letter-spacing: 0.06em;
}

.real-homepage #baseline-models .card ul {
  margin-top: 12px !important;
}

.real-homepage #baseline-models .card li {
  color: var(--carbon);
}

/* ========================================
   HOMEPAGE — KEY TAKEAWAYS (Expandable)
   ======================================== */

.real-homepage .rp-takeaways {
  margin-top: 34px;
  border-top: 1px solid rgba(105, 98, 133, 0.22);
  border-bottom: 1px solid rgba(105, 98, 133, 0.22);
}

.real-homepage details.rp-takeaway {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(105, 98, 133, 0.14);
}

.real-homepage details.rp-takeaway:last-child {
  border-bottom: 0;
}

.real-homepage .rp-takeaway-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  gap: 12px;
  align-items: baseline;
  padding: 16px 6px;
  user-select: none;
}

.real-homepage .rp-takeaway-summary::-webkit-details-marker {
  display: none;
}

.real-homepage .rp-takeaway-num {
  font-family: var(--font-sans);
  font-weight: 800;
  color: rgba(105, 98, 133, 0.95);
  text-align: right;
}

.real-homepage .rp-takeaway-headline {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: -0.01em;
}

.real-homepage .rp-takeaway-chevron {
  width: 18px;
  height: 18px;
  position: relative;
  top: 3px;
}

.real-homepage .rp-takeaway-chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(105, 98, 133, 0.85);
  border-bottom: 2px solid rgba(105, 98, 133, 0.85);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.real-homepage details.rp-takeaway[open] .rp-takeaway-chevron::before {
  transform: rotate(-135deg);
}

.real-homepage details.rp-takeaway[open] .rp-takeaway-summary {
  background: rgba(235, 233, 245, 0.45);
}

.real-homepage .rp-takeaway-body {
  padding: 0 6px 16px 46px; /* align under headline */
  max-width: 860px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate);
}

/* ========================================
   HOMEPAGE — BENCHMARK RESULTS MODULE
   ======================================== */

.real-homepage {
  /* Results Explorer bars: light mint theme (single-hue green) */
  --rp-benchmark-bar: #34cda3;   /* mint green */
  --rp-benchmark-track: #d9f7ef; /* very light mint */
}

.real-homepage .rp-benchmark-lead {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 860px;
  margin: 0;
}

.real-homepage .rp-benchmark-sublead {
  margin: 0.6rem 0 0;
  max-width: 960px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(105, 98, 133, 0.92);
}

.real-homepage .rp-benchmark-sublead strong {
  color: var(--carbon);
  font-weight: 750;
}

.real-homepage strong.rp-purple-strong {
  color: var(--slate);
  font-weight: 800;
}

/* ========================================
   HOMEPAGE — BENCHMARK OVERVIEW (Baselines + Metrics)
   ======================================== */

.real-homepage .rp-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
  /* Prevent awkward equal-height stretching between the two overview panels */
  align-items: start;
}

@media (max-width: 980px) {
  .real-homepage .rp-overview-grid {
    grid-template-columns: 1fr;
  }
}

.real-homepage .rp-overview-shell {
  margin-top: 28px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(216, 212, 230, 0.38);
  box-shadow: 0 12px 40px rgba(20, 20, 24, 0.05);
  position: relative;
  overflow: hidden;
}

.real-homepage .rp-overview-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 280px at 85% 12%, rgba(177, 232, 223, 0.35) 0%, rgba(177, 232, 223, 0) 60%),
    radial-gradient(520px 320px at 10% 88%, rgba(216, 212, 230, 0.35) 0%, rgba(216, 212, 230, 0) 60%);
  pointer-events: none;
}

.real-homepage .rp-overview-shell > .rp-overview-grid {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

@media (max-width: 700px) {
  .real-homepage .rp-overview-shell {
    padding: 14px;
    border-radius: 22px;
  }
}

.real-homepage .rp-overview-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 212, 230, 0.45);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 20, 24, 0.06);
  padding: 22px;
}

.real-homepage .rp-overview-heading {
  margin: 0 0 14px;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.real-homepage .rp-overview-subgrid {
  display: grid;
  gap: 18px;
}

.real-homepage .rp-overview-subgrid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.real-homepage .rp-overview-subgrid--baseline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "foundation traditional"
    "operators operators"
    "transformers transformers";
  gap: 16px;
  align-items: start;
}

.real-homepage .rp-overview-subgrid--baseline .rp-overview-group--foundation {
  grid-area: foundation;
}

.real-homepage .rp-overview-subgrid--baseline .rp-overview-group--traditional {
  grid-area: traditional;
}

.real-homepage .rp-overview-subgrid--baseline .rp-overview-group--operators {
  grid-area: operators;
}

.real-homepage .rp-overview-subgrid--baseline .rp-overview-group--transformers {
  grid-area: transformers;
}

.real-homepage #baseline-models .rp-overview-group {
  padding: 14px 14px 12px;
  border: 1px solid rgba(216, 212, 230, 0.35);
  border-radius: 16px;
  background: rgba(249, 249, 252, 0.55);
}

.real-homepage #baseline-models .rp-overview-group--operators .rp-overview-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.real-homepage #baseline-models .rp-overview-group--transformers .rp-overview-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

@media (max-width: 700px) {
  .real-homepage .rp-overview-subgrid--baseline {
    grid-template-columns: 1fr;
    grid-template-areas:
      "foundation"
      "traditional"
      "operators"
      "transformers";
  }

  .real-homepage #baseline-models .rp-overview-group--operators .rp-overview-list {
    grid-template-columns: 1fr;
  }

  .real-homepage #baseline-models .rp-overview-group--transformers .rp-overview-list {
    grid-template-columns: 1fr;
  }
}

.real-homepage .rp-overview-subgrid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .real-homepage .rp-overview-subgrid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .real-homepage .rp-overview-subgrid--2 {
    grid-template-columns: 1fr;
  }
}

.real-homepage .rp-overview-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
  margin: 2px 0 10px;
}

.real-homepage .rp-overview-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--carbon);
  font-family: var(--font-sans);
  font-weight: 600;
}

.real-homepage .rp-overview-list li {
  padding: 0;
  border: 0;
  background: transparent;
}

.real-homepage .rp-overview-link {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(216, 212, 230, 0.35);
  border-radius: 12px;
  background: rgba(249, 249, 252, 0.75);
  color: var(--carbon);
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.real-homepage .rp-overview-link:hover {
  background: rgba(235, 233, 245, 0.55);
  border-color: rgba(182, 177, 202, 0.55);
  transform: translateY(-1px);
}

.real-homepage .rp-overview-link:focus-visible {
  outline: 2px solid rgba(182, 177, 202, 0.85);
  outline-offset: 3px;
}

.real-homepage #benchmark .rp-metrics-list {
  grid-template-columns: 1fr; /* tighter, academic list */
  row-gap: 10px;
}

.real-homepage #benchmark .rp-metric-item {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.real-homepage #benchmark .rp-metric-item::before {
  content: none;
}

.real-homepage #benchmark .rp-metric-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(216, 212, 230, 0.35);
  border-radius: 12px;
  background: rgba(249, 249, 252, 0.75);
  color: var(--carbon);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.real-homepage #benchmark .rp-metric-link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(105, 98, 133, 0.55);
  flex: 0 0 auto;
}

.real-homepage #benchmark .rp-metric-item:hover .rp-metric-link {
  background: rgba(235, 233, 245, 0.55);
  border-color: rgba(182, 177, 202, 0.55);
  transform: translateY(-1px);
}

.real-homepage #benchmark .rp-metric-link:focus-visible {
  outline: 2px solid rgba(182, 177, 202, 0.85);
  outline-offset: 3px;
}

.real-homepage .rp-benchmark {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid rgba(216, 212, 230, 0.45);
  box-shadow: 0 10px 34px rgba(20, 20, 24, 0.06);
}

.real-homepage .rp-benchmark-howto {
  padding: 0 4px 12px;
  margin: 0 0 10px;
  border-bottom: 1px solid rgba(216, 212, 230, 0.55);
}

.real-homepage .rp-benchmark-howto-title {
  margin: 2px 0 6px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--carbon);
  line-height: 1.25;
}

.real-homepage .rp-benchmark-howto-subtitle {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(105, 98, 133, 0.92);
  max-width: 980px;
}

.real-homepage .rp-benchmark-howto-subtitle strong {
  color: inherit; /* match radar subtitle (bold but not darker) */
  font-weight: 750;
}

.real-homepage .rp-benchmark-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4px 4px 2px;
}

.real-homepage .rp-benchmark-paradigm-help {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(216, 212, 230, 0.55);
  border-radius: 14px;
  background: rgba(249, 249, 252, 0.72);
}

.real-homepage .rp-benchmark-paradigm-help--header {
  margin: 12px 0 14px;
  max-width: 960px;
}

.real-homepage .rp-benchmark-paradigm-help-title {
  display: flex;
  align-items: baseline;
  font-family: var(--font-sans);
}

.real-homepage .rp-benchmark-paradigm-help-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
}

.real-homepage .rp-benchmark-paradigm-help-desc {
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(105, 98, 133, 0.92);
  display: grid;
  gap: 10px;
}

.real-homepage .rp-benchmark-paradigm-help-item-title {
  color: var(--carbon);
  font-weight: 750;
}

.real-homepage .rp-benchmark-paradigm-help-item-desc {
  padding-left: 1.15rem; /* indent description */
  margin-top: 2px;
}

.real-homepage .rp-benchmark-paradigm-help-desc strong {
  color: var(--carbon);
  font-weight: 750;
}

.real-homepage .rp-benchmark-metric-help {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(216, 212, 230, 0.55);
  border-radius: 14px;
  background: rgba(235, 233, 245, 0.35);
}

.real-homepage .rp-benchmark-paradigm-inline {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(216, 212, 230, 0.55);
}

.real-homepage .rp-benchmark-paradigm-inline-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-family: var(--font-sans);
}

.real-homepage .rp-benchmark-paradigm-inline-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
}

.real-homepage .rp-benchmark-paradigm-inline-label {
  font-family: var(--font-sans);
  font-weight: 850;
  color: var(--carbon);
}

.real-homepage .rp-benchmark-paradigm-inline-desc {
  margin-top: 6px;
  padding-left: 1.15rem; /* indent description */
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(105, 98, 133, 0.92);
}

.real-homepage .rp-benchmark-metric-help-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-family: var(--font-sans);
}

.real-homepage .rp-benchmark-metric-help-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
}

.real-homepage .rp-benchmark-metric-help-abbr {
  font-family: var(--font-sans);
  font-weight: 850;
  color: var(--carbon);
}

.real-homepage .rp-benchmark-metric-help-full {
  font-family: var(--font-sans);
  font-weight: 650;
  color: var(--slate);
}

.real-homepage .rp-benchmark-metric-help-dir {
  font-family: var(--font-sans);
  font-weight: 650;
  color: rgba(105, 98, 133, 0.92);
}

.real-homepage .rp-benchmark-metric-help-desc {
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(105, 98, 133, 0.92);
}

.real-homepage .rp-benchmark-control {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.real-homepage .rp-benchmark-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
  margin: 0;
}

.real-homepage .rp-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 14px;
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--carbon);
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.real-homepage .rp-select:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.real-homepage .rp-seg {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(235, 233, 245, 0.8);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.real-homepage .rp-seg-btn {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 650;
  color: rgba(105, 98, 133, 0.92);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.real-homepage .rp-seg-btn:hover {
  background: rgba(216, 212, 230, 0.55);
  color: var(--carbon);
}

.real-homepage .rp-seg-btn.is-active {
  background: var(--carbon);
  color: white;
}

.real-homepage .rp-seg-btn:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.real-homepage .rp-benchmark-chart {
  margin-top: 18px;
  padding: 10px 6px 6px;
}

.real-homepage .rp-benchmark-loading {
  padding: 14px 10px;
  color: var(--slate);
  font-family: var(--font-sans);
  font-weight: 600;
}

.real-homepage .rp-bar-row {
  display: grid;
  grid-template-columns: 34px minmax(140px, 1.2fr) minmax(160px, 2.2fr) 92px;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 0;
}

.real-homepage .rp-bar-row:hover {
  background: rgba(235, 233, 245, 0.55);
}

.real-homepage .rp-bar-rank {
  font-family: var(--font-sans);
  font-weight: 800;
  color: rgba(105, 98, 133, 0.95);
  text-align: right;
}

.real-homepage .rp-bar-label {
  min-width: 0;
}

.real-homepage .rp-bar-model {
  font-family: var(--font-sans);
  font-weight: 750;
  color: var(--carbon);
  line-height: 1.2;
}

.real-homepage .rp-bar-params {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: rgba(105, 98, 133, 0.92);
  line-height: 1.2;
  margin-top: 2px;
}

.real-homepage .rp-bar-track {
  height: 18px;
  background: var(--rp-benchmark-track);
  border: 1px solid rgba(52, 205, 163, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.real-homepage .rp-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--rp-benchmark-bar);
  border-radius: 999px;
  transition: width 260ms ease;
}

.real-homepage .rp-bar-value {
  font-family: var(--font-sans);
  font-weight: 750;
  color: var(--carbon);
  text-align: right;
}

.real-homepage .rp-benchmark-footnote {
  margin-top: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(216, 212, 230, 0.55);
  font-size: 0.95rem;
  color: var(--slate);
}

.real-homepage .rp-benchmark-footnote-label {
  font-family: var(--font-sans);
  font-weight: 800;
  color: rgba(105, 98, 133, 0.95);
  margin-right: 6px;
}

/* ========================================
   HOMEPAGE — BENCHMARK RADAR (Explore Results)
   ======================================== */

.real-homepage .rp-benchmark-divider {
  margin: 12px 0 0;
  border-top: 1px solid rgba(216, 212, 230, 0.55);
}

.real-homepage .rp-radar {
  margin-top: 14px;
}

.real-homepage .rp-radar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 12px 6px 0;
}

.real-homepage .rp-radar-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
  margin-bottom: 6px;
}

.real-homepage .rp-radar-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--carbon);
  line-height: 1.25;
}

.real-homepage .rp-radar-subtitle {
  margin-top: 6px;
  max-width: 820px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(105, 98, 133, 0.92);
}

.real-homepage .rp-radar-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.real-homepage .rp-radar-actions--notes {
  justify-content: flex-start;
}

.real-homepage .rp-radar-notes-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px; /* nudge the "How we compute" sub-card down a bit */
}

.real-homepage .rp-chip-btn {
  border: 1px solid rgba(182, 177, 202, 0.65);
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(105, 98, 133, 0.95);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.real-homepage .rp-chip-btn.is-active,
.real-homepage .rp-chip-btn[aria-pressed="true"] {
  background: rgba(105, 98, 133, 0.12);
  border-color: rgba(105, 98, 133, 0.38);
  color: rgba(60, 55, 88, 0.96);
}

.real-homepage .rp-chip-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.real-homepage .rp-chip-btn:hover {
  background: rgba(235, 233, 245, 0.75);
  border-color: rgba(182, 177, 202, 0.8);
}

.real-homepage .rp-chip-btn:active {
  transform: scale(0.98);
}

.real-homepage .rp-chip-btn:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.real-homepage .rp-radar-models {
  margin-top: 12px;
  padding: 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.real-homepage .rp-model-chip {
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.real-homepage .rp-model-chip:hover {
  background: rgba(235, 233, 245, 0.75);
  border-color: rgba(182, 177, 202, 0.75);
}

.real-homepage .rp-model-chip:active {
  transform: scale(0.99);
}

.real-homepage .rp-model-chip:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.real-homepage .rp-chip-check {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(182, 177, 202, 0.65);
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  flex: 0 0 auto;
}

.real-homepage .rp-model-chip.is-selected .rp-chip-check {
  background: var(--rp-benchmark-bar);
  border-color: rgba(52, 205, 163, 0.78);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.real-homepage .rp-model-chip.is-selected .rp-chip-check::after {
  display: none;
}

.real-homepage .rp-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rp-chip-color, rgba(105, 98, 133, 0.6));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.real-homepage .rp-chip-label {
  font-family: var(--font-sans);
  font-weight: 750;
  color: var(--carbon);
  white-space: nowrap;
}

.real-homepage .rp-radar-layout {
  margin-top: 14px;
  padding: 0 6px 6px;
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(240px, 0.9fr);
  gap: 14px 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .real-homepage .rp-radar-layout {
    grid-template-columns: 1fr;
  }
}

.real-homepage .rp-radar-chart {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(216, 212, 230, 0.55);
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
  box-shadow: 0 10px 26px rgba(20, 20, 24, 0.05);
  min-height: 420px;
}

.real-homepage .rp-radar-svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--font-sans);
}

.real-homepage .rp-radar-grid {
  fill: none;
  stroke: rgba(105, 98, 133, 0.18);
  stroke-width: 1;
}

.real-homepage .rp-radar-axis {
  stroke: rgba(105, 98, 133, 0.22);
  stroke-width: 1;
}

.real-homepage .rp-radar-label {
  fill: rgba(105, 98, 133, 0.92);
  font-size: 14px;
  font-weight: 750;
}

.real-homepage .rp-radar-model {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.real-homepage .rp-radar-tooltip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(20, 20, 24, 0.12);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--carbon);
  max-width: 220px;
}

.real-homepage .rp-radar-notes {
  border-radius: 16px;
  border: 1px solid rgba(216, 212, 230, 0.55);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px 14px;
  box-shadow: 0 10px 26px rgba(20, 20, 24, 0.05);
}

.real-homepage .rp-radar-note-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.9);
  margin-bottom: 10px;
}

.real-homepage .rp-radar-note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-family: var(--font-sans);
  color: rgba(105, 98, 133, 0.92);
  font-size: 0.98rem;
  line-height: 1.55;
}

.real-homepage .rp-radar-note-axis {
  font-weight: 800;
  color: var(--carbon);
}

.real-homepage .rp-radar-note-help {
  font-weight: 650;
}

.real-homepage .rp-radar-note-muted {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(216, 212, 230, 0.55);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(105, 98, 133, 0.92);
}

/* Homepage Buttons */
.real-homepage .btn-primary {
  background: var(--carbon);
  color: white;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.real-homepage .btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(29, 29, 31, 0.2);
  color: white;
  text-decoration: none;
}

.real-homepage .btn-secondary {
  color: var(--slate);
  background: transparent;
  border: 2px solid var(--lavender-main);
  padding: 12px 32px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.real-homepage .btn-secondary:hover {
  background: var(--lavender-light);
  border-color: var(--lavender-dark);
  color: var(--carbon);
  text-decoration: none;
}

/* Homepage Stats */
.real-homepage .rp-home-stats {
  display: grid;
  /* We only target desktop/tablet widths (>=768px); keep layout simple and stable. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  text-align: center;
}

@media (min-width: 1200px) {
  .real-homepage .rp-home-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.real-homepage .rp-home-stat {
  /* Keep each stat block visually tight and centered */
  display: grid;
  justify-items: center;
}

.real-homepage .stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--carbon);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.5rem;
}

.real-homepage .stat-label {
  font-size: 1rem;
  color: var(--slate);
  font-weight: 500;
}

/* Homepage Badge */
.real-homepage .badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--lavender-light);
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 10px 10px 0;
}

/* Homepage Image Placeholders */
.real-homepage .image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--lavender-light) 0%, var(--platinum) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.real-homepage .image-placeholder::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

.real-homepage .image-placeholder-text {
  font-size: 0.875rem;
  color: var(--slate);
  opacity: 0.6;
  z-index: 1;
  text-align: center;
  padding: 1rem;
}

/* Homepage Datasets section: calmer placeholders (less "busy" than shimmer) */
.real-homepage #datasets .image-placeholder::before {
  display: none;
}

.real-homepage #datasets .image-placeholder {
  background: radial-gradient(120% 120% at 20% 15%, rgba(255, 255, 255, 0.95) 0%, rgba(235, 233, 245, 0.95) 45%, rgba(245, 245, 247, 0.95) 100%);
  border: 1px solid rgba(216, 212, 230, 0.45);
}

.real-homepage #datasets .image-placeholder-text {
  opacity: 0.78;
  font-weight: 600;
}

/* Homepage dataset tiles: allow real videos to fill the placeholder "grid" */
.real-homepage #datasets [data-rp-video-tile] video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* keep the whole card clickable */
  opacity: 0; /* keep placeholder visible while video loads */
  transition: opacity 220ms ease;
}

.real-homepage #datasets [data-rp-video-tile].is-loaded video {
  opacity: 1;
}

/* Dataset video tile overlay:
   - visible while loading / on error (fallback placeholder)
   - re-appears on hover as "glass + label" */
.real-homepage #datasets [data-rp-video-tile] .rp-video-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(216, 212, 230, 0.55);
  z-index: 1;
  opacity: 1;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.real-homepage #datasets [data-rp-video-tile] .rp-video-tile-overlay .image-placeholder-text {
  padding: 0; /* override base placeholder padding (overlay already has padding) */
  opacity: 0.9;
}

/* When loaded, hide overlay until hover/focus */
.real-homepage #datasets [data-rp-video-tile].is-loaded .rp-video-tile-overlay {
  opacity: 0;
}

.real-homepage #datasets [data-rp-video-tile].is-loaded:hover .rp-video-tile-overlay,
.real-homepage #datasets .bento-item:focus-visible [data-rp-video-tile].is-loaded .rp-video-tile-overlay {
  opacity: 1;
}

/* Homepage dataset cards: keep compact descriptions from overflowing the card */
.real-homepage #datasets .bento-medium p,
.real-homepage #datasets .bento-small p {
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Homepage Sections */
.real-homepage .section {
  padding: var(--spacing-xl) 0;
  width: 100%;
  display: block;
}

.real-homepage .section-sm {
  padding: var(--spacing-lg) 0;
}

.real-homepage .spacer-lg {
  height: var(--spacing-lg);
}

.real-homepage .spacer-md {
  height: var(--spacing-md);
}

/* Dataset Showcase (Real vs Sim images) */
.real-homepage .rp-dataset-showcase {
  padding: var(--spacing-md) 0;
}

.real-homepage .rp-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.real-homepage .rp-showcase-item {
  text-align: center;
}

.real-homepage .rp-showcase-label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.75rem;
}

.real-homepage .rp-showcase-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Full-bleed backgrounds without layout hacks (Homepage Only) */
.real-homepage .rp-fullbleed {
  position: relative;
  z-index: 0; /* create stacking context so ::before doesn't get hidden */
  overflow: visible;
}

.real-homepage .rp-fullbleed::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: var(--rp-fullbleed-bg, transparent);
  z-index: -1;
}

.real-homepage .rp-fullbleed--hero {
  --rp-fullbleed-bg: linear-gradient(
    135deg,
    rgba(249, 249, 252, 1) 0%,
    rgba(235, 233, 245, 0.85) 45%,
    rgba(245, 245, 247, 1) 100%
  );
  padding-top: 48px; /* tighter top whitespace (body already has 60px for fixed nav) */
  /* Hero no longer ends the page header; the authors band follows below. */
  padding-bottom: 24px;
}

.real-homepage .rp-fullbleed--platinum {
  --rp-fullbleed-bg: var(--platinum);
}

.real-homepage .rp-fullbleed--download {
  --rp-fullbleed-bg: linear-gradient(
    135deg,
    rgba(235, 233, 245, 0.95) 0%,
    rgba(216, 212, 230, 0.65) 55%,
    rgba(249, 249, 252, 1) 100%
  );
  /* Slightly tighter bottom so the page ends without a large "dead" area before the footer */
  padding: 96px 0 64px;
  text-align: left;
  overflow: visible; /* allow full-bleed ::before to extend */
}

.real-homepage .rp-download-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden; /* clip blur blobs without clipping full-bleed background */
  pointer-events: none;
  z-index: 0;
}


/* ========================================
   SIDEBAR (GitBook Style)
   ======================================== */

/* Sidebar Container */
.content-wrapper:not(.real-homepage) .col-md-3 {
  position: fixed !important;
  left: 0 !important;
  top: 60px !important;
  bottom: 0 !important;
  width: 280px !important;
  background: #fbfbfd !important; /* slightly cleaner than platinum */
  border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 14px 0 !important;
  overflow-y: auto !important;
  z-index: 10 !important;
  display: block !important;
  transform: translateX(0);
  transition: transform 0.22s ease;
}

/* Sidebar scrollbar (make it subtle) */
.content-wrapper:not(.real-homepage) .col-md-3 {
  scrollbar-width: thin;
  scrollbar-color: rgba(182, 177, 202, 0.7) transparent; /* lavender-dark */
}

.content-wrapper:not(.real-homepage) .col-md-3::-webkit-scrollbar {
  width: 10px;
}

.content-wrapper:not(.real-homepage) .col-md-3::-webkit-scrollbar-track {
  background: transparent;
}

.content-wrapper:not(.real-homepage) .col-md-3::-webkit-scrollbar-thumb {
  background-color: rgba(182, 177, 202, 0.55);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.content-wrapper:not(.real-homepage) .col-md-3::-webkit-scrollbar-thumb:hover {
  background-color: rgba(105, 98, 133, 0.55); /* slate */
}

/* Sidebar header + hamburger */
.content-wrapper:not(.real-homepage) .rp-sidebar {
  padding: 0 14px;
}

/* Floating hamburger (outside sidebar, flat + transparent) */
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating {
  position: fixed;
  top: 76px; /* below the top navbar */
  left: calc(280px + 16px); /* sits outside the sidebar */
  z-index: 1100;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:focus,
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:active,
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:hover .rp-sidebar-toggle-icon,
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:hover .rp-sidebar-toggle-icon::before,
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating:hover .rp-sidebar-toggle-icon::after {
  background: var(--carbon);
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-icon {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--slate);
  position: relative;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-icon::before,
.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--slate);
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-icon::before {
  top: -5px;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toggle-icon::after {
  top: 5px;
}

/* Sidebar section label + nav list (more academic, less rounded) */
.content-wrapper:not(.real-homepage) .rp-sidebar-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.75);
  margin: 6px 0 10px;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav {
  padding: 0;
  margin: 0;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc {
  padding: 0;
  margin: 0;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc .nav-link {
  padding: 7px 10px;
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc .nav-link:hover {
  background: rgba(235, 233, 245, 0.7);
  color: var(--carbon);
  text-decoration: none;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc-item.level-3 > .nav-link {
  padding-left: 22px;
  font-size: 0.9rem;
  opacity: 0.95;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc-item.level-4 > .nav-link {
  padding-left: 34px;
  font-size: 0.88rem;
  opacity: 0.92;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-toc-item.level-5 > .nav-link {
  padding-left: 46px;
  font-size: 0.86rem;
  opacity: 0.9;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav .nav-link {
  padding: 8px 10px;
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav .nav-link:hover {
  background: rgba(235, 233, 245, 0.7);
  color: var(--carbon);
  text-decoration: none;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav .nav-link.active {
  background: transparent;
  color: var(--carbon);
  font-weight: 600;
  border-left: 3px solid var(--lavender-dark);
}

/* Sidebar: nested section support (Models has grouped subsections) */
.content-wrapper:not(.real-homepage) .rp-sidebar-nav-sub {
  margin: 2px 0 8px;
  padding-left: 0;
  /* MkDocs bootstrap theme may hide nested <ul> by default; keep them visible. */
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-sub.level-2 {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(182, 177, 202, 0.35);
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-2 > .nav-link {
  padding-left: 22px;
  font-size: 0.92rem;
  opacity: 0.96;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-3 > .nav-link {
  padding-left: 34px;
  font-size: 0.9rem;
  opacity: 0.94;
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-4 > .nav-link {
  padding-left: 46px;
  font-size: 0.88rem;
  opacity: 0.92;
}

/* Active-state padding: keep text aligned when border-left is present. */
.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-1 > .nav-link.active {
  padding-left: 7px; /* base 10px - 3px border */
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-2 > .nav-link.active {
  padding-left: 19px; /* 22px - 3px border */
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-3 > .nav-link.active {
  padding-left: 31px; /* 34px - 3px border */
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-item.level-4 > .nav-link.active {
  padding-left: 43px; /* 46px - 3px border */
}

.content-wrapper:not(.real-homepage) .rp-sidebar-nav-label {
  cursor: default;
}

/* Adjust Main Content Area */
.content-wrapper:not(.real-homepage) .col-md-9 {
  margin-left: 280px !important;
  width: calc(100% - 280px) !important;
  padding: 36px 64px !important;
  background: white !important;
  min-height: calc(100vh - 60px) !important;
  box-sizing: border-box;
  transition: margin-left 0.22s ease, width 0.22s ease;
}

/* Collapse sidebar (GitBook-like) */
html.sidebar-collapsed .content-wrapper:not(.real-homepage) .col-md-3 {
  transform: translateX(-100%);
}

html.sidebar-collapsed .content-wrapper:not(.real-homepage) {
  display: flex;
  justify-content: center;
}

html.sidebar-collapsed .content-wrapper:not(.real-homepage) .col-md-9 {
  float: none !important;
  width: 100% !important;
  max-width: 1560px !important;
  margin: 0 auto !important;
}

html.sidebar-collapsed .content-wrapper:not(.real-homepage) .rp-sidebar-section {
  opacity: 0;
  pointer-events: none;
}

html.sidebar-collapsed .content-wrapper:not(.real-homepage) .rp-sidebar-toggle-floating {
  left: 16px;
}

/* Mobile Responsiveness (match top-nav breakpoint to avoid “in-between” layout glitches) */
@media (max-width: 991.98px) {
  .content-wrapper:not(.real-homepage) .col-md-3 {
    position: relative !important;
    width: 100% !important;
    top: 0 !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    border-right: none !important;
    border-bottom: 1px solid #eee !important;
  }
  .content-wrapper:not(.real-homepage) .col-md-9 {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    float: none !important;
    transition: none !important;
    padding: 24px !important;
  }

  /* If the sidebar was collapsed on desktop, don’t let the “slide-away” transform
     reserve space on mobile/tablet widths (it causes blank columns while resizing). */
  html.sidebar-collapsed .content-wrapper:not(.real-homepage) {
    display: block !important;
    justify-content: initial !important;
  }

  html.sidebar-collapsed .content-wrapper:not(.real-homepage) .col-md-3 {
    display: none !important;
  }

  html.sidebar-collapsed .content-wrapper:not(.real-homepage) .rp-sidebar-section {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html.sidebar-collapsed .content-wrapper:not(.real-homepage) .col-md-9 {
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* Remove default Bootstrap border from sidebar */
.bs-sidebar {
  border: none !important;
  margin: 0 !important;
}

/* (Removed old sidebar block/card styling) */

/* ========================================
   DOCUMENTATION PAGES STYLES
   ======================================== */

/* Doc pages: the Bootstrap theme wraps page content in `body > .container > .row`,
   which otherwise caps width (e.g., 1140px) and creates a huge empty gap next to our fixed sidebar.
   Make that outer container full-width on doc pages so datasets/models/metrics pages align consistently. */
html.rp-doc body > .container {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Homepage: also make the theme outer container full-width so our full-bleed sections
   don't rely on `100vw` hacks (which can trigger “shrink-to-fit” scaling on some mobile WebViews). */
html.rp-site-home body > .container {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html.rp-site-home body > .container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  --bs-gutter-x: 0;
}

html.rp-doc body > .container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  --bs-gutter-x: 0;
}

/* Documentation wrapper */
.content-wrapper:not(.real-homepage) {
  max-width: 100% !important; /* Allow full width to accommodate fixed sidebar */
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  width: 100% !important;
  flex: 0 0 100%;
}

/* Remove Bootstrap gutters that can cause horizontal overflow with fixed sidebar */
.content-wrapper:not(.real-homepage) .row {
  --bs-gutter-x: 0;
}

/* Override Bootstrap container in doc pages */
.content-wrapper:not(.real-homepage) .container {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Documentation Typography */
.content-wrapper:not(.real-homepage) .col-md-9[role='main'] > h1 {
  transition: opacity 0.12s ease;
}

html.rp-js.rp-title-pending .content-wrapper:not(.real-homepage) .col-md-9[role='main'] > h1 {
  opacity: 0;
}

.content-wrapper:not(.real-homepage) h1 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  margin-top: 2.4rem;
  color: #212529;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.65rem;
  max-width: 100%;
  line-height: 1.15;
}

/* Title one-line policy: we only guarantee layout down to 768px width. */
@media (min-width: 768px) {
  .real-homepage h1,
  .real-homepage .hero-title,
  .content-wrapper:not(.real-homepage) h1 {
    white-space: nowrap;
  }
}

/* Page brief (intro paragraph right after H1) */
.content-wrapper:not(.real-homepage) h1 + p {
  margin-top: 0.25rem;
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  color: rgba(29, 29, 31, 0.9);
}

/* On this page (under H1) */
.content-wrapper:not(.real-homepage) .onpage-toc {
  margin: 18px 0 34px;
  padding: 6px 0 6px 14px;
  background: transparent;
  border-left: 3px solid rgba(182, 177, 202, 0.9); /* lavender-dark */
}

.content-wrapper:not(.real-homepage) .onpage-toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 10px;
}

.content-wrapper:not(.real-homepage) .onpage-toc-list,
.content-wrapper:not(.real-homepage) .onpage-toc-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-wrapper:not(.real-homepage) .onpage-toc-list > li {
  margin: 6px 0;
}

.content-wrapper:not(.real-homepage) .onpage-toc-list a {
  color: var(--slate);
  text-decoration: none;
}

.content-wrapper:not(.real-homepage) .onpage-toc-list a:hover {
  color: var(--carbon);
  text-decoration: underline;
}

.content-wrapper:not(.real-homepage) .onpage-toc-sublist {
  margin-top: 6px;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.content-wrapper:not(.real-homepage) .onpage-toc-sublist > li {
  margin: 6px 0;
  opacity: 0.95;
}

.content-wrapper:not(.real-homepage) h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #212529;
}

.content-wrapper:not(.real-homepage) h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #212529;
}

.content-wrapper:not(.real-homepage) h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #495057;
}

.content-wrapper:not(.real-homepage) p {
  font-size: 1rem;
  line-height: 1.7;
  color: #212529;
  margin-bottom: 1rem;
}

/* Documentation Tables
   - "Single-line" separators (horizontal rules only)
   - Default width: 80% of the main content column (centered)
   - On small screens: fall back to 100% width */
.content-wrapper:not(.real-homepage) table {
  width: 80%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border-top: 1px solid rgba(105, 98, 133, 0.22);
  border-bottom: 1px solid rgba(105, 98, 133, 0.22);
  margin: 1.5rem auto;
  font-size: 0.95rem;
  background: transparent;
}

.content-wrapper:not(.real-homepage) table tbody tr {
  background: transparent;
}

/* Neutralize Bootstrap's zebra striping / bordered table variants for a clean "single-line" look */
.content-wrapper:not(.real-homepage) table.table-striped > tbody > tr:nth-of-type(odd),
.content-wrapper:not(.real-homepage) table.table-striped > tbody > tr:nth-of-type(odd) > td,
.content-wrapper:not(.real-homepage) table.table-striped > tbody > tr:nth-of-type(odd) > th,
.content-wrapper:not(.real-homepage) table.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: transparent !important;
}

.content-wrapper:not(.real-homepage) table.table-bordered,
.content-wrapper:not(.real-homepage) table.table-bordered > :not(caption) > * > * {
  border: 0 !important;
}

.content-wrapper:not(.real-homepage) table th,
.content-wrapper:not(.real-homepage) table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid rgba(105, 98, 133, 0.18); /* slate @ low opacity */
}

.content-wrapper:not(.real-homepage) table thead th {
  background: transparent;
  font-weight: 600;
  color: var(--carbon);
  border-bottom: 1px solid rgba(105, 98, 133, 0.28);
}

.content-wrapper:not(.real-homepage) table tbody tr:last-child td {
  border-bottom: 0;
}

.content-wrapper:not(.real-homepage) table tbody tr:hover {
  background: rgba(235, 233, 245, 0.45); /* lavender-light tint */
}

/* Wide tables: allow horizontal scroll inside the content column (prevents overflow on narrow pages). */
.content-wrapper:not(.real-homepage) .rp-table-scroll {
  /* Keep the same visual width as normal tables, but allow horizontal scroll when needed. */
  width: 80%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem auto;
  /* Make the horizontal scrollbar subtle (Win/Edge defaults look very heavy). */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(182, 177, 202, 0.65) transparent; /* thumb | track */
  scrollbar-gutter: stable; /* avoid layout shift when scrollbar appears (supported browsers only) */
}

@media (max-width: 768px) {
  .content-wrapper:not(.real-homepage) .rp-table-scroll {
    width: 100%;
  }
}

.content-wrapper:not(.real-homepage) .rp-table-scroll::-webkit-scrollbar {
  height: 10px; /* horizontal scrollbar height */
}

.content-wrapper:not(.real-homepage) .rp-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.content-wrapper:not(.real-homepage) .rp-table-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(182, 177, 202, 0.55);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.content-wrapper:not(.real-homepage) .rp-table-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(105, 98, 133, 0.55); /* slate */
}

/* Hide the arrow buttons on Windows (they make the bar look chunky). */
.content-wrapper:not(.real-homepage) .rp-table-scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
}

.content-wrapper:not(.real-homepage) .rp-table-scroll > table {
  /* Let the table take its natural (content) width, while still filling the wrapper when narrow. */
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0; /* wrapper handles spacing */
}

/* IMPORTANT: Do NOT force-break identifiers in tables (use horizontal scroll instead). */
.content-wrapper:not(.real-homepage) table code,
.content-wrapper:not(.real-homepage) table kbd,
.content-wrapper:not(.real-homepage) table samp {
  white-space: nowrap;
  word-wrap: normal;
  overflow-wrap: normal;
  word-break: normal;
}

/* Dataset pages: paired Sim vs Real videos */
.content-wrapper:not(.real-homepage) .rp-dataset-videos {
  width: 50%;
  max-width: 50%;
  margin: 1.25rem auto 2rem;
}

.content-wrapper:not(.real-homepage) .rp-dataset-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .content-wrapper:not(.real-homepage) .rp-dataset-video-grid {
    grid-template-columns: 1fr;
  }

  .content-wrapper:not(.real-homepage) .rp-dataset-videos {
    width: 100%;
    max-width: 100%;
  }
}

.content-wrapper:not(.real-homepage) .rp-dataset-video-card {
  border: 1px solid rgba(182, 177, 202, 0.45);
  border-radius: 14px;
  background: rgba(249, 249, 252, 0.72);
  padding: 12px 12px 10px;
}

.content-wrapper:not(.real-homepage) .rp-dataset-video-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.85);
  margin: 0 0 10px;
}

.content-wrapper:not(.real-homepage) .rp-dataset-video-card video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
  .content-wrapper:not(.real-homepage) table {
    width: 100%;
  }
}

/* Documentation Lists */
.content-wrapper:not(.real-homepage) ul,
.content-wrapper:not(.real-homepage) ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.content-wrapper:not(.real-homepage) li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Documentation Code Blocks */
.content-wrapper:not(.real-homepage) pre {
  background: rgba(245, 245, 247, 0.95); /* platinum */
  border: 1px solid rgba(182, 177, 202, 0.45);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  /* Avoid horizontal scrollbar: wrap long lines instead */
  overflow-x: hidden;
  overflow-y: auto;
  margin: 1.35rem 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.content-wrapper:not(.real-homepage) code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: rgba(235, 233, 245, 0.65);
  border: 1px solid rgba(182, 177, 202, 0.35);
  padding: 2px 7px;
  border-radius: 8px;
}

.content-wrapper:not(.real-homepage) pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.95em;
  line-height: 1.65;
  color: var(--carbon);
  /* Wrap long lines in fenced code blocks (e.g., div.language-xxx / .highlight) */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Homepage: inline citation inside Resources */
.real-homepage .rp-citation-inline {
  /* Keep the citation text left-aligned with the section content */
  max-width: 100%;
  /* More space under the CTA buttons */
  margin: 2.25rem 0 0;
}

.real-homepage .rp-citation-inline-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 0.6rem;
}

.real-homepage .rp-citation-inline-kicker {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.real-homepage .rp-citation-inline-hint {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(105, 98, 133, 0.85);
}

.real-homepage .rp-citation-inline-lead {
  margin: 0 0 0.8rem;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.6;
}

/* Put "BibTeX" flush with the code block's top-right; left side intentionally blank */
.real-homepage .rp-citation-inline-code-meta {
  width: 90%;
  margin: 0 auto 0.45rem;
  display: flex;
  justify-content: flex-end;
}

/* Center the code box while keeping the surrounding text left-aligned */
.real-homepage .rp-citation-inline .rp-code-block {
  width: 90%;
  margin: 0 auto;
}

/* Homepage citation: wrap BibTeX lines to avoid an ugly horizontal scrollbar */
.real-homepage .rp-citation-inline .rp-code-block code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Reusable code block style (no "floating card") */
.rp-code-block {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(182, 177, 202, 0.45);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  overflow: auto;
  margin: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.rp-code-block code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--carbon);
  background: transparent;
  border: 0;
  padding: 0;
  display: block;
  /* Avoid horizontal scrollbar: wrap long lines instead */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Documentation Links */
.content-wrapper:not(.real-homepage) a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s ease;
}

.content-wrapper:not(.real-homepage) a:hover {
  color: var(--carbon);
  text-decoration: underline;
}

/* Header Links (Anchor symbols) */
a.headerlink {
  color: var(--lavender-main) !important;
  margin-left: 8px;
  font-weight: normal;
  transition: color 0.2s ease;
}

a.headerlink:hover {
  color: var(--lavender-dark) !important;
  text-decoration: none !important;
}

/* Documentation Buttons - Simple Style */
.content-wrapper:not(.real-homepage) .btn-primary,
.content-wrapper:not(.real-homepage) a.btn-primary {
  background: var(--carbon);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s ease;
}

.content-wrapper:not(.real-homepage) .btn-primary:hover {
  background: var(--slate);
  text-decoration: none;
  color: white;
  transform: none;
  box-shadow: none;
}

.content-wrapper:not(.real-homepage) .btn-secondary,
.content-wrapper:not(.real-homepage) a.btn-secondary {
  background: white;
  color: #6c757d;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
  border: 1px solid #6c757d;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.content-wrapper:not(.real-homepage) .btn-secondary:hover {
  background: #6c757d;
  color: white;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

/* Remove glassmorphism from doc pages */
.content-wrapper:not(.real-homepage) .glass-card,
.content-wrapper:not(.real-homepage) .card {
  background: white !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  padding: 1rem !important;
}

/* Remove fancy image placeholders from doc pages */
.content-wrapper:not(.real-homepage) .image-placeholder {
  display: none !important;
}

.content-wrapper:not(.real-homepage) .image-placeholder::before {
  display: none !important;
}

/* Simplify stats on doc pages */
.content-wrapper:not(.real-homepage) .stat-number {
  font-size: 2rem !important;
  font-weight: 600 !important;
  color: #212529 !important;
}

.content-wrapper:not(.real-homepage) .stat-label {
  font-size: 0.9rem !important;
  color: #6c757d !important;
}

/* Blockquotes */
.content-wrapper:not(.real-homepage) blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #6c757d;
  font-style: italic;
}

/* Horizontal Rules */
.content-wrapper:not(.real-homepage) hr {
  border: 0;
  border-top: 1px solid #dee2e6;
  margin: 2rem 0;
}

/* ========================================
   FOOTER (Global)
   ======================================== */

.rp-footer {
  padding: 4rem 0 3rem;
  background: var(--surface);
  border-top: 1px solid var(--lavender-light);
  color: var(--slate);
  text-align: center;
}

/* Homepage: smoother last-section → footer transition (avoid a harsh divider + reduce perceived empty space) */
.real-homepage .rp-footer {
  border-top: 0;
  background: var(--platinum);
  padding: 2.5rem 0 3rem;
  position: relative;
}

.real-homepage .rp-footer::before {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--platinum));
  pointer-events: none;
}

.rp-footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.rp-footer-content p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.rp-footer-copyright {
  font-weight: 500;
  color: var(--carbon);
  margin-bottom: 1.25rem !important;
}

.rp-footer-links {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.rp-footer-links a {
  color: var(--slate);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s ease;
}

.rp-footer-links a:hover {
  color: var(--carbon);
  text-decoration: underline;
}

.rp-footer-note {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 1.5rem;
}

.rp-footer-note a {
  color: inherit;
  text-decoration: underline;
}

.rp-footer-note a:hover {
  color: var(--carbon);
}

/* Adjust footer for documentation pages with sidebar */
.content-wrapper:not(.real-homepage) .rp-footer {
  margin-left: 280px;
  background: white;
}

html.sidebar-collapsed .content-wrapper:not(.real-homepage) .rp-footer {
  margin-left: 0;
}

@media (max-width: 992px) {
  .content-wrapper:not(.real-homepage) .rp-footer {
    margin-left: 0;
  }
}

/* ========================================
   LEADERBOARD (Doc Pages)
   ======================================== */

.content-wrapper:not(.real-homepage) .rp-leaderboard {
  /* Match homepage Results Explorer bar palette */
  --rp-benchmark-bar: #34cda3;   /* mint green */
  --rp-benchmark-track: #d9f7ef; /* very light mint */
  margin-top: 18px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-lead {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(182, 177, 202, 0.45);
  border-radius: 10px;
  background: rgba(245, 245, 247, 0.75);
  color: rgba(105, 98, 133, 0.92);
  font-size: 0.98rem;
  line-height: 1.65;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  margin: 0 0 18px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-control {
  display: grid;
  gap: 8px;
  /* IMPORTANT: avoid stretching segmented controls (Top 5 / All) to an arbitrary width */
  justify-items: start;
  min-width: 0;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-control--dataset {
  /* Keep dataset selector comfortably wide */
  min-width: 240px;
  justify-items: stretch;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-control--dataset .rp-select {
  width: 100%;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-control--topk {
  /* Only two buttons: keep it tight */
  min-width: max-content;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(105, 98, 133, 0.85);
  margin: 0;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--carbon);
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-select:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-seg {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  border: 1px solid rgba(182, 177, 202, 0.55);
  background: rgba(235, 233, 245, 0.8);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-seg-btn {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 650;
  color: rgba(105, 98, 133, 0.92);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-seg-btn:hover {
  background: rgba(216, 212, 230, 0.55);
  color: var(--carbon);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-seg-btn.is-active {
  background: var(--carbon);
  color: white;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-seg-btn:focus-visible {
  outline: 3px solid rgba(182, 177, 202, 0.6);
  outline-offset: 2px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: start;
}

@media (max-width: 1100px) {
  .content-wrapper:not(.real-homepage) .rp-leaderboard-metric-grid {
    grid-template-columns: 1fr;
  }
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric {
  margin: 0;
  padding: 10px 10px 8px;
  border: 1px solid rgba(216, 212, 230, 0.55);
  border-radius: 12px;
  background: rgba(245, 245, 247, 0.55);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-head {
  margin-bottom: 8px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 850;
  color: var(--carbon);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-link {
  color: inherit;
  text-decoration: none;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-link:hover {
  text-decoration: underline;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-dir {
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(105, 98, 133, 0.92);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-metric-sub {
  margin-top: 3px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(105, 98, 133, 0.92);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-benchmark-loading {
  padding: 10px 8px;
  color: var(--slate);
  font-family: var(--font-sans);
  font-weight: 600;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-row {
  display: grid;
  grid-template-columns: 30px minmax(140px, 1.25fr) minmax(140px, 2fr) 86px;
  gap: 10px;
  align-items: center;
  padding: 8px 8px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-row:hover {
  background: rgba(235, 233, 245, 0.55);
  border-radius: 10px;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-rank {
  font-family: var(--font-sans);
  font-weight: 800;
  color: rgba(105, 98, 133, 0.95);
  text-align: right;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-label {
  min-width: 0;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-model {
  font-family: var(--font-sans);
  font-weight: 750;
  color: var(--carbon);
  line-height: 1.2;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-params {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: rgba(105, 98, 133, 0.92);
  line-height: 1.2;
  margin-top: 2px;
}

/* Bars: slightly thicker than homepage, but keep length moderate by column layout */
.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-track {
  height: 22px;
  background: var(--rp-benchmark-track);
  border: 1px solid rgba(52, 205, 163, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--rp-benchmark-bar);
  border-radius: 999px;
  transition: width 260ms ease;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard .rp-bar-value {
  font-family: var(--font-sans);
  font-weight: 750;
  color: var(--carbon);
  text-align: right;
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-footnote {
  margin-top: 16px;
  padding: 12px 14px;
  border-top: 1px solid rgba(216, 212, 230, 0.55);
  font-size: 0.95rem;
  color: var(--slate);
}

.content-wrapper:not(.real-homepage) .rp-leaderboard-footnote-label {
  font-family: var(--font-sans);
  font-weight: 800;
  color: rgba(105, 98, 133, 0.95);
  margin-right: 6px;
}