/* ═══════════════════════════════════════════
   PandoraBench — Design Tokens + Theming
   ═══════════════════════════════════════════ */

[data-theme="dark"] {
  color-scheme: dark;
  --bg:         #111b2d;
  --bg-s:       #17243a;
  --bg-r:       #1d2c45;
  --border:     #30435f;
  --text:       #c5ccd8;
  --text-m:     #929eb0;
  --text-b:     #f8f3e9;
  --accent:     #fa600d;
  --accent-2:   #5f8fe2;
  --accent-soft: rgba(250, 96, 13, 0.13);
  --gold:       #eab308;
  --silver:     #94a3b8;
  --bronze:     #d97706;
  --nav-bg:     rgba(17, 27, 45, 0.92);
  --logo-invert: brightness(0) invert(1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg:         #faf7ef;
  --bg-s:       #fffdf8;
  --bg-r:       #f2ede2;
  --border:     #ded5c6;
  --text:       #485064;
  --text-m:     #7c8494;
  --text-b:     #172033;
  --accent:     #e65209;
  --accent-2:   #2350af;
  --accent-soft: rgba(230, 82, 9, 0.12);
  --gold:       #b8960c;
  --silver:     #64748b;
  --bronze:     #b45309;
  --nav-bg:     rgba(250, 247, 239, 0.92);
  --logo-invert: none;
}

:root {
  --mono:       'JetBrains Mono', monospace;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w:      960px;
  --radius:     8px;
  --pad:        24px;
}

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

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s, color 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

main {
  flex: 1;
}

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

.accent { color: var(--accent); }
.brand-blue { color: var(--accent-2); }
.brand-orange { color: var(--accent); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* ═══════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════ */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 54px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-b);
  line-height: 1;
  white-space: nowrap;
}

.nav-brand-blue {
  letter-spacing: -0.3px;
}

.nav-brand-orange {
  letter-spacing: 0.1px;
}

.nav-brand-mark {
  display: block;
  width: auto;
  height: 31px;
  margin: 0 -8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-m);
  padding: 7px 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-r);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-m);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-r);
}

[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ═══════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════ */

.hero {
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 51px 24px 31px;
}

.hero-logo {
  display: block;
  height: 10em;
  max-width: min(92vw, 600px);
  object-fit: contain;
  width: auto;
}

.hero-logo-stacked {
  height: 13em;
  margin: 0 auto;
}

.hero-logo-dark {
  display: none;
}

[data-theme="dark"] .hero-logo-light {
  display: none;
}

[data-theme="dark"] .hero-logo-dark {
  display: block;
}

.hero-logo-frame {
  position: relative;
  display: block;
}

.hero-lockup {
  --hero-sweep-duration: 320ms;
  --hero-sweep-distance: 2px;
  position: relative;
  display: grid;
  grid-template-columns: 140px auto 140px;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 10px;
  color: var(--text-b);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
}

.hero-lockup-word {
  display: flex;
  justify-content: space-between;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.hero-lockup.is-revealing .hero-lockup-word {
  will-change: clip-path, opacity, transform;
}

.hero-lockup.is-revealing .hero-lockup-left {
  animation: hero-word-sweep-left var(--hero-sweep-duration) linear both;
}

.hero-lockup.is-revealing .hero-lockup-right {
  animation: hero-word-sweep-right var(--hero-sweep-duration) linear both;
}

.hero-lockup[data-sweep-direction="rtl"].is-revealing .hero-lockup-left {
  animation-name: hero-word-sweep-left-rtl;
}

.hero-lockup[data-sweep-direction="rtl"].is-revealing .hero-lockup-right {
  animation-name: hero-word-sweep-right-rtl;
}

@keyframes hero-word-sweep-left {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.25;
    transform: translateX(calc(-1 * var(--hero-sweep-distance)));
  }
  43%, 100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-word-sweep-right {
  0%, 43% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.25;
    transform: translateX(calc(-1 * var(--hero-sweep-distance)));
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-word-sweep-left-rtl {
  0%, 57% {
    clip-path: inset(0 0 0 100%);
    opacity: 0.25;
    transform: translateX(var(--hero-sweep-distance));
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-word-sweep-right-rtl {
  0% {
    clip-path: inset(0 0 0 100%);
    opacity: 0.25;
    transform: translateX(var(--hero-sweep-distance));
  }
  57%, 100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-lockup-left {
  justify-self: end;
  width: 97px;
  margin-right: 18.5px;
}

.hero-lockup-right {
  justify-self: start;
  width: 128px;
  margin-left: 6px;
}

/* Unlinked /design alignment overlay. These guides never affect normal pages. */
.design-mode::before {
  content: "";
  position: fixed;
  z-index: 1000;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 0, 128, 0.72);
  pointer-events: none;
}

.design-mode .design-box {
  position: relative;
  outline: 1px solid rgba(0, 229, 255, 0.9);
  outline-offset: 2px;
}

.design-mode .design-box::before,
.design-mode .design-box::after {
  content: "";
  position: absolute;
  z-index: 1001;
  top: 50%;
  left: 50%;
  background: #00e5ff;
  pointer-events: none;
}

.design-mode .design-box::before {
  width: 11px;
  height: 1px;
  transform: translate(-50%, -0.5px);
}

.design-mode .design-box::after {
  width: 1px;
  height: 11px;
  transform: translate(-0.5px, -50%);
}

.design-mode .hero-logo-frame::after {
  content: "";
  position: absolute;
  z-index: 999;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 1px;
  transform: translate(-50%, -0.5px);
  background: rgba(255, 0, 128, 0.72);
  pointer-events: none;
}

.design-mode.design-guides-hidden::before,
.design-mode.design-guides-hidden .hero-logo-frame::after {
  display: none;
}

.design-mode.design-boxes-hidden .design-box {
  outline: none;
}

.design-mode.design-boxes-hidden .design-box::before,
.design-mode.design-boxes-hidden .design-box::after {
  display: none;
}

.design-mode {
  padding-bottom: 118px;
}

.design-panel {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: 14px;
  width: min(calc(100% - 28px), 1080px);
  min-height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px;
  color: var(--text-b);
  background: color-mix(in srgb, var(--bg-s) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
}

.design-panel-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--bg-r) 58%, transparent);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.design-alignment-controls {
  min-width: 206px;
}

.design-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 104px;
}

.design-panel-heading strong {
  font-size: 13px;
}

.design-panel-heading span,
.design-control output {
  color: var(--text-m);
}

.design-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  min-width: 125px;
}

.design-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.design-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.design-select select {
  min-width: 112px;
  padding: 5px 7px;
  color: var(--text-b);
  background: var(--bg-r);
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
}

.design-toggles {
  display: flex;
  flex-direction: column;
  gap: 5px;
  white-space: nowrap;
}

.design-toggles label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.design-toggles input {
  accent-color: var(--accent-2);
}

.design-replay {
  flex: 0 0 auto;
  padding: 8px 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.design-replay:hover {
  filter: brightness(1.08);
}

.design-replay:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  body:not(.design-mode) .hero-lockup.is-revealing .hero-lockup-word {
    animation: none;
  }
}

.hero-title {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--text-b);
  letter-spacing: 0.8px;
  margin-top: 0;
  margin-bottom: 10px;
  white-space: pre;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-b);
  max-width: 580px;
  margin: 0 auto 10px;
  line-height: 1.5;
}

