/* ==========================================================================
   HyperBones Project Page - Modern Research Design System
   ========================================================================== */

:root {
  /* =================================================================
     Mobile readability knobs — tweak these (or add ?tune to the URL)
     --type-floor   0.85–1.00  min wrapping-text scale (higher = bigger body)
     --space-floor  0.40–0.70  min padding/gap scale (lower = tighter page)
     --type-follow  0.00–1.00  0 = keep desktop type, 1 = shrink with layout
     --ui-min       0.35–0.55  min hero/overlay/table scale (higher may overflow)
     ================================================================= */
  --type-floor: 0.75;
  --space-floor: 0.47;
  --type-follow: 1.00;
  --ui-min: 0.42;

  --bg-primary: #eef2f6;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-card-border: rgba(0, 0, 0, 0.1);
  --bg-card-border-glow: rgba(59, 130, 246, 0.35);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent-cyan: #0891b2;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-amber: #d97706;
  --accent-emerald: #059669;

  --gradient-title: linear-gradient(135deg, #0f172a 0%, #334155 40%, #2563eb 70%, #7c3aed 100%);
  --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  --gradient-badge: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-btn: linear-gradient(135deg, #ffffff, #f1f5f9);
  --gradient-btn-hover: linear-gradient(135deg, #e2e8f0, #cbd5e1);

  --ui-scale: 1;
  --type-scale: clamp(var(--type-floor), calc(1 - var(--type-follow) * (1 - var(--ui-scale))), 1);
  --space-scale: clamp(var(--space-floor), var(--ui-scale), 1);
  --overlay-scale: clamp(0.36, calc(var(--ui-scale) * var(--ui-scale) * 0.2 + var(--ui-scale) * 0.8), 1);
  --quality-scale: max(0.46, calc(var(--overlay-scale) * 1.16));
  --quality-min-width: 0px;

  --radius-sm: calc(8px * var(--space-scale));
  --radius-md: calc(12px * var(--space-scale));
  --radius-lg: calc(20px * var(--space-scale));
  --radius-full: 9999px;

  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(59, 130, 246, 0.25);
  --grid-size: clamp(16px, 4.6vw, 40px);
  --section-y-pad: clamp(1.15rem, calc(3rem * var(--space-scale)), 3rem);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button,
a,
label,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 2px;
}

html.is-intro .reveal-item {
  opacity: 0;
  transform: translate3d(0, -1.35rem, 0);
  pointer-events: none;
}

html.is-intro .reveal-item.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

html.is-intro .bg-grid-overlay {
  position: fixed;
  inset: 0;
  clip-path: inset(0 0 100% 0);
}

html.is-intro.is-drawing-grid .bg-grid-overlay {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.65s cubic-bezier(0.22, 1, 0.36, 1);
}

html.is-intro.is-drawing-grid body::after {
  content: "";
  position: fixed;
  left: 0;
  width: 100%;
  height: 1px;
  top: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(79, 70, 229, 0.28) 18%,
    rgba(124, 58, 237, 0.7) 50%,
    rgba(79, 70, 229, 0.28) 82%,
    transparent 100%
  );
  animation: grid-draw-head 1.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes grid-draw-head {
  from { top: 0; opacity: 1; }
  to { top: 100vh; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html.is-intro .reveal-item,
  html.is-intro .reveal-item.is-in {
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
  }

  html.is-intro .bg-grid-overlay {
    clip-path: none;
    transition: none;
  }

  html.is-intro.is-drawing-grid body::after {
    display: none;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Background Animated Grid */
.bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-size: var(--grid-size) var(--grid-size);
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Top Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--bg-card-border);
  transition: var(--transition-normal);
}

.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--gradient-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.nav-brand-logo svg {
  width: 18px;
  height: 18px;
  fill: white;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-normal);
}

.nav-back-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* Main Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(0.72rem, calc(1.5rem * var(--space-scale)), 1.5rem);
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-section {
  --hero-lede-size: calc(2.2rem * var(--ui-scale));
  --hero-video-pull: 2.75%;
  --hero-rule-gap: 0.45rem;
  container-type: inline-size;
  container-name: hero;
  padding: calc(2.25rem * var(--space-scale)) 0 0 0;
  text-align: center;
  position: relative;
  overflow: visible;
}

.venue-badge-wrapper {
  margin-bottom: 1.5rem;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.venue-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.nowrap {
  white-space: nowrap;
}

.hero-title-stack {
  position: relative;
  z-index: 5;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 auto 1rem auto;
  max-width: 1050px;
  text-wrap: wrap;
}

.hero-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: Gotham, "Gotham Book", "Gotham Regular", Montserrat, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  line-height: 0.95;
  margin-bottom: 0.18em;
}

.hero-brand-cap,
.hero-brand-rest {
  font-family: inherit;
  font-weight: 400;
  font-synthesis: none;
  line-height: 0.9;
}

.hero-brand-cap {
  font-size: calc(4.35rem * 0.9 * var(--ui-scale));
}

.hero-brand-rest {
  font-size: calc(4.35rem * 0.9 * var(--ui-scale) * 0.7);
  letter-spacing: 0.04em;
}

.hero-lede {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  font-size: var(--hero-lede-size);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero-lede-line {
  display: block;
  white-space: nowrap;
  text-align: center;
}

.publication-venue-container {
  --venue-size: min(calc(1.1rem * var(--type-scale)), calc(var(--hero-lede-size) * 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.15rem auto 1.65rem auto;
  position: relative;
  z-index: 5;
}

.venue-logo {
  display: block;
  height: calc(var(--venue-size) * 1.82);
  width: auto;
  max-height: calc(var(--venue-size) * 1.82);
  max-width: calc(var(--venue-size) * 1.94);
  aspect-ratio: 760 / 765;
  object-fit: contain;
}

.venue-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--venue-size);
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 0.42em 0.85em;
  border: 1px solid #4b5563;
  border-radius: var(--radius-full);
  background: #fef3c7;
}

.venue-event {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.venue-track {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.86em;
  line-height: 1;
  margin: 0;
}

.venue-track::before {
  content: "";
  display: block;
  width: 1px;
  height: 1em;
  flex-shrink: 0;
  margin: 0 0.7em;
  background: #4b5563;
  opacity: 0.7;
}

/* Authors List */
.authors-container {
  margin: 0 auto 1.15rem auto;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.authors-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem 1.05rem;
  font-size: min(calc((0.92rem + 3pt) * var(--type-scale)), calc(var(--hero-lede-size) * 0.6));
  line-height: 1.25;
}

.author-item {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.author-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.author-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.author-item.author-primary .author-link {
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: none;
}

.author-sup {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin-left: 1px;
  font-weight: 600;
}

/* Affiliations */
.affiliations-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.affil-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.affil-num {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 700;
}

/* Action Buttons */
.action-buttons-wrapper {
  --action-fit: min(calc(0.94rem * var(--type-scale)), calc(100cqi / 46));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: max-content;
  max-width: 100%;
  justify-content: center;
  gap: calc(var(--action-fit) * 0.55);
  margin: 0.15rem auto 0 auto;
  position: relative;
  z-index: 6;
}

.action-btn {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38em;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: max(0.68em, 0.46rem) 0.92em;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 9999px;
  color: var(--text-main);
  text-decoration: none;
  font-size: var(--action-fit);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  backdrop-filter: blur(8px);
  overflow: visible;
}

.action-btn svg,
.action-btn svg.action-btn-quote-icon {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  fill: currentColor;
}

.action-btn svg.action-btn-quote-icon {
  fill: none;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-indigo);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
  color: var(--accent-indigo);
}

.action-btn.btn-primary {
  background: var(--gradient-badge);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.action-btn.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
}

/* Teaser / Hero Media Card */
.teaser-wrapper {
  margin: calc(2.5rem * var(--space-scale)) 0 calc(3.5rem * var(--space-scale)) 0;
}

.teaser-wrapper.is-parked,
.teaser-wrapper[hidden] {
  display: none !important;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: calc(2rem * var(--space-scale));
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--bg-card-border-glow);
}

.teaser-card {
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.teaser-media {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #e2e8f0;
  box-shadow: var(--shadow-md);
}

.teaser-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.teaser-caption {
  margin-top: 1.25rem;
  font-size: calc(0.95rem * var(--type-scale));
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
}

.teaser-caption strong {
  color: var(--text-main);
}

/* Section Common Styling */
.section {
  padding: var(--section-y-pad) 0;
}

.section:not(#bibtex):not(#method) {
  position: relative;
}

.section:not(#bibtex):not(#method)::after,
#abstract::before {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(124, 58, 237, 0.18) 12%,
    rgba(167, 139, 250, 0.95) 50%,
    rgba(124, 58, 237, 0.18) 88%,
    transparent 100%
  );
}

#abstract::before {
  top: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: calc(1.85rem * var(--type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title svg {
  width: calc(28px * var(--type-scale));
  height: calc(28px * var(--type-scale));
  fill: var(--accent-cyan);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: calc(1rem * var(--type-scale));
  margin-top: 0.4rem;
}

.abstract-visual-grid {
  --overview-scale: var(--space-scale);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: calc(1.5rem * var(--overview-scale));
  margin-top: calc(2.5rem * var(--overview-scale));
}

#abstract .overview-crowd-stage {
  margin-top: calc(2.5rem * var(--space-scale));
}

.overview-card,
.glass-card.overview-card {
  padding: calc(1.5rem * var(--overview-scale, 1));
  text-align: left;
  cursor: default;
}

.overview-card-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: calc(0.7rem * var(--overview-scale, 1));
  margin-bottom: calc(0.75rem * var(--overview-scale, 1));
}

.overview-card-icon {
  width: calc(48px * var(--type-scale));
  height: calc(48px * var(--type-scale));
  border-radius: calc(12px * var(--space-scale));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.overview-card-icon svg {
  width: calc(24px * var(--type-scale));
  height: calc(24px * var(--type-scale));
}

.overview-card-icon-challenge {
  background: rgba(239, 68, 68, 0.1);
}

.overview-card-icon-approach {
  background: rgba(59, 130, 246, 0.1);
}

.overview-card-icon-perf {
  background: rgba(16, 185, 129, 0.1);
}

.overview-card-title {
  color: var(--text-main);
  margin: 0;
  font-size: calc(1.05rem * var(--type-scale));
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.overview-card-text {
  color: var(--text-dim);
  font-size: calc(0.9rem * var(--type-scale));
  line-height: 1.55;
}

.overview-kick {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: calc(-1 * var(--hero-video-pull)) 0 var(--hero-rule-gap);
  position: relative;
  z-index: 4;
  pointer-events: none;
}

.overview-kick.is-hero-hold,
html.is-intro .overview-kick.is-hero-hold,
html.is-intro .overview-kick.reveal-item.is-hero-hold,
html.is-intro .overview-kick.reveal-item.is-in.is-hero-hold {
  opacity: 0;
  transform: none;
}

.overview-kick-card,
.glass-card.overview-kick-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1372 / 1014;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.overview-kick-video {
  position: absolute;
  display: block;
  width: calc(1920 / 1372 * 100%);
  height: calc(1080 / 1014 * 100%);
  left: calc(-274 / 1372 * 100%);
  top: calc(-34 / 1014 * 100%);
  max-width: none;
  object-fit: fill;
  background: transparent;
  opacity: 1;
}

.overview-kick-video.is-standby,
.overview-kick-video.is-loop-hold {
  opacity: 0;
}

.phys-body {
  transform-origin: center center;
}

.phys-body.is-phys-hit {
  will-change: transform;
}

.action-btn.phys-body {
  transform-origin: center bottom;
  transition-property: background, border-color, box-shadow, color;
}

.action-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 32%,
    rgba(255, 255, 255, 0.22) 46%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.18) 54%,
    transparent 68%
  );
  background-size: 240% 100%;
  background-position: 140% 0;
  opacity: 0;
  mix-blend-mode: overlay;
}

.action-btn.is-phys-glimmer::after {
  opacity: 1;
  animation: phys-btn-glimmer 0.75s ease-out forwards;
}

.phys-edge-light {
  position: absolute;
  left: -5px;
  top: -5px;
  pointer-events: none;
  z-index: 4;
}

@keyframes phys-btn-glimmer {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

.phys-body.is-phys-hit {
  z-index: 8 !important;
}

.method-idea-figure {
  display: block;
  width: 100%;
  margin: calc(1.75rem * var(--arch-scale, 1)) 0 0;
  padding: 0;
}

.method-idea-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(18px * var(--arch-scale, 1));
  background: #eef2f6;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.method-summary {
  margin-top: calc(2rem * var(--arch-scale, 1));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.method-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(1.35rem * var(--space-scale)) calc(1.75rem * var(--space-scale));
}

.method-summary-block {
  text-align: left;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.method-summary-block-train {
  background: rgba(254, 243, 199, 0.72);
  border-color: #d6c48a;
}

.method-summary-block-infer {
  background: rgba(187, 247, 208, 0.62);
  border-color: #8bb89a;
}

.method-summary-kicker {
  margin: 0 0 0.45rem;
  color: var(--text-main);
  font-size: calc(0.78rem * var(--type-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.method-summary-title {
  margin-bottom: calc(0.5rem * var(--arch-scale, 1));
  color: var(--text-main);
  font-size: calc(1.2rem * var(--type-scale));
  font-weight: 700;
  line-height: 1.25;
}

.method-summary-text {
  color: var(--text-dim);
  font-size: calc(0.95rem * var(--type-scale));
  line-height: 1.55;
}

@media (max-width: 720px) {
  .method-summary-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.method-summary-text a {
  color: var(--accent-indigo);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.method-summary-text .method-term {
  background: rgba(79, 70, 229, 0.14);
  color: var(--accent-indigo);
  font-weight: 700;
  padding: 0.08em 0.28em;
  border-radius: 0.28em;
}

/* Key Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.highlight-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.9);
}

.highlight-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-cyan);
}

.highlight-icon-wrapper svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.highlight-title {
  font-size: calc(1.1rem * var(--type-scale));
  font-weight: 700;
  color: var(--text-main);
}

.highlight-desc {
  font-size: calc(0.9rem * var(--type-scale));
  color: var(--text-muted);
  line-height: 1.5;
}

/* Abstract Section */
.abstract-card {
  padding: calc(2.25rem * var(--space-scale));
  font-size: calc(1.05rem * var(--type-scale));
  line-height: 1.8;
  color: #334155;
  text-align: justify;
}

.abstract-card p:not(:last-child) {
  margin-bottom: 1.25rem;
}

.abstract-card strong {
  color: #0f172a;
}

/* Interactive Simulator / Canvas Section */
.simulator-card {
  padding: 1.75rem;
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.08) 0%, rgba(255, 255, 255, 0.9) 70%);
}

.sim-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.sim-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.sim-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-select, .sim-btn {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sim-select:hover, .sim-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(226, 232, 240, 0.9);
}

.sim-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

.sim-canvas-container {
  position: relative;
  width: 100%;
  height: 440px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#hyperbones-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#hyperbones-canvas:active {
  cursor: grabbing;
}

.canvas-overlay-stats {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-card-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38bdf8;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.canvas-instructions {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card-border);
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
}

/* Method Section */
.method-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--bg-card-border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.method-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.method-tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.method-tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border-bottom: 2px solid var(--accent-cyan);
}

.method-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.method-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.method-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.method-desc h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.method-desc p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.formula-box {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4f46e5;
  margin-top: 0.75rem;
}

.method-visual {
  background: #f8fafc;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comparisons & Results Grid */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-top: 1.5rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.comparison-table th {
  background: rgba(241, 245, 249, 0.8);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.comparison-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.comparison-table td.highlight-cell {
  color: #059669;
  font-weight: 700;
}

.badge-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-tag.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tag.tag-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-tag.tag-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* BibTeX Section */
.bibtex-wrapper {
  position: relative;
  margin-top: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
}

.glass-card.bibtex-wrapper {
  background: #f8fafc;
  overflow-x: auto;
  overflow-y: hidden;
}

.bibtex-code-block {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  padding-right: 3.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #334155;
  overflow: visible;
  line-height: 1.65;
  white-space: pre;
  width: max-content;
  box-sizing: border-box;
}

.bibtex-code-block .keyword { color: #6366f1; font-weight: 600; }
.bibtex-code-block .entity { color: #0284c7; font-weight: 600; }
.bibtex-code-block .string { color: #059669; }
.bibtex-code-block .variable { color: #d97706; }

.copy-bibtex-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.copy-bibtex-btn:hover {
  background: #ffffff;
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.copy-bibtex-btn.copied {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: #ffffff;
}

.copy-bibtex-btn svg {
  width: 16px;
  height: 16px;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  border: 1px solid var(--accent-emerald);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notice svg {
  width: 18px;
  height: 18px;
  fill: #34d399;
}

/* Footer */
.page-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--bg-card-border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: calc(0.85rem * var(--type-scale));
}

.page-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--accent-cyan);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  :root {
    --radius-full: 10px;
  }

  .bg-grid-overlay {
    --grid-size: 26px;
    background-size: var(--grid-size) var(--grid-size);
  }

  .method-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    line-height: 1.12;
    margin-bottom: 0.75rem;
  }

  .publication-venue-container {
    gap: 0.4rem;
    margin: 0.85rem auto 1.25rem auto;
  }

  .venue-logo {
    height: calc(var(--venue-size) * 1.82);
  }

  .authors-container {
    margin-bottom: 0.95rem;
  }

  .authors-list {
    gap: 0.16rem 0.75rem;
    line-height: 1.2;
  }

  .action-buttons-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 0.1rem auto 0 auto;
  }

  .overview-card-text {
    line-height: 1.5;
  }

  .comparison-method-overlay {
    gap: 0.22rem;
    padding: 0.32rem 1.1rem 0.7rem;
  }

  .comparison-method-chip {
    min-height: 0;
    padding: 0.26rem 0.36rem;
    font-size: 0.68rem;
  }

  .method-summary-text {
    line-height: 1.5;
  }

  .ablation-grid {
    gap: 0.75rem !important;
  }

  .ablation-header-cell h4 {
    font-size: calc((1.65rem - 2pt) * var(--type-scale)) !important;
  }

  .ablation-connector svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-full: 8px;
  }

  .hero-title {
    line-height: 1.12;
    margin-bottom: 0.65rem;
    letter-spacing: -0.035em;
  }

  .nav-links {
    display: none;
  }

  .abstract-card {
    text-align: left;
  }

  .publication-venue-container {
    gap: 0.3rem;
    margin: 0.75rem auto 1.1rem auto;
  }

  .venue-logo,
  .publication-venue-container img {
    height: calc(var(--venue-size) * 1.82);
  }

  .venue-label,
  .publication-venue-container > span {
    line-height: 1;
  }

  .authors-container {
    margin-bottom: 0.85rem;
  }

  .authors-list {
    gap: 0.12rem 0.58rem;
    line-height: 1.2;
  }

  .author-item {
    white-space: normal;
  }

  .glass-card {
    padding: calc(1.15rem * var(--space-scale));
  }

  .teaser-wrapper {
    margin: 1.25rem 0 2rem 0;
  }

  .teaser-card {
    padding: 0.85rem;
  }

  .section {
    padding: var(--section-y-pad) 0;
  }

  .section-header {
    margin-bottom: 1.15rem;
  }

  .section-subtitle {
    padding: 0 0.25rem;
  }

  .overview-card-text,
  .method-summary-text {
    line-height: 1.45;
  }

  .sim-canvas-container {
    height: 320px;
  }

  .action-buttons-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 0.35rem auto 0 auto;
  }

  .teaser-video-controls {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.15rem;
    margin: 0.9rem auto 0 auto;
    padding: 0.28rem 0.3rem;
    box-sizing: border-box;
  }

  .vid-ctrl-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.42rem 0.35rem;
    font-size: calc(0.78rem * var(--type-scale));
    gap: 0.28rem;
    min-width: 0;
  }

  .vid-ctrl-btn svg {
    width: 14px;
    height: 14px;
  }

  .quality-btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none;
  }

  .quality-btn.active.is-ready {
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.28);
  }

  .results-checkbox-overlay,
  .results-radio-group.results-checkbox-overlay {
    width: max-content;
    max-width: calc(100% - 3.6rem);
    flex-wrap: nowrap;
    gap: 0.2rem;
    padding: 0.22rem;
  }

  .results-radio-label .checkbox-text {
    display: inline;
  }

  .results-radio-label .checkbox-text-short {
    display: none;
  }

  .results-radio-label {
    gap: 0.28rem;
    font-size: max(0.68rem, calc(0.85rem * var(--overlay-scale)));
    padding: 0.34rem 0.5rem;
    line-height: 1.15;
  }

  .results-radio-icon,
  .results-radio-icon svg {
    width: 14px;
    height: 14px;
  }

  .ablation-grid {
    gap: 0.4rem !important;
  }

  .ablation-header-cell {
    margin-bottom: 0.45rem !important;
  }

  .ablation-header-cell h4 {
    font-size: calc(0.95rem * var(--type-scale)) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25;
  }

  .ablation-connector {
    display: none !important;
  }

  .ablation-toolbar {
    gap: 0.55rem;
    margin-top: 1rem;
  }


  .bibtex-code-block {
    padding: 1.5rem 1.75rem;
    padding-right: 3.25rem;
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .page-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
  }
}

@media (max-width: 420px) {
  .action-btn span {
    letter-spacing: -0.01em;
  }

  .vid-ctrl-btn {
    font-size: calc(0.72rem * var(--type-scale));
    padding: 0.4rem 0.22rem;
  }
}

.teaser-videos-container {
  position: relative;
  background: #f8fafc;
  display: block;
}

.teaser-videos-container .video-stack-container {
  aspect-ratio: 12.8 / 7.65;
}

.teaser-videos-container .stacked-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-stack-container {
  display: grid;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Blurry filter and loading badge while the full video group buffers */
.video-loading-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: none;
  align-items: stretch;
  flex-direction: column;
  gap: calc(0.4rem * var(--ui-scale));
  width: min(calc(13.5rem * var(--ui-scale)), 72%);
  padding: calc(0.45rem * var(--ui-scale)) calc(0.75rem * var(--ui-scale)) calc(0.5rem * var(--ui-scale));
  background: transparent;
  color: #3730a3;
  border: none;
  border-radius: var(--radius-full);
  font-size: calc(0.8rem * var(--type-scale));
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
  box-shadow: none;
}

.video-loading-badge .loading-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(0.38rem * var(--ui-scale));
  width: 100%;
  min-width: 0;
}

.video-loading-badge .loading-label {
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.video-loading-badge .loading-bar {
  display: block;
  width: 100%;
  height: calc(0.55rem * var(--ui-scale));
  border-radius: 999px;
  background: rgba(55, 48, 163, 0.16);
  overflow: hidden;
}

.video-loading-badge .loading-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4338ca 0%, #5b21b6 55%, #6d28d9 100%);
  box-shadow: 0 0 10px rgba(91, 33, 182, 0.4);
  transition: width 0.12s linear;
}

.video-stack-container.is-loading .video-loading-badge {
  display: flex;
}

.video-stack-container.is-loading .stacked-vid {
  opacity: 0 !important;
}

.video-stack-container.is-loading {
  background: #f1f5f9;
}

.teaser-wrapper.is-group-loading .teaser-video-controls,
.results-video-card.is-group-loading .teaser-video-controls,
.comparison-video-card.is-group-loading + .teaser-video-controls,
.ablation-grid.is-group-loading .ablation-controls {
  opacity: 0.45;
  pointer-events: none;
}

.video-loading-badge .spinner-icon {
  display: none;
}

.video-fade-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.stacked-vid {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
.stacked-vid.previous {
  opacity: 1 !important;
  z-index: 1 !important;
  pointer-events: none;
  transition: none !important;
}
.stacked-vid.active {
  opacity: 1 !important;
  pointer-events: auto;
  z-index: 2 !important;
}

/* Results: hot clips keep a full-size decode surface (opacity 0) so
   HD/FHD are not downscaled to a 2px window. Cold clips stay tiny. */
#results-video-stack .stacked-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: none;
}
#results-video-stack .stacked-vid.is-cold {
  inset: auto;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  opacity: 1;
  z-index: 0;
}
#results-video-stack .stacked-vid.is-hot:not(.active):not(.previous) {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
}
#results-video-stack .stacked-vid.previous,
#results-video-stack .stacked-vid.active {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
#results-video-stack .stacked-vid.previous {
  z-index: 1;
}

