/* ============================================
   CSS Variables & Base
   ============================================ */
:root {
  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAF8;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-tertiary: #8A8A8A;
  --border: #E5E2DB;
  --border-light: #F0EDE6;

  --accent-1: #8C1515;
  --accent-2: #B83A4B;
  --accent-gradient: linear-gradient(135deg, #8C1515 0%, #B83A4B 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(140,21,21,0.08) 0%, rgba(184,58,75,0.08) 100%);

  --gold: #D97706;
  --silver: #6B7280;
  --bronze: #B45309;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-panel: 0 20px 44px rgba(25, 22, 18, 0.06), 0 6px 18px rgba(25, 22, 18, 0.035);
  --shadow-control: 0 10px 24px rgba(25, 22, 18, 0.05), 0 3px 10px rgba(25, 22, 18, 0.03);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  --container: 1440px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(20px) saturate(180%);

  border-bottom: 1px solid var(--border-light);

}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--container);
  background-color: white;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.nav-links .btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--text-primary);
  color: white;
  padding: 8px 20px;
  font-weight: 600;
  margin-left: 8px;
}


.nav-links .btn-nav:hover {
  background: #333;
  color: white;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: calc(var(--nav-height) + 72px) 32px 12px;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 8px;
  border-radius: 100px;
  background: var(--accent-gradient-soft);
  border: 1px solid rgba(13,148,136,0.15);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-1);
  margin-bottom: 24px;

}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-family: var(--font-heading);
  font-size: 76px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin-bottom: 18px;
  white-space: nowrap;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, #8C1515 0%, #B83A4B 45%, #D4A017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-primary);
  max-width: 920px;
  margin: 0 auto 10px;
  line-height: 1.7;
}

.hero-authors {
  font-size: 18px;
  line-height: 1.8;
}

.hero-author-notes {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 auto 12px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.hero-author-notes a {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 18px;
}

.hero-author-notes a:hover {
  color: var(--accent-1);
}

.author-ref {
  font-size: 0.68em;
  line-height: 0;
  vertical-align: super;
  font-weight: 700;
  color: var(--accent-1);
  margin-left: 1px;
}

.hero-partners {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 10px 0 20px 0;
}

.hero-partners a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-partners a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.hero-partner-logo {
  display: block;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-partner-logo-stanford {
  height: 56px;
}

.hero-partner-logo-kinetic {
  height: 40px;
}

.hero-partner-divider {
  width: 1px;
  height: 34px;
  background: rgba(37, 33, 29, 0.12);
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--text-primary);
  color: white;
  
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);

}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);

}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #ccc;
  transform: translateY(-1px);

}

/* Stats row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  max-width: 1080px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  
}

.stat-card {
  background: var(--bg-card);
  padding: 18px 15px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-body);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-1);
}

.stat-label {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 6px;
}

/* ============================================
   Section Layout
   ============================================ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 32px;
}

#leaderboard.section {
  padding-top: 32px;
}

.section-shell {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px 28px 30px;
  box-shadow: 0 20px 46px rgba(25, 22, 18, 0.045), 0 6px 18px rgba(25, 22, 18, 0.03);
}

.section-shell-explorer {
  padding: 28px;
}

.section-header {
  text-align: center;
  margin-bottom: 34px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-1);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  margin: 0 auto;
  font-size: 16px;
}

#domains.section,
#how-it-works.section,
#task-explorer.section {
  padding-top: 24px;
  padding-bottom: 24px;
}

#domains .section-header,
#how-it-works .section-header,
#task-explorer .explorer-heading {
  text-align: left;
  margin-bottom: 34px;
}

#domains .section-title,
#how-it-works .section-title,
#task-explorer .section-title {
  font-size: clamp(28px, 3.4vw, 34px);
  margin-bottom: 10px;
}

#domains .section-desc,
#how-it-works .section-desc,
#task-explorer .section-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   Leaderboard
   ============================================ */
.leaderboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.leaderboard-shell {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 46px rgba(25, 22, 18, 0.045), 0 6px 18px rgba(25, 22, 18, 0.03);
}

.leaderboard-head {
  padding: 28px 28px 0;
  background: white;
}

.leaderboard-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  text-align: left;
}

.leaderboard-heading .section-label {
  margin-bottom: 0;
}

.leaderboard-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.results-heading {
  text-align: left;
  margin-bottom: 22px;
  max-width: none;
}

.results-heading .section-label,
.environments-heading .section-label {
  margin-bottom: 8px;
}

.environments-heading {
  text-align: left;
  margin-bottom: 22px;
  max-width: none;
}

.environments-heading .section-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.leaderboard-filters {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
}

.leaderboard-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.leaderboard-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.leaderboard-radio-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.leaderboard-radio-option {
  position: relative;
  margin: 0;
}

.leaderboard-radio-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.leaderboard-radio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.leaderboard-radio-button:hover {
  color: var(--text-primary);
  background: rgba(22, 26, 23, 0.04);
}

.leaderboard-radio-input:focus-visible + .leaderboard-radio-button {
  outline: 2px solid rgba(13, 148, 136, 0.28);
  outline-offset: 2px;
}

.leaderboard-radio-input:checked + .leaderboard-radio-button {
  background: var(--text-primary);
  color: white;
  box-shadow: 0 10px 18px rgba(25, 22, 18, 0.14);
}

.tab-group {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.02);
}

.tab-btn.active {
  background: var(--text-primary);
  color: white;
}

.metric-toggles {
  display: flex;
  gap: 8px;
}

.metric-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.metric-btn:hover {
  border-color: #ccc;
  color: var(--text-primary);
}

.metric-btn.active {
  background: var(--accent-gradient-soft);
  border-color: rgba(13,148,136,0.2);
  color: var(--accent-1);
}

/* Table */
.leaderboard-table-wrap {
  background: transparent;
  border-radius: 0;
  border: none;
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: white;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.leaderboard-table th:hover {
  color: var(--text-primary);
}

.leaderboard-table th.sort-active {
  color: var(--accent-1);
}

.leaderboard-table th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;

}

.leaderboard-table th.sort-active .sort-icon {
  opacity: 1;
}

.leaderboard-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  vertical-align: middle;
}

.leaderboard-table tbody tr {
  transition: background 0.15s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(0,0,0,0.015);
}

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

.leaderboard-state-row td {
  padding: 0;
}

.leaderboard-state {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.leaderboard-loading-row .leaderboard-state {
  color: var(--accent-1);
}

.leaderboard-error-row .leaderboard-state {
  color: #B42318;
}

.leaderboard-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(140, 21, 21, 0.16);
  border-top-color: var(--accent-1);
  animation: leaderboardSpin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

/* Rank badges */
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.rank-1 {
  background: #F7E4A0;
  color: #9A5B00;
  border-color: rgba(154, 91, 0, 0.12);
}

.rank-2 {
  background: #ECEFF3;
  color: #667085;
  border-color: rgba(102, 112, 133, 0.12);
}

.rank-3 {
  background: #E9D7C5;
  color: #8D5524;
  border-color: rgba(141, 85, 36, 0.12);
}

.rank-default {
  background: rgba(247,245,240,0.92);
  color: var(--text-tertiary);
  border-color: var(--border-light);
}

/* Model name cell */
.model-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.model-name {
  font-weight: 600;
  font-size: 14px;
}

.model-provider {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* Score cell */
.score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-bar-bg {
  width: 80px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.score-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
  transition: width 0.35s ease-out;
}

.score-secondary {
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ============================================
   Domains
   ============================================ */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.domain-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,248,244,0.94) 100%);
  border: 1px solid var(--border);
  padding: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 360px;
}

.domain-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.8;
}

.domain-card:hover {
  border-color: rgba(140,21,21,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,246,241,0.96) 100%);
}

.domain-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(251,249,244,0.96) 0%, rgba(255,255,255,0.98) 100%);
  border-bottom: 1px solid var(--border);
}