.hero-description {
  font-size: 15px;
  color: var(--text-b);
  max-width: 580px;
  margin: 0 auto 10px;
  line-height: 1.7;
}

.hero-authors {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  max-width: 840px;
}
.hero-authors-line {
  display: block;
  font-size: 13px;
  color: var(--text-m);
  letter-spacing: 0.01em;
  line-height: 1.6;
  white-space: normal;
}
.hero-authors a {
  color: var(--text-b);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.hero-authors a:hover {
  color: var(--accent);
}
.author-sep {
  color: var(--text-m);
  opacity: 0.5;
}
.hero-authors-affiliation {
  display: block;
  font-size: 12px;
  color: var(--text-m);
  margin-top: 0;
  white-space: nowrap;
}

.hero-authors-affiliation a { color: var(--text-m); }
.hero-authors-affiliation a:hover { color: var(--accent-2); }

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-install {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.hero-gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-m);
  background: var(--bg-r);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s;
}
.hero-gh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hero-install-cmd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-b);
  background: var(--bg-r);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.hero-install-cmd:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hero-install-hover { display: none; }
.hero-install-cmd:hover .hero-install-default { display: none; }
.hero-install-cmd:hover .hero-install-hover { display: inline; }

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--mono);
  padding: 8px 16px;
}

.badge strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.badge span {
  font-size: 11px;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   Section headers
   ═══════════════════════════════════════════ */

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

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-m);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.section-label-link {
  color: inherit;
  text-decoration: none;
}
.section-label-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.section-note {
  font-size: 12px;
  color: var(--text-m);
}

/* ═══════════════════════════════════════════
   Leaderboard table
   ═══════════════════════════════════════════ */

.lb-block {
  display: table;
  margin: 0 auto;
}

.leaderboard-container.details-active {
  max-width: 1400px;
}

.leaderboard-container.details-active .lb-block {
  display: block;
}

.leaderboard-container.details-active .lb-table {
  min-width: 1080px;
}

.lb-table-details {
  min-width: 1080px;
}

.lb-table-details th,
.lb-table-details td {
  padding-left: 16px;
  padding-right: 16px;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  transition: border-color 0.2s;
  -webkit-overflow-scrolling: touch;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-s);
  transition: background 0.2s;
}

.lb-table thead { background: var(--bg-r); }

.lb-table th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 26px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.lb-table td {
  padding: 12px 26px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.lb-table tbody tr { transition: background 0.12s; }
.lb-table tbody tr:hover { background: var(--bg-r); }

.col-rank {
  width: 48px;
  text-align: center !important;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-m);
}

.col-logo {
  width: 36px;
  padding-right: 0 !important;
}

.org-logo {
  height: 20px;
  width: auto;
  display: block;
  color: black;
  filter: var(--logo-invert);
}