#results-video-stack .stacked-vid.active,
#results-video-stack .stacked-vid.previous {
  filter: blur(0px);
  transform: scale(1);
  transform-origin: 50% 48%;
  transition: filter 0.4s cubic-bezier(0.37, 0, 0.63, 1),
              transform 0.4s cubic-bezier(0.37, 0, 0.63, 1);
}

#results-video-stack.is-breathing-out .stacked-vid.active,
#results-video-stack.is-breathing-out .stacked-vid.previous {
  filter: blur(10px);
  transform: scale(1.4);
  transition-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
}

#results-video-stack.is-breathing-in .stacked-vid.active,
#results-video-stack.is-breathing-in .stacked-vid.previous {
  filter: blur(0px);
  transform: scale(1);
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

/* Ablation: same model as the original page — 1:1 card, video fills it.
   Only .active is visible (see .stacked-vid). Intrinsic video size must
   not set the card, or a 16:9 encode will stretch the square scene. */
.ablation-grid .video-stack-container {
  padding: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  flex-grow: 0;
  overflow: hidden;
}

.ablation-grid .stacked-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.teaser-video-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto 0 auto;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  width: max-content;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.active-indicator {
  position: absolute;
  left: 0;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.4);
  border-radius: var(--radius-full);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
  pointer-events: none;
}