.domain-preview-image {
  display: block;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  margin: -24px;
  object-fit: cover;
  object-position: top center;
}

.domain-image-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px dashed rgba(140,21,21,0.22);
  border-radius: 999px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.domain-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 18px;
}

.domain-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-1);
}

.domain-name {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
}

.domain-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  max-width: 48ch;
}

.domain-link {
  display: inline-block;
  color: var(--accent-1);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.domain-link:hover {
  text-decoration: underline;
}

.domain-access {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.domain-access-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.domain-access-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.domain-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  justify-content: flex-start;
  align-items: flex-start;
}

.domain-tag {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
}

.domain-tag-status {
  color: var(--accent-1);
  border-color: rgba(140, 21, 21, 0.14);
  background: rgba(140, 21, 21, 0.05);
}

/* ============================================
   How It Works
   ============================================ */
.how-video {
  margin-bottom: 28px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.how-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.how-card {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 6px;
  align-items: start;
  position: relative;
  padding: 24px 22px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,248,244,0.94) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.how-card:hover {
  border-color: rgba(140,21,21,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,246,241,0.96) 100%);
}

.how-step {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(140,21,21,0.05);
  border: 1px solid rgba(140,21,21,0.12);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-1);
}

.how-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.how-card p {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

/* ============================================
   Task Explorer
   ============================================ */
.explorer-section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.explorer-heading {
  text-align: left;
  margin-bottom: 30px;
}

.explorer-heading .section-title {
  margin-bottom: 10px;
}

.explorer-heading .section-desc {
  margin: 0;
  line-height: 1.65;
}

.explorer-intro {
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;

}

.explorer-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  height: min(88vh, 1020px);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(251,249,244,0.96) 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;

}

.explorer-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #8C1515 0%, #B83A4B 58%, #D4A017 100%);
  opacity: 0.9;
  pointer-events: none;
}

.explorer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, #FBFAF7 0%, #F8F6F1 100%);
  border-right: 1px solid var(--border);
  height: 100%;
  min-height: 0;
  overflow: hidden;

  position: static;
}

.explorer-search-shell {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0.98) 0%, rgba(248, 246, 241, 0.98) 100%);
  border-bottom: 1px solid var(--border);
}

.explorer-search-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.explorer-search-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
}

.explorer-search-input::placeholder {
  color: var(--text-tertiary);
}

.explorer-search-input:focus {
  outline: none;
  border-color: rgba(140, 21, 21, 0.22);
  box-shadow: 0 0 0 4px rgba(140, 21, 21, 0.06);
}

.explorer-sidebar-groups {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.explorer-sidebar-empty {
  padding: 18px;
}

.explorer-sidebar-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.explorer-sidebar-empty-copy {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.explorer-group {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  background: transparent;
  overflow: hidden;
  transition: none;
}

.explorer-group:last-child {
  border-bottom: none;
}

.explorer-group.open {
  flex: 1 1 auto;
  min-height: 0;
  background: rgba(255,255,255,0.86);

}

.explorer-group.open .explorer-group-toggle {
  background: linear-gradient(180deg, rgba(140,21,21,0.03) 0%, rgba(255,255,255,0.2) 100%);
}

.explorer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
}

.explorer-group-toggle:hover {
  background: rgba(0,0,0,0.018);
}

.explorer-group-toggle:disabled {
  cursor: default;
}

.explorer-group-toggle:disabled:hover {
  background: transparent;
}

.explorer-group-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.explorer-group-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.explorer-group-icon {
  width: 18px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--accent-1);
  line-height: 1;
}

.explorer-group-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
  border-top: 1px solid var(--border-light);
  overflow: auto;
  background: transparent;
}

.explorer-task-btn {
  width: 100%;
  padding: 12px 18px 13px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;

}

.explorer-task-btn:hover {
  transform: none;
  background: rgba(0,0,0,0.025);
  border-left-color: rgba(140,21,21,0.2);
}

