:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface2: #f4f4f5;
  --border: #e4e4e7;
  --accent: #2563eb;
  --accent2: #1d4ed8;
  --text: #18181b;
  --muted: #71717a;
  --green: #16a34a;
  --amber: #d97706;
  --purple: #7c3aed;
  --mono: "Source Code Pro", "Fira Code", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 8px;
  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent2);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(250, 250, 250, 0.98);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.nav-actions {
  display: flex;
  gap: 0.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent2);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.06);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero */
.page {
  padding-top: var(--nav-h);
}

.page-sub,
.page-results {
  padding-top: var(--nav-h);
}

.page-tasks .page-intro-block {
  margin-bottom: 0.65rem;
}

.page-tasks .tasks-layout {
  min-height: calc(100vh - var(--nav-h) - 8rem);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.page-intro-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.page-intro-title span {
  color: var(--accent);
}

.page-intro-sub {
  margin-bottom: 0;
  max-width: 640px;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Subpages: single section for intro + content */
.page-sub .section.page-sub-main {
  padding: 1.25rem 0 2rem;
}

.page-sub .page-intro-block {
  margin-bottom: 0.75rem;
}

.page-sub .card + .card {
  margin-top: 0.75rem;
}

.page-sub .card-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.page-sub .card-footnote {
  margin: 0.65rem 0 0;
}

.section-alt {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero {
  padding: 10px 0 2rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% -5%, rgba(37, 99, 235, 0.08), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
}

.hero-logo {
  width: min(250px, 82vw);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 30px auto 30px;
  line-height: 0;
}

.hero-title {
  font-size: clamp(2.15rem, 5.8vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.hero-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin: -0.15rem 0 0;
  max-width: 28rem;
  text-align: center;
  line-height: 1.35;
}

.title-vibe {
  background: linear-gradient(90deg, #3ee8c9, #1fc5a5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-search {
  color: #3181f0;
}

.title-bench {
  color: #03194b;
}

.tagline-accent {
  flex-shrink: 0;
  width: 1.75rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #1fc5a5, transparent);
}

.tagline-accent-right {
  background: linear-gradient(90deg, transparent, #3181f0);
}

.hero-stats {
  display: flex;
  width: 100%;
  max-width: 640px;
  margin: 30px auto;
  flex-wrap: nowrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.hero-sub-em {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-sub-kw {
  font-weight: 800;
  padding: 0.12em 0.35em;
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-sub-kw-hardest {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
  box-shadow: inset 0 -2px 0 rgba(220, 38, 38, 0.45);
}

.hero-sub-kw-verifiable {
  color: #15803d;
  background: rgba(22, 163, 74, 0.14);
  box-shadow: inset 0 -2px 0 rgba(22, 163, 74, 0.4);
}

.hero-sub-kw-horizon {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.14);
  box-shadow: inset 0 -2px 0 rgba(124, 58, 237, 0.4);
}

.h-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 0.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
}

.h-stat:last-child {
  border-right: none;
}

.h-stat-n {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.h-stat-l {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
  line-height: 1.25;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

/* Sections */
.section {
  padding: 3rem 0 3.5rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.section-title span {
  color: var(--accent);
}

.section-sub {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 720px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

/* Highlights */
.hl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.hl-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.hl-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  background: #dbeafe;
  color: #1d4ed8;
  margin-top: 0.75rem;
}

/* Leaderboard */
.lb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tab-bar {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
}

.tab-btn {
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th {
  text-align: left;
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

th:hover,
th.sorted {
  color: var(--accent);
}

td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover td {
  background: #f8faff;
}

.rank-badge {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface2);
}

.rank-1 {
  background: #fef3c7;
  color: #b45309;
}

.rank-2 {
  background: #f1f5f9;
  color: #475569;
}

.rank-3 {
  background: #ffedd5;
  color: #c2410c;
}

.model-name {
  font-weight: 600;
}

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

.metric-cell {
  font-variant-numeric: tabular-nums;
}

.metric-cell strong {
  font-weight: 700;
}

.sub-metric {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}

/* Tasks */
.tasks-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  min-height: calc(100vh - var(--nav-h) - 8rem);
  align-items: stretch;
}

.task-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - var(--nav-h) - 2rem);
}

.task-filters {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.task-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.task-filter-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.task-filters select,
.task-filters input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.84rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.task-filters select {
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  padding-right: 2.25rem;
  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='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
}

.task-filters input[type="search"] {
  padding-left: 2.15rem;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem center;
}

.task-filters input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.task-filters select:hover,
.task-filters input:hover {
  border-color: #cbd5e1;
}

.task-filters select:focus,
.task-filters input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.task-subset-status {
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.task-list {
  overflow-y: auto;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.task-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.task-item:hover {
  background: #f8faff;
}

.task-item.active {
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid var(--accent);
}

.task-item-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
  text-align: left;
  min-width: 0;
}

.task-item-num {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.task-item-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-viewer-header h3 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.task-viewer-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.task-subset-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.task-heading-num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.task-heading-name {
  color: var(--text);
}

.task-item-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  color: var(--muted);
}

.task-viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  min-height: calc(100vh - var(--nav-h) - 2rem);
  overflow: hidden;
}

.task-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.task-viewer-header {
  flex-shrink: 0;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.task-question-preview {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.45;
  max-height: 10rem;
  overflow-y: auto;
}

.task-question-preview.md-body {
  color: var(--text);
}

.task-question-preview.md-body em {
  font-style: italic;
}

.task-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.metric-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.metric-pill strong {
  color: var(--accent);
}

.task-accordion-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.5rem 1.15rem 0.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  position: sticky;
  top: 0;
  z-index: 2;
}

.task-acc-tool {
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.task-acc-tool:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.task-acc-hint {
  flex: 1;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: left;
  align-self: center;
}

.task-accordion {
  flex-shrink: 0;
}

.task-acc-section {
  border-top: 1px solid var(--border);
}

.task-acc-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: var(--surface);
  text-align: left;
}

.task-acc-head:hover {
  background: var(--surface2);
  color: var(--text);
}

.task-acc-section.is-open > .task-acc-head {
  color: var(--accent);
  background: #f8faff;
}

.task-acc-chevron {
  display: inline-block;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.task-acc-section.is-open .task-acc-chevron {
  transform: rotate(90deg);
}

.task-acc-title {
  flex: 0 0 auto;
}

.task-acc-subtitle {
  margin-left: auto;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.task-acc-body {
  display: none;
  padding: 0 1.15rem 1rem;
}

.task-acc-body[hidden] {
  display: none !important;
}

.task-acc-section.is-open .task-acc-body {
  display: block;
}

.task-acc-section.is-open .task-acc-body[hidden] {
  display: none !important;
}

.trajectory {
  padding: 0.25rem 0 0.5rem;
  min-height: 200px;
}

.turn {
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.turn-user {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.turn-assistant {
  background: var(--surface);
}

.turn-role {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.turn-user .turn-role {
  color: #1d4ed8;
}

.turn-thinking {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface2);
  border-radius: 6px;
}

.turn-thinking.md-body {
  font-style: normal;
}

.turn-content {
  font-size: 0.84rem;
  word-break: break-word;
}

.tool-block {
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  background: var(--surface2);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
}

.tool-args {
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.tool-args.md-body {
  font-family: inherit;
  white-space: normal;
}

.tool-result {
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  word-break: break-word;
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.tool-result.md-body {
  font-size: 0.8rem;
}

.trajectory .md-body,
.task-question-preview.md-body {
  line-height: 1.5;
}

.trajectory .md-body > :first-child,
.task-question-preview.md-body > :first-child {
  margin-top: 0;
}

.trajectory .md-body > :last-child,
.task-question-preview.md-body > :last-child {
  margin-bottom: 0;
}

.trajectory .md-body h1,
.trajectory .md-body h2,
.trajectory .md-body h3,
.task-question-preview.md-body h1,
.task-question-preview.md-body h2,
.task-question-preview.md-body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
  color: var(--text);
}

.trajectory .md-body h2,
.task-question-preview.md-body h2 {
  font-size: 0.85rem;
}

.trajectory .md-body h3,
.task-question-preview.md-body h3 {
  font-size: 0.8rem;
}

.trajectory .md-body p,
.task-question-preview.md-body p {
  margin: 0.35rem 0;
}

.trajectory .md-body ul,
.trajectory .md-body ol,
.task-question-preview.md-body ul,
.task-question-preview.md-body ol {
  margin: 0.35rem 0;
  padding-left: 1.25rem;
}

.trajectory .md-body li,
.task-question-preview.md-body li {
  margin: 0.2rem 0;
}

.trajectory .md-body a,
.task-question-preview.md-body a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.trajectory .md-body a:hover,
.task-question-preview.md-body a:hover {
  color: #1d4ed8;
}

.trajectory .md-body strong,
.task-question-preview.md-body strong {
  font-weight: 700;
  color: var(--text);
}

.trajectory .md-body ol,
.task-question-preview.md-body ol {
  list-style: decimal;
}

.trajectory .md-body li > p,
.task-question-preview.md-body li > p {
  margin: 0.15rem 0;
}

.trajectory .md-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface2);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.trajectory .md-body pre {
  margin: 0.5rem 0;
  padding: 0.5rem 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: pre-wrap;
}

.trajectory .md-body pre code {
  background: none;
  padding: 0;
}

.trajectory .md-body blockquote {
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.trajectory .md-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.65rem 0;
}

.trajectory .md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0.5rem 0;
}

.trajectory .md-body th,
.trajectory .md-body td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.ground-truth-panel {
  min-height: 200px;
}

.gt-status {
  margin: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.kg-graph-wrap {
  position: relative;
  margin-top: 0.35rem;
}

.kg-graph-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.kg-fullscreen-btn {
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.kg-fullscreen-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.kg-graph-wrap:fullscreen {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #fff;
  box-sizing: border-box;
}

.kg-graph-wrap:fullscreen .kg-graph {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
}

.kg-graph-wrap:fullscreen .kg-graph-toolbar {
  flex-shrink: 0;
}

.gt-graph {
  margin-top: 0;
}

.gt-legend {
  margin-top: 0.4rem;
}

.kg-extraction {
  padding: 0.15rem 0 0;
}

.kg-extraction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.kg-extraction-head .turn-role {
  margin-bottom: 0;
}

.kg-tabs {
  display: flex;
  gap: 0.25rem;
}

.kg-tab {
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.kg-tab:hover {
  color: var(--text);
}

.kg-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.kg-panel {
  display: none;
}

.kg-panel.active {
  display: block;
}

.kg-graph {
  height: min(420px, 45vh);
  min-height: 280px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.kg-legend,
.kg-note {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
}

.kg-raw {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.7rem;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(420px, 45vh);
  min-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.demo-banner {
  padding: 0.55rem 0.85rem;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #854d0e;
  margin-bottom: 0.75rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero-logo {
    width: min(204px, 82vw);
    margin: 30px auto 30px;
  }

  .hero-brand {
    margin-top: 0;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 10px;
  }

  .h-stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .h-stat:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .h-stat:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .h-stat:last-child:nth-child(odd) {
    border-right: none;
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .hl-grid {
    grid-template-columns: 1fr;
  }

  .tasks-layout {
    grid-template-columns: 1fr;
  }

  .task-sidebar,
  .task-viewer {
    max-height: none;
  }

  .nav-links {
    display: none;
  }
}