.org-logo-google {
  filter: none !important;
}

[data-theme="light"] .org-logo {
  color: black;
}

.col-num {
  text-align: right !important;
  font-family: var(--mono);
  font-size: 13px;
}

.col-agent {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

.model-name {
  font-weight: 600;
  color: var(--text-b);
}

.model-provider {
  color: var(--text-m);
  font-size: 12px;
  margin-left: 8px;
}

td.resolved-highlight {
  font-weight: 700;
  color: var(--accent);
}

.resolved-zero {
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.muted { color: var(--text-m); }

.col-almost {
  color: var(--text-m);
  font-size: 12px !important;
}

.lb-load-more {
  text-align: center !important;
  cursor: pointer;
  color: var(--text-m);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.lb-load-more:hover {
  color: var(--accent);
}

.th-mobile { display: none; }

.pct {
  font-size: 0.75em;
}

.col-cost,
.col-calls {
  color: var(--text-m);
  font-size: 12px !important;
}

[hidden] { display: none !important; }

.th-info {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.info-icon {
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.15s;
  vertical-align: middle;
}

.th-info:hover .info-icon {
  opacity: 1;
}

.info-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 14px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  text-align: left;
  z-index: 50;
}

.info-popover a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-popover.active {
  display: block;
}

.extended-link {
  font-size: 13px;
  margin: 8px 0;
}

.extended-link a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.15s;
}

.extended-link a:hover {
  text-decoration: underline;
}

.extended-inline {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Steps / How it works
   ═══════════════════════════════════════════ */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-card {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: background 0.2s, border-color 0.2s;
}

.step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-b);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════ */

.faq-list {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.faq-question {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-b);
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
}

.faq-link-btn {
  margin-left: auto;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--text-m);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  flex-shrink: 0;
}

.faq-item[id] {
  scroll-margin-top: 70px;
}

.faq-item[open] .faq-link-btn {
  opacity: 0.5;
}

.faq-link-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::before {
  content: "";
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  background: url("../images/bug-mark-1.png") center / contain no-repeat;
  transition: transform 0.16s ease;
}

.faq-item:nth-child(12n + 2) .faq-question::before {
  background-image: url("../images/bug-mark-2.png");
}

.faq-item:nth-child(12n + 3) .faq-question::before {
  background-image: url("../images/bug-mark-3.png");
}

.faq-item:nth-child(12n + 4) .faq-question::before { background-image: url("../images/bug-mark-4.png"); }
.faq-item:nth-child(12n + 5) .faq-question::before { background-image: url("../images/bug-mark-5.png"); }
.faq-item:nth-child(12n + 6) .faq-question::before { background-image: url("../images/bug-mark-6.png"); }
.faq-item:nth-child(12n + 7) .faq-question::before { background-image: url("../images/bug-mark-7.png"); }
.faq-item:nth-child(12n + 8) .faq-question::before { background-image: url("../images/bug-mark-8.png"); }
.faq-item:nth-child(12n + 9) .faq-question::before { background-image: url("../images/bug-mark-9.png"); }
.faq-item:nth-child(12n + 10) .faq-question::before { background-image: url("../images/bug-mark-10.png"); }
.faq-item:nth-child(12n + 11) .faq-question::before { background-image: url("../images/bug-mark-11.png"); }
.faq-item:nth-child(12n) .faq-question::before { background-image: url("../images/bug-mark-12.png"); }

.faq-item[open] .faq-question::before {
  transform: rotate(12deg) scale(0.92);
}

.faq-question:hover::before {
  transform: scale(1.08);
}

.faq-item[open] .faq-question:hover::before {
  transform: rotate(12deg) scale(1);
}

.faq-answer {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.7;
  padding: 0 0 14px 28px;
  margin: 0;
}

.faq-answer p {
  margin: 0 0 10px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-b);
  margin-bottom: 16px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.about-heading-centered { text-align: center; }
.about-width {
  max-width: 680px;
  margin: 0 auto;
}
.about-text {
  max-width: 680px;
  margin: 0 auto;
}
.about-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.about-text p {
  font-size: 14px;
  color: var(--text-m);
  line-height: 1.75;
  margin: 0 0 16px;
}
.about-figure {
  overflow: hidden;
  margin: 28px 0 24px;
  background: #faf7ef;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.about-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.about-faq { margin-top: 20px; }

/* ═══════════════════════════════════════════
   Stats bar
   ═══════════════════════════════════════════ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  text-align: center;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  transition: background 0.2s, border-color 0.2s;
}

.stat-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-b);
  margin-bottom: 2px;
}

.stat-num.accent {
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-sub {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-m);
}

/* ═══════════════════════════════════════════
   Page-level headings (Team, News, Assets)
   ═══════════════════════════════════════════ */

.page-top { padding-top: 48px; }

.page-title {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-b);
  margin-bottom: 12px;
}

.page-intro {
  font-size: 15px;
  color: var(--text-m);
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════════
   Team
   ═══════════════════════════════════════════ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.team-card {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: background 0.2s, border-color 0.15s;
}

.team-card-link {
  display: block;
}

.team-card-link:hover {
  border-color: var(--accent);
  background: var(--bg-r);
}

.team-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.team-info { flex: 1; min-width: 0; }


.team-name {
  font-weight: 600;
  color: var(--text-b);
  font-size: 14px;
  margin-bottom: 2px;
}

.team-affiliation {
  font-size: 12px;
  color: var(--text-m);
}

.footnote {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-m);
}

.team-section-heading {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-b);
  margin-top: 40px;
  margin-bottom: 10px;
}