.vid-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  z-index: 2;
}

.vid-ctrl-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.vid-ctrl-btn:hover {
  color: var(--accent-blue);
}

.vid-ctrl-btn:hover svg {
  transform: scale(1.1);
}

.vid-ctrl-btn.active {
  background: transparent;
  color: var(--accent-indigo);
  border-color: transparent;
  box-shadow: none;
}

/* ==========================================================================
   Results Section Styles
   ========================================================================== */
.results-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 1.25rem auto;
}

.results-radio-group,
.results-checkbox-group {
  display: inline-flex;
  align-items: center;
  gap: calc(0.35rem * var(--overlay-scale));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: calc(0.35rem * var(--overlay-scale));
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.results-checkbox-overlay {
  position: absolute;
  top: calc(1.15rem * var(--overlay-scale));
  left: calc(1.15rem * var(--overlay-scale));
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 4.2rem);
  flex-wrap: nowrap;
}

.results-radio-label {
  display: inline-flex;
  align-items: center;
  gap: calc(0.4rem * var(--overlay-scale));
  cursor: pointer;
  font-size: calc(0.85rem * var(--overlay-scale));
  font-weight: 600;
  color: var(--text-dim);
  user-select: none;
  padding: calc(0.4rem * var(--overlay-scale)) calc(0.75rem * var(--overlay-scale));
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: var(--transition-fast);
}