.explorer-task-btn.selected {
  background: rgba(140,21,21,0.05);
  border-left-color: var(--accent-1);

}

.explorer-task-btn.selected .explorer-task-name,
.explorer-task-btn.selected .explorer-task-title {
  color: var(--text-primary);
}

.explorer-task-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.explorer-task-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.explorer-task-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  text-wrap: pretty;
}

.explorer-task-difficulty {
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: none;
  background: none;
}

.explorer-task-difficulty.easy {
  color: #8C1515;
}

.explorer-task-difficulty.medium {
  color: #B83A4B;
}

.explorer-task-difficulty.hard {
  color: #9A6B00;
}

.explorer-detail {
  min-width: 0;
  min-height: 0;
  background: var(--bg-card);
}

.explorer-detail-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.explorer-detail-header {
  padding: 24px 28px 22px;
  border-bottom: 1px solid var(--border);
  background:
    white;
}

.explorer-detail-context,
.explorer-pane-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-1);
}

.explorer-detail-context {
  margin-bottom: 10px;
}

.explorer-detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.explorer-detail-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.explorer-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.explorer-detail-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.explorer-detail-summary {
  margin-top: 8px;
  max-width: 75ch;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

.explorer-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
  max-width: 280px;
  flex-shrink: 0;
}

.explorer-pill {
  padding: 4px 9px;
  border-radius: 100px;
  background: rgba(140,21,21,0.06);
  border: 1px solid rgba(140,21,21,0.12);
  color: var(--accent-1);
  font-size: 11px;
  font-weight: 700;
}

.explorer-pill-muted {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.explorer-detail-meta {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.explorer-meta-item {
  min-width: 0;
  position: relative;
}

.explorer-meta-item-left {
  justify-self: start;
}

.explorer-meta-item-center {
  justify-self: start;
  text-align: left;
  margin-left: 28px;
}

.explorer-meta-item-right {
  justify-self: end;
}

.explorer-meta-item-wide {
  grid-column: auto;
  justify-self: start;
  width: auto;
}

.explorer-meta-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.explorer-meta-value {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.explorer-rubric-inline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
}

.explorer-rubric-metric {
  min-width: 0;
  position: relative;
}

.explorer-rubric-metric + .explorer-rubric-metric {
  padding-left: 16px;
}

.explorer-rubric-metric + .explorer-rubric-metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(32, 27, 20, 0.12);
}

.explorer-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.explorer-source-btn:hover {
  border-color: rgba(140, 21, 21, 0.18);
  color: var(--accent-1);
  background: rgba(140, 21, 21, 0.04);
}

.explorer-meta-item-center .explorer-meta-label {
  text-align: left;
}

.explorer-rubric-points {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.explorer-meta-item-right .explorer-meta-label {
  text-align: left;
}

.explorer-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: #F4F1EA;
  border: 1px solid var(--border-light);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-word;
}

.explorer-detail-card {
  margin: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;

}

.explorer-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.explorer-card-copy,
.explorer-pane-copy {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.explorer-card-copy {
  margin-top: 8px;
}

.explorer-pane-copy-compact {
  margin-top: 6px;
}

.explorer-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.84fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "actions side";
  min-height: 0;
  height: 100%;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(247,245,240,0.56) 0%, rgba(250,248,244,0.22) 100%);
}

.explorer-pane {
  min-width: 0;
  padding: 18px 20px 20px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border);
  border-radius: 18px;

}

.explorer-pane-brief {
  grid-area: brief;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(251,249,245,0.96) 100%);
}

.explorer-side-column {
  grid-area: side;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.explorer-pane-outcome {
  flex: 0 0 auto;
  min-height: auto;
  max-height: 340px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  background: white;
}

.explorer-pane-actions {
  grid-area: actions;
  min-height: 0;
  padding: 0;
  overflow: auto;
  background: rgba(255,255,255,0.94);
}

.explorer-pane-evals {
  flex: 1 1 0;
  min-height: 320px;
  padding: 0;
  overflow: auto;
  background: rgba(255,255,255,0.94);
}

.explorer-brief-block {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: rgba(247,245,240,0.72);
}

.explorer-pane-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.explorer-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 16px;
  margin: -18px -20px 14px;
  padding: 18px 20px 12px;
  background: rgba(255, 255, 255);
  border-bottom: 1px solid var(--border-light);
}