.team-section-text {
  font-size: 14px;
  color: var(--text-m);
  line-height: 1.7;
}

.team-section-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.citation-block {
  margin-top: 12px;
  margin-bottom: 48px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══════════════════════════════════════════
   Prompt
   ═══════════════════════════════════════════ */

.prompt-page {
  max-width: 900px;
}

.prompt-section + .prompt-section {
  margin-top: 28px;
}

.prompt-heading {
  margin-bottom: 10px;
  color: var(--text-b);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prompt-block {
  padding: 20px;
  color: var(--text);
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══════════════════════════════════════════
   Discoverability examples
   ═══════════════════════════════════════════ */

.discoverability-page {
  max-width: 1200px;
}

.discoverability-intro,
.discoverability-section-description {
  max-width: 760px;
  color: var(--text-m);
}

.discoverability-intro {
  margin-bottom: 40px;
  font-size: 15px;
}

.discoverability-section + .discoverability-section {
  margin-top: 44px;
}

.discoverability-section h2 {
  margin-bottom: 8px;
  color: var(--text-b);
  font-size: 20px;
}

.discoverability-section-description {
  margin-bottom: 18px;
  font-size: 14px;
}

.discoverability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.discoverability-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accept);
  border-radius: var(--radius);
}

.discoverability-card.is-rejected {
  border-top-color: var(--reject);
}

.discoverability-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.discoverability-badge,
.discoverability-language {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.discoverability-badge {
  padding: 2px 8px;
  color: var(--accept);
  background: color-mix(in srgb, var(--accept) 12%, transparent);
  border-radius: 999px;
}

.is-rejected .discoverability-badge {
  color: var(--reject);
  background: color-mix(in srgb, var(--reject) 12%, transparent);
}

.discoverability-language {
  color: var(--text-m);
}

.discoverability-card h3 {
  margin-bottom: 8px;
  color: var(--text-b);
  font-size: 15px;
}

.discoverability-card h3 span {
  color: var(--text-m);
  font-weight: 400;
}

.discoverability-rationale {
  margin-bottom: 14px;
  color: var(--text-m);
  font-size: 13px;
  line-height: 1.6;
}

.discoverability-rationale a,
.discoverability-source {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.discoverability-patch {
  flex: 1;
  margin: 0 0 14px;
  padding: 14px;
  overflow-x: auto;
  color: var(--text);
  background: var(--bg-r);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre;
}

.discoverability-source {
  align-self: flex-start;
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   Blog
   ═══════════════════════════════════════════ */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-item {
  display: block;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s;
}

.blog-item:hover { border-color: var(--accent); }

.blog-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
}

.blog-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-b);
  margin-bottom: 4px;
}

.blog-item-authors {
  font-size: 12px;
  color: var(--text-m);
  margin-bottom: 4px;
}

.blog-item-desc {
  font-size: 13px;
  color: var(--text-m);
}

.empty-state {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: var(--text-m);
}

/* ═══════════════════════════════════════════
   Post (individual blog article)
   ═══════════════════════════════════════════ */

.post {
  max-width: 680px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.post-meta { margin-bottom: 8px; }

.post-authors {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-m);
  margin-left: 10px;
}

.post-authors::before {
  content: "·";
  margin-right: 10px;
  color: var(--text-m);
}

.post-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.post-body h2,
.post-body h3 {
  color: var(--text-b);
  margin-top: 32px;
  margin-bottom: 8px;
}

.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { padding-left: 1.5em; margin-bottom: 16px; }
.post-body li { margin-bottom: 4px; }
.post-body img { max-width: 100%; height: auto; }
.post-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.post-body blockquote p { margin: 0; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-s);
  font-size: 14px;
  margin-bottom: 0;
}

.post-body thead { background: var(--bg-r); }

.post-body th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.post-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr { transition: background 0.12s; }
.post-body tbody tr:hover { background: var(--bg-r); }

.post-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-r);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.post-body pre code {
  background: none !important;
  padding: 0 !important;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
}

.post-body pre code.hljs {
  background: none !important;
  padding: 0 !important;
}

.admonition {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.admonition-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.admonition p:last-child {
  margin-bottom: 0;
}

.admonition a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ═══════════════════════════════════════════
   Assets
   ═══════════════════════════════════════════ */

.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.asset-card {
  display: block;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s, background 0.15s;
}

.asset-card:hover {
  border-color: var(--accent);
  background: var(--bg-r);
}

.asset-inline-icon {
  font-size: 18px;
  vertical-align: -3px;
  margin-right: 4px;
  color: var(--accent);
}

.asset-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-b);
  margin-bottom: 4px;
}