.results-radio-label:hover {
  color: var(--accent-indigo);
}

.results-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.results-radio-icon {
  width: calc(18px * var(--overlay-scale));
  height: calc(18px * var(--overlay-scale));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.results-radio-icon svg {
  width: calc(18px * var(--overlay-scale));
  height: calc(18px * var(--overlay-scale));
}

.results-radio-icon .eye-open {
  display: none;
}

.results-radio-icon .eye-closed {
  display: block;
}

.results-radio-label input[type="radio"]:checked + .results-radio-icon .eye-open {
  display: block;
}

.results-radio-label input[type="radio"]:checked + .results-radio-icon .eye-closed {
  display: none;
}

.results-radio-label:has(input[type="radio"]:checked) {
  color: #ffffff;
  background: var(--accent-indigo);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.checkbox-text-short {
  display: none;
}

.results-fade-overlay {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.05s linear;
}

/* ==========================================================================
   Video Buffering / Loading Spinner
   ========================================================================== */
.video-buffer-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 46px;
  height: 46px;
  border: 3.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--accent-indigo, #4f46e5);
  border-radius: 50%;
  animation: video-spin 0.75s linear infinite;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 15;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@keyframes video-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

.video-stack-container.is-buffering > .video-buffer-spinner,
.teaser-videos-container.is-buffering .video-buffer-spinner,
.interactive-results-container.is-buffering .video-buffer-spinner {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   Quality Switcher Pill Control
   ========================================================================== */
.quality-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem auto 0 auto;
}

.quality-toggle-on-panel {
  position: absolute;
  top: calc(0.85rem * var(--quality-scale));
  right: calc(0.85rem * var(--quality-scale));
  margin: 0;
  z-index: 22;
  pointer-events: auto;
}

.quality-toggle-on-panel .quality-btn {
  padding: calc(0.28rem * var(--quality-scale)) calc(0.7rem * var(--quality-scale));
  font-size: calc(0.75rem * var(--quality-scale));
}

.quality-toggle-inline {
  margin: 0;
}

.comparison-stage {
  --comparison-radius: var(--radius-lg);
  position: relative;
  overflow: visible;
  container-type: inline-size;
}

#comparison .comparison-after-video {
  margin-top: 1rem;
  text-align: center;
}

.glass-card.comparison-video-card,
.comparison-video-card {
  padding: 0;
  overflow: hidden;
  position: relative;
  border-radius: var(--comparison-radius);
  box-shadow: var(--shadow-md);
}

.cmp-video-stack {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  container-type: inline-size;
  container-name: comparison;
}

#temporal .section-header,
#temporal .comparison-stage,
#temporal .temporal-after-video {
  width: 60.75%;
  margin-left: auto;
  margin-right: auto;
}

