:root {
  --bg: #f6f1e8;
  --bg-alt: #efe6d6;
  --paper: #fffdf8;
  --ink: #1f1a17;
  --ink-soft: #5d544c;
  --ink-muted: #8a7d73;
  --line: rgba(31, 26, 23, 0.12);
  --accent: #b2512d;
  --accent-dark: #8f3d1f;
  --accent-soft: rgba(178, 81, 45, 0.1);
  --accent-2: #2c5e56;
  --accent-2-soft: rgba(44, 94, 86, 0.12);
  --shadow-sm: 0 2px 8px rgba(25, 20, 18, 0.05);
  --shadow-md: 0 18px 34px rgba(25, 20, 18, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(31, 26, 23, 0.04) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(31, 26, 23, 0.04) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

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

code,
pre {
  font-family: "IBM Plex Mono", monospace;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.leaderboard-container {
  width: min(1320px, calc(100% - 28px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.88);
  backdrop-filter: blur(12px);
}

.nav-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Fraunces", serif;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  font-size: 0.98rem;
}

.nav-main {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.site-nav a {
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 160ms ease;
}

.site-nav a:hover::after,
.footer-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(31, 26, 23, 0.12);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
}

.nav-cta-primary {
  background: rgba(44, 94, 86, 0.1);
  color: var(--accent-2);
  border-color: rgba(44, 94, 86, 0.18);
}

.nav-cta-secondary {
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink-soft);
  border-color: rgba(31, 26, 23, 0.1);
}

.nav-cta-cite {
  background: rgba(166, 128, 46, 0.16);
  color: #7d641a;
  border-color: rgba(166, 128, 46, 0.24);
}

.nav-cta-secondary:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  padding: 32px 0 22px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top right, rgba(44, 94, 86, 0.08), transparent 28%),
    radial-gradient(circle at left 20%, rgba(178, 81, 45, 0.12), transparent 26%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 28px;
  align-items: start;
}

.hero-heading {
  margin-bottom: 26px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chip-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.chip-accent {
  border-color: rgba(178, 81, 45, 0.3);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.hero-title,
.section-title,
.motivation-card h3,
.card h3,
.finding-card h3,
.figure-card h3,
.datatype-card h3,
.query-card h3,
.path-card h3,
.tool-card h3,
.panel-title {
  font-family: "Fraunces", serif;
}

.hero-title {
  margin: 0;
  font-size: clamp(3.3rem, 7vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: none;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 1080px;
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  line-height: 1.25;
  color: var(--ink-soft);
}

.gradient-text {
  color: var(--accent);
}

.hero-copy {
  max-width: 720px;
}

.hero-meta {
  display: grid;
  gap: 14px;
}

.hero-meta-row {
  display: grid;
  gap: 8px;
}

.hero-meta-label,
.figure-label,
.card-tag,
.panel-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta-label {
  color: var(--accent-dark);
}

.hero-meta-value {
  min-height: 18px;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.55;
  border-bottom: 1px solid rgba(31, 26, 23, 0.14);
}

.hero-abstract {
  margin-top: 22px;
  max-width: 700px;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 253, 248, 0.85);
  box-shadow: var(--shadow-sm);
}

.hero-abstract p {
  margin: 0;
  color: var(--ink);
}

.abstract-emphasis {
  color: var(--accent-dark);
  font-weight: 800;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  cursor: pointer;
}

.btn-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-soft {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn.disabled {
  opacity: 0.55;
  cursor: default;
}

.btn.disabled:hover {
  transform: none;
}

.hero-note {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.hero-panel {
  align-self: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(239, 230, 214, 0.96));
  box-shadow: var(--shadow-md);
}

.panel-card {
  padding-bottom: 0;
  border-bottom: none;
}

.panel-kicker {
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.hero-points {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.signal-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.signal-card {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.signal-card strong {
  display: block;
  line-height: 1.15;
  font-size: 0.95rem;
}

.signal-card span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.stats-band {
  padding: 18px 0 0;
}

.stats-grid,
.card-grid,
.finding-grid,
.figure-gallery,
.datatype-grid,
.query-grid,
.path-grid,
.tool-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 22px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.stat-card-head {
  min-height: 30px;
  justify-content: center;
}

.stat-num {
  font-family: "Fraunces", serif;
  font-size: 1.95rem;
  line-height: 1;
  color: #8f6a11;
  text-align: center;
}

.stat-label {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-sub {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section {
  padding: 74px 0 66px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(239, 230, 214, 0.72), rgba(246, 241, 232, 0.72));
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 28px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.section-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
}

.overview-text p,
.motivation-card p,
.card p,
.finding-card p,
.figure-card p,
.datatype-card p,
.query-card p,
.path-card p,
.panel-sub,
.explore-lead,
.site-footer p {
  color: var(--ink-soft);
}

.motivation-stack {
  display: grid;
  gap: 10px;
}

.motivation-card,
.card,
.finding-card,
.figure-card,
.tool-shell,
.datatype-card,
.query-card,
.path-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.motivation-card,
.card,
.finding-card,
.figure-card,
.datatype-card,
.query-card,
.path-card {
  padding: 18px 20px;
}

.motivation-card,
.card,
.finding-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.motivation-card::before,
.card::before,
.finding-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.motivation-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.15;
}

.motivation-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.card h3,
.finding-card h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.card p,
.finding-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.68;
}

.mini-card-head,
.signal-card-head,
.stat-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.mini-card-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

.mini-card-head .card-tag {
  margin-bottom: 0;
}

.mini-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-card-icon,
.finding-icon,
.signal-icon,
.stat-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(178, 81, 45, 0.16);
  background: linear-gradient(180deg, rgba(178, 81, 45, 0.12), rgba(178, 81, 45, 0.05));
  color: var(--accent-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mini-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.finding-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.finding-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.signal-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border-color: rgba(166, 128, 46, 0.2);
  background: linear-gradient(180deg, rgba(166, 128, 46, 0.14), rgba(166, 128, 46, 0.05));
  color: #8f6a11;
}

.mini-card-icon-svg,
.finding-icon-svg,
.signal-icon-svg,
.stat-icon-svg {
  display: block;
}

.mini-card-icon-svg {
  width: 18px;
  height: 18px;
}

.finding-icon-svg {
  width: 18px;
  height: 18px;
}

.signal-icon-svg,
.stat-icon-svg {
  width: 16px;
  height: 16px;
}

.mini-card-head h3,
.finding-head h3,
.stat-card-head .stat-label {
  margin: 0;
}

.mini-card-head h3,
.finding-head h3 {
  min-width: 0;
}

.mini-card-copy h3 {
  margin: 0;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benchmark-card-grid {
  margin-top: 28px;
}

.card:nth-child(2)::before,
.finding-card:nth-child(2)::before,
.finding-card:nth-child(4)::before {
  background: var(--accent-2);
}

.finding-card:nth-child(6)::before {
  background: var(--accent);
}

.card:nth-child(3)::before,
.finding-card:nth-child(3)::before,
.finding-card:nth-child(5)::before {
  background: #a6802e;
}

.motivation-card:nth-child(2) .mini-card-icon,
.card:nth-child(2) .mini-card-icon,
.finding-card:nth-child(2) .finding-icon,
.finding-card:nth-child(4) .finding-icon,
.signal-card:nth-child(2) .signal-icon {
  border-color: rgba(44, 94, 86, 0.18);
  background: linear-gradient(180deg, rgba(44, 94, 86, 0.12), rgba(44, 94, 86, 0.05));
  color: var(--accent-2);
}

.finding-card:nth-child(6) .finding-icon {
  border-color: rgba(178, 81, 45, 0.18);
  background: linear-gradient(180deg, rgba(178, 81, 45, 0.12), rgba(178, 81, 45, 0.05));
  color: var(--accent);
}

.motivation-card:nth-child(3) .mini-card-icon,
.card:nth-child(3) .mini-card-icon,
.finding-card:nth-child(3) .finding-icon,
.finding-card:nth-child(5) .finding-icon,
.signal-card:nth-child(3) .signal-icon {
  border-color: rgba(166, 128, 46, 0.2);
  background: linear-gradient(180deg, rgba(166, 128, 46, 0.14), rgba(166, 128, 46, 0.05));
  color: #8f6a11;
}

.card-tag,
.figure-label {
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.overview-figure-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.figure-card.placeholder {
  background:
    linear-gradient(135deg, rgba(178, 81, 45, 0.03), rgba(44, 94, 86, 0.06)),
    var(--paper);
  border-style: dashed;
}

.main-figure-card {
  display: grid;
  gap: 12px;
}

.figure-only-card {
  padding-bottom: 18px;
}

.main-figure-image {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.embedded-note {
  margin-top: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(44, 94, 86, 0.06), rgba(44, 94, 86, 0.03));
}

.embedded-note-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.mini-icon-svg {
  width: 13px;
  height: 13px;
  display: block;
}

.embedded-note .figure-label {
  color: var(--accent-2);
}

.motivation-card:nth-child(2) .mini-card-icon,
.motivation-card:nth-child(3) .mini-card-icon {
  border-color: rgba(178, 81, 45, 0.16);
  background: linear-gradient(180deg, rgba(178, 81, 45, 0.12), rgba(178, 81, 45, 0.05));
  color: var(--accent-dark);
}

.figure-card.note {
  background: var(--bg-alt);
}

.plain-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.compact-list {
  margin-top: 10px;
  font-size: 0.92rem;
}

.compact-list li + li {
  margin-top: 4px;
}

.finding-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.results-shell,
.tool-shell {
  padding: 22px;
}

.leaderboard-shell {
  position: relative;
  border: 1px solid rgba(178, 81, 45, 0.16);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at top right, rgba(44, 94, 86, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 242, 230, 0.98));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.leaderboard-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #cb9465, var(--accent-2));
}

.citation-shell {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.citation-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.copy-citation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(44, 94, 86, 0.22);
  border-radius: 999px;
  background: rgba(44, 94, 86, 0.1);
  color: var(--accent-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.copy-citation-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(44, 94, 86, 0.34);
  background: rgba(44, 94, 86, 0.15);
}

.copy-citation-btn:disabled {
  cursor: wait;
}

.copy-citation-btn.copied {
  border-color: rgba(178, 81, 45, 0.28);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.copy-citation-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.citation-block {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  overflow: auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 0 0 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fade 0.24s ease;
}

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

.panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.panel-title {
  margin: 0;
  font-size: 1.45rem;
}

.panel-sub {
  margin: 0;
  font-size: 0.94rem;
}

.leaderboard-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
  padding-top: 8px;
}

.leaderboard-kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.leaderboard-footnote {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(31, 26, 23, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.legend-pill-strong {
  border-color: rgba(178, 81, 45, 0.24);
  background: rgba(178, 81, 45, 0.1);
  color: var(--accent-dark);
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 2px;
}

.metric-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 0.86rem;
}

.metric-table th,
.metric-table td {
  padding: 9px 6px;
  text-align: center;
  vertical-align: middle;
}

.metric-table th {
  color: var(--ink-muted);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 8px;
  padding-bottom: 9px;
  background: linear-gradient(180deg, rgba(250, 244, 234, 0.96), rgba(255, 253, 248, 0.92));
  border-bottom: 1px solid rgba(31, 26, 23, 0.08);
  text-align: center;
}

.metric-table thead tr:first-child th {
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.metric-table thead tr:nth-child(2) th {
  font-size: 0.62rem;
  line-height: 1.24;
}

.leaderboard-col-rank {
  width: 6%;
}

.leaderboard-col-model {
  width: 20%;
}

.leaderboard-col-metric {
  width: 10.57%;
}

.metric-table tbody td {
  border-top: 1px solid rgba(31, 26, 23, 0.08);
  border-bottom: 1px solid rgba(31, 26, 23, 0.08);
  background: rgba(255, 253, 248, 0.9);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.metric-table tbody td:first-child {
  border-left: 1px solid rgba(31, 26, 23, 0.08);
  border-radius: 14px 0 0 14px;
}

.metric-table tbody td:last-child {
  border-right: 1px solid rgba(31, 26, 23, 0.08);
  border-radius: 0 14px 14px 0;
}

.metric-table tbody tr:hover td {
  transform: translateY(-2px);
  border-color: rgba(178, 81, 45, 0.18);
  background: rgba(255, 253, 248, 0.98);
}

.model-entry {
  display: grid;
  gap: 4px;
}

.model-topline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.model-name {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.24;
  letter-spacing: -0.02em;
  text-align: center;
  overflow-wrap: anywhere;
}

.rank-cell {
  text-align: center;
}

.metric-value-cell {
  min-width: 0;
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.05);
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.rank-badge-top-1 {
  background: rgba(178, 81, 45, 0.14);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(178, 81, 45, 0.18);
}

.rank-badge-top-2 {
  background: rgba(44, 94, 86, 0.12);
  color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(44, 94, 86, 0.16);
}

.rank-badge-top-3 {
  background: rgba(203, 148, 101, 0.15);
  color: #80522a;
  box-shadow: inset 0 0 0 1px rgba(152, 117, 70, 0.16);
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--metric-fill, rgba(255, 255, 255, 0.8));
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 23, 0.04);
}

.metric-chip-empty {
  background: rgba(31, 26, 23, 0.04);
  color: var(--ink-muted);
  box-shadow: inset 0 0 0 1px rgba(31, 26, 23, 0.06);
}

.figure-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.takeaway-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.takeaway-shell {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.takeaway-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.takeaway-column-label {
  margin: 0 0 10px;
  display: flex;
  justify-content: center;
}

.takeaway-label-pill {
  font-size: 0.92rem;
  border-width: 1px;
}

.takeaway-stage {
  min-height: 260px;
  flex: 1;
  display: grid;
}

.takeaway-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(44, 94, 86, 0.08), transparent 34%),
    linear-gradient(180deg, #fffdf8, #faf4ea);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: fade 0.24s ease;
  text-align: center;
}

.takeaway-grid .takeaway-card {
  height: 100%;
  min-height: 260px;
  padding: 24px 26px;
}

#takeaway-experiment-stage {
  min-height: 230px;
  flex: 0 0 auto;
}

#takeaway-experiment-stage .takeaway-card {
  min-height: 230px;
  padding: 18px 24px;
  justify-content: center;
}

#takeaway-experiment-stage .takeaway-statement {
  margin-top: 14px;
}

.takeaway-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.takeaway-card-head {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.takeaway-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.takeaway-page {
  color: var(--ink-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.takeaway-statement {
  margin: 20px 0 0;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.takeaway-grid .takeaway-statement {
  max-width: 34ch;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.takeaway-support {
  width: min(100%, 760px);
  margin: 22px auto 0;
  display: grid;
  gap: 16px;
}

.takeaway-grid .takeaway-support {
  width: 100%;
}

.takeaway-grid .takeaway-detail,
.takeaway-grid .takeaway-bullets {
  font-size: 0.96rem;
  line-height: 1.68;
}

.takeaway-detail {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.72;
  text-align: left;
}

.takeaway-bullets {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.72;
  text-align: left;
}

.takeaway-bullets li + li {
  margin-top: 8px;
}

.takeaway-figure {
  margin: 0;
  display: grid;
  gap: 10px;
}

.takeaway-figure-split {
  grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
  align-items: center;
  gap: 18px;
}

.takeaway-figure-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.takeaway-figure img {
  width: 100%;
  max-height: 240px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  justify-self: center;
}

.takeaway-image-frame {
  width: 100%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.takeaway-image-frame img {
  width: calc(var(--figure-image-scale, 1) * 100%);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.takeaway-grid .takeaway-figure img {
  max-height: 210px;
}

.takeaway-figure-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(31, 26, 23, 0.18);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.takeaway-grid .takeaway-figure-placeholder {
  min-height: 190px;
}

.takeaway-figure figcaption {
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.62;
  text-align: left;
}

.takeaway-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: nowrap;
}

.takeaway-progress {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.takeaway-counter {
  color: var(--ink-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  font-weight: 700;
}

.takeaway-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.takeaway-dot,
.takeaway-btn {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.takeaway-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, width 140ms ease;
}

.takeaway-dot.active {
  width: 28px;
  background: var(--accent);
  border-color: rgba(178, 81, 45, 0.45);
}

.takeaway-btn {
  min-width: 74px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.takeaway-btn:hover:not(:disabled),
.takeaway-dot:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 81, 45, 0.34);
}

.takeaway-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.figure-card img {
  width: 100%;
  display: block;
  margin: 12px 0 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.tool-controls {
  display: grid;
  grid-template-columns: 1.18fr 1.14fr 1fr 0.92fr 0.92fr minmax(250px, 0.98fr);
  gap: 14px 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235d544c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  text-overflow: ellipsis;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(178, 81, 45, 0.16);
  border-color: var(--accent);
}

.tool-controls-actions {
  display: grid;
  gap: 10px;
  align-self: end;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.92);
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-field span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#clear-filters.btn-soft {
  min-height: 34px;
  padding: 0 14px;
  white-space: nowrap;
}

.tool-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 16px 0 18px;
}

.tool-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-summary,
.pill-row,
.alias-row,
.query-meta,
.path-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-count {
  color: var(--ink-soft);
  font-weight: 800;
  white-space: nowrap;
}

.meta-pill,
.soft-pill,
.path-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta-pill {
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tool-family-pill,
.tool-family-pill.tool-family-gold,
.tool-family-pill.tool-family-noisy,
.tool-family-pill.tool-family-blocker {
  background: rgba(166, 128, 46, 0.14);
  color: #7d641a;
}

.tool-subtype-pill {
  background: rgba(44, 94, 86, 0.14);
  color: var(--accent-2);
}

.path-length-pill {
  background: rgba(166, 128, 46, 0.14);
  color: #7d641a;
}

.soft-pill,
.path-pill {
  padding: 6px 10px;
  background: rgba(44, 94, 86, 0.08);
  color: var(--accent-2);
}

.takeaway-column-label .takeaway-label-experiment {
  color: var(--accent-2);
  background: rgba(44, 94, 86, 0.1);
  border-color: rgba(44, 94, 86, 0.18);
}

.takeaway-column-label .takeaway-label-analysis {
  color: #7d641a;
  background: rgba(166, 128, 46, 0.16);
  border-color: rgba(166, 128, 46, 0.24);
}

.takeaway-column-label .takeaway-label-error {
  color: var(--accent-dark);
  background: rgba(178, 81, 45, 0.12);
  border-color: rgba(178, 81, 45, 0.24);
}

.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8, #faf6ef);
}

.tool-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.tool-header > div {
  flex: 1;
  min-width: 0;
}

.tool-header h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tool-header p,
.tool-description,
.path-query,
.query-text {
  margin: 0;
}

.tool-header p {
  color: var(--ink-muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tool-description {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.label-block {
  margin-top: 14px;
}

.label-block strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-card details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.tool-card summary {
  cursor: pointer;
  font-weight: 800;
}

.tool-card pre {
  margin: 10px 0 0;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(31, 26, 23, 0.04);
  font-size: 0.74rem;
}

.datatype-grid,
.query-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.path-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.datatype-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.datatype-field {
  min-width: min(100%, 280px);
}

.datatype-count {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.datatype-card,
.query-card,
.path-card {
  background: var(--paper);
}

.datatype-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.query-header h3 {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.datatype-head h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.datatype-head .meta-pill {
  flex: 0 0 auto;
  white-space: nowrap;
}

.datatype-meta {
  margin-top: 14px;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.datatype-meta-row {
  display: block;
}

.query-foot {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.query-text {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.alias-block {
  margin-top: 16px;
}

.alias-block strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-query {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.path-query-id {
  color: var(--ink-soft);
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.path-card .label-block:first-child {
  margin-top: 0;
}

.path-chain {
  margin-top: 0;
}

.empty-state {
  padding: 30px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--ink-soft);
  text-align: center;
}

.site-footer {
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--ink-soft);
}

.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 160ms ease;
}

@media (max-width: 1080px) {
  .hero-grid,
  .overview-grid,
  .overview-figure-block {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    align-self: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid,
  .finding-grid,
  .figure-gallery,
  .datatype-grid,
  .query-grid,
  .path-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .takeaway-statement {
    max-width: 100%;
  }

  .tool-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1140px);
  }

  .nav-main,
  .nav-row,
  .tool-meta,
  .footer-row,
  .datatype-toolbar,
  .datatype-head,
  .path-head {
    flex-direction: column;
    align-items: start;
  }

  .nav-main {
    width: 100%;
    gap: 12px;
  }

  .nav-actions {
    padding-left: 0;
    border-left: none;
  }

  .stats-grid,
  .card-grid,
  .finding-grid,
  .figure-gallery,
  .datatype-grid,
  .query-grid,
  .path-grid,
  .tool-grid,
  .tool-controls {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .takeaway-figure-split,
  .takeaway-figure-group {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 100%;
  }

  .section {
    padding: 60px 0 54px;
  }

  .metric-table {
    min-width: 620px;
  }

  .takeaway-shell,
  .takeaway-card {
    padding: 18px;
  }

  .takeaway-card-head,
  .takeaway-nav {
    justify-content: center;
    align-items: center;
  }

  .takeaway-progress {
    justify-items: center;
  }

  .citation-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