.asset-desc {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.5;
}

.asset-tag {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 12px;
}

/* ═══════════════════════════════════════════
   Explore links
   ═══════════════════════════════════════════ */

.link-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.link-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 20px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.link-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--bg-r);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.link-tile-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.link-tile-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.link-tile-title {
  color: var(--text-b);
  font-weight: 600;
}

.link-tile-description {
  color: var(--text-m);
  font-size: 12px;
  line-height: 1.45;
}

.link-tile-arrow {
  flex: 0 0 auto;
  color: var(--text-m);
  transition: color 0.15s, transform 0.15s;
}

.link-tile:hover .link-tile-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Repository cards are also used on repository detail pages. */

.instance-card {
  width: 240px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.instance-card[href]:hover {
  border-color: var(--accent);
  background: var(--bg-r);
}

.instance-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.instance-gh {
  flex-shrink: 0;
  color: var(--text-m);
}

.instance-repo {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.instance-desc {
  font-size: 12px;
  color: var(--text-m);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.instance-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.instance-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-m);
}

.instance-stars svg {
  color: var(--gold);
}

.instance-lang {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 11%, transparent);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ═══════════════════════════════════════════
   Clickable rows
   ═══════════════════════════════════════════ */

.clickable-row { cursor: pointer; }

/* ═══════════════════════════════════════════
   Sortable columns
   ═══════════════════════════════════════════ */

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]::after {
  content: '⇅';
  margin-left: 5px;
  opacity: 0.35;
  font-size: 13px;
}

th[data-sort]:hover::after {
  opacity: 0.7;
}

th[data-sort].sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--accent);
}

th[data-sort].sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Instance best-model line
   ═══════════════════════════════════════════ */

.instance-best {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-m);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.instance-best-label {
  color: var(--accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   Truncated description in tables
   ═══════════════════════════════════════════ */

.col-repo-cell {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-name-truncate,
.repo-desc-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════
   Repository detail hero
   ═══════════════════════════════════════════ */

.repository-hero {
  margin-bottom: 24px;
}

.repository-title {
  font-size: 32px;
  margin-bottom: 10px;
}

.repository-facts {
  display: grid;
  gap: 5px;
  margin: 0;
  max-width: 760px;
  font-size: 13px;
  line-height: 1.5;
}

.repository-facts > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px;
}

.repository-facts dt {
  color: var(--text-m);
  font-weight: 600;
}

.repository-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--text-b);
}

.repository-facts a {
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The supporting repository numbers stay secondary to the title and metadata. */
.repository-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ═══════════════════════════════════════════
   Instance difficulty tag
   ═══════════════════════════════════════════ */

.instance-difficulty {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-m);
  background: var(--bg-r);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ═══════════════════════════════════════════
   Model detail hero
   ═══════════════════════════════════════════ */

.model-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.org-logo-lg {
  height: 36px;
}

.model-hero-name {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-b);
  margin-bottom: 2px;
}

.model-hero-meta {
  font-size: 13px;
  color: var(--text-m);
}

.model-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════
   Model link inside tables
   ═══════════════════════════════════════════ */

.model-link {
  color: inherit;
  text-decoration: none;
}

.model-link:hover .model-name {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Container wide (for wide tables)
   ═══════════════════════════════════════════ */

.container-wide {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* This follows the container shorthand so it is not reset to zero. */
.container-wide.page-top { padding-top: 48px; }

/* ═══════════════════════════════════════════
   Misc
   ═══════════════════════════════════════════ */

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-size: 14px;
}

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

/* ═══════════════════════════════════════════
   Heatmap
   ═══════════════════════════════════════════ */

.heatmap-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.heatmap-wrap canvas {
  display: block;
}

.heatmap-tooltip {
  display: none;
  position: fixed;
  padding: 8px 12px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}

.heatmap-tooltip strong {
  color: var(--text-b);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.heatmap-legend-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-m);
}