#temporal .temporal-after-video {
  margin-top: 1rem;
  text-align: left;
  font-size: min(calc(1rem * var(--type-scale)), calc(1.85rem * var(--type-scale) * 0.78));
}

#temporal-video-stack {
  aspect-ratio: 1110 / 1080;
}

#temporal-video-stack .comparison-method-overlay {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#temporal-video-stack .comparison-method-chip.is-direct {
  background: #fecaca;
  border-color: #937575;
  color: var(--text-main);
  font-weight: 500;
}

#temporal-video-stack .comparison-method-chip.is-ours {
  background: #bbf7d0;
  border-color: #6c8f79;
  color: var(--text-main);
  font-weight: 500;
}

@media (min-width: 641px) {
  #temporal-video-stack .comparison-method-chip.is-direct,
  #temporal-video-stack .comparison-method-chip.is-ours {
    padding: 0.58rem 1rem;
    min-height: 2.75rem;
    line-height: 1.25;
  }
}

.cmp-video-stack > .video-loading-badge,
.cmp-video-stack > .quality-toggle-container,
.cmp-video-stack > .comparison-method-overlay,
.cmp-video-stack > .video-fade-overlay {
  grid-area: 1 / 1;
}

.cmp-video-stack .stacked-vid,
.cmp-video-stack .stacked-vid.active,
.cmp-video-stack .stacked-vid.previous {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  opacity: 1 !important;
  pointer-events: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.82s cubic-bezier(0.33, 0.0, 0.2, 1) !important;
}

.cmp-video-stack .stacked-vid {
  z-index: 0;
}

.cmp-video-stack .stacked-vid.active {
  transform: translate3d(0, 0, 0);
  z-index: 2;
  pointer-events: auto;
}

.cmp-video-stack .stacked-vid.is-armed {
  transition: none !important;
}

.cmp-video-stack .stacked-vid.slide-from-right {
  transform: translate3d(100%, 0, 0);
  z-index: 2;
}

.cmp-video-stack .stacked-vid.slide-from-left {
  transform: translate3d(-100%, 0, 0);
  z-index: 2;
}

.cmp-video-stack .stacked-vid.slide-out-left {
  transform: translate3d(-100%, 0, 0);
  z-index: 1;
}

.cmp-video-stack .stacked-vid.slide-out-right {
  transform: translate3d(100%, 0, 0);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cmp-video-stack .stacked-vid,
  .cmp-video-stack .stacked-vid.active,
  .cmp-video-stack .stacked-vid.previous {
    transition-duration: 0.01ms !important;
  }
}

.cmp-video-stack.is-sliding .video-fade-overlay {
  opacity: 0 !important;
}

.comparison-method-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(0.12rem, 1.1cqi, 0.4rem);
  padding: 0.35rem max(1.15rem, 3.6cqi) max(0.7rem, 2.6cqi);
  box-sizing: border-box;
  background: transparent;
  pointer-events: none;
}

.cmp-video-stack.is-loading .comparison-method-overlay {
  opacity: 0;
}

