/* ===================== THEME ===================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --fg: #1a1d2b;
  --fg-soft: #4a4f63;
  --fg-muted: #7a8097;
  --line: #e7e9f0;
  --accent: #5661f2;       /* indigo */
  --accent-2: #22b8cf;     /* teal  */
  --accent-3: #f06595;     /* pink  */
  --accent-4: #ffa94d;     /* amber */
  --accent-5: #51cf66;     /* green */
  --gradient: linear-gradient(135deg, #5661f2 0%, #22b8cf 55%, #f06595 100%);
  --gradient-soft: linear-gradient(135deg, rgba(86,97,242,.10), rgba(240,101,149,.10));
  --shadow-sm: 0 1px 2px rgba(14, 18, 45, .04), 0 2px 8px rgba(14,18,45,.04);
  --shadow-md: 0 4px 10px rgba(14, 18, 45, .06), 0 20px 40px rgba(14,18,45,.06);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-3); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(86, 97, 242, .85), transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(240, 101, 149, .65), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(34, 184, 207, .65), transparent 55%),
    linear-gradient(135deg, #0f1227 0%, #1d2245 100%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: .7;
}
.hero-inner { position: relative; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}
.chip i { color: #ffd8a8; }
.chip-accent {
  background: linear-gradient(135deg, rgba(255,169,77,.25), rgba(240,101,149,.25));
  border-color: rgba(255, 169, 77, .6);
}

.hero-title {
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
  line-height: 1.02;
  background: linear-gradient(90deg, #fff 0%, #dae1ff 60%, #ffd0e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  color: rgba(255,255,255,.92);
  max-width: 880px;
  margin: 0 0 14px;
}
.hero-subtitle .gradient-text {
  background: linear-gradient(90deg, #ffd8a8, #ffa8c8 60%, #c0d2ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-meta {
  color: rgba(255,255,255,.75);
  font-size: 15.5px;
  max-width: 760px;
  margin: 0 0 32px;
}

.author-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.author { display: flex; flex-direction: column; }
.author-name { font-weight: 600; font-size: 17px; color: #fff; }
.author-aff { color: rgba(255,255,255,.7); font-size: 14px; }

.link-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  cursor: pointer;
}
.btn i { font-size: 15px; }
.btn-primary {
  background: #fff; color: #1a1d2b;
  box-shadow: 0 8px 18px rgba(14,18,45,.2);
}
.btn-primary:hover { transform: translateY(-1px); color: #5661f2; }
.btn-ghost {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.38);
}
.btn-ghost:hover { background: rgba(255,255,255,.10); color: #fff; }

/* ===================== STATS ===================== */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: -44px auto 0;
  position: relative; z-index: 5;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-hl {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}
.stat-hl .stat-num { color: #fff; }
.stat-hl .stat-label, .stat-hl .stat-sub { color: rgba(255,255,255,.88); }
.stat-num {
  font-size: 30px; font-weight: 800;
  letter-spacing: -.02em;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
}
.stat-label { font-size: 14px; font-weight: 600; margin-top: 2px; color: var(--fg); }
.stat-sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }

@media (max-width: 880px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== SECTIONS ===================== */
.section { padding: 88px 0 72px; }
.section-alt { background: var(--bg-alt); }
.section-title {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 38px;
}
.section-num {
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
}

/* ===================== OVERVIEW ===================== */
.overview-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
}
.overview-text p { color: var(--fg-soft); margin: 0 0 16px; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; }
.feature-list li {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--fg-soft);
  font-size: 15px;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list i {
  flex-shrink: 0;
  width: 34px; height: 34px; line-height: 34px;
  background: var(--gradient-soft);
  color: var(--accent);
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
}
.overview-figure img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: #fff;
  border: 1px solid var(--line);
}
.fig-caption {
  font-size: 13px; color: var(--fg-muted);
  margin-top: 10px; text-align: center;
}

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

/* ===================== CARDS ===================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px; background: var(--accent);
}
.card-kg::before    { background: linear-gradient(90deg, #5661f2, #22b8cf); }
.card-bench::before { background: linear-gradient(90deg, #f06595, #ffa94d); }
.card-train::before { background: linear-gradient(90deg, #51cf66, #22b8cf); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.card-icon {
  width: 38px; height: 38px; line-height: 38px;
  border-radius: 10px; text-align: center;
  background: var(--gradient-soft); color: var(--accent);
  font-size: 17px;
}
.card h3 { margin: 0; font-size: 20px; font-weight: 700; }
.card-tag {
  margin-left: auto;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-alt); color: var(--fg-muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase;
}
.card p { color: var(--fg-soft); font-size: 15px; margin: 6px 0 14px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li {
  font-size: 14px; color: var(--fg-soft);
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.mini-list li:first-child { border-top: 0; }
.task-list li { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.d1 { background: #5661f2; }
.d2 { background: #22b8cf; }
.d3 { background: #51cf66; }
.d4 { background: #ffa94d; }
.d5 { background: #f06595; }

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

/* ===================== BENCH ===================== */
.bench-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
  align-items: center;
}
.bench-text p { color: var(--fg-soft); margin: 0 0 14px; font-size: 15.5px; }
.bench-figure img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: #fff; border: 1px solid var(--line);
}
@media (max-width: 860px) { .bench-grid { grid-template-columns: 1fr; } }

/* ===================== FINDINGS ===================== */
.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.finding {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; gap: 18px;
  align-items: flex-start;
  transition: transform .15s ease;
}
.finding:hover { transform: translateY(-3px); }
.finding-num {
  font-size: 34px; font-weight: 800; letter-spacing: -.02em;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  flex-shrink: 0;
  min-width: 74px;
  line-height: 1.05;
}
.finding-body { font-size: 14.5px; color: var(--fg-soft); }
.finding-body b { color: var(--fg); }

.results-callout {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 24px;
  background: var(--gradient-soft);
  border: 1px solid rgba(86, 97, 242, .18);
  border-radius: var(--radius);
  font-size: 15.5px;
  color: var(--fg-soft);
}
.results-callout i {
  color: var(--accent-4);
  font-size: 20px;
  margin-top: 2px;
}
.results-callout b { color: var(--fg); }

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

/* ===================== EXPLORE / TABS (v2) ===================== */
.explore-lead {
  color: var(--fg-soft);
  font-size: 15.5px;
  max-width: 820px;
  margin: -22px 0 28px;
}

/* Tab buttons - cleaner pill group */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--fg-soft);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tab-btn i { font-size: 14px; color: var(--accent); transition: color .15s ease; }
.tab-btn:hover { background: var(--bg-alt); color: var(--fg); }
.tab-btn.active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 16px rgba(86, 97, 242, .3);
}
.tab-btn.active i { color: rgba(255, 255, 255, .95); }