.heatmap-legend-bar {
  width: 200px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

[data-theme="light"] .heatmap-legend-bar {
  background: linear-gradient(to right, #faf7ef, #ffd5ad, #ff9542, #f05912, #154aa8);
}

[data-theme="dark"] .heatmap-legend-bar {
  background: linear-gradient(to right, #1a2233, #503428, #ab4716, #ff5a0a, #3f74db);
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero-title { font-size: 28px; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .model-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .discoverability-grid { grid-template-columns: 1fr; }
  .nav-inner {
    flex-wrap: nowrap;
    height: auto;
    padding: 10px 16px;
    gap: 4px;
  }
  .nav-links {
    flex-wrap: nowrap;
    gap: 0;
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
    margin-left: 0;
    overflow: hidden;
  }
  .nav-brand { flex: 0 0 auto; font-size: 11px; }
  .nav-brand-mark { height: 26px; }
  .nav-link { padding: 7px 8px; font-size: 12px; }
  .theme-toggle { margin-left: 4px; }
  .container-wide { padding: 0 16px 40px; }
  .hero-authors-line {
    display: inline;
    white-space: normal;
    font-size: 11px;
  }
  .hero-authors-affiliation { font-size: 10px; white-space: normal; }
  .hero-authors {
    display: block;
    text-align: center;
    line-height: 1.8;
  }
  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 0 16px;
  }
  .footer-links a:first-child { margin-left: 0; }
  .lb-block { display: block; }
  .design-mode { padding-bottom: 266px; }
  .design-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .design-animation-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: flex-end;
    gap: 10px 14px;
  }
  .design-panel-heading { grid-column: 1 / -1; }
  .design-control { min-width: 0; }
  .design-select select { width: 100%; }
  .design-toggles { flex-direction: row; gap: 12px; }
  .design-replay { justify-self: end; }
  .design-alignment-controls {
    justify-content: space-between;
    min-width: 0;
  }
  .design-alignment-controls .design-panel-heading {
    width: auto;
  }
}

@media (max-width: 520px) {
  .stats-bar { grid-template-columns: 1fr; }
  .col-secondary .th-full { display: none; }
  .col-secondary .th-mobile { display: inline; }
  .col-resolved-header .th-full { display: none; }
  .col-resolved-header .th-mobile { display: inline; }
  .col-almost-header .th-full { display: none; }
  .col-almost-header .th-mobile { display: inline; }
  .hero { padding: 40px 16px 32px; }
  .hero-title { font-size: 24px; }
  .hero-lockup { grid-template-columns: 84px auto 84px; }
  .hero-lockup-word { font-size: 24px; }
  .hero-lockup-left { width: 58px; margin-right: 12px; }
  .hero-lockup-right { width: 76px; margin-left: 4px; }
  .hero-subtitle { font-size: 17px; }
  .hero-description { font-size: 14px; }
  .hero-subtitle,
  .hero-description,
  .hero-authors { width: 100%; overflow-wrap: anywhere; }
  .nav-link { padding: 7px 5px; font-size: 11px; }
  .nav-brand { font-size: 10px; }
  .nav-brand-mark { height: 23px; }
  .theme-toggle { margin-left: 2px; padding: 6px; }
  .container { padding: 0 16px 40px; }
  .link-tiles { grid-template-columns: 1fr; }
  .model-provider { display: none; }
  .col-agent { display: none; }
  .col-logo { display: none; }
  [data-leaderboard-table] .col-rank { display: none; }
  .lb-table th { padding: 10px 8px; }
  .lb-table td { padding: 10px 8px; }
  .leaderboard-container.details-active .lb-table,
  .lb-table-details { min-width: 520px; }
  .lb-table-details th,
  .lb-table-details td { padding-left: 6px; padding-right: 6px; }
  .col-num { font-size: 12px; }
  .model-name { font-size: 13px; }
  .model-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .model-hero-name { font-size: 18px; }
  .repository-title { font-size: 24px; }
  .repository-facts > div { grid-template-columns: 1fr; gap: 0; }
  .repository-stats { grid-template-columns: 1fr; }
  .chart-toggle-btn,
  .scatter-toggle-btn,
  .view-toggle-btn { font-size: 12px; padding: 5px 10px; }
}

/* ── Charts ── */
.chart-block {
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 16px;
  height: 420px;
  position: relative;
}
@media (max-width: 640px) {
  .chart-block { height: 320px; padding: 16px 8px 8px; }
}

.chart-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-r);
  border-radius: 6px;
  padding: 3px;
}

.chart-toggle-stacked {
  flex-direction: column;
  gap: 3px;
}

.chart-toggle-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.chart-toggle-row-secondary .scatter-toggle-btn {
  font-size: 11px;
}
.chart-toggle-btn,
.scatter-toggle-btn,
.view-toggle-btn {
  background: none;
  border: none;
  color: var(--text-m);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.chart-toggle-btn:hover,
.scatter-toggle-btn:hover,
.view-toggle-btn:hover { color: var(--text-b); }
.chart-toggle-btn.active,
.scatter-toggle-btn.active,
.view-toggle-btn.active {
  background: var(--bg-s);
  color: var(--text-b);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.lb-view-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Organization filter (funnel button + checkbox popover) */
.org-filter { position: relative; display: inline-flex; }
.org-filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--bg-r); border: 1px solid transparent; color: var(--text-m);
  border-radius: 6px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.org-filter-btn:hover { color: var(--text-b); }
.org-filter-btn.is-filtered {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.org-filter-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 190px; z-index: 60;
  background: var(--bg-s); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}
.org-filter-menu.open { display: block; }
.org-filter-head {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-m);
  padding: 4px 8px 6px;
}
.org-filter-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--text-b);
}
.org-filter-opt:hover { background: var(--bg-r); }
.org-filter-opt input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.org-filter-reset {
  margin-top: 4px; width: 100%; text-align: left;
  background: none; border: none; border-top: 1px solid var(--border);
  padding: 8px; font-family: var(--sans); font-size: 12px; font-weight: 500;
  color: var(--accent); cursor: pointer;
}
.org-filter-reset:disabled { color: var(--text-m); opacity: .5; cursor: default; }
.table-hint {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-m);
  opacity: 0.55;
  margin: 6px 0 0;
}
.table-hint a {
  color: var(--accent);
  text-decoration: underline;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0 0;
}
.table-footer .table-hint { margin: 0; }
.table-footer-end { justify-content: flex-end; }
.chart-legend-hint {
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-m);
  opacity: 0.55;
  margin: 6px 0 0;
}