.explorer-pane-actions .explorer-pane-header,
.explorer-pane-evals .explorer-pane-header {
  margin: 0 0 14px;
  padding: 18px 20px 12px;
  background: white;
}

.explorer-pane-outcome .explorer-pane-header {
  margin: 0 0 12px;
  padding: 18px 20px 12px;
  background: white;
}

.explorer-pane-heading-wrap {
  min-width: 0;
}

.explorer-pane-kicker {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.explorer-pane-count {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(255,255,255,0.92);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.explorer-json-panel {
  flex: 0 0 auto;
  min-height: auto;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #FAF8F4;
}

.explorer-pane-outcome .explorer-json-panel,
.explorer-pane-outcome .explorer-pane-copy {
  margin: 0 20px 20px;
}

.explorer-json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255,255,255,0.72);
}

.explorer-json-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.explorer-json-block {
  flex: 0 1 auto;
  min-height: auto;
  max-height: 228px;
  margin: 0;
  padding: 12px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.explorer-json-block code {
  white-space: inherit;
}

.explorer-json-token {
  font-weight: 500;
}

.explorer-json-key {
  color: #8C1515;
}

.explorer-json-string {
  color: #7A4A17;
}

.explorer-json-number {
  color: #0F766E;
}

.explorer-json-boolean {
  color: #2563EB;
}

.explorer-json-null {
  color: #6B7280;
}

.explorer-step-list {
  margin: 0;
  padding: 0 20px 20px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.explorer-step-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.explorer-step-item:last-child {
  border-bottom: none;
}

.explorer-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(140,21,21,0.12);
  background: rgba(140,21,21,0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-1);
}

.explorer-step-text {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14px;
}

.explorer-eval-list {
  margin: 0;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.explorer-eval-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
}

.explorer-eval-copy {
  min-width: 0;
}

.explorer-eval-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  text-wrap: pretty;
}

.explorer-eval-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-start;
}

.explorer-eval-tag {
  font-size: 12px;
  color: var(--text-tertiary);
}

.explorer-detail-instruction {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.68;
  max-width: 74ch;
}

.explorer-eval-points {
  align-self: start;
  padding: 4px 8px;
  border: 1px solid rgba(140,21,21,0.12);
  border-radius: 999px;
  background: rgba(140,21,21,0.04);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-1);
}

.explorer-empty-copy {
  color: var(--text-tertiary);
}

.explorer-detail-frame-placeholder {
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(circle at top right, rgba(212,160,23,0.07), transparent 24%),
    linear-gradient(180deg, rgba(250,248,244,0.96) 0%, rgba(255,255,255,0.98) 100%);
}

.explorer-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 56px 36px 56px;
}

.explorer-shell.is-empty {
  height: auto;
  min-height: 0;
  align-items: stretch;
}

.explorer-shell.is-empty .explorer-sidebar,
.explorer-shell.is-empty .explorer-detail,
.explorer-shell.is-empty .explorer-detail-frame,
.explorer-shell.is-empty .explorer-detail-frame-placeholder {
  height: auto;
  min-height: 0;
}

.explorer-shell.is-empty .explorer-placeholder {
  height: auto;
  padding-bottom: 56px;
}

.explorer-placeholder-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-1);
  margin-bottom: 10px;
}

.explorer-placeholder-title {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.explorer-placeholder-copy {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.explorer-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin-top: 32px;
}

.explorer-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 24px;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  background: rgba(255,255,255,0.85);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.explorer-category-card:hover {
  border-color: var(--accent-1);
  background: rgba(255,255,255,1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212,160,23,0.10);
}

.explorer-category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.explorer-category-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;

}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-title {
  font-size: 17px;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* ============================================
   Visualization Row (Radar + Scatter)
   ============================================ */
.viz-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 0;
}