.comparison-method-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: clamp(0.1rem, 0.7cqi, 0.38rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(0.16rem, 1.05cqi, 0.46rem) clamp(0.18rem, 1.2cqi, 0.65rem);
  border-radius: var(--comparison-radius);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 6px 16px rgba(15, 23, 42, 0.12),
    0 14px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: clamp(0.4rem, 2.05cqi, 0.95rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.comparison-method-name,
.comparison-method-fps,
.comparison-method-sep {
  flex: 0 0 auto;
  white-space: nowrap;
}

.comparison-method-sep {
  color: #94a3b8;
  font-weight: 600;
}

.comparison-method-fps {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78em;
  white-space: nowrap;
}

.comparison-method-fps.is-realtime {
  color: var(--accent-emerald);
}

.comparison-method-fps.is-not-realtime {
  color: #dc2626;
}

.comparison-method-chip.is-ours {
  background: #ffffff;
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.comparison-method-chip.is-ours .comparison-method-fps.is-realtime {
  color: var(--accent-emerald);
}

.comparison-stage:has(.cmp-video-stack.is-sliding) .comparison-nav {
  pointer-events: none;
}

.comparison-nav {
  position: absolute;
  top: 50%;
  z-index: 24;
  width: 3.375rem;
  height: 3.375rem;
  padding: 0;
  border: 1px solid #5a5a5a;
  border-radius: 50%;
  background: #6e6e6e;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.comparison-nav:hover {
  background: #5c5c5c;
  border-color: #4a4a4a;
  color: #ffffff;
}

.comparison-nav-prev {
  left: var(--nav-inset-left, 0px);
  transform: translate(-50%, -50%);
  animation: comparison-nav-beckon-prev 3.4s ease-in-out infinite;
}

.comparison-nav-next {
  right: var(--nav-inset-right, 0px);
  transform: translate(50%, -50%);
  animation: comparison-nav-beckon-next 3.4s ease-in-out infinite;
}

.comparison-nav svg {
  width: 41%;
  height: 41%;
}

.comparison-nav-prev svg {
  animation: comparison-nav-chevron-prev 3.4s ease-in-out infinite;
}

.comparison-nav-next svg {
  animation: comparison-nav-chevron-next 3.4s ease-in-out infinite;
}

@keyframes comparison-nav-beckon-prev {
  0%, 24%, 100% {
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
  }
  7% {
    transform: translate(calc(-50% - 7px), -50%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  }
  12% {
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
  }
  17% {
    transform: translate(calc(-50% - 5px), -50%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  }
}

@keyframes comparison-nav-beckon-next {
  0%, 24%, 100% {
    transform: translate(50%, -50%);
    box-shadow: var(--shadow-md);
  }
  7% {
    transform: translate(calc(50% + 7px), -50%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  }
  12% {
    transform: translate(50%, -50%);
    box-shadow: var(--shadow-md);
  }
  17% {
    transform: translate(calc(50% + 5px), -50%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  }
}

@keyframes comparison-nav-chevron-prev {
  0%, 24%, 100% { transform: translateX(0); }
  7% { transform: translateX(-3px); }
  12% { transform: translateX(0); }
  17% { transform: translateX(-2px); }
}

@keyframes comparison-nav-chevron-next {
  0%, 24%, 100% { transform: translateX(0); }
  7% { transform: translateX(3px); }
  12% { transform: translateX(0); }
  17% { transform: translateX(2px); }
}

.comparison-nav-prev:hover,
.comparison-nav-prev:focus-visible {
  animation: none;
  transform: translate(-50%, -50%) scale(1.12);
}

.comparison-nav-next:hover,
.comparison-nav-next:focus-visible {
  animation: none;
  transform: translate(50%, -50%) scale(1.12);
}

.comparison-stage.is-nav-inset .comparison-nav-prev {
  animation-name: comparison-nav-beckon-prev-inset;
}

.comparison-stage.is-nav-inset .comparison-nav-next {
  animation-name: comparison-nav-beckon-next-inset;
}

@keyframes comparison-nav-beckon-prev-inset {
  0%, 24%, 100% {
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
  }
  7% {
    transform: translate(calc(-50% + 6px), -50%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  }
  12% {
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
  }
  17% {
    transform: translate(calc(-50% + 4px), -50%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  }
}

@keyframes comparison-nav-beckon-next-inset {
  0%, 24%, 100% {
    transform: translate(50%, -50%);
    box-shadow: var(--shadow-md);
  }
  7% {
    transform: translate(calc(50% - 6px), -50%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  }
  12% {
    transform: translate(50%, -50%);
    box-shadow: var(--shadow-md);
  }
  17% {
    transform: translate(calc(50% - 4px), -50%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  }
}

.comparison-nav-prev:hover svg,
.comparison-nav-prev:focus-visible svg,
.comparison-nav-next:hover svg,
.comparison-nav-next:focus-visible svg {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .comparison-nav-prev,
  .comparison-nav-next,
  .comparison-nav-prev svg,
  .comparison-nav-next svg {
    animation: none;
  }
}

.comparison-stage.is-group-loading .comparison-nav {
  opacity: 0.45;
  pointer-events: none;
}

.architecture-panel,
.glass-card.architecture-panel {
  --arch-scale: var(--space-scale);
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  padding: calc(2rem * var(--arch-scale));
}

.physics-table-wrap {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.physics-table-wrap {
  margin-top: 3.25rem;
}

.physics-table-title {
  margin: 0 0 0.28rem;
  text-align: center;
  font-size: calc((1.85rem - 3pt) * var(--type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.physics-table-lead {
  margin: 0 0 0.68rem;
  text-align: center;
  color: var(--text-muted);
  font-size: min(calc(1rem * var(--type-scale)), calc((1.85rem - 3pt) * var(--type-scale) * 0.78));
  line-height: 1.45;
}

.physics-table-note {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: min(calc(1rem * var(--type-scale)), calc((1.85rem - 3pt) * var(--type-scale) * 0.78));
  line-height: 1.45;
}

.physics-table-footnote {
  margin: 1.35rem 0 0;
  text-align: center;
  color: var(--text-dim);
  font-size: min(calc(0.72rem * var(--type-scale)), calc((1.85rem - 3pt) * var(--type-scale) * 0.62));
  line-height: 1.45;
}

.physics-table-footnote-label {
  font-weight: 700;
  color: var(--text-main);
}

.physics-table-card,
.glass-card.physics-table-card {
  padding: 0;
  overflow: hidden;
}

.physics-table-scroll {
  max-width: 100%;
  overflow: visible;
}

.physics-table {
  --table-fit-scale: 1;
  --table-edge-pad: calc(0.7rem * var(--type-scale) * var(--table-fit-scale));
  --table-last-col: 16%;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: calc(0.88rem * var(--type-scale) * var(--table-fit-scale));
}

.physics-col-method {
  width: 36%;
}

.physics-col-metric {
  width: 16%;
}

.physics-table-runtime {
  --table-last-col: 13.333%;
  min-width: 0;
}

.physics-col-runtime-method {
  width: 20%;
}

.physics-col-runtime-metric {
  width: 13.333%;
}

.physics-table-runtime thead th {
  white-space: nowrap;
  line-height: 1.2;
}

.physics-table-bones {
  --table-last-col: 14%;
  --bones-table-gap: calc(0.38rem * var(--type-scale) * var(--table-fit-scale));
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.physics-table-bones thead .bones-group-row th:first-child,
.physics-table-bones thead tr:last-child th:first-child,
.physics-table-bones tbody th {
  border-right: var(--bones-table-gap) solid #ffffff;
}

.physics-table-bones thead .bones-group-row th:nth-child(2),
.physics-table-bones thead tr:last-child th:nth-child(4),
.physics-table-bones tbody td:nth-child(4) {
  border-right: var(--bones-table-gap) solid #ffffff;
}

.physics-col-bones-count {
  width: 22%;
}

.physics-col-bones-metric {
  width: 13%;
}

.physics-table-bones thead .bones-group-row th {
  background: #ffffff;
  color: var(--accent-purple);
  text-transform: uppercase;
}

.physics-table-bones thead .bones-group-row th:first-child {
  color: transparent;
}

.physics-table-bones thead tr:last-child th,
.physics-table-bones thead th:first-child,
.physics-table-bones tbody th {
  text-align: center;
  padding-left: calc(0.55rem * var(--type-scale) * var(--table-fit-scale));
  padding-right: calc(0.55rem * var(--type-scale) * var(--table-fit-scale));
}

.physics-table-bones thead tr:last-child th {
  letter-spacing: 0;
}

.physics-table-bones .metric-sym,
.physics-table-lead .metric-sym {
  text-transform: none;
  font-style: italic;
  letter-spacing: 0;
}

.physics-table-bones thead .metric-sym {
  font-size: 1.32em;
  font-weight: 700;
  line-height: 1;
}

.physics-table-bones thead .metric-sym sub {
  font-size: 0.68em;
}

.physics-table-bones .metric-pm {
  font-size: 0.82em;
  font-weight: 500;
  opacity: 0.78;
}

.physics-table-bones tbody tr {
  background-image: none;
}

.physics-table-bones tbody tr:hover th,
.physics-table-bones tbody tr:hover td {
  background-color: inherit;
}

.physics-table-bones .bones-row-32 th,
.physics-table-bones .bones-row-32 td {
  background-color: #fecaca;
}

.physics-table-bones .bones-row-64 th,
.physics-table-bones .bones-row-64 td {
  background-color: #fef3c7;
}

.physics-table-bones .bones-row-128 th,
.physics-table-bones .bones-row-128 td {
  background-color: #bbf7d0;
}

.physics-table-bones tr.is-bold th,
.physics-table-bones tr.is-bold td {
  font-weight: 800;
}

.physics-table thead th {
  padding: calc(0.8rem * var(--type-scale) * var(--table-fit-scale)) calc(0.45rem * var(--type-scale) * var(--table-fit-scale));
  text-align: center;
  font-size: calc(0.92rem * var(--type-scale) * var(--table-fit-scale));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: #4b5563;
  border-bottom: none;
  white-space: nowrap;
  line-height: 1.2;
}

.physics-table thead th:first-child,
.physics-table tbody th,
.physics-table tbody tr > *:first-child {
  padding-left: calc(var(--table-edge-pad) + var(--table-last-col) * 0.22);
  text-align: left;
}

.physics-table thead th:last-child,
.physics-table tbody tr > *:last-child {
  padding-right: var(--table-edge-pad);
}

.physics-table .metric-dir {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.physics-table tbody th,
.physics-table tbody td {
  padding: calc(0.68rem * var(--type-scale) * var(--table-fit-scale)) calc(0.32rem * var(--type-scale) * var(--table-fit-scale));
  border-bottom: none;
  text-align: center;
  vertical-align: middle;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.physics-table tbody th {
  text-align: left;
  font-weight: 600;
}

.physics-table.physics-table-bones thead th:first-child,
.physics-table.physics-table-bones tbody th,
.physics-table.physics-table-bones tbody tr > *:first-child {
  padding-left: calc(0.4rem * var(--type-scale) * var(--table-fit-scale));
  padding-right: calc(0.4rem * var(--type-scale) * var(--table-fit-scale));
  text-align: center;
}

.physics-table.physics-table-bones thead th:last-child,
.physics-table.physics-table-bones tbody tr > *:last-child {
  padding-right: var(--table-edge-pad);
}

.physics-table .method-cite {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.84em;
}

.physics-table tbody tr {
  background-image: linear-gradient(
    to right,
    transparent,
    rgba(71, 85, 105, 0.16) 8%,
    rgba(71, 85, 105, 0.16) 92%,
    transparent
  );
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 1px;
}

.physics-table tbody tr:last-child {
  background-image: none;
}

.physics-table tbody tr:hover {
  background-color: rgba(248, 250, 252, 0.9);
}

.physics-table tr.is-ours th {
  color: var(--accent-purple);
  font-weight: 800;
}

.physics-table .is-best,
.physics-table .is-second {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28em 0.55em;
  border-radius: 0.45rem;
  line-height: 1;
  vertical-align: middle;
}

.physics-table .is-best {
  color: var(--accent-purple);
  font-weight: 800;
  background: rgba(124, 58, 237, 0.14);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.32);
}

.physics-table .is-second {
  color: #a16207;
  font-weight: 700;
  background: rgba(250, 204, 21, 0.22);
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.38);
}

#num-bones .section-header,
#num-bones .num-bones-after-video {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

#num-bones .num-bones-after-video {
  margin-top: 1rem;
  text-align: left;
  font-size: min(calc(1rem * var(--type-scale)), calc(1.85rem * var(--type-scale) * 0.78));
}

.num-bones-stage {
  --nb-scale: var(--ui-scale);
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.num-bones-link-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.num-bones-stage .quality-toggle-on-panel {
  z-index: 22;
}

.num-bones-bridge {
  --nb-bridge-h: calc(1.85rem * var(--nb-scale));
  --nb-bridge-gap: calc(0.42rem * var(--nb-scale));
  --nb-head-over: calc(0.58rem * var(--nb-scale));
  --nb-head-scale: 1.3;
  --nb-arrow-h: calc(var(--nb-head-scale) * (var(--nb-bridge-h) + 2 * var(--nb-bridge-gap) + 2 * var(--nb-head-over)));
  --nb-shaft-inset: calc((var(--nb-arrow-h) - var(--nb-bridge-h) - 2 * var(--nb-bridge-gap)) / 2);
  --nb-label-size: calc(1.12rem * var(--nb-scale));
  --nb-arrow-nudge: calc(0.7rem * var(--nb-scale));
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  min-height: var(--nb-bridge-h);
  margin: var(--nb-bridge-gap) 0;
  overflow: visible;
}

.num-bones-bridge-arrow {
  container-type: size;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--nb-bridge-gap) - var(--nb-shaft-inset));
  bottom: calc(-1 * var(--nb-bridge-gap) - var(--nb-shaft-inset));
  transform: translateX(var(--nb-arrow-nudge));
  z-index: 3;
  pointer-events: none;
}

.num-bones-bridge-arrow::before {
  --nb-head: calc(100cqh * 0.8660254037844386);
  content: "";
  position: absolute;
  inset: 0;
  background: #6e6e70;
  clip-path: polygon(
    0 var(--nb-shaft-inset),
    calc(100% - var(--nb-head)) var(--nb-shaft-inset),
    calc(100% - var(--nb-head)) 0,
    100% 50%,
    calc(100% - var(--nb-head)) 100%,
    calc(100% - var(--nb-head)) calc(100% - var(--nb-shaft-inset)),
    0 calc(100% - var(--nb-shaft-inset))
  );
}

.num-bones-labels {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 90%;
  justify-self: center;
  margin: 0;
  text-align: center;
  font-size: var(--nb-label-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.num-bones-labels span {
  justify-self: center;
  padding: 0.12em 0.55em;
  border-radius: calc(0.4rem * var(--nb-scale));
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18), 0 1px 2px rgba(15, 23, 42, 0.1);
}

.num-bones-labels span:nth-child(1) {
  background: #fecaca;
  border-color: #937575;
}

.num-bones-labels span:nth-child(2) {
  background: #fde68a;
  border-color: #938550;
}

.num-bones-labels span:nth-child(3) {
  background: #bbf7d0;
  border-color: #6c8f79;
}

.glass-card.num-bones-card,
.num-bones-card {
  width: 90%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  z-index: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.num-bones-card:has(#num-bones-shirt-stack) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.num-bones-card:has(#num-bones-dress-stack) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

#num-bones .physics-table-wrap {
  width: 90%;
}

.num-bones-stage .video-stack-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
}

.num-bones-stage .stacked-vid,
.num-bones-stage .stacked-vid.active {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.num-bones-stage .video-fade-overlay {
  z-index: 5;
}

.num-bones-track-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.num-bones-stage .video-stack-container.is-loading .num-bones-track-canvas {
  opacity: 0;
}

.ablation-col-title {
  text-align: center;
  color: var(--text-main);
  font-size: calc((1.65rem - 2pt) * var(--type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  font-family: var(--font-sans);
}

.ablation-toolbar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
}

.quality-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim, #64748b);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quality-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(3px * var(--quality-scale));
  width: max-content;
  min-width: var(--quality-min-width, 0px);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-full, 9999px);
  padding: calc(3px * var(--quality-scale));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
}

.quality-btn {
  --quality-fill: 0%;
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    rgba(100, 116, 139, 0.38),
    rgba(100, 116, 139, 0.38)
  );
  background-repeat: no-repeat;
  background-position: left center;
  background-size: var(--quality-fill) 100%;
  background-clip: padding-box;
  border: none;
  padding: calc(0.35rem * var(--quality-scale)) calc(0.9rem * var(--quality-scale));
  border-radius: var(--radius-full, 9999px);
  font-size: calc(0.82rem * var(--quality-scale));
  font-weight: 600;
  color: var(--text-dim, #64748b);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, background-size 0.16s linear, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.quality-btn-fill {
  display: none;
}

.quality-btn-label {
  position: relative;
  z-index: 1;
}

.quality-btn:hover:not(.is-locked):not(:disabled) {
  color: var(--accent-indigo, #4f46e5);
  background-color: #e5e7eb;
}

.quality-btn.active.is-ready:hover:not(:disabled),
.video-stack-container.is-ready .quality-btn.active:hover:not(:disabled) {
  color: #ffffff;
  background-color: #6366f1;
}

.quality-btn.active.is-ready,
.video-stack-container.is-ready .quality-btn.active {
  --quality-fill: 100%;
  color: #ffffff;
  background-color: var(--accent-indigo, #4f46e5);
  background-image: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.quality-btn.active:not(.is-ready) {
  color: #334155;
  background-color: transparent;
  box-shadow: none;
}

.quality-btn.is-ready:not(.active) {
  color: #334155;
  background-image: none;
}

.quality-btn.is-locked,
.quality-btn:disabled {
  cursor: not-allowed;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .bg-grid-overlay {
    --grid-size: 18px;
    background-size: var(--grid-size) var(--grid-size);
  }

  .hero-title {
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 0.6rem;
  }

  .publication-venue-container {
    gap: 0.25rem;
    margin: 0.7rem auto 1rem auto;
  }

  .venue-label,
  .publication-venue-container > span {
    line-height: 1;
  }

  .authors-container {
    margin-bottom: 0.8rem;
  }

  .authors-list {
    gap: 0.1rem 0.5rem;
    line-height: 1.18;
  }

  .action-buttons-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .overview-card-text,
  .method-summary-text {
    line-height: 1.42;
  }

  .teaser-video-controls {
    width: max-content;
    max-width: 100%;
    gap: 0.1rem;
    margin-top: 0.6rem;
    padding: 0.12rem 0.14rem;
  }

  .vid-ctrl-btn {
    flex: 0 1 auto;
    padding: 0.28rem 0.42rem;
    font-size: calc(0.75rem * var(--type-scale));
    gap: 0.18rem;
  }

  .vid-ctrl-btn svg {
    width: 12px;
    height: 12px;
  }

  .glass-card {
    padding: calc(1.05rem * var(--space-scale));
  }

  .glass-card.physics-table-card {
    padding: 0;
  }

  .comparison-stage {
    --comparison-radius: 14px;
  }

  .comparison-nav {
    width: clamp(1.05rem, 5.2cqi, 1.45rem);
    height: clamp(1.05rem, 5.2cqi, 1.45rem);
  }

  .comparison-method-overlay {
    gap: 0.14rem;
    padding: 0.22rem 1rem 0.62rem;
  }

  .comparison-method-chip {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.12rem;
    min-height: 0;
    padding: 0.2rem 0.28rem;
    font-size: clamp(0.48rem, calc(0.66rem * var(--overlay-scale)), 0.66rem);
    line-height: 1.15;
    border-width: 1px;
  }

  .comparison-method-sep {
    display: inline;
  }

  .glass-card.comparison-video-card {
    padding: 0;
    border-radius: var(--comparison-radius);
  }

  .architecture-panel,
  .glass-card.architecture-panel {
    max-width: 100%;
  }

  .physics-table-wrap {
    margin-top: 2.25rem;
  }

  #num-bones .physics-table-wrap {
    width: 100%;
  }

  .physics-table {
    font-size: calc(0.8rem * var(--type-scale) * var(--table-fit-scale));
  }

  .physics-table thead th {
    white-space: nowrap;
  }

  .physics-table-lead {
    margin-bottom: 0.48rem;
  }

  .copy-bibtex-btn {
    width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
  }

  .copy-bibtex-btn svg {
    width: 13px;
    height: 13px;
  }

  .quality-btn.active.is-ready {
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
  }

  .results-checkbox-overlay,
  .results-radio-group.results-checkbox-overlay {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  }

  .results-checkbox-overlay .checkbox-text {
    display: inline;
  }

  .results-checkbox-overlay .checkbox-text-short {
    display: none;
  }

  .results-checkbox-overlay .results-radio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .results-checkbox-overlay .results-radio-icon svg {
    stroke-width: 1.75;
    flex-shrink: 0;
  }

  .results-checkbox-overlay .results-radio-icon .eye-open {
    display: none;
  }

  .results-checkbox-overlay .results-radio-icon .eye-closed {
    display: block;
  }

  .results-checkbox-overlay .results-radio-label input[type="radio"]:checked + .results-radio-icon .eye-open {
    display: block;
  }

  .results-checkbox-overlay .results-radio-label input[type="radio"]:checked + .results-radio-icon .eye-closed {
    display: none;
  }
}

@media (max-width: 420px) {
  .bg-grid-overlay {
    --grid-size: 14px;
    background-size: var(--grid-size) var(--grid-size);
  }

  .hero-title {
    line-height: 1.1;
  }

  .overview-card-text,
  .method-summary-text {
    line-height: 1.4;
  }

  .authors-list {
    gap: 0.08rem 0.44rem;
    line-height: 1.15;
  }

  .action-btn span {
    letter-spacing: -0.02em;
  }

  .comparison-stage {
    --comparison-radius: 12px;
  }

  .comparison-method-overlay {
    gap: 0.1rem;
    padding: 0.16rem 0.9rem 0.55rem;
  }

  .comparison-method-chip {
    flex-direction: row;
    flex-wrap: nowrap;
    min-height: 0;
    padding: 0.16rem 0.22rem;
    font-size: clamp(0.44rem, calc(0.6rem * var(--overlay-scale)), 0.6rem);
    line-height: 1.15;
    border-width: 1px;
  }

  .teaser-video-controls {
    padding: 0.1rem 0.12rem;
  }

  .vid-ctrl-btn {
    padding: 0.22rem 0.32rem;
    font-size: calc(0.72rem * var(--type-scale));
  }

  .vid-ctrl-btn svg {
    width: 11px;
    height: 11px;
  }

}

.readability-tune {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 400;
  width: min(20rem, calc(100vw - 1.5rem));
  padding: 0.85rem 0.95rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  font-family: var(--font-sans);
  color: var(--text-main);
}

.readability-tune-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.readability-tune-head strong {
  font-size: 0.92rem;
}

.readability-tune-head span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.readability-tune-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
}

.readability-tune-row span {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.readability-tune-row code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.readability-tune-row small {
  color: var(--text-dim);
}

.readability-tune-row output {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.readability-tune-row input {
  grid-column: 1 / -1;
  width: 100%;
}

.readability-tune-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.readability-tune-actions button {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

@media print {
  .readability-tune {
    display: none;
  }
}