/* ── Task-page scatter (score vs cost/turns) ── */
.scatter-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.scatter-main {
  flex: 1 1 auto;
  min-width: 0;
}
.scatter-main .chart-block { height: 460px; }
.scatter-side {
  flex: 0 0 300px;
  background: var(--bg-s);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  max-height: 460px;
}
/* Hint + optional link, on one compact row below the chart/panel. */
.scatter-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.scatter-foot .chart-legend-hint {
  flex: 1 1 auto;
  margin: 0;
}
.scatter-foot .extended-link { flex: 0 0 auto; }
.scatter-side-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-m);
}
.scatter-side-list {
  overflow-y: auto;
}
.scatter-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.scatter-side-item:last-child { border-bottom: none; }
.scatter-side-item:hover,
.scatter-side-item.active {
  background: var(--accent-soft);
}
.scatter-side-rank {
  flex: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-m);
  text-align: right;
}
.scatter-side-rank.rank-1 { color: var(--gold); font-weight: 700; }
.scatter-side-rank.rank-2 { color: var(--silver); font-weight: 700; }
.scatter-side-rank.rank-3 { color: var(--bronze); font-weight: 700; }
.scatter-side-item .org-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
}
.scatter-side-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.scatter-side-name .model-name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scatter-side-name .model-provider {
  font-size: 11px;
  color: var(--text-m);
  margin-left: 0;
}
.scatter-side-vals {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}
.scatter-side-score {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-b);
}
.scatter-side-x {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-m);
}
@media (max-width: 780px) {
  .scatter-layout { flex-direction: column; }
  .scatter-side { flex-basis: auto; max-height: 320px; }
  .scatter-main .chart-block { height: 360px; }
}

/* ── Model Comparison ── */
.comparison-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.comparison-select-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.comparison-select-group label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cmp-select {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-b);
  background: var(--bg-r);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  width: 100%;
  cursor: pointer;
  appearance: auto;
}
.cmp-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.cmp-swap-btn {
  background: var(--bg-r);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-m);
  font-size: 20px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  line-height: 1.4;
}
.cmp-swap-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.comparison-chart-block {
  height: 500px;
}
@media (max-width: 640px) {
  .comparison-controls { flex-wrap: wrap; }
  .comparison-select-group { flex-basis: 100%; }
  .cmp-swap-btn { align-self: center; }
  .comparison-chart-block { height: 350px; }
}

/* ═══════════════════════════════════════════
   Trajectory viewer
   ═══════════════════════════════════════════ */

.traj-window {
  border-radius: 10px;
  overflow: hidden;
  background: #1a1b26;
  border: 1px solid #2f3146;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.15s;
}

.traj-window:focus {
  border-color: #7aa2f7;
}

.traj-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: #13141f;
  border-bottom: 1px solid #2f3146;
  user-select: none;
}

.traj-window-tabbed:focus-within {
  border-color: #7aa2f7;
}

.traj-window-tabbed .traj-titlebar {
  padding: 6px 16px 0;
  gap: 12px;
  align-items: flex-end;
}

.traj-window-tabbed .traj-dots {
  padding-bottom: 8px;
}