.viz-row-single {
  grid-template-columns: minmax(0, 960px);
  justify-content: center;
}

.viz-half { display: flex; flex-direction: column; min-width: 0; }
.metric-explorer-card {
  width: 100%;
  margin-inline: auto;
}
.radar-model-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.radar-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 100px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s; user-select: none;
}
.radar-chip:hover { border-color: #bbb; }
.radar-chip.selected { border-color: var(--chip-color, var(--accent-1)); background: var(--chip-bg, var(--accent-gradient-soft)); color: var(--text-primary); }
.radar-chip .chip-dot { width: 8px; height: 8px; border-radius: 50%; }
.radar-wrap { display: flex; justify-content: center; align-items: center; flex: 1; min-height: 388px; padding: 0 4px; }

/* ============================================
   Citation
   ============================================ */
.citation-section {
  padding-top: 24px;
  padding-bottom: 36px;
}

.citation-header {
  text-align: left;
  max-width: none;
  margin-bottom: 28px;
}

.citation-code-card {
  position: relative;
}

.citation-copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.citation-copy-btn:hover {
  background: var(--bg-card-hover);
  border-color: #d8d3ca;
}

.citation-copy-btn.is-copied {
  color: var(--accent-1);
  border-color: rgba(140, 21, 21, 0.16);
  background: rgba(140, 21, 21, 0.05);
}

.citation-copy-icon,
.citation-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.citation-check-icon {
  display: none;
}

.citation-copy-btn.is-copied .citation-copy-icon {
  display: none;
}

.citation-copy-btn.is-copied .citation-check-icon {
  display: inline-flex;
}

.citation-shell {
  padding: 28px 28px 30px;
}

.citation-block {
  margin: 0;
  padding: 22px 64px 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.citation-block code {
  white-space: inherit;
}

.citation-token.citation-annotation,
.citation-token.citation-field {
  color: #8C1515;
  font-weight: 700;
}

.citation-token.citation-key {
  color: #7A4A17;
  font-weight: 700;
}

.citation-token.citation-string {
  color: #1F2937;
}

.citation-token.citation-number {
  color: #2563EB;
  font-weight: 700;
}
#radar-canvas { display: block; max-width: 100%; height: auto; }
.radar-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 10px; }
.radar-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.radar-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.scatter-filter-groups {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
}

.scatter-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.scatter-controls { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.scatter-axis-group { display: flex; flex-direction: column; gap: 4px; }
.scatter-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); }
.scatter-select {
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--text-primary); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
.scatter-select:focus { outline: none; border-color: var(--accent-1); }
.scatter-vs { font-size: 12px; font-weight: 600; color: var(--text-tertiary); padding-bottom: 10px; }
.scatter-wrap { position: relative; display: flex; justify-content: center; align-items: center; flex: 1; min-height: 344px; padding: 0 2px; }
#scatter-canvas { display: block; max-width: 100%; height: auto; transition: opacity 0.18s ease; }
.scatter-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--accent-1);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(247, 245, 240, 0.7) 0%, rgba(247, 245, 240, 0.9) 100%);
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.scatter-wrap.is-ready .scatter-state {
  opacity: 0;
  visibility: hidden;
}
.scatter-wrap.is-loading #scatter-canvas,
.scatter-wrap.is-error #scatter-canvas,
.scatter-wrap.is-empty #scatter-canvas {
  opacity: 0;
}
.scatter-wrap.is-error .scatter-state {
  color: #B42318;
}
.scatter-wrap.is-empty .scatter-state {
  color: var(--text-secondary);
}
.scatter-state-spinner {
  flex: 0 0 auto;
}
.scatter-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  min-width: 156px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(92, 92, 92, 0.94);
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.scatter-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.scatter-tooltip-model {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.scatter-tooltip-metric {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.scatter-correlation { text-align: center; margin-top: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.scatter-correlation strong { color: var(--accent-1); font-weight: 700; }

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand {
  font-weight: 700;
  font-size: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1100px) {
  .section-shell,
  .section-shell-explorer {
    padding: 28px 28px 30px;
  }

  .explorer-shell {
    height: auto;
  }

  .explorer-sidebar {
    max-height: 420px;
  }

  .explorer-detail-frame {
    height: auto;
  }

  .explorer-detail-pills {
    justify-content: flex-start;
    max-width: none;
  }

  .explorer-detail-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .explorer-detail-meta {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .explorer-meta-item-right {
    justify-self: stretch;
  }

  .explorer-detail-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "actions"
      "side";
    height: auto;
    gap: 14px;
    padding: 14px;
  }

  .explorer-side-column {
    gap: 14px;
  }

  .explorer-pane-actions,
  .explorer-pane-evals {
    max-height: 320px;
  }

  .explorer-pane-outcome {
    max-height: 300px;
  }
}

@media (max-width: 900px) {
  .section-shell,
  .section-shell-explorer {
    padding: 24px 22px 24px;
    border-radius: 24px;
  }

  .leaderboard-head {
    padding: 22px 18px 0;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-bottom: 80px;
  }

  .domains-grid,
  .how-grid,
  .viz-row,
  .explorer-shell {
    grid-template-columns: 1fr;
  }

  .leaderboard-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .leaderboard-filters {
    align-items: stretch;
    padding: 0 0 16px;
  }

  .leaderboard-table-wrap {
    overflow-x: auto;
  }

  .explorer-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    max-height: 360px;
  }

}

@media (max-width: 600px) {
  .section-shell,
  .section-shell-explorer {
    padding: 20px 18px 20px;
    border-radius: 20px;
  }

  .leaderboard-head {
    padding: 20px 18px 0;
  }

  .hero-partners {
    gap: 14px;
    margin-bottom: 24px;
    padding: 6px 10px;
  }

  .hero-author-notes {
    gap: 8px 14px;
    margin-bottom: 10px;
    font-size: 11px;
  }

  .hero-partner-logo-stanford {
    height: 46px;
  }

  .hero-partner-logo-kinetic {
    height: 32px;
  }

  .hero-partner-divider {
    height: 28px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
    white-space: normal;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .tab-group {
    overflow-x: auto;
    max-width: 100%;
  }

  .metric-toggles {
    flex-wrap: wrap;
  }

  .leaderboard-filter {
    width: 100%;
    min-width: 0;
  }

  .leaderboard-shell {
    border-radius: 18px;
  }

  .chart-container {
    padding: 24px 16px;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .explorer-intro {
    padding: 14px 16px;
    font-size: 14px;
  }

  .explorer-group-toggle {
    padding: 12px 14px;
  }

  .explorer-group-body {
    max-height: auto;
    min-height: auto;
  }

  .explorer-shell {
    border-radius: 16px;
  }

  .explorer-detail-header {
    padding: 16px;
  }

  .explorer-detail-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .explorer-meta-item-left,
  .explorer-meta-item-center,
  .explorer-meta-item-right {
    justify-self: start;
    text-align: left;
  }

  .explorer-rubric-inline {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .explorer-rubric-metric + .explorer-rubric-metric {
    padding-left: 0;
  }

  .explorer-rubric-metric + .explorer-rubric-metric::before {
    display: none;
  }

  .explorer-pane {
    padding: 14px 16px;
  }

  .explorer-pane-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .explorer-detail-card {
    margin: 12px;
    padding: 16px;
  }

  .explorer-detail-title {
    font-size: 26px;
  }

  .explorer-eval-item {
    grid-template-columns: 1fr;
  }

}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInSoft {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInSoft 0.22s ease-out forwards;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .animate-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .score-bar {
    transition: none;
  }

  .leaderboard-spinner {
    animation: none;
  }
}