/* Panel header */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.01em;
}
.panel-sub {
  color: var(--fg-soft);
  font-size: 14.5px;
  max-width: 880px;
  margin: 0;
  line-height: 1.6;
}

/* ===== Nodes (v2): showcase cards ===== */
.node-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.node-card {
  --node-color: #5661f2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.node-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(14, 18, 45, .08);
  border-color: color-mix(in srgb, var(--node-color) 40%, white);
}
.node-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--node-color);
}
/* Concept/Skill/Exercise are full; Book/Chapter/Section are compact (span 4/3 depending) */
.node-card:nth-child(1) { grid-column: span 2; }
.node-card:nth-child(2) { grid-column: span 2; }
.node-card:nth-child(3) { grid-column: span 2; }
.node-card:nth-child(4) { grid-column: span 2; }
.node-card-compact { grid-column: span 4/3 auto !important; }

.node-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--node-color) 12%, white);
  color: var(--node-color);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.node-chip i { font-size: 11px; }
.node-name {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 10px;
}
.node-body {
  font-size: 13.5px;
  color: var(--fg-soft);
  line-height: 1.6;
  margin-bottom: 12px;
}
.node-body b { color: var(--fg); font-weight: 600; }
.node-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-alt);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}
.meta-pill code {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.node-card-compact { padding: 16px 16px 12px; }
.node-card-compact .node-name { font-size: 15px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .node-showcase { grid-template-columns: repeat(2, 1fr); }
  .node-card:nth-child(n) { grid-column: span 1; }
}
@media (max-width: 560px) {
  .node-showcase { grid-template-columns: 1fr; }
}

/* ===== Edges (v2): uniform tiles ===== */
.edge-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.edge-tile {
  --etype-color: #5661f2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}
.edge-tile::before {
  content: "";
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--etype-color);
}
.edge-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(14, 18, 45, .08);
  border-color: color-mix(in srgb, var(--etype-color) 35%, white);
}
.edge-tile-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 8px;
}
.edge-tile-head code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--etype-color);
  background: color-mix(in srgb, var(--etype-color) 10%, white);
  padding: 4px 10px;
  border-radius: 6px;
}
.edge-tile-head span {
  font-size: 11.5px;
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.edge-tile-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-alt);
  border-radius: 10px;
}
.epill {
  display: inline-block;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.epill-exe { background: rgba(253, 126, 20, .10); border-color: rgba(253, 126, 20, .3); color: #b85400; }
.epill-skl { background: rgba(18, 184, 134, .10); border-color: rgba(18, 184, 134, .3); color: #087f5b; }
.epill-sec { background: rgba(122, 128, 151, .10); border-color: rgba(122, 128, 151, .25); color: #495057; }
.epill-exp { background: rgba(230, 73, 128, .10); border-color: rgba(230, 73, 128, .3); color: #b02860; }
.epill-cluster { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.earrow {
  color: var(--etype-color);
  font-size: 12px;
  opacity: .75;
}
.edge-tile-evidence {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.55;
  font-style: italic;
  padding-left: 8px;
  border-left: 2px solid var(--line);
  margin-left: 2px;
}

@media (max-width: 900px) { .edge-showcase { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .edge-showcase { grid-template-columns: 1fr; } }

/* ===== Benchmark (v2): numbered tiles ===== */
.bench-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.bench-tile {
  --bt-color-1: #5661f2;
  --bt-color-2: #4b57e3;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.bench-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(14, 18, 45, .08);
}
.bench-tile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--bt-color-1), var(--bt-color-2));
  color: #fff;
}
.bench-tile-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  opacity: .55;
  font-family: 'JetBrains Mono', monospace;
}
.bench-tile-meta { flex: 1; min-width: 0; }
.bench-tile-task {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}
.bench-tile-desc {
  font-size: 12.5px;
  opacity: .88;
  line-height: 1.4;
}
.bench-tile-subject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, .18);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.bench-tile-stem {
  padding: 18px 20px 12px;
  font-size: 14.5px;
  color: var(--fg);
  line-height: 1.6;
  font-weight: 500;
  border-bottom: 1px dashed var(--line);
}
.bench-tile-opts {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bopt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--fg-soft);
  background: var(--bg-alt);
  line-height: 1.5;
  transition: background .15s ease;
}
.bopt-key {
  display: inline-block;
  width: 22px; height: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  line-height: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.bopt.bopt-ok {
  background: rgba(81, 207, 102, .12);
  color: var(--fg);
  font-weight: 500;
}
.bopt.bopt-ok .bopt-key {
  background: #37b24d;
  color: #fff;
  border-color: #37b24d;
}
.bopt.bopt-ok i { margin-left: auto; color: #37b24d; font-size: 14px; }

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

/* ===== Train (v2): chat bubbles ===== */
.train-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(14, 18, 45, .08);
}
.chat-anchor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  color: #fff;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chat-node { background: linear-gradient(135deg, #5661f2, #22b8cf); }
.chat-edge { background: linear-gradient(135deg, #f06595, #fd7e14); }
.chat-badge i { font-size: 10.5px; }
.chat-anchor-tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fg-muted);
}
.chat-anchor-tag .node-pill {
  background: rgba(86, 97, 242, .08);
  color: #3a44bf;
  border: 1px solid rgba(86, 97, 242, .22);
  padding: 2px 9px;
  font-size: 12px;
  border-radius: 999px;
  font-weight: 500;
}
.chat-anchor-tag code {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--accent);
}
.small-arrow { color: var(--fg-muted); font-size: 10px; }

.chat-bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 14px;
  line-height: 1.6;
  font-size: 14px;
}
.chat-q {
  background: var(--bg-alt);
  color: var(--fg);
  align-self: flex-start;
  max-width: 92%;
  border-bottom-left-radius: 4px;
}
.chat-a {
  background: linear-gradient(135deg, rgba(86, 97, 242, .09), rgba(34, 184, 207, .07));
  border: 1px solid rgba(86, 97, 242, .15);
  color: var(--fg);
  align-self: flex-end;
  max-width: 96%;
  border-bottom-right-radius: 4px;
}
.chat-role {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.chat-a .chat-role { color: var(--accent); }
.chat-text { color: var(--fg); }

.node-pill {
  display: inline-block;
  padding: 3px 11px;
  background: rgba(86, 97, 242, .08);
  color: #3a44bf;
  border: 1px solid rgba(86, 97, 242, .22);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}

.boxed {
  background: rgba(81, 207, 102, .16);
  border: 1px solid rgba(81, 207, 102, .34);
  padding: 1px 7px;
  border-radius: 5px;
  color: #2f9e44;
  font-weight: 600;
}

@media (max-width: 900px) { .train-showcase { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { flex-shrink: 0; }
}

/* ===================== TRAINING RESULTS ===================== */
.results-lead {
  color: var(--fg-soft);
  font-size: 15.5px;
  max-width: 880px;
  margin: -22px 0 28px;
  line-height: 1.6;
}
.rtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.rtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--fg-soft);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rtab-btn i { font-size: 14px; color: var(--accent-4); }
.rtab-btn:hover { background: var(--bg-alt); color: var(--fg); }
.rtab-btn.active {
  background: linear-gradient(135deg, #ffa94d, #f06595);
  color: #fff;
  box-shadow: 0 6px 16px rgba(240, 101, 149, .28);
}
.rtab-btn.active i { color: #fff; }

.rpanel { display: none; }
.rpanel.active { display: block; animation: fade .3s ease; }
.rpanel-sub {
  color: var(--fg-soft);
  font-size: 14.5px;
  max-width: 880px;
  margin: 0 0 22px;
  line-height: 1.6;
}

/* ---- K12-Bench Leaderboard ---- */
.lb-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.lb-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: .02em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lb-group-title i { color: var(--accent); }
.lb-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.lb-name {
  color: var(--fg-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-row-best .lb-name { color: var(--fg); font-weight: 700; }
.lb-crown { color: #f59f00; margin-left: 4px; }
.lb-bar-wrap {
  position: relative;
  height: 20px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.lb-bar {
  height: 100%;
  background: linear-gradient(90deg, #5661f2, #4b57e3);
  border-radius: 6px;
  transition: width 1s ease;
}
.lb-bar-best { background: linear-gradient(90deg, #5661f2, #22b8cf); box-shadow: 0 2px 10px rgba(86, 97, 242, .4); }
.lb-bar-api { background: linear-gradient(90deg, #f06595, #e64980); }
.lb-bar-api-best { background: linear-gradient(90deg, #f06595, #ffa94d); box-shadow: 0 2px 10px rgba(240, 101, 149, .4); }
.lb-val {
  position: absolute;
  right: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
}
.lb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--bg-alt);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--fg-muted);
}
.lb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lb-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lb-dot-os  { background: linear-gradient(90deg, #5661f2, #4b57e3); }
.lb-dot-api { background: linear-gradient(90deg, #f06595, #e64980); }
.lb-legend i { color: #f59f00; }
.lb-legend-sep { margin-left: auto; font-style: italic; }

@media (max-width: 820px) { .lb-wrap { grid-template-columns: 1fr; } }

/* ---- GaokaoBench / EduEval chart duo ---- */
.chart-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.chart-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -.01em;
}
.chart-tag {
  padding: 3px 10px;
  background: var(--bg-alt);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--fg-muted);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.chart-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cbar {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}
.cbar-name {
  color: var(--fg-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbar-name i { margin-left: 4px; color: #f59f00; font-size: 11px; }
.cbar-wrap {
  height: 14px;
  background: var(--bg-alt);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.cbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #adb5bd, #868e96);
  border-radius: 5px;
  transition: width 1s ease;
}
.cbar-fill.cbar-dim { background: linear-gradient(90deg, #dee2e6, #ced4da); }
.cbar-fill.cbar-instruct { background: linear-gradient(90deg, #868e96, #495057); }
.cbar-fill.cbar-ours {
  background: linear-gradient(90deg, #5661f2, #22b8cf, #f06595);
  box-shadow: 0 2px 10px rgba(86, 97, 242, .35);
}
.cbar-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}
.cbar-best .cbar-name { color: var(--fg); font-weight: 700; }
.cbar-best .cbar-val { color: var(--accent); }
.cbar-divider {
  margin: 10px 0 6px;
  padding: 4px 0;
  border-top: 1px dashed var(--line);
}
.cbar-divider span {
  display: inline-block;
  font-size: 11.5px;
  color: var(--fg-muted);
  font-style: italic;
  letter-spacing: .02em;
  margin-top: 6px;
}
.chart-delta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(86, 97, 242, .06), rgba(240, 101, 149, .06));
  border: 1px solid rgba(86, 97, 242, .15);
  border-radius: 10px;
  font-size: 13px;
  color: var(--fg-soft);
  line-height: 1.55;
}
.chart-delta i { color: #2f9e44; margin-top: 3px; }
.chart-delta b { color: var(--fg); }

@media (max-width: 900px) { .chart-duo { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .cbar { grid-template-columns: 100px 1fr 55px; font-size: 12px; }
  .lb-row { grid-template-columns: 140px 1fr; font-size: 12px; }
}

.results-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(255, 169, 77, .10), rgba(240, 101, 149, .10));
  border: 1px solid rgba(240, 101, 149, .22);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.6;
}
.results-summary i { color: #f59f00; font-size: 20px; margin-top: 2px; }
.results-summary b { color: var(--fg); }


/* ===================== EXAMPLE ===================== */
.example-wrap {
  max-width: 900px;
  margin: 0 auto;
}
.example-wrap img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: #fff; border: 1px solid var(--line);
}

/* ===================== ACCESS ===================== */
.access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.access-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  color: var(--fg);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.access-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(86, 97, 242, .4);
  color: var(--fg);
}
.access-card i {
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 14px;
}
.access-card h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.access-card p { margin: 0 0 14px; color: var(--fg-soft); font-size: 14px; }
.access-card .link-arrow {
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.access-card.access-static { cursor: default; }
.access-card.access-static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.muted { color: var(--fg-muted); font-size: 12.5px; }

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

/* ===================== PAPER / BIBTEX ===================== */
.paper-note {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-soft); font-size: 15px;
  margin: 0 0 22px;
}
.paper-note i { color: var(--accent-2); }

.bibtex-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.bibtex-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
  color: var(--fg);
}
.bibtex-head i { color: var(--accent); margin-right: 6px; }
.copy-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.copy-btn:hover { background: var(--bg-alt); border-color: var(--accent); color: var(--accent); }
.bibtex-card pre {
  margin: 0; padding: 18px 20px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  color: var(--fg);
  background: #fff;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ===================== FOOTER ===================== */
.footer {
  background: #0f1227;
  color: rgba(255,255,255,.78);
  padding: 42px 0 36px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.footer-title {
  font-weight: 700; font-size: 17px; color: #fff;
  letter-spacing: -0.01em;
}
.footer-sub { font-size: 13.5px; color: rgba(255,255,255,.56); }
.footer-links { display: flex; gap: 14px; justify-content: center; }
.footer-links a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.footer-links a:hover { background: var(--accent); transform: translateY(-2px); }
.footer-copy { font-size: 12.5px; color: rgba(255,255,255,.52); text-align: right; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-copy { text-align: center; }
}