.traj-tabs {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.traj-tabs::-webkit-scrollbar { display: none; }

.traj-tab {
  font-family: var(--mono);
  font-size: 12px;
  color: #565f89;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.traj-tab:hover {
  color: #c0caf5;
  background: #1e2030;
}

.traj-tab.is-active {
  color: #c0caf5;
  background: #1a1b26;
  border-color: #2f3146;
}

.traj-tab-panel {
  outline: none;
}

.traj-tab-hidden {
  display: none;
}

.traj-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.traj-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.traj-dot-close    { background: #ff5f57; }
.traj-dot-minimize { background: #febc2e; }
.traj-dot-maximize { background: #28c840; }

.traj-title {
  font-size: 12px;
  color: #565f89;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traj-body {
  height: 440px;
  overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
}

.traj-body::-webkit-scrollbar { width: 6px; }
.traj-body::-webkit-scrollbar-track { background: transparent; }
.traj-body::-webkit-scrollbar-thumb { background: #2f3146; border-radius: 3px; }

.traj-thought {
  font-family: var(--sans);
  font-size: 13px;
  color: #9aa5ce;
  line-height: 1.65;
  padding: 12px 16px;
  background: #1e2030;
  border-radius: 6px;
  margin-bottom: 12px;
  border-left: 3px solid #7aa2f7;
}

.traj-cmd {
  font-size: 13px;
  color: #c0caf5;
  padding: 10px 16px;
  background: #1e2030;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

.traj-cmd-submit {
  color: #9ece6a;
  font-weight: 600;
}

.traj-prompt {
  color: #7aa2f7;
  font-weight: 700;
  margin-right: 8px;
  user-select: none;
}

.traj-cmd-submit .traj-prompt {
  color: #9ece6a;
}

.traj-output pre {
  font-family: var(--mono);
  font-size: 12px;
  color: #787c99;
  line-height: 1.5;
  padding: 14px 16px;
  background: #13141f;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

.traj-exit-code {
  display: inline-block;
  font-size: 11px;
  color: #f7768e;
  background: rgba(247, 118, 142, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Keep nested scroll surfaces legible in dark mode without changing the page scrollbar. */
[data-theme="dark"] :is(
  .table-wrap,
  .citation-block,
  .prompt-block,
  .discoverability-patch,
  .post-body .table-scroll,
  .post-body pre,
  .heatmap-wrap,
  .scatter-side-list,
  .traj-body,
  .traj-cmd,
  .traj-output pre
) {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-s);
}

[data-theme="dark"] :is(
  .table-wrap,
  .citation-block,
  .prompt-block,
  .discoverability-patch,
  .post-body .table-scroll,
  .post-body pre,
  .heatmap-wrap,
  .scatter-side-list,
  .traj-body,
  .traj-cmd,
  .traj-output pre
)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-theme="dark"] :is(
  .table-wrap,
  .citation-block,
  .prompt-block,
  .discoverability-patch,
  .post-body .table-scroll,
  .post-body pre,
  .heatmap-wrap,
  .scatter-side-list,
  .traj-body,
  .traj-cmd,
  .traj-output pre
)::-webkit-scrollbar-track {
  background: var(--bg-s);
}

[data-theme="dark"] :is(
  .table-wrap,
  .citation-block,
  .prompt-block,
  .discoverability-patch,
  .post-body .table-scroll,
  .post-body pre,
  .heatmap-wrap,
  .scatter-side-list,
  .traj-body,
  .traj-cmd,
  .traj-output pre
)::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 2px solid var(--bg-s);
  border-radius: 999px;
}

[data-theme="dark"] :is(
  .table-wrap,
  .citation-block,
  .prompt-block,
  .post-body .table-scroll,
  .post-body pre,
  .heatmap-wrap,
  .scatter-side-list,
  .traj-body,
  .traj-cmd,
  .traj-output pre
)::-webkit-scrollbar-thumb:hover {
  background: var(--text-m);
}

.traj-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #13141f;
  border-top: 1px solid #2f3146;
}

.traj-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.traj-btn {
  background: #1e2030;
  border: 1px solid #2f3146;
  color: #c0caf5;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  padding: 0;
}

.traj-btn:hover:not(:disabled) {
  background: #2f3146;
  border-color: #7aa2f7;
}

.traj-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.traj-counter {
  font-size: 12px;
  color: #565f89;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.traj-step-input {
  background: #1e2030;
  border: 1px solid #2f3146;
  border-radius: 4px;
  color: #c0caf5;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  padding: 3px 4px;
  min-width: 1.5ch;
  -moz-appearance: textfield;
  transition: border-color 0.12s;
}

.traj-step-input::-webkit-outer-spin-button,
.traj-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.traj-step-input:focus {
  outline: none;
  border-color: #7aa2f7;
}

.traj-counter-total {
  color: #565f89;
}

.traj-jumps {
  font-family: var(--sans);
  font-size: 11px;
  color: #565f89;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 1px;
  margin-left: 4px;
}

.traj-jumps-label {
  color: #3b4261;
  margin-right: 3px;
}

.traj-jumps-sep {
  color: #3b4261;
  margin-right: 2px;
}

.traj-jump {
  color: #7aa2f7;
  cursor: pointer;
  text-decoration: none;
  padding: 1px 5px;
  border-radius: 3px;
  transition: background 0.12s, color 0.12s;
}

.traj-jump:hover {
  background: #2f3146;
  color: #c0caf5;
}

.traj-jump.is-active {
  background: #7aa2f7;
  color: #1a1b26;
  font-weight: 600;
}

.traj-hint {
  font-family: var(--sans);
  font-size: 11px;
  color: #3b4261;
}

.traj-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: #1e2030;
  border: 1px solid #2f3146;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: #565f89;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.traj-hint kbd:hover {
  background: #2f3146;
  border-color: #7aa2f7;
  color: #c0caf5;
}

@media (max-width: 520px) {
  .traj-body { height: 340px; padding: 14px; }
  .traj-thought { font-size: 12px; padding: 10px 12px; }
  .traj-cmd { font-size: 12px; padding: 8px 12px; }
  .traj-output pre { font-size: 11px; padding: 10px 12px; }
  .traj-hint { display: none; }
}

footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links a {
  color: var(--text);
  text-decoration: none;
  margin-left: 16px;
}
.footer-links a:hover {
  color: var(--accent);
}

/* Trace links in the per-instance / per-model result tables. */
.trace-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-m);
  white-space: nowrap;
}
.trace-link:hover { color: var(--accent); text-decoration: underline; }
.clickable-row:hover .trace-link { color: var(--accent); }
